diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index a1e780a..5a3cf20 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -2757,3 +2757,8 @@ Weapon* Creature::ChooseNextSpecWeapon(int curr_weapon_slot_id) } return next_weapon; } + +void Creature::OnBattleStart(Room* room) +{ + +} diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index 5b9670c..58ee4d4 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -89,6 +89,7 @@ class Creature : public MoveableEntity virtual bool Attackable(Room* room) override; virtual bool ReceiveExplosionDmg(Explosion* explosion) override; virtual bool IsCreature(Room* room) override { return true;}; + virtual void OnBattleStart(Room* room) override; bool HasBuffEffect(int buff_effect_id); Buff* GetBuffByEffectId(int effect_id); Buff* GetBuffById(int buff_id); diff --git a/server/gameserver/entity.h b/server/gameserver/entity.h index a4f7d03..f8e90c2 100644 --- a/server/gameserver/entity.h +++ b/server/gameserver/entity.h @@ -40,6 +40,7 @@ class Entity virtual void OnExplosionHit(Explosion* explosion) {}; virtual void OnAddToTargetPartObject(Entity* target) {}; virtual void OnRemoveFromTargetPartObject(Entity* target) {}; + virtual void OnBattleStart(Room* room) {}; virtual bool CanSeeMe(Human* hum) { return true; }; virtual bool Attackable(Room* room) { return false; }; virtual bool ReceiveExplosionDmg(Explosion* explosion) { return false; }; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 4a1015d..ad92918 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -1400,6 +1400,7 @@ void Room::UpdateGasJump() InitAirRaid(); } ClearPostBattleAutoFreeList(); + OnBattleStart(); } } @@ -4031,3 +4032,8 @@ void Room::ClearPostBattleAutoFreeList() } } } + +void Room::OnBattleStart() +{ + +} diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 307acd3..e77b849 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -270,6 +270,7 @@ private: void InitAndroidAI(); void ForwardGasRing(int n); void InternalRemoveObjectLater(Entity* entity, a8::XTimerAttacher& entity_xtimer_attacher); + void OnBattleStart(); void ClearPostBattleAutoFreeList(); #ifdef DEBUG diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 9257685..ad9e69e 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -266,6 +266,7 @@ message Buff optional int32 dead_valid = 23; optional int32 buff_interval = 24; optional string tag = 25; + optional int32 post_battle_valid = 26; } message Drop