1
This commit is contained in:
parent
b5eb72aade
commit
1929890541
@ -675,7 +675,7 @@ void Bullet::OnKillTarget(Entity* target)
|
|||||||
if (sender.Get()->IsHero() &&
|
if (sender.Get()->IsHero() &&
|
||||||
sender.Get()->AsHero()->master.Get() &&
|
sender.Get()->AsHero()->master.Get() &&
|
||||||
sender.Get()->AsHero()->master.Get()->IsHuman()) {
|
sender.Get()->AsHero()->master.Get()->IsHuman()) {
|
||||||
sender.Get()->AsHero()->master.Get()->AsHuman()->stats->IncWeaponKills(gun_meta->id(), 1);
|
sender.Get()->AsHero()->master.Get()->AsHuman()->stats->kills++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "roomobstacle.h"
|
#include "roomobstacle.h"
|
||||||
#include "human.h"
|
#include "human.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
#include "hero.h"
|
||||||
|
|
||||||
#include "mt/Param.h"
|
#include "mt/Param.h"
|
||||||
#include "mt/Buff.h"
|
#include "mt/Buff.h"
|
||||||
@ -179,6 +180,11 @@ void VirtualBullet::OnKillTarget(Entity* 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);
|
||||||
}
|
}
|
||||||
|
if (sender.Get()->IsHero() &&
|
||||||
|
sender.Get()->AsHero()->master.Get() &&
|
||||||
|
sender.Get()->AsHero()->master.Get()->IsHuman()) {
|
||||||
|
sender.Get()->AsHero()->master.Get()->AsHuman()->stats->kills++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user