[Packets] Added some more entity creation related and quest related Packets

* EvtCreateGadgetNotify
* EvtDestroyGadgetNotify
* EvtDoSkillSuccNotify
* QuestCreateEntityReq
* QuestCreateEntityRsp
* QuestDestroyEntityReq
* QuestDestroyEntityRsp
* QuestGlobalVarNotify
* QuestDelNotify
* QuestListNotify
* QuestListUpdateNotify
* SceneCreateEntityReq
* SceneCreateEntityRsp
* SceneDestroyEntityReq
* SceneDestroyEntityRsp
* SceneForceLockNotify
This commit is contained in:
hartie95 2024-02-23 02:38:16 +01:00
parent 0a0aa6fd99
commit c94d04363b
24 changed files with 412 additions and 0 deletions

View File

@ -188,6 +188,10 @@ internal interface ActivityInfo {
// FontaineGatherInfo::class,
// GcgPvePuzzleInfo::class,
// 4.1.0 TODO
// NEW_ACTIVITY_COLLECT_UNDERWATER
// NEW_ACTIVITY_QUICK_TIME_COMBAT
// NEW_ACTIVITY_POETRY_FESTIVAL
// NEW_ACTIVITY_FISHBLASTER
// 4.2.0 TODO
// 4.3.0 TODO
]

View File

@ -0,0 +1,38 @@
package data.battle
import data.general.Vector
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.NOTIFY)
internal interface EvtCreateGadgetNotify {
var forwardType: ForwardType
var entityId: Int
var configId: Int
var campId: Int
var campType: Int
var initPos: Vector
var initEulerAngles: Vector
var guid: Long
var ownerEntityId: Int
var targetEntityId: Int
var isAsyncLoad: Boolean
var targetLockPointIndex: Int
@AddedIn(Version.GI_CB2)
var roomId: Int
@AddedIn(Version.GI_1_0_0)
var propOwnerEntityId: Int
@AddedIn(Version.GI_1_2_0)
var sightGroupWithOwner: Boolean
@AddedIn(Version.GI_2_4_0)
var isPeerIdFromPlayer: Boolean
@AddedIn(Version.GI_2_6_0)
var isTrueLifeTimeByOwner: Boolean
@AddedIn(Version.GI_2_7_0)
var targetEntityIdList: List<Int>
@AddedIn(Version.GI_2_7_0)
var targetLockPointIndexList: List<Int>
}

View File

@ -0,0 +1,13 @@
package data.battle
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.NOTIFY)
internal interface EvtDestroyGadgetNotify {
var forwardType: ForwardType
var entityId: Int
}

View File

@ -0,0 +1,16 @@
package data.battle
import data.general.Vector
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.NOTIFY)
internal interface EvtDoSkillSuccNotify {
var forwardType: ForwardType
var casterId: Int
var skillId: Int
var forward: Vector
}

View File

@ -0,0 +1,30 @@
package data.battle
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoEnum
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.AltName
@AddedIn(GI_CB1)
@ProtoEnum
internal enum class ForwardType {
@AltName("FORWARD_TYPE_LOCAL")
FORWARD_LOCAL,
@AltName("FORWARD_TYPE_TO_ALL")
FORWARD_TO_ALL,
@AltName("FORWARD_TYPE_TO_ALL_EXCEPT_CUR")
FORWARD_TO_ALL_EXCEPT_CUR,
@AltName("FORWARD_TYPE_TO_HOST")
FORWARD_TO_HOST,
@AltName("FORWARD_TYPE_TO_ALL_GUEST")
FORWARD_TO_ALL_GUEST,
@AltName("FORWARD_TYPE_TO_PEER")
FORWARD_TO_PEER,
@AltName("FORWARD_TYPE_TO_PEERS")
FORWARD_TO_PEERS,
@AltName("FORWARD_TYPE_ONLY_SERVER")
FORWARD_ONLY_SERVER,
@AltName("FORWARD_TYPE_TO_ALL_EXIST_EXCEPT_CUR")
FORWARD_TO_ALL_EXIST_EXCEPT_CUR,
}

View File

@ -0,0 +1,12 @@
package data.general.entity
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1)
@ProtoModel("CreateGadgetInfo")
internal interface Chest {
var chestDropId: Int
var isShowCutscene: Boolean
}

View File

@ -0,0 +1,41 @@
package data.general.entity
import data.general.Vector
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.RemovedIn
import org.anime_game_servers.core.base.annotations.proto.OneOf
import org.anime_game_servers.core.base.annotations.proto.OneOfEntry
import org.anime_game_servers.core.base.annotations.proto.OneOfType
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1)
@ProtoModel
internal interface CreateEntityInfo {
var level: Int
var pos: Vector
var rot: Vector
var dropId: Int
var sceneId: Int
var roomId: Int
var clientUniqueId: Int
@AddedIn(Version.GI_CB2) @RemovedIn(Version.GI_0_9_0)
var alias: Long
@AddedIn(Version.GI_CB2) @RemovedIn(Version.GI_0_9_0)
var metaPathIndex: Int
@AddedIn(Version.GI_CB2) @RemovedIn(Version.GI_0_9_0)
var canCreateInOtherPlayerWorld: Boolean
@OneOf(
OneOfEntry(Int::class, "monster_id"),
OneOfEntry(Int::class, "npc_id"),
OneOfEntry(Int::class, "gadget_id"),
OneOfEntry(Int::class, "item_id"),
)
var entity : OneOfType
@OneOf(
OneOfEntry(CreateGadgetInfo::class, "gadget"),
)
var entityCreateInfo : OneOfType
}

