*Add function GetPlayer and GetCreature for scripts. Please try to not use GetUnit in the future.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-11 13:42:34 -05:00
parent 80e1a5faac
commit 9378a9cf21
56 changed files with 196 additions and 169 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ void SummonList::DespawnEntry(uint32 entry)
{
for(iterator i = begin(); i != end(); ++i)
{
if(Creature *summon = (Creature*)Unit::GetUnit(*m_creature, *i))
if(Creature *summon = Unit::GetCreature(*m_creature, *i))
{
if(summon->GetEntry() == entry)
{
@@ -55,7 +55,7 @@ void SummonList::DespawnAll()
{
for(iterator i = begin(); i != end(); ++i)
{
if(Creature *summon = (Creature*)Unit::GetUnit(*m_creature, *i))
if(Creature *summon = Unit::GetCreature(*m_creature, *i))
{
summon->setDeathState(JUST_DIED);
summon->RemoveCorpse();