Convert some C style casts to new functions

--HG--
branch : trunk
This commit is contained in:
thenecromancer committed 2010-03-11 20:51:31 +01:00
1 parent 02a9cd6a43
commit e1542df90c
10 files changed
+51 -60

No files matched your search

+3 -5
View File
@@ -6404,7 +6404,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
if( uVictim->GetTypeId() == TYPEID_PLAYER )
{
Player *pVictim = (Player *)uVictim;
Player *pVictim = uVictim->ToPlayer();
if( GetTeam() == pVictim->GetTeam() && !sWorld.IsFFAPvPRealm() )
return false;
@@ -6459,9 +6459,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
}
else
{
Creature *cVictim = (Creature *)uVictim;
if (!cVictim->isRacialLeader())
if (!uVictim->ToCreature()->isRacialLeader())
return false;
honor = 100; // ??? need more info
@@ -19921,7 +19919,7 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
if(isGameMaster())
{
if(u->GetTypeId() == TYPEID_PLAYER)
return ((Player *)u)->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
return u->ToPlayer()->GetSession()->GetSecurity() <= GetSession()->GetSecurity();
else
return true;
}