fix: restore battle entry and character profile initialization
This commit is contained in:
1 parent
cfbbc7b970
commit
5c4d0d4149
16 files changed
+888
-228
No files matched your search
@@ -206,8 +206,8 @@ func (a *AvatarJson) ToBattleAvatarProto(index uint32, lightcone *Lightcone, rel
|
||||
EnhancedId: enhancedID,
|
||||
IGDEHGIKFJA: exRanks,
|
||||
SpBar: &goproto.SpBarInfo{
|
||||
CurSp: a.SPCur(),
|
||||
MaxSp: a.SPMaxVal(),
|
||||
CurSp: a.BattleSPCur(),
|
||||
MaxSp: battleRatioScale,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -227,11 +227,12 @@ func (a *AvatarJson) ToBattleAvatarProto(index uint32, lightcone *Lightcone, rel
|
||||
var buffs []*goproto.BattleBuff
|
||||
for _, buffID := range a.Techniques {
|
||||
buffs = append(buffs, &goproto.BattleBuff{
|
||||
Id: buffID,
|
||||
Level: 1,
|
||||
OwnerId: index,
|
||||
WaveFlag: 0xffffffff,
|
||||
DynamicValues: map[string]float32{"SkillIndex": 2.0},
|
||||
Id: buffID,
|
||||
Level: 1,
|
||||
OwnerId: index,
|
||||
WaveFlag: 0xffffffff,
|
||||
TargetIndexList: []uint32{0},
|
||||
DynamicValues: map[string]float32{"SkillIndex": 0},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -310,13 +311,10 @@ func ToLineupInfo(lineups map[uint32]uint32) *goproto.LineupInfo {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
func (m *Monster) ToSceneMonster() *goproto.SceneMonster {
|
||||
hp := m.MaxHP
|
||||
if hp == 0 {
|
||||
hp = 10000
|
||||
}
|
||||
return &goproto.SceneMonster{
|
||||
MonsterId: m.MonsterID,
|
||||
MaxHp: hp,
|
||||
// Zero requests the stage's normal HP, as in PearlSR addMonsterWaves.
|
||||
MaxHp: m.MaxHP,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user