mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Misc: Now attackers receiving all rewards, when the victim gone offline.
This commit is contained in:
@@ -423,10 +423,6 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
}
|
||||
else if (!_player->getAttackers().empty())
|
||||
{
|
||||
_player->CombatStop();
|
||||
_player->getHostileRefManager().setOnlineOfflineState(false);
|
||||
_player->RemoveAllAurasOnDeath();
|
||||
|
||||
// build set of player who attack _player or who have pet attacking of _player
|
||||
std::set<Player*> aset;
|
||||
for (Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr)
|
||||
@@ -438,6 +434,11 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
aset.insert((Player*)(*itr));
|
||||
}
|
||||
|
||||
// CombatStop() method is removing all attackers from the AttackerSet
|
||||
// That is why it must be AFTER building current set of attackers
|
||||
_player->CombatStop();
|
||||
_player->getHostileRefManager().setOnlineOfflineState(false);
|
||||
_player->RemoveAllAurasOnDeath();
|
||||
_player->SetPvPDeath(!aset.empty());
|
||||
_player->KillPlayer();
|
||||
_player->BuildPlayerRepop();
|
||||
|
||||
Reference in New Issue
Block a user