aboutsummaryrefslogtreecommitdiff
path: root/src/game/TemporarySummon.cpp
diff options
context:
space:
mode:
authorraczman <none@none>2010-03-07 18:30:53 +0100
committerraczman <none@none>2010-03-07 18:30:53 +0100
commit07f3b914260374792fe8b40d590cb24067c87125 (patch)
tree7c1604160d6aeda8d8b10cf47effa6f075cfa50b /src/game/TemporarySummon.cpp
parent9a8f10fa3067ca65c2e69ac610d8950c3b384125 (diff)
Some Creature* casts moved to new ToCreature.
Added const Creature* ToCreature() --HG-- branch : trunk
Diffstat (limited to 'src/game/TemporarySummon.cpp')
-rw-r--r--src/game/TemporarySummon.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index 5b9f19a2278..e708aadfd77 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -214,8 +214,8 @@ void TempSummon::InitSummon()
Unit* owner = GetSummoner();
if(owner)
{
- if(owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
- ((Creature*)owner)->AI()->JustSummoned(this);
+ if(owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled)
+ owner->ToCreature()->AI()->JustSummoned(this);
if(IsAIEnabled)
AI()->IsSummonedBy(owner);
}
@@ -237,8 +237,8 @@ void TempSummon::UnSummon()
}
Unit* owner = GetSummoner();
- if(owner && owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
- ((Creature*)owner)->AI()->SummonedCreatureDespawn(this);
+ if(owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled)
+ owner->ToCreature()->AI()->SummonedCreatureDespawn(this);
AddObjectToRemoveList();
}