Skip to content

Commit

Permalink
Core/Misc: Fix static analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Aokromes committed Nov 12, 2017
1 parent 51d0bef commit 9595e0c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@ void BattlegroundAB::_NodeOccupied(uint8 node, Team team)

void BattlegroundAB::_NodeDeOccupied(uint8 node)
{
//only dynamic nodes, no start points
if (node >= BG_AB_DYNAMIC_NODES_COUNT)
return;

//remove bonus honor aura trigger creature when node is lost
if (node < BG_AB_DYNAMIC_NODES_COUNT)//only dynamic nodes, no start points
DelCreature(node+7);//NULL checks are in DelCreature! 0-6 spirit guides
DelCreature(node+7);//NULL checks are in DelCreature! 0-6 spirit guides

RelocateDeadPlayers(BgCreatures[node]);

Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Chat/ChatLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
return false;
}
}
else if (id < 0)
else
{
_suffix = sItemRandomSuffixStore.LookupEntry(-id);
if (!_suffix)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Globals/ObjectMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7737,7 +7737,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, QuestRelationsReve
if (reverseMap)
reverseMap->insert(QuestRelationsReverse::value_type(quest, id));
}
else if (starter)
else
poolRelationMap->insert(PooledQuestRelation::value_type(quest, id));

++count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,12 @@ class npc_felkael_phoenix : public CreatureScript
Rebirth = true;
}

if (Rebirth)
if (Death_Timer <= diff)
{
if (Death_Timer <= diff)
{
me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
me->DisappearAndDie();
Rebirth = false;
} else Death_Timer -= diff;
}
me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
me->DisappearAndDie();
Rebirth = false;
} else Death_Timer -= diff;
}

if (!UpdateVictim())
Expand Down

0 comments on commit 9595e0c

Please sign in to comment.