From a1636c4ed42dea7cb274cb96bfcfa7cefae62218 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 16 Mar 2023 21:00:29 +0800 Subject: [PATCH] 1 --- server/gameserver/car.cc | 2 +- server/gameserver/car.h | 2 +- server/gameserver/creature.h | 2 +- server/gameserver/hero.cc | 2 +- server/gameserver/hero.h | 2 +- server/gameserver/human.cc | 2 +- server/gameserver/human.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/gameserver/car.cc b/server/gameserver/car.cc index 3f8cc812..8e4e2b14 100644 --- a/server/gameserver/car.cc +++ b/server/gameserver/car.cc @@ -338,7 +338,7 @@ void Car::OnExplosionHit(Explosion* e) dmg_out); } -void Car::DecHP(float dec_hp, int killer_id, const std::string& killer_name, int weapon_id, +void Car::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) { diff --git a/server/gameserver/car.h b/server/gameserver/car.h index a9425628..bb6b92b1 100644 --- a/server/gameserver/car.h +++ b/server/gameserver/car.h @@ -36,7 +36,7 @@ class Car : public Creature virtual float GetRadius() override; virtual float GetSpeed() override; virtual void DecHP(float dec_hp, - int killer_id, const std::string& killer_name, int weapon_id, + int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) override; virtual void SendDebugMsg(const std::string& debug_msg) override; diff --git a/server/gameserver/creature.h b/server/gameserver/creature.h index cdad1760..b1e25114 100644 --- a/server/gameserver/creature.h +++ b/server/gameserver/creature.h @@ -220,7 +220,7 @@ class Creature : public MoveableEntity Player* AsPlayer() { return IsPlayer() ? (Player*)this : nullptr; }; Car* AsCar() { return IsCar() ? (Car*)this : nullptr; }; virtual void DecHP(float dec_hp, int killer_id, - const std::string& killer_name, int weapon_id, + const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) {}; void AddHp(float hp); diff --git a/server/gameserver/hero.cc b/server/gameserver/hero.cc index 1a9b0305..54107b93 100644 --- a/server/gameserver/hero.cc +++ b/server/gameserver/hero.cc @@ -167,7 +167,7 @@ void Hero::DetachFromMaster() } } -void Hero::DecHP(float dec_hp, int killer_id, const std::string& killer_name, int weapon_id, +void Hero::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) { diff --git a/server/gameserver/hero.h b/server/gameserver/hero.h index 7674762c..f33892b9 100644 --- a/server/gameserver/hero.h +++ b/server/gameserver/hero.h @@ -25,7 +25,7 @@ public: virtual void OnBulletHit(IBullet* bullet) override; virtual void Update(int delta_time) override; virtual void DecHP(float dec_hp, - int killer_id, const std::string& killer_name, int weapon_id, + int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) override; virtual std::string GetName() override; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 77969a02..e27d3863 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -643,7 +643,7 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id, } } -void Human::DecHP(float dec_hp, int killer_id, const std::string& killer_name, int weapon_id, +void Human::DecHP(float dec_hp, int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) { diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 1ed95565..ed17935d 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -302,7 +302,7 @@ class Human : public Creature void BeKill(int killer_id, const std::string& killer_name, int weapon_id, int real_killer_id, const std::string& real_killer_name); virtual void DecHP(float dec_hp, - int killer_id, const std::string& killer_name, int weapon_id, + int killer_id, const std::string killer_name, int weapon_id, int real_killer_id, const std::string real_killer_name, float& real_dmg_out) override; virtual void AddToNewObjects(Entity* entity) override;