Skip to content

Commit

Permalink
Remove some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberium committed Jan 8, 2019
1 parent 57e5e99 commit 6c34c3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/game/Entities/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ bool Creature::InitEntry(uint32 Entry, CreatureData const* data /*=nullptr*/, Ga
SetCanParry(!(cinfo->ExtraFlags & CREATURE_EXTRA_FLAG_NO_PARRY));
SetCanBlock(!(cinfo->ExtraFlags & CREATURE_EXTRA_FLAG_NO_BLOCK));
SetForceAttackingCapability((cinfo->ExtraFlags & CREATURE_EXTRA_FLAG_FORCE_ATTACKING_CAPABILITY) != 0);
SetNoXP(cinfo->ExtraFlags & CREATURE_EXTRA_FLAG_NO_XP_AT_KILL);
SetNoXP((cinfo->ExtraFlags & CREATURE_EXTRA_FLAG_NO_XP_AT_KILL) != 0);
SetNoLoot(false);
SetNoReputation(false);

Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,7 @@ class Unit : public WorldObject
Movement::MoveSpline* movespline;

void ScheduleAINotify(uint32 delay, bool forced = false);
bool IsAINotifyScheduled() const { return bool(m_AINotifyEvent);}
bool IsAINotifyScheduled() const { return m_AINotifyEvent != nullptr;}
void FinalizeAINotifyEvent() { m_AINotifyEvent = nullptr; }
void AbortAINotifyEvent();
void OnRelocated();
Expand Down
4 changes: 2 additions & 2 deletions src/game/Reputation/ReputationMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ void ReputationMgr::SetAtWar(FactionState* faction, bool atWar)
return;

// not allow declare war to faction unless already hated or less
if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && ReputationToRank(faction->Standing) > REP_HATED)
if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) != 0 && ReputationToRank(faction->Standing) > REP_HATED)
return;

// already set
if (bool(faction->Flags & FACTION_FLAG_AT_WAR) == atWar)
if (((faction->Flags & FACTION_FLAG_AT_WAR) != 0) && atWar)
return;

if (atWar)
Expand Down

0 comments on commit 6c34c3a

Please sign in to comment.