diff options
author | leak <leakzx@googlemail.com> | 2011-01-18 20:02:28 +0100 |
---|---|---|
committer | leak <leakzx@googlemail.com> | 2011-01-18 20:02:28 +0100 |
commit | 40af92dd66a4905946e155aca01fb75c0ba35185 (patch) | |
tree | cc1abbaddce0678ba8636d5fb1093afcff4b569d /src | |
parent | e05ab4b25aad3119c7f0b0a0ac569779a9fe22a6 (diff) |
Core/Spells: Stop exploit that allowed looting despawned gameobjects by packet manipulation.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d75aaa6ea22..afd0b7dc714 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -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) { |