diff options
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r-- | src/game/ThreatManager.cpp | 4 |
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; } |