pre cw with probe and a bunch script to read game behavior

This commit is contained in:
CAtlas0784 committed 2026-10-21 20:40:13 +07:00
1 parent 5120219ae2
commit da8a32f60d
310 files changed
+219693 -872

No files matched your search

@@ -72,13 +72,14 @@ func loadChallengeScene(s *Session, entryID, targetGroupID, monsterID, eventID u
// load all props in the arena scene (do not filter out prop groups like group 2 / group 3)
propEntityID := uint32(1000)
s.PropEntities = map[uint32]PropEntry{}
s.CurrentSceneFloor = floorID
for _, gid := range sortedU32Keys2(scene.Scenes) {
group := scene.Scenes[gid]
groupInfo := &goproto.SceneEntityGroupInfo{State: 1, GroupId: gid}
groupInfo := &goproto.SceneEntityGroupInfo{State: 1, GroupId: gid, PropertyMap: s.sceneGroupProperties(floorID, gid, scene.GroupProperties[gid])}
for i := range group.Props {
prop := &group.Props[i]
propEntityID++
s.PropEntities[propEntityID] = PropEntry{PropID: prop.PropID, InstID: prop.InstID, State: prop.PropState}
s.PropEntities[propEntityID] = PropEntry{GroupID: prop.GroupID, PropID: prop.PropID, InstID: prop.InstID, State: prop.PropState}
groupInfo.EntityList = append(groupInfo.EntityList, &goproto.SceneEntityInfo{
InstId: prop.InstID,
GroupId: prop.GroupID,
@@ -97,6 +98,7 @@ func loadChallengeScene(s *Session, entryID, targetGroupID, monsterID, eventID u
// single boss monster (entity 30001, registered for SceneCastSkill battles)
monsterGroup := &goproto.SceneEntityGroupInfo{State: 1, GroupId: targetGroupID}
s.MonsterEntities = map[uint32]uint32{30001: eventID}
s.SceneMonsterIdentities = map[uint32]sceneMonsterIdentity{30001: {MonsterID: monsterID, GroupID: targetGroupID}}
s.ChallengeStageID = eventID
monsterGroup.EntityList = append(monsterGroup.EntityList, &goproto.SceneEntityInfo{
InstId: instID,
@@ -107,7 +109,7 @@ func loadChallengeScene(s *Session, entryID, targetGroupID, monsterID, eventID u
NpcMonster: &goproto.SceneNpcMonsterInfo{
MonsterId: monsterID,
EventId: eventID,
WorldLevel: 6,
WorldLevel: playerWorldLevel,
},
},
})
@@ -179,12 +181,11 @@ func handleStartChallengePeak(s *Session, req *goproto.StartChallengePeakCsReq,
return nil
}
previousConfig := s.ChallengeBattleConfig
if err := setChallengeBattleConfig(s, avatars, peakID, eventID, buffs); err != nil {
if err := setPeakBattleConfig(s, avatars, peakID, eventID, buffs); err != nil {
SceneDebugLog("[PEAK] stage rejected: %v", err)
rsp.Retcode = uint32(goproto.Retcode_RET_CHALLENGE_NOT_EXIST)
return nil
}
s.ChallengeBattleConfig.BattleType = common.BattleTypeAA
sceneInfo, _, err := loadChallengeScene(s, stage.Entrance, stage.Group, monsterID, eventID, avatars)
if err != nil {
s.ChallengeBattleConfig = previousConfig