From 9d77c5736ddf7902d2e224e12e5e15ba057aa54a Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 10 Jul 2009 08:34:28 +0800 Subject: [8131] Some anti-cheating server side checks. Author: Lightguard * Loot in ghost state * Apply duplicate glyphs. --HG-- branch : trunk --- src/game/LootHandler.cpp | 4 ++++ src/game/Spell.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index 172a6ef46c2..6b5f22b6a6b 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -259,6 +259,10 @@ void WorldSession::HandleLootOpcode( WorldPacket & recv_data ) uint64 guid; recv_data >> guid; + // Check possible cheat + if(!_player->isAlive()) + return; + GetPlayer()->SendLoot(guid, LOOT_CORPSE); } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 610e6af6b06..84bd533a406 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4713,6 +4713,14 @@ SpellCastResult Spell::CheckCast(bool strict) break; } + case SPELL_EFFECT_APPLY_GLYPH: + { + uint32 glyphId = m_spellInfo->EffectMiscValue[i]; + if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyphId)) + if(m_caster->HasAura(gp->SpellId)) + return SPELL_FAILED_UNIQUE_GLYPH; + break; + } case SPELL_EFFECT_FEED_PET: { if (m_caster->GetTypeId() != TYPEID_PLAYER) -- cgit v1.2.3