1
This commit is contained in:
parent
492862be1a
commit
9828aeb470
@ -28,6 +28,7 @@
|
|||||||
#include "debugcmd.h"
|
#include "debugcmd.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "movement.h"
|
#include "movement.h"
|
||||||
|
#include "hero.h"
|
||||||
|
|
||||||
#include "mt/Param.h"
|
#include "mt/Param.h"
|
||||||
#include "mt/Equip.h"
|
#include "mt/Equip.h"
|
||||||
@ -669,6 +670,12 @@ void Bullet::OnKillTarget(Entity* target)
|
|||||||
Creature* c = (Creature*)target;
|
Creature* c = (Creature*)target;
|
||||||
if (c->IsHuman() && sender.Get() && sender.Get()->IsHuman()) {
|
if (c->IsHuman() && sender.Get() && sender.Get()->IsHuman()) {
|
||||||
sender.Get()->AsHuman()->stats->IncWeaponKills(gun_meta->id(), 1);
|
sender.Get()->AsHuman()->stats->IncWeaponKills(gun_meta->id(), 1);
|
||||||
|
sender.Get()->GetTrigger()->BulletKill(this, c);
|
||||||
|
}
|
||||||
|
if (sender.Get()->IsHero() &&
|
||||||
|
sender.Get()->AsHero()->master.Get() &&
|
||||||
|
sender.Get()->AsHero()->master.Get()->IsHuman()) {
|
||||||
|
sender.Get()->AsHero()->master.Get()->AsHuman()->stats->IncWeaponKills(gun_meta->id(), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user