Core/Spells: Better solution for exploit check (Thanks to manuel)

Readd lost changes from char db type cleanup
This commit is contained in:
leak committed 2011-01-20 03:06:51 +01:00
1 parent f7af49291b
commit dd751242fc
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -2705,7 +2705,7 @@ 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())
if (!gameObjTarget->isSpawned() && !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());