*Allow some spell effects to target units not in caster's map - fixes SPELL_EFFECT_SUMMON_PLAYER

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-29 19:48:40 +02:00
parent ade1bbdd62
commit c44b601ac7
7 changed files with 46 additions and 9 deletions
@@ -165,6 +165,11 @@ Player* ObjectAccessor::FindPlayer(uint64 guid)
return GetObjectInWorld(guid, (Player*)NULL);
}
Unit* ObjectAccessor::FindUnit(uint64 guid)
{
return GetObjectInWorld(guid, (Unit*)NULL);
}
Player* ObjectAccessor::FindPlayerByName(const char* name)
{
ACE_GUARD_RETURN(LockType, g, *HashMapHolder<Player>::GetLock(), NULL);
+1
View File
@@ -179,6 +179,7 @@ class ObjectAccessor
// ACCESS LIKE THAT IS NOT THREAD SAFE
static Pet * FindPet(uint64);
static Player* FindPlayer(uint64);
static Unit* FindUnit(uint64);
Player* FindPlayerByName(const char* name);
// when using this, you must use the hashmapholder's lock