aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorleak <leakzx@googlemail.com>2011-01-18 20:02:28 +0100
committerleak <leakzx@googlemail.com>2011-01-18 20:02:28 +0100
commit40af92dd66a4905946e155aca01fb75c0ba35185 (patch)
treecc1abbaddce0678ba8636d5fb1093afcff4b569d /src
parente05ab4b25aad3119c7f0b0a0ac569779a9fe22a6 (diff)
Core/Spells: Stop exploit that allowed looting despawned gameobjects by packet manipulation.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp7
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)
{