diff --git a/server/gameserver/buff.cc b/server/gameserver/buff.cc index 6d06f264..c0a2523c 100644 --- a/server/gameserver/buff.cc +++ b/server/gameserver/buff.cc @@ -160,7 +160,7 @@ void Buff::InternalTimerAddBuff() } }; auto timer_after_func = - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { SkillCasterState* caster_state = (SkillCasterState*)param.param1.GetUserData(); delete caster_state; @@ -487,7 +487,7 @@ void Buff::ProcSprint() } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { std::map* hited_objects = (std::map*) param.param1.GetUserData(); @@ -756,7 +756,7 @@ void Buff::ProcAutoShot() } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Buff* buff = (Buff*)param.sender.GetUserData(); if (buff->owner->IsHuman()) { diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index edcd8ee8..7a58d950 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -221,7 +221,7 @@ void Bullet::ProcBomb() #endif }, &room->timer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { } ); @@ -360,7 +360,7 @@ void Bullet::ProcSmokeBomb() { }, &room->timer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { SmokeMiTask* task = (SmokeMiTask*)param.sender.GetUserData(); task->Done(); @@ -695,7 +695,7 @@ void Bullet::ProcFragBomb(int delay_time) task->Done(); }, &task->timer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { FragMiTask* task = (FragMiTask*)param.sender.GetUserData(); delete task; @@ -749,7 +749,7 @@ void Bullet::ProcC4Bomb(Car* target, int delay_time) task->Done(); }, &task->timer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { FragMiTask* task = (FragMiTask*)param.sender.GetUserData(); delete task; diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index c1146cc7..ba6f193d 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -211,7 +211,7 @@ int Creature::AddBuff(Creature* caster, c->RemoveBuffByUniId(param.param1); }, &buff->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Buff* buff = (Buff*)param.param2.GetUserData(); if (buff->remover_timer) { @@ -341,7 +341,7 @@ std::weak_ptr Creature::TryDelayAddBuff(Creature* caster, int buf } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { DelayAddBuffHandle* handle = (DelayAddBuffHandle*)param.param3.GetUserData(); delete handle; @@ -1016,7 +1016,7 @@ void Creature::ProcSkillPhase(MetaData::SkillPhase* phase) c->context_pos = old_context_pos; }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { }); @@ -2913,7 +2913,7 @@ Hero* Creature::InternalSummonHero(Buff* buff, MetaData::Player* hero_meta, a8:: { }, &hero->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { }); @@ -2927,7 +2927,7 @@ Hero* Creature::InternalSummonHero(Buff* buff, MetaData::Player* hero_meta, a8:: #endif }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { SummonHeroInfo* summon_info = (SummonHeroInfo*)param.param1.GetUserData(); delete summon_info; @@ -3002,7 +3002,7 @@ void Creature::AutoSwitchWeapon() param, switch_func, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Creature* c = (Creature*)param.sender.GetUserData(); c->auto_switch_weapon_timer_ = nullptr; @@ -3043,7 +3043,7 @@ void Creature::CheckLoadingBullet() } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Creature* c = (Creature*)param.sender.GetUserData(); if (c->reload_delay_timer_) { @@ -3435,7 +3435,7 @@ void Creature::LockAttackDir(int time) Creature* c = (Creature*)param.sender.GetUserData(); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Creature* c = (Creature*)param.sender.GetUserData(); c->DecDisableAttackDirTimes(); diff --git a/server/gameserver/explosion.cc b/server/gameserver/explosion.cc index 76469f36..d0504fba 100644 --- a/server/gameserver/explosion.cc +++ b/server/gameserver/explosion.cc @@ -185,7 +185,7 @@ void Explosion::InternalAttack() (*self)->ProcDamage(); }, &room_->xtimer_attacher_.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { auto self = (std::shared_ptr*)param.sender.GetUserData(); delete self; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 4ac00745..e41c9eb5 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1131,7 +1131,7 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id, ); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { KillInfo* info = (KillInfo*)param.param1.GetUserData(); delete info; @@ -1247,7 +1247,7 @@ void Human::DecHP(float dec_hp, int killer_id, const std::string& killer_name, i .SetParam1(info), downed_func, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { DownedInfo* info = (DownedInfo*)param.param1.GetUserData(); delete info; @@ -2934,7 +2934,7 @@ void Human::Revive() .SetSender(this), callback, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Human* hum = (Human*)param.sender.GetUserData(); hum->revive_timer = nullptr; @@ -3354,7 +3354,7 @@ void Human::ProcUseItemAction() } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Human* hum = (Human*)param.sender.GetUserData(); hum->pain_killer_timer = nullptr; @@ -3915,7 +3915,7 @@ void Human::StartRefreshViewTimer() hum->UpdateViewObjects(); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Human* hum = (Human*)param.sender.GetUserData(); hum->refresh_view_timer_ = nullptr; @@ -4522,7 +4522,7 @@ void Human::DoFollow(int target_id) } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Player* hum = (Player*)param.sender.GetUserData(); hum->follow_target_timer_ = nullptr; @@ -4650,7 +4650,7 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we hum->SendGameOver(); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Human* hum = (Human*)param.sender.GetUserData(); hum->dead_timer = nullptr; diff --git a/server/gameserver/incubator.cc b/server/gameserver/incubator.cc index 50aa96fd..65254c44 100644 --- a/server/gameserver/incubator.cc +++ b/server/gameserver/incubator.cc @@ -46,7 +46,7 @@ void Incubator::InitPve() incubator->OnEnterNewWave(param.param1.GetInt()); }, &xtimer_attacher_.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { int wave = param.param1.GetInt(); Incubator* incubator = (Incubator*)param.sender.GetUserData(); diff --git a/server/gameserver/killmgr.cc b/server/gameserver/killmgr.cc index d3809791..b6f0126b 100644 --- a/server/gameserver/killmgr.cc +++ b/server/gameserver/killmgr.cc @@ -218,7 +218,7 @@ void KillMgr::BoradcastRollMsg(Human* dead_hum, *pb_msg); }, &dead_hum->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { KillInfo* info = (KillInfo*)param.param1.GetUserData(); std::shared_ptr* pb_msg = (std::shared_ptr*) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 84bd2f1b..1458b53d 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -765,7 +765,7 @@ void Player::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg) } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { }); } @@ -1460,7 +1460,7 @@ void Player::CheckShotHoldState(Weapon* weapon) } }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Human* hum = (Human*)param.sender.GetUserData(); hum->RemoveBuffById(param.param1); @@ -1504,7 +1504,7 @@ void Player::AsyncRequestWatchWar(bool send_rsp_msg) .SetSender(this), cb, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Player* hum = (Player*)param.sender.GetUserData(); hum->watch_war_req_timer_ = nullptr; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 64edb135..fa40e9f9 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -1349,7 +1349,7 @@ void Room::UpdateGasInactivePvp() } }, &xtimer_attacher_.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Room* room = (Room*)param.sender.GetUserData(); room->auto_jump_timer_ = nullptr; @@ -2665,7 +2665,7 @@ void Room::ShuaAndroidTimerFunc() room->ShuaAndroidTimerFunc(); }, &xtimer_attacher_.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { } ); @@ -2706,7 +2706,7 @@ void Room::DieAndroidTimerFunc() room->DieAndroidTimerFunc(); }, &xtimer_attacher_.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { } ); diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index 3e8f0642..0e2c90f5 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -526,7 +526,7 @@ void RoomObstacle::ActiveAirDrop() obstacle->BroadcastFullState(obstacle->room); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { int i = 0; }); diff --git a/server/gameserver/shot.cc b/server/gameserver/shot.cc index 3ffc4575..18bd8ea9 100644 --- a/server/gameserver/shot.cc +++ b/server/gameserver/shot.cc @@ -260,7 +260,7 @@ static void InternalCreateBullet(BulletInfo& bullet_info) InternalCreateBullet(*info_copy); }, &bullet_info.c.Get()->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { BulletInfo* info_copy = (BulletInfo*)param.sender.GetUserData(); delete info_copy; diff --git a/server/gameserver/skill.cc b/server/gameserver/skill.cc index 6cc82eb5..a3d91174 100644 --- a/server/gameserver/skill.cc +++ b/server/gameserver/skill.cc @@ -194,7 +194,7 @@ void Skill::AddMinorMode( Skill* skill = (Skill*)param.sender.GetUserData(); }, &owner->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { Skill* skill = (Skill*)param.sender.GetUserData(); skill->minor_type_ = SMT_NONE; @@ -907,7 +907,7 @@ void Skill::ProcFH() skill->meta); }, &xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { } ); diff --git a/server/gameserver/trigger.cc b/server/gameserver/trigger.cc index 341474cc..ae07ce8c 100644 --- a/server/gameserver/trigger.cc +++ b/server/gameserver/trigger.cc @@ -122,7 +122,7 @@ void Trigger::Shot(MetaData::Equip* weapon_meta) c->RemoveBuffByUniId(param.param1); }, &owner_->xtimer_attacher.timer_list_, - [] (const a8::XParams& param) + [] (const a8::XParams& param, bool is_destory) { }); } diff --git a/third_party/a8engine b/third_party/a8engine index 9d9efccd..c02fdb4a 160000 --- a/third_party/a8engine +++ b/third_party/a8engine @@ -1 +1 @@ -Subproject commit 9d9efccd69f5a81ac2905617d2fe4d197394f27c +Subproject commit c02fdb4a9238a282479161226584ba0845703ae9