[12021] Fix some warnings

Thx to stfx for porting

Signed-off-by: stfx <stfx@hotmail.de>
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
darkstalker 2011-08-27 21:19:25 -03:00 committed by Schmoozerd
parent e533ff54d5
commit f777665d48
18 changed files with 35 additions and 57 deletions

View file

@ -1675,7 +1675,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// We have to perform this check before the teleport, otherwise the
// ObjectAccessor won't find the flag.
if (duel && GetMapId() != mapid)
if (GameObject* obj = GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER)))
if (GetMap()->GetGameObject(GetGuidValue(PLAYER_DUEL_ARBITER)))
DuelComplete(DUEL_FLED);
// reset movement flags at teleport, because player will continue move with these flags after teleport
@ -3268,7 +3268,7 @@ bool Player::IsNeedCastPassiveLikeSpellAtLearn(SpellEntry const* spellInfo) cons
// note: form passives activated with shapeshift spells be implemented by HandleShapeshiftBoosts instead of spell_learn_spell
// talent dependent passives activated at form apply have proper stance data
bool need_cast = !spellInfo->Stances || !form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT);
bool need_cast = !spellInfo->Stances || (!form && spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
// Check CasterAuraStates
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));