Skip to content

Commit

Permalink
All: resolved ISO violation (definition of preprocessor macro that be…
Browse files Browse the repository at this point in the history
…gins with underscore followed by a capital letter)

All: Random style changes.
  • Loading branch information
Zyres committed Jul 15, 2017
1 parent 2c109ad commit 9b000f0
Show file tree
Hide file tree
Showing 11 changed files with 264 additions and 213 deletions.
36 changes: 21 additions & 15 deletions src/scripts/Battlegrounds/IsleOfConquest.h
Expand Up @@ -122,53 +122,59 @@ struct IOCGate

struct IOCVehicle
{
Creature* c;
Creature* creature;
LocationVector baselocation;

IOCVehicle()
{
c = NULL;
creature = nullptr;
}

~IOCVehicle()
{
c = NULL;
creature = nullptr;
}

bool IsCloseToBaseLocation()
{
if (c != NULL)
if (creature != nullptr)
{
if (c->CalcDistance(baselocation) <= 10.0f)
if (creature->CalcDistance(baselocation) <= 10.0f)
{
return true;
else
return false;
}
}
else
return false;

return false;
}


bool IsEmpty() const
{
if (c == NULL)
if (creature == nullptr)
{
return true;
}

if (c->GetVehicleComponent() == NULL)
if (creature->GetVehicleComponent() == nullptr)
{
return true;
}

if (c->GetVehicleComponent()->GetPassengerCount() > 0)
if (creature->GetVehicleComponent()->GetPassengerCount() > 0)
{
return false;
}

return true;
}

void Despawn()
{
if (c != NULL)
if (creature != nullptr)
{
c->Despawn(0, 0);
c = NULL;
creature->Despawn(0, 0);
creature = nullptr;
}
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/scripts/InstanceScripts/Instance_BlackMorass.cpp
Expand Up @@ -122,8 +122,10 @@ class ChronoLordAI : public CreatureAIScript

void CastTime()
{
for (uint8 i = 0; i < nrspells; i++)
for (int i = 0; i < nrspells; ++i)
{
spells[i].casttime = spells[i].cooldown;
}
}

void OnTargetDied(Unit* mTarget)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/InstanceScripts/Raid_Karazhan.cpp
Expand Up @@ -1621,7 +1621,7 @@ class ShadeofAranAI : public CreatureAIScript
explode = false;
}
}
else if (!summoned && _unit->GetHealthPct() <= 40)
else if (summoned == false && _unit->GetHealthPct() <= 40)
{
_unit->CastSpell(_unit, info_summon_elemental_1, true);
_unit->CastSpell(_unit, info_summon_elemental_2, true);
Expand Down
8 changes: 6 additions & 2 deletions src/scripts/MiscScripts/GameObjects.cpp
Expand Up @@ -947,12 +947,16 @@ class TheRootofAllEvil : public GameObjectAIScript
void OnActivate(Player* pPlayer)
{
QuestLogEntry* qle = pPlayer->GetQuestLogForEntry(8481);
if(qle == NULL)
if (qle == nullptr)
{
return;
}

Creature* xandivious = sEAS.SpawnCreature(pPlayer, 15623, pPlayer->GetPositionX() + 5, pPlayer->GetPositionY(), pPlayer->GetPositionZ(), pPlayer->GetOrientation(), 0);
if(xandivious != NULL)
if (xandivious != nullptr)
{
xandivious->Despawn(6 * 60 * 1000, 0);
}
}
};

Expand Down

0 comments on commit 9b000f0

Please sign in to comment.