diff options
Diffstat (limited to 'src/crplayer.cc')
| -rw-r--r-- | src/crplayer.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/crplayer.cc b/src/crplayer.cc index c4dbd80..86c2aba 100644 --- a/src/crplayer.cc +++ b/src/crplayer.cc @@ -1534,6 +1534,20 @@ void TPlayer::RecordMurder(uint32 VictimID){ } } +void TPlayer::RecordDeath(uint32 AttackerID, int OldLevel, const char *Remark){ + bool Justified = true; + if(AttackerID != 0 && AttackerID != this->ID && IsCreaturePlayer(AttackerID)){ + TPlayer *Attacker = GetPlayer(AttackerID); + if(Attacker == NULL){ + return; + } + + Justified = Attacker->IsAttackJustified(this->ID); + Attacker->RecordMurder(this->ID); + } + CharacterDeathOrder(this, OldLevel, AttackerID, Remark, !Justified); +} + int TPlayer::CheckPlayerkilling(int Now){ int LastDay = 0; int LastWeek = 0; |