View File

@ -0,0 +1,13 @@
package data.general.entity
import data.scene.entity.GadgetBornType
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_CB1)
@ProtoModel
internal interface CreateGadgetInfo {
var bornType: GadgetBornType
var chest: Chest
}

View File

@ -0,0 +1,34 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.Version.GI_CB2
import org.anime_game_servers.core.base.Version.GI_1_4_0
@AddedIn(GI_CB1)
@ProtoModel
internal interface Quest {
var questId: Int
var state: Int
var startTime: Int
var isRandom: Boolean
var parentQuestId: Int
var questConfigId: Int
var startGameTime: Int
@AddedIn(GI_CB2)
var acceptTime: Int
@AddedIn(GI_CB2)
var lackedNpcList:List<Int>
@AddedIn(GI_CB2)
var finishProgressList: List<Int>
@AddedIn(GI_CB2)
var failProgressList: List<Int>
@AddedIn(GI_CB2)
var lackedNpcMap: Map<Int, Int>
@AddedIn(GI_1_4_0)
var lackedPlaceList: List<Int>
@AddedIn(GI_1_4_0)
var lackedPlaceMap: Map<Int, Int>
}

View File

@ -0,0 +1,17 @@
package data.quest
import data.general.entity.CreateEntityInfo
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.REQUEST)
internal interface QuestCreateEntityReq {
var entity: CreateEntityInfo
var questId: Int
var isRewind: Boolean
@AddedIn(Version.GI_0_9_0)
var parentQuestId: Int
}

View File

@ -0,0 +1,19 @@
package data.quest
import data.general.entity.CreateEntityInfo
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.RESPONSE)
internal interface QuestCreateEntityRsp {
var entityId: Int
var entity: CreateEntityInfo
var questId: Int
var isRewind: Boolean
@AddedIn(Version.GI_0_9_0)
var parentQuestId: Int
var retCode: Int
}

View File

@ -0,0 +1,11 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(GI_CB1)
@ProtoModel
internal interface QuestDelNotify {
var questId: Int
}

View File

@ -0,0 +1,15 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.REQUEST)
internal interface QuestDestroyEntityReq {
var entityId: Int
var questId: Int
@AddedIn(Version.GI_0_9_0)
var sceneId: Int
}

View File

@ -0,0 +1,16 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.RESPONSE)
internal interface QuestDestroyEntityRsp {
var entityId: Int
var questId: Int
@AddedIn(Version.GI_0_9_0)
var sceneId: Int
var retCode: Int
}

View File

@ -0,0 +1,12 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(Version.GI_1_0_0)
@ProtoModel
internal interface QuestGlobalVar {
var value: Int
var key: Int
}

View File

@ -0,0 +1,11 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version.GI_1_0_0
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(GI_1_0_0)
@ProtoModel
internal interface QuestGlobalVarNotify {
var varList: List<QuestGlobalVar>
}

View File

@ -0,0 +1,11 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(GI_CB1)
@ProtoModel
internal interface QuestListNotify {
var questList: List<Quest>
}

View File

@ -0,0 +1,11 @@
package data.quest
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version.GI_CB1
import org.anime_game_servers.core.base.annotations.proto.ProtoModel
@AddedIn(GI_CB1)
@ProtoModel
internal interface QuestListUpdateNotify {
var questList: List<Quest>
}

View File

@ -0,0 +1,17 @@
package data.scene
import data.general.entity.CreateEntityInfo
import data.scene.entity.CreateReason
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.REQUEST)
internal interface SceneCreateEntityReq {
var entity: CreateEntityInfo
var reason: CreateReason
@AddedIn(Version.GI_CB2)
var isDestroyWhenDisconnect: Boolean
}

View File

@ -0,0 +1,15 @@
package data.scene
import data.general.entity.CreateEntityInfo
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.RESPONSE)
internal interface SceneCreateEntityRsp {
var entityId: Int
var entity: CreateEntityInfo
var retCode: Int
}

View File

@ -0,0 +1,12 @@
package data.scene
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.REQUEST)
internal interface SceneDestroyEntityReq {
var entityId: Int
}

View File

@ -0,0 +1,13 @@
package data.scene
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.RESPONSE)
internal interface SceneDestroyEntityRsp {
var entityId: Int
var retCode: Int
}

View File

@ -0,0 +1,14 @@
package data.scene
import org.anime_game_servers.core.base.annotations.AddedIn
import data.general.Vector
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.CommandType
import org.anime_game_servers.core.base.annotations.proto.ProtoCommand
@AddedIn(Version.GI_CB1)
@ProtoCommand(CommandType.NOTIFY)
internal interface SceneForceLockNotify {
var forceIdList: List<Int>
}

View File

@ -0,0 +1,17 @@
package data.scene.entity
import org.anime_game_servers.core.base.annotations.AddedIn
import org.anime_game_servers.core.base.Version
import org.anime_game_servers.core.base.annotations.proto.AltName
import org.anime_game_servers.core.base.annotations.proto.ProtoEnum
@AddedIn(Version.GI_CB1)
@ProtoEnum
internal enum class CreateReason {
@AltName("CREATE_REASON_NONE")
CREATE_NONE,
@AltName("CREATE_REASON_QUEST")
CREATE_QUEST,
@AltName("CREATE_REASON_ENERGY")
CREATE_ENERGY,
}