aboutsummaryrefslogtreecommitdiff
path: root/src/game/ThreatManager.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/ThreatManager.cpp
parent9a8f10fa3067ca65c2e69ac610d8950c3b384125 (diff)
Some Creature* casts moved to new ToCreature.
Added const Creature* ToCreature() --HG-- branch : trunk
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r--src/game/ThreatManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index 8b4ea04718f..02665d9b55f 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -129,7 +129,7 @@ void HostilReference::updateOnlineStatus()
((getTarget()->GetTypeId() != TYPEID_PLAYER || !((Player*)getTarget())->isGameMaster()) ||
!getTarget()->hasUnitState(UNIT_STAT_IN_FLIGHT)))
{
- Creature* creature = (Creature*)getSourceUnit();
+ Creature* creature = getSourceUnit()->ToCreature();
online = getTarget()->isInAccessiblePlaceFor(creature);
if (!online)
{
@@ -423,7 +423,7 @@ void ThreatManager::modifyThreatPercent(Unit *pVictim, int32 iPercent)
Unit* ThreatManager::getHostilTarget()
{
iThreatContainer.update();
- HostilReference* nextVictim = iThreatContainer.selectNextVictim((Creature*) getOwner(), getCurrentVictim());
+ HostilReference* nextVictim = iThreatContainer.selectNextVictim( getOwner()->ToCreature(), getCurrentVictim());
setCurrentVictim(nextVictim);
return getCurrentVictim() != NULL ? getCurrentVictim()->getTarget() : NULL;
}