Core/Spells: Stop exploit that allowed looting despawned gameobjects by packet manipulation.
This commit is contained in:
@@ -2704,6 +2704,13 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
|
||||
if (gameObjTarget)
|
||||
{
|
||||
// Players shouldn't be able to loot gameobjects that are currently despawned
|
||||
if (gameObjTarget->GetRespawnTime() > 0 && !player->isGameMaster())
|
||||
{
|
||||
sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!",
|
||||
player->GetName(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
// special case, already has GossipHello inside so return and avoid calling twice
|
||||
if (gameObjTarget->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user