[8131] Some anti-cheating server side checks. Author: Lightguard

* Loot in ghost state
    * Apply duplicate glyphs.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-10 08:34:28 +08:00
parent 02eecab45c
commit 9d77c5736d
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -259,6 +259,10 @@ void WorldSession::HandleLootOpcode( WorldPacket & recv_data )
uint64 guid; uint64 guid;
recv_data >> guid; recv_data >> guid;
// Check possible cheat
if(!_player->isAlive())
return;
GetPlayer()->SendLoot(guid, LOOT_CORPSE); GetPlayer()->SendLoot(guid, LOOT_CORPSE);
} }
+8
View File
@@ -4713,6 +4713,14 @@ SpellCastResult Spell::CheckCast(bool strict)
break; 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: case SPELL_EFFECT_FEED_PET:
{ {
if (m_caster->GetTypeId() != TYPEID_PLAYER) if (m_caster->GetTypeId() != TYPEID_PLAYER)