Core: Fix more warnings

--HG--
branch : trunk
This commit is contained in:
Spp committed 2010-08-30 15:25:15 +02:00
1 parent b0d85ac185
commit 405f312918
103 files changed
+564 -468

No files matched your search

@@ -177,10 +177,12 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
if (pInstance)
{
if (pInstance->GetData(DATA_GHOSTKILL) >= 7)
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
else
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
void EnterCombat(Unit * /*who*/)
@@ -219,7 +219,7 @@ public:
void SetData64(uint32 type, uint64 data)
{
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
switch(type)
{
@@ -121,7 +121,7 @@ public:
} else uiNimbleReflexesTimer -= uiDiff;
/*END ACID-AI*/
if (uiHealth == 0 && !HealthAbovePct(66) || uiHealth == 1 && !HealthAbovePct(33))
if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33)))
{
++uiHealth;
DoCastAOE(SPELL_SMITE_STOMP,false);
@@ -109,7 +109,7 @@ public:
struct netherspite_infernalAI : public ScriptedAI
{
netherspite_infernalAI(Creature *c) : ScriptedAI(c) ,
malchezaar(0), HellfireTimer(0), CleanupTimer(0), point(NULL) {}
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
uint32 HellfireTimer;
uint32 CleanupTimer;
@@ -123,19 +123,23 @@ public:
void UpdateAI(const uint32 diff)
{
if (HellfireTimer)
if (HellfireTimer <= diff)
{
DoCast(me, SPELL_HELLFIRE);
HellfireTimer = 0;
if (HellfireTimer <= diff)
{
DoCast(me, SPELL_HELLFIRE);
HellfireTimer = 0;
}
else HellfireTimer -= diff;
}
else HellfireTimer -= diff;
if (CleanupTimer)
if (CleanupTimer <= diff)
{
Cleanup();
CleanupTimer = 0;
} else CleanupTimer -= diff;
if (CleanupTimer <= diff)
{
Cleanup();
CleanupTimer = 0;
} else CleanupTimer -= diff;
}
}
void KilledUnit(Unit *who)
@@ -287,15 +287,17 @@ public:
//Drink Interrupt Timer
if (Drinking && !DrinkInturrupted)
{
if (DrinkInterruptTimer >= diff)
DrinkInterruptTimer -= diff;
else
{
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_POTION, true);
DoCast(me, SPELL_AOE_PYROBLAST, false);
DrinkInturrupted = true;
Drinking = false;
else
{
me->SetStandState(UNIT_STAND_STATE_STAND);
DoCast(me, SPELL_POTION, true);
DoCast(me, SPELL_AOE_PYROBLAST, false);
DrinkInturrupted = true;
Drinking = false;
}
}
//Don't execute any more code if we are drinking
@@ -342,17 +342,17 @@ public:
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_OZ;
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_HOOD;
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_RAJ;
sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
sLog.outString("TSCR: player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
break;
}
@@ -75,7 +75,7 @@ public:
for (uint8 i = 0; i < size; ++i)
{
uint64 guid = pInstance->GetData64(DATA_FEL_CRYSTAL);
sLog.outDebug("TSCR: Selin: Adding Fel Crystal %u to list", guid);
sLog.outDebug("TSCR: Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
Crystals.push_back(guid);
}
}
@@ -207,7 +207,7 @@ public:
else
sLog.outError("npc_unworthy_initiateAI: unable to find prison!");
}
return;
break;
case PHASE_TO_EQUIP:
if (wait_timer)
{
@@ -221,7 +221,7 @@ public:
wait_timer = 0;
}
}
return;
break;
case PHASE_TO_ATTACK:
if (wait_timer)
{
@@ -238,7 +238,7 @@ public:
wait_timer = 0;
}
}
return;
break;
case PHASE_ATTACKING:
if (!UpdateVictim())
return;
@@ -273,10 +273,12 @@ public:
}
DoMeleeAttackIfReady();
break;
default:
break;
}
}
};
};
@@ -140,7 +140,7 @@ public:
//ShadowBolt
if (ShadowBolt_Timer <= diff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 10000;
@@ -41,13 +41,9 @@ public:
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry * /*at*/)
{
if (InstanceScript* pInstance = pPlayer->GetInstanceScript())
{
if (!pPlayer->FindNearestCreature(15362,15))
pPlayer->SummonCreature(15362, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
return false;
}
return false;
if (pPlayer->GetInstanceScript() && !pPlayer->FindNearestCreature(15362, 15))
pPlayer->SummonCreature(15362, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
return false;
}
};
@@ -62,10 +58,8 @@ public:
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
{
InstanceScript* pInstance = pPlayer->GetInstanceScript();
if (!pInstance)
return false;
pInstance->SetData(EVENT_STATE,pGo->GetEntry());
if (InstanceScript* pInstance = pPlayer->GetInstanceScript())
pInstance->SetData(EVENT_STATE,pGo->GetEntry());
return false;
}
@@ -122,16 +122,12 @@ public:
{
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_ALYTHESS));
if (Temp)
{
if (Temp->isDead())
{
CAST_CRE(Temp)->Respawn();
}else
{
if (Temp->getVictim())
{
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
}
}
else if (Temp->getVictim())
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
}
}
if (!me->isInCombat())
@@ -389,16 +385,12 @@ public:
{
Unit* Temp = Unit::GetUnit((*me),pInstance->GetData64(DATA_SACROLASH));
if (Temp)
{
if (Temp->isDead())
{
CAST_CRE(Temp)->Respawn();
}else
{
if (Temp->getVictim())
{
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
}
}
else if (Temp->getVictim())
me->getThreatManager().addThreat(Temp->getVictim(),0.0f);
}
}
if (!me->isInCombat())
@@ -270,6 +270,8 @@ public:
uiFlightCount = 0;
uiBreathCount = 0;
break;
default:
break;
}
phase = NextPhase;
}
@@ -291,7 +293,7 @@ public:
break;
case 2:
{
Unit *pTarget = pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
if (!pTarget)
pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0);
@@ -545,16 +545,19 @@ public:
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
{
uint32 SpectralPlayers = 0;
uint8 SpectralPlayers = 0;
Map* pMap = pGo->GetMap();
if (!pMap->IsDungeon()) return true;
if (!pMap->IsDungeon())
return true;
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
++SpectralPlayers;
}
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MAX_PLAYERS_IN_SPECTRAL_REALM && SpectralPlayers >= MAX_PLAYERS_IN_SPECTRAL_REALM))
uint8 MaxSpectralPlayers = MAX_PLAYERS_IN_SPECTRAL_REALM;
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MaxSpectralPlayers && SpectralPlayers >= MaxSpectralPlayers))
pPlayer->GetSession()->SendNotification(GO_FAILED);
else
pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_SPECTRAL, true);
@@ -193,9 +193,9 @@ enum KilJaedenTimers
// Locations of the Hand of Deceiver adds
Position DeceiverLocations[3]=
{
{1682.045f, 631.299f, 5.936f},
{1684.099f, 618.848f, 0.589f},
{1694.170f, 612.272f, 1.416f},
{1682.045f, 631.299f, 5.936f, 0.0f},
{1684.099f, 618.848f, 0.589f, 0.0f},
{1694.170f, 612.272f, 1.416f, 0.0f},
};
// Locations, where Shield Orbs will spawn
@@ -345,7 +345,7 @@ public:
}
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 /*diff*/)
{
}
@@ -612,7 +612,7 @@ public:
summons.Summon(summoned);
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_KJ_DEATH, me);
summons.DespawnAll();
@@ -621,7 +621,7 @@ public:
pInstance->SetData(DATA_KILJAEDEN_EVENT, DONE);
}
void KilledUnit(Unit* victim)
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KJ_SLAY1,SAY_KJ_SLAY2), me);
}
@@ -639,7 +639,7 @@ public:
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* /*who*/)
{
DoZoneInCombat();
}
@@ -957,7 +957,7 @@ public:
me->InterruptNonMeleeSpells(true);
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
if (!pInstance)
return;
@@ -1081,7 +1081,7 @@ public:
bLockedTarget = false;
}
void DamageTaken(Unit *done_by, uint32 &damage)
void DamageTaken(Unit * /*done_by*/, uint32 &damage)
{
if (damage > me->GetHealth())
DoCast(me, SPELL_FELFIRE_FISSION, true);
@@ -1248,7 +1248,7 @@ public:
} else uiTimer -= diff;
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 type, uint32 /*id*/)
{
if (type != POINT_MOTION_TYPE)
return;
@@ -189,7 +189,7 @@ class boss_archaedas : public CreatureScript
DoMeleeAttackIfReady();
}
void JustDied (Unit *pKiller) {
void JustDied (Unit * /*pKiller*/) {
if (pInstance)
{
pInstance->SetData(NULL,3); // open the vault door
@@ -173,7 +173,7 @@ class instance_uldaman : public InstanceMapScript
if (!archaedas)
return;
if (Unit *victim = Unit::GetUnit(*archaedas, target))
if (Unit::GetUnit(*archaedas, target))
{
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN,false);
whoWokeArchaedasGUID = target;
@@ -299,4 +299,4 @@ class instance_uldaman : public InstanceMapScript
void AddSC_instance_uldaman()
{
new instance_uldaman();
}
}
@@ -242,12 +242,14 @@ class boss_halazzi : public CreatureScript
} else FrenzyTimer -= diff;
if (Phase == PHASE_LYNX)
{
if (CheckTimer <= diff)
{
if (HealthBelowPct(25 * (3 - TransformCount)))
EnterPhase(PHASE_SPLIT);
CheckTimer = 1000;
} else CheckTimer -= diff;
}
}
if (Phase == PHASE_HUMAN || Phase == PHASE_ENRAGE)
@@ -271,6 +273,7 @@ class boss_halazzi : public CreatureScript
} else ShockTimer -= diff;
if (Phase == PHASE_HUMAN)
{
if (CheckTimer <= diff)
{
if (!HealthAbovePct(20) /*HealthBelowPct(10)*/)
@@ -283,6 +286,7 @@ class boss_halazzi : public CreatureScript
}
CheckTimer = 1000;
} else CheckTimer -= diff;
}
}
if (Phase == PHASE_MERGE)
@@ -343,15 +343,14 @@ class boss_nalorakk : public CreatureScript
void UpdateAI(const uint32 diff)
{
if (waitTimer)
if (waitTimer && inMove)
{
if (inMove)
if (waitTimer <= diff)
{
(*me).GetMotionMaster()->MovementExpired();
(*me).GetMotionMaster()->MovePoint(MovePhase,NalorakkWay[MovePhase][0],NalorakkWay[MovePhase][1],NalorakkWay[MovePhase][2]);
waitTimer = 0;
} else waitTimer -= diff;
if (waitTimer <= diff)
{
(*me).GetMotionMaster()->MovementExpired();
(*me).GetMotionMaster()->MovePoint(MovePhase,NalorakkWay[MovePhase][0],NalorakkWay[MovePhase][1],NalorakkWay[MovePhase][2]);
waitTimer = 0;
} else waitTimer -= diff;
}
if (!UpdateVictim())
@@ -317,7 +317,8 @@ class boss_zuljin : public CreatureScript
Unit* Temp = NULL;
if (SpiritGUID[i])
{
if (Temp = Unit::GetUnit(*me, SpiritGUID[i]))
Temp = Unit::GetUnit(*me, SpiritGUID[i]);
if (Temp)
{
Temp->SetVisibility(VISIBILITY_OFF);
Temp->setDeathState(DEAD);
@@ -123,26 +123,30 @@ class boss_renataki : public CreatureScript
//Resetting some aggro so he attacks other gamers
if (!Invisible)
if (Aggro_Timer <= diff)
{
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
if (Aggro_Timer <= diff)
{
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(),-50);
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(),-50);
if (pTarget)
AttackStart(pTarget);
if (pTarget)
AttackStart(pTarget);
Aggro_Timer = 7000 + rand()%13000;
} else Aggro_Timer -= diff;
Aggro_Timer = 7000 + rand()%13000;
} else Aggro_Timer -= diff;
}
if (!Invisible)
if (ThousandBlades_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
ThousandBlades_Timer = 7000 + rand()%5000;
} else ThousandBlades_Timer -= diff;
if (ThousandBlades_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_THOUSANDBLADES);
ThousandBlades_Timer = 7000 + rand()%5000;
} else ThousandBlades_Timer -= diff;
}
DoMeleeAttackIfReady();
}
@@ -252,6 +252,7 @@ public:
void UpdateAI(const uint32 diff)
{
if (questPhase == 1)
{
if (timer <= diff)
{
me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND);
@@ -266,22 +267,25 @@ public:
}
else
timer -= diff;
}
if (!UpdateVictim())
return;
// healer
if (spellFlashLight)
if (HealthBelowPct(70))
if (timerFlashLight <= diff)
{
DoCast(me, SPELL_FLASH_OF_LIGHT);
timerFlashLight = TIMER_FLASH_OF_LIGHT + rand()%TIMER_FLASH_OF_LIGHT;
}
else
timerFlashLight -= diff;
if (spellFlashLight && HealthBelowPct(70))
{
if (timerFlashLight <= diff)
{
DoCast(me, SPELL_FLASH_OF_LIGHT);
timerFlashLight = TIMER_FLASH_OF_LIGHT + rand()%TIMER_FLASH_OF_LIGHT;
}
else
timerFlashLight -= diff;
}
if (spellJustice)
{
if (timerJustice <= diff)
{
DoCast(me, SPELL_SEAL_OF_JUSTICE);
@@ -289,8 +293,10 @@ public:
}
else
timerJustice -= diff;
}
if (spellJudLight)
{
if (timerJudLight <= diff)
{
DoCast(me, SPELL_JUDGEMENT_OF_LIGHT);
@@ -298,8 +304,10 @@ public:
}
else
timerJudLight -= diff;
}
if (spellCommand)
if (spellCommand)
{
if (timerCommand <= diff)
{
DoCast(me, TIMER_SEAL_OF_COMMAND);
@@ -307,14 +315,15 @@ public:
}
else
timerCommand -= diff;
}
DoMeleeAttackIfReady();
DoMeleeAttackIfReady();
}
void Activate(uint64 summonerguid)
{
questPhase = 1;
summonerGuid = summonerguid;
questPhase = 1;
summonerGuid = summonerguid;
}
void KilledUnit(Unit* Killed)
@@ -36,10 +36,10 @@ EndScriptData */
const Position LorgusPosition[4] =
{
{ -458.500610f, -38.343079f, -33.474445f },
{ -469.423615f, -88.400513f, -39.265102f },
{ -622.354980f, -10.350100f, -22.777000f },
{ -759.640564f, 16.658913f, -29.159529f }
{ -458.500610f, -38.343079f, -33.474445f, 0.0f },
{ -469.423615f, -88.400513f, -39.265102f, 0.0f },
{ -622.354980f, -10.350100f, -22.777000f, 0.0f },
{ -759.640564f, 16.658913f, -29.159529f, 0.0f }
};
const Position SpawnsLocation[] =
@@ -525,7 +525,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
}
}
void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3])
{
// 1 in 4 chance we give a rally yell. Not sure if the chance is offilike.
if (rand()%4 == 0)
@@ -67,7 +67,7 @@ struct Wave
bool IsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that
};
static Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
const Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
{ // Rage Winterchill Wave 1-8
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0}, 120000, false},
@@ -92,7 +92,7 @@ static Wave AllianceWaves[]= // Waves that will b
{{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}
};
static Wave HordeWaves[]= // Waves that are summoned in the Horde base
const Wave HordeWaves[]= // Waves that are summoned in the Horde base
{ // Kaz'Rogal Wave 1-8
{{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0}, 180000, false},
@@ -141,7 +141,7 @@ enum YellId
DEATH = 6, // Used on death
};
static Yells JainaQuotes[]=
const Yells JainaQuotes[]=
{
{ATTACKED, -1534000},
{ATTACKED, -1534001},
@@ -154,7 +154,7 @@ static Yells JainaQuotes[]=
{DEATH, -1534008},
};
static Yells ThrallQuotes[]=
const Yells ThrallQuotes[]=
{
{ATTACKED, -1534009},
{ATTACKED, -1534010},
@@ -201,7 +201,7 @@ struct hyjalAI : public npc_escortAI
void SummonCreature(uint32 entry, float Base[4][3]); // Summons a creature for that wave in that base
// Summons the next wave, calls SummonCreature
void SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3]);
void SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]);
void StartEvent(Player* player); // Begins the event by gossip click
@@ -245,9 +245,9 @@ struct Wave
static Wave PortalWaves[]=
{
{C_ASSAS, C_WHELP, C_CHRON, 0},
{C_EXECU, C_CHRON, C_WHELP, C_ASSAS},
{C_EXECU, C_VANQU, C_CHRON, C_ASSAS}
{ {C_ASSAS, C_WHELP, C_CHRON, 0} },
{ {C_EXECU, C_CHRON, C_WHELP, C_ASSAS} },
{ {C_EXECU, C_VANQU, C_CHRON, C_ASSAS} }
};
class npc_time_rift : public CreatureScript
@@ -87,17 +87,17 @@ static sOnyxMove aMoveData[]=
{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -55.0548f},//north
};
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f};
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f, 0.0f};
const Position Phase2Location = {-80.924f, -214.299f, -82.942f};
const Position Phase2Location = {-80.924f, -214.299f, -82.942f, 0.0f};
static Position aSpawnLocations[3]=
{
//Whelps
{-30.127f, -254.463f, -89.440f},
{-30.817f, -177.106f, -89.258f},
{-30.127f, -254.463f, -89.440f, 0.0f},
{-30.817f, -177.106f, -89.258f, 0.0f},
//Lair Guard
{-145.950f, -212.831f, -68.659f}
{-145.950f, -212.831f, -68.659f, 0.0f}
};
class boss_onyxia : public CreatureScript
@@ -177,7 +177,7 @@ public:
}
}
void EnterCombat(Unit* pWho)
void EnterCombat(Unit* /*pWho*/)
{
DoScriptText(SAY_AGGRO, me);
me->SetInCombatWithZone();
@@ -189,7 +189,7 @@ public:
}
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
if (m_pInstance)
m_pInstance->SetData(DATA_ONYXIA, DONE);
@@ -220,12 +220,12 @@ public:
Summons.Despawn(summon);
}
void KilledUnit(Unit* pVictim)
void KilledUnit(Unit* /*pVictim*/)
{
DoScriptText(SAY_KILL, me);
}
void SpellHit(Unit *pCaster, const SpellEntry* pSpell)
void SpellHit(Unit * /*pCaster*/, const SpellEntry* pSpell)
{
if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST ||
pSpell->Id == SPELL_BREATH_WEST_TO_EAST ||
@@ -260,23 +260,23 @@ public:
me->GetMotionMaster()->MoveChase(me->getVictim());
m_uiBellowingRoarTimer = 1000;
break;
case 10:
me->SetFlying(true);
case 10:
me->SetFlying(true);
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(),Phase2Location.GetPositionY(),Phase2Location.GetPositionZ()+25);
me->SetSpeed(MOVE_FLIGHT, 1.0f);
me->SetSpeed(MOVE_FLIGHT, 1.0f);
DoScriptText(SAY_PHASE_2_TRANS, me);
if (m_pInstance)
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
m_uiWhelpTimer = 5000;
m_uiLairGuardTimer = 15000;
break;
case 11:
break;
case 11:
if (m_pPointData)
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ);
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle();
break;
break;
default:
m_bIsMoving = false;
@@ -67,7 +67,7 @@ public:
m_uiEruptTimer = 0;
}
void OnCreatureCreate(Creature* pCreature, bool add)
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
{
switch (pCreature->GetEntry())
{
@@ -230,7 +230,7 @@ public:
}
}
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0)
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0)
{
switch(criteria_id)
{
@@ -162,7 +162,7 @@ const Position FleshTentaclePos[2] =
};
//Kick out position
const Position KickPos = { -8545.0f, 1984.0f, -96.0f};
const Position KickPos = { -8545.0f, 1984.0f, -96.0f, 0.0f};
class boss_eye_of_cthun : public CreatureScript
{
@@ -353,6 +353,7 @@ public:
case PHASE_EYE_RED_BEAM:
if (DarkGlareTick < 35)
{
if (DarkGlareTickTimer <= diff)
{
//Set angle and cast
@@ -372,6 +373,7 @@ public:
//1 second per tick
DarkGlareTickTimer = 1000;
} else DarkGlareTickTimer -= diff;
}
//PhaseTimer
if (PhaseTimer <= diff)
@@ -799,6 +801,7 @@ public:
} else StomachEnterTimer -= diff;
if (StomachEnterVisTimer && StomachEnterTarget)
{
if (StomachEnterVisTimer <= diff)
{
//Check for valid player
@@ -812,6 +815,7 @@ public:
StomachEnterTarget = 0;
StomachEnterVisTimer = 0;
} else StomachEnterVisTimer -= diff;
}
//GientClawTentacleTimer
if (GiantClawTentacleTimer <= diff)
@@ -1051,6 +1055,7 @@ public:
//EvadeTimer
if (!me->IsWithinMeleeRange(me->getVictim()))
{
if (EvadeTimer <= diff)
{
if (Unit* p = Unit::GetUnit(*me, Portal))
@@ -1083,6 +1088,7 @@ public:
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
}
//GroundRuptureTimer
if (GroundRuptureTimer <= diff)
@@ -1161,40 +1167,40 @@ public:
//EvadeTimer
if (!me->IsWithinMeleeRange(me->getVictim()))
if (EvadeTimer <= diff)
{
if (Unit* p = Unit::GetUnit(*me, Portal))
p->Kill(p);
//Dissapear and reappear at new position
me->SetVisibility(VISIBILITY_OFF);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
if (EvadeTimer <= diff)
{
me->Kill(me);
return;
}
if (Unit* p = Unit::GetUnit(*me, Portal))
p->Kill(p);
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
{
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
//Dissapear and reappear at new position
me->SetVisibility(VISIBILITY_OFF);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
{
pPortal->SetReactState(REACT_PASSIVE);
Portal = pPortal->GetGUID();
me->Kill(me);
return;
}
GroundRuptureTimer = 500;
HamstringTimer = 2000;
ThrashTimer = 5000;
EvadeTimer = 5000;
AttackStart(pTarget);
}
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
{
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
Portal = pPortal->GetGUID();
}
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
GroundRuptureTimer = 500;
HamstringTimer = 2000;
ThrashTimer = 5000;
EvadeTimer = 5000;
AttackStart(pTarget);
}
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
}
//GroundRuptureTimer
if (GroundRuptureTimer <= diff)
@@ -61,7 +61,7 @@ class npc_sergeant_bly : public CreatureScript
public:
npc_sergeant_bly() : CreatureScript("npc_sergeant_bly") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
@@ -179,7 +179,7 @@ public:
DoMeleeAttackIfReady();
}
void DoAction(const int32 param)
void DoAction(const int32 /*param*/)
{
postGossipStep=1;
Text_Timer = 0;
@@ -219,7 +219,7 @@ class go_troll_cage : public GameObjectScript
public:
go_troll_cage() : GameObjectScript("go_troll_cage") { }
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
{
if (InstanceScript* pInstance = pGo->GetInstanceScript())
{
@@ -261,7 +261,7 @@ class npc_weegli_blastfuse : public CreatureScript
public:
npc_weegli_blastfuse() : CreatureScript("npc_weegli_blastfuse") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
@@ -356,7 +356,7 @@ public:
}
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 /*type*/, uint32 /*id*/)
{
if (pInstance)
{
@@ -376,7 +376,7 @@ public:
}
}
void DoAction(const int32 param)
void DoAction(const int32 /*param*/)
{
DestroyDoor();
}
@@ -415,7 +415,7 @@ class go_shallow_grave : public GameObjectScript
public:
go_shallow_grave() : GameObjectScript("go_shallow_grave") { }
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
{
// randomly summon a zombie or dead hero the first time a grave is used
if (pGo->GetUseCount() == 0)
@@ -448,7 +448,7 @@ class at_zumrah : public AreaTriggerScript
public:
at_zumrah() : AreaTriggerScript("at_zumrah") { }
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry *at)
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry * /*at*/)
{
Creature* pZumrah = pPlayer->FindNearestCreature(ZUMRAH_ID, 30.0f);
+1 -1
View File
@@ -456,7 +456,7 @@ class go_naga_brazier : public GameObjectScript
{
}
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* /*player*/, GameObject* go)
{
if (Creature* creature = GetClosestCreatureWithEntry(go, NPC_MUGLASH, INTERACTION_DISTANCE*2))
{
+4
View File
@@ -331,11 +331,13 @@ public:
void UpdateAI(const uint32 diff)
{
if (Must_Die)
{
if (Must_Die_Timer <= diff)
{
me->ForcedDespawn();
return;
} else Must_Die_Timer -= diff;
}
if (!Escape)
{
@@ -490,10 +492,12 @@ public:
void UpdateAI(const uint32 diff)
{
if (we_must_die)
{
if (must_die_timer <= diff)
{
me->ForcedDespawn();
} else must_die_timer -= diff;
}
return;
}
@@ -368,7 +368,7 @@ public:
## npc_zelfrax
######*/
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f};
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f, 0.0f};
enum eZelfrax
{
@@ -503,19 +503,19 @@ public:
DoScriptText(SAY_STAY_1, me, pPlayer);
break;
case 11:
DoScriptText(SAY_STAY_2, me, pPlayer);
DoScriptText(SAY_STAY_2, me, pPlayer);
break;
case 25:
DoScriptText(SAY_STAY_3, me, pPlayer);
DoScriptText(SAY_STAY_3, me, pPlayer);
break;
case 26:
DoScriptText(SAY_STAY_4, me, pPlayer);
DoScriptText(SAY_STAY_4, me, pPlayer);
break;
case 27:
DoScriptText(SAY_STAY_5, me, pPlayer);
DoScriptText(SAY_STAY_5, me, pPlayer);
break;
case 28:
DoScriptText(SAY_STAY_6, me, pPlayer);
DoScriptText(SAY_STAY_6, me, pPlayer);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
break;
case 29:
@@ -274,6 +274,7 @@ public:
} else uiHolySmiteTimer -= uiDiff;
if (me->HasAura(SPELL_SHIELD))
{
if (uiRenewTimer <= uiDiff)
{
me->InterruptNonMeleeSpells(true);
@@ -291,7 +292,7 @@ public:
}
uiRenewTimer = urand(15000,17000);
} else uiRenewTimer -= uiDiff;
}
if (!bHealth && !HealthAbovePct(25))
{
@@ -157,6 +157,7 @@ public:
return;
if (bEventInProgress)
{
if (uiResurrectTimer <= uiDiff)
{
me->SetFullHealth();
@@ -166,6 +167,7 @@ public:
bEventInProgress = false;
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
} else uiResurrectTimer -= uiDiff;
}
switch(uiPhase)
{
@@ -211,12 +213,14 @@ public:
DoCast(me, SPELL_ARMY_DEAD);
}
if (!bDeathArmyDone)
{
if (uiDeathArmyCheckTimer <= uiDiff)
{
me->clearUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED);
uiDeathArmyCheckTimer = 0;
bDeathArmyDone = true;
} else uiDeathArmyCheckTimer -= uiDiff;
}
if (uiDesecration <= uiDiff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
@@ -207,7 +207,7 @@ public:
switch(i)
{
case 2:
if (pInstance && uiWaypointPath == 3 || uiWaypointPath == 2)
if ((pInstance && uiWaypointPath == 3) || uiWaypointPath == 2)
pInstance->SetData(DATA_MOVEMENT_DONE, pInstance->GetData(DATA_MOVEMENT_DONE)+1);
break;
case 3:
@@ -308,7 +308,7 @@ public:
{
me->GetMotionMaster()->MovePoint(1,735.81f,661.92f,412.39f);
if (Creature* pBoss = me->SummonCreature(uiArgentChampion,SpawnPosition))
if (me->SummonCreature(uiArgentChampion,SpawnPosition))
{
for (uint8 i = 0; i < 3; ++i)
{
@@ -366,8 +366,8 @@ public:
DoStartArgentChampionEncounter();
}
if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
if ((pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE) ||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
me->SummonCreature(VEHICLE_BLACK_KNIGHT,769.834f,651.915f,447.035f,0);
}
@@ -472,10 +472,10 @@ public:
InstanceScript* pInstance = pCreature->GetInstanceScript();
if (pInstance &&
pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
((pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
pInstance->GetData(BOSS_BLACK_KNIGHT) == DONE &&
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE) ||
pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE))
return false;
if (pInstance &&
@@ -59,9 +59,9 @@ enum Achievements
ACHIEV_OH_NOVOS = 2057
};
static Position AddSpawnPoint = { -379.20f, -816.76f, 59.70f };
static Position CrystalHandlerSpawnPoint = { -326.626343f, -709.956604f, 27.813314f };
static Position AddDestinyPoint = { -379.314545f, -772.577637f, 28.58837f };
static Position AddSpawnPoint = { -379.20f, -816.76f, 59.70f, 0.0f };
static Position CrystalHandlerSpawnPoint = { -326.626343f, -709.956604f, 27.813314f, 0.0f };
static Position AddDestinyPoint = { -379.314545f, -772.577637f, 28.58837f, 0.0f };
class boss_novos : public CreatureScript
{
@@ -169,6 +169,8 @@ public:
uiTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS);
} else uiTimer -= diff;
break;
default:
break;
}
}
void JustDied(Unit* /*killer*/)
@@ -71,7 +71,7 @@ public:
pInstance->SetData(DATA_FALRIC_EVENT, NOT_STARTED);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
if (pInstance)
@@ -82,7 +82,7 @@ public:
events.ScheduleEvent(EVENT_DEFILING_HORROR, urand(25000,45000)); // TODO adjust timer.
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
@@ -90,7 +90,7 @@ public:
pInstance->SetData(DATA_FALRIC_EVENT, DONE);
}
void KilledUnit(Unit *victim)
void KilledUnit(Unit * /*victim*/)
{
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
@@ -67,7 +67,7 @@ public:
pInstance->SetData(DATA_MARWYN_EVENT, NOT_STARTED);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
if (pInstance)
@@ -79,7 +79,7 @@ public:
events.ScheduleEvent(EVENT_SHARED_SUFFERING, 20000); // TODO Check timer
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
@@ -87,7 +87,7 @@ public:
pInstance->SetData(DATA_MARWYN_EVENT, DONE);
}
void KilledUnit(Unit *victim)
void KilledUnit(Unit * /*victim*/)
{
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
}
@@ -135,19 +135,19 @@ enum eEnum
QUEST_WRATH_OF_THE_LICH_KING_H2 = 24802,
};
static Position HallsofReflectionLocs[]=
const Position HallsofReflectionLocs[]=
{
{5283.234863f, 1990.946777f, 707.695679f, 0.929097f}, // 2 Loralen Follows
{5408.031250f, 2102.918213f, 707.695251f, 0.792756f}, // 9 Sylvanas Follows
{5401.866699f, 2110.837402f, 707.695251f, 0.800610f}, // 10 Loralen follows
};
static Position SpawnPos = {5262.540527f, 1949.693726f, 707.695007f, 0.808736f}; // Jaina/Sylvanas Beginning Position
static Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
static Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
static Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
static Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
static Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
const Position SpawnPos = {5262.540527f, 1949.693726f, 707.695007f, 0.808736f}; // Jaina/Sylvanas Beginning Position
const Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
const Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
const Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
class npc_jaina_or_sylvanas_hor : public CreatureScript
{
@@ -157,7 +157,7 @@ private:
public:
npc_jaina_or_sylvanas_hor(bool isSylvana, const char* name) : CreatureScript(name), m_isSylvana(isSylvana) { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
@@ -438,10 +438,12 @@ public:
}
if (Creature* pUther = me->GetCreature(*me, uiUther))
{
if (pInstance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
DoScriptText(SAY_UTHER_INTRO_A2_9, pUther);
else
DoScriptText(SAY_UTHER_INTRO_H2_7, pUther);
}
events.ScheduleEvent(EVENT_INTRO_LK_2, 11000);
break;
@@ -96,7 +96,7 @@ struct boss_horAI : ScriptedAI
me->SetReactState(REACT_PASSIVE);
}
void DamageTaken(Unit *pWho, uint32 &uiDamage)
void DamageTaken(Unit * /*pWho*/, uint32 &uiDamage)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
uiDamage = 0;
@@ -414,7 +414,7 @@ public:
events.Update(diff);
switch(uint32 eventId = events.ExecuteEvent())
switch(events.ExecuteEvent())
{
case EVENT_NEXT_WAVE:
uiWaveCount++;
@@ -377,9 +377,9 @@ class boss_lady_deathwhisper : public CreatureScript
break;
case EVENT_DOMINATE_MIND_H:
DoScriptText(SAY_DOMINATE_MIND, me);
for (uint8 i = 0; i < uiDominateMindCount; i++)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
DoCast(target, SPELL_DOMINATE_MIND_H);
for (uint8 i = 0; i < uiDominateMindCount; i++)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
DoCast(target, SPELL_DOMINATE_MIND_H);
events.ScheduleEvent(EVENT_DOMINATE_MIND_H, urand(18000, 22000));
break;
case EVENT_P1_SUMMON_WAVE:
@@ -727,7 +727,7 @@ class npc_vengeful_shade : public CreatureScript
npc_vengeful_shadeAI(Creature* pCreature) : ScriptedAI(pCreature)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void Reset()
@@ -755,7 +755,7 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader
class spell_deathwhisper_mana_barrier_AuraScript : public AuraScript
{
void HandlePeriodicTick(AuraEffect const * aurEff, AuraApplication const * aurApp)
void HandlePeriodicTick(AuraEffect const * /*aurEff*/, AuraApplication const * /*aurApp*/)
{
Unit* caster = GetCaster();
int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth();
@@ -783,7 +783,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
class spell_cultist_dark_martyrdom_SpellScript : public SpellScript
{
bool Validate(SpellEntry const* spellEntry)
bool Validate(SpellEntry const* /*spellEntry*/)
{
if (uint32 scriptId = sObjectMgr.GetScriptId("boss_lady_deathwhisper"))
if (CreatureInfo const* creInfo = ObjectMgr::GetCreatureTemplate(NPC_LADY_DEATHWHISPER))
@@ -793,7 +793,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
return false;
}
void HandleEffect(SpellEffIndex effIndex)
void HandleEffect(SpellEffIndex /*effIndex*/)
{
if (GetCaster()->isSummon())
if (Unit* owner = GetCaster()->ToTempSummon()->GetSummoner())
@@ -104,7 +104,7 @@ class boss_lord_marrowgar : public CreatureScript
pInstance->SetData(DATA_LORD_MARROWGAR, NOT_STARTED);
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
@@ -112,7 +112,7 @@ class boss_lord_marrowgar : public CreatureScript
pInstance->SetData(DATA_LORD_MARROWGAR, IN_PROGRESS);
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
@@ -354,14 +354,14 @@ class npc_bone_spike : public CreatureScript
uiTrappedGUID = 0;
}
void JustDied(Unit *killer)
void JustDied(Unit * /*killer*/)
{
events.Reset();
if (Unit* trapped = Unit::GetUnit((*me), uiTrappedGUID))
trapped->RemoveAurasDueToSpell(SPELL_IMPALED);
}
void KilledUnit(Unit *pVictim)
void KilledUnit(Unit * /*pVictim*/)
{
me->Kill(me);
}
@@ -415,7 +415,7 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
class spell_marrowgar_coldflame_SpellScript : public SpellScript
{
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
uint8 count = 1;
@@ -463,7 +463,7 @@ class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript
{
void HandleApplyAura(SpellEffIndex effIndex)
void HandleApplyAura(SpellEffIndex /*effIndex*/)
{
CreatureAI* marrowgarAI = GetCaster()->ToCreature()->AI();
bool yell = false;
@@ -512,7 +512,7 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
class spell_marrowgar_bone_storm_SpellScript : public SpellScript
{
void RecalculateDamage(SpellEffIndex effIndex)
void RecalculateDamage(SpellEffIndex /*effIndex*/)
{
int32 dmg = GetHitDamage();
float distance = GetHitUnit()->GetExactDist2d(GetCaster());
@@ -61,7 +61,7 @@ class icecrown_citadel_teleport : public GameObjectScript
return true;
}
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action)
{
player->CLOSE_GOSSIP_MENU();
SpellEntry const* spell = sSpellStore.LookupEntry(action);
@@ -50,7 +50,7 @@ class instance_icecrown_citadel : public InstanceMapScript
return false;
}
void OnCreatureCreate(Creature* creature, bool add)
void OnCreatureCreate(Creature* creature, bool /*add*/)
{
Map::PlayerList const &players = instance->GetPlayers();
uint32 TeamInInstance = 0;
@@ -82,7 +82,7 @@ class instance_icecrown_citadel : public InstanceMapScript
}
}
void OnGameObjectCreate(GameObject* pGo, bool add)
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
{
switch (pGo->GetEntry())
{
@@ -51,12 +51,12 @@ enum Achievs
const Position RiftLocation[6] =
{
{652.64f, -273.70f, -8.75f},
{634.45f, -265.94f, -8.44f},
{620.73f, -281.17f, -9.02f},
{626.10f, -304.67f, -9.44f},
{639.87f, -314.11f, -9.49f},
{651.72f, -297.44f, -9.37f}
{652.64f, -273.70f, -8.75f, 0.0f},
{634.45f, -265.94f, -8.44f, 0.0f},
{620.73f, -281.17f, -9.02f, 0.0f},
{626.10f, -304.67f, -9.44f, 0.0f},
{639.87f, -314.11f, -9.49f, 0.0f},
{651.72f, -297.44f, -9.37f, 0.0f}
};
class boss_anomalus : public CreatureScript
@@ -229,10 +229,12 @@ public:
{
Unit* pAnomalus = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
if (pAnomalus && pAnomalus->HasAura(SPELL_RIFT_SHIELD))
DoCast(pTarget, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
else
DoCast(pTarget, SPELL_CHAOTIC_ENERGY_BURST);
}
uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS;
} else uiChaoticEnergyBurstTimer -= diff;
@@ -125,6 +125,7 @@ public:
return;
}
if (bCrystalSpikes)
{
if (uiCrystalSpikesTimer2 <= diff)
{
fSpikeXY[0][0] = fBaseX+(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO));
@@ -141,6 +142,7 @@ public:
bCrystalSpikes = false;
uiCrystalSpikesTimer2 = 200;
} else uiCrystalSpikesTimer2 -= diff;
}
if (!bFrenzy && HealthBelowPct(25))
{
@@ -71,9 +71,9 @@ struct Summons
static Summons Group[]=
{
{NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_CLOUDSCRAPER,NPC_PHANTASMAL_MAMMOTH,NPC_PHANTASMAL_WOLF},
{NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_AIR,NPC_PHANTASMAL_WATER,NPC_PHANTASMAL_FIRE},
{NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_OGRE,NPC_PHANTASMAL_NAGAL,NPC_PHANTASMAL_MURLOC}
{ {NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_CLOUDSCRAPER, NPC_PHANTASMAL_MAMMOTH, NPC_PHANTASMAL_WOLF} },
{ {NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_AIR, NPC_PHANTASMAL_WATER, NPC_PHANTASMAL_FIRE} },
{ {NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_OGRE, NPC_PHANTASMAL_NAGAL, NPC_PHANTASMAL_MURLOC} }
};
static uint32 TeleportSpells[]=
@@ -133,7 +133,8 @@ public:
uiGroup[2] = 0;
}
x,y = 0.0f;
x = 0.0f;
y = 0.0f;
bCanCast = false;
bCanGoBack = false;
@@ -146,7 +147,7 @@ public:
uiTimeBombTimer = urand(20000,25000);
}
void EnterCombat(Unit* pWho)
void EnterCombat(Unit* /*pWho*/)
{
if (pInstance)
pInstance->SetData(DATA_UROM_EVENT, IN_PROGRESS);
@@ -325,7 +326,7 @@ public:
me->DeleteThreatList();
}
void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell)
{
switch(pSpell->Id)
{
@@ -76,11 +76,11 @@ public:
}
}
void OnGameObjectCreate(GameObject* pGO, bool bAdd)
void OnGameObjectCreate(GameObject* pGO, bool /*bAdd*/)
{
if (pGO->GetEntry() == GO_DRAGON_CAGE_DOOR)
{
if (DATA_DRAKOS_EVENT == DONE)
if (GetData(DATA_DRAKOS_EVENT) == DONE)
pGO->SetGoState(GO_STATE_ACTIVE);
else
pGO->SetGoState(GO_STATE_READY);
@@ -128,8 +128,8 @@ enum Achievements
static Position SpawnLocations[]=
{
{946.992f, 397.016f, 208.374f},
{960.748f, 382.944f, 208.374f},
{946.992f, 397.016f, 208.374f, 0.0f},
{960.748f, 382.944f, 208.374f, 0.0f},
};
class mob_tribuna_controller : public CreatureScript
@@ -167,7 +167,7 @@ enum eAchievementData
static Position Center[]=
{
{354.8771f, -12.90240f, 409.803650f},
{354.8771f, -12.90240f, 409.803650f, 0.0f},
};
const Position PosSiege[5] =
@@ -806,7 +806,7 @@ public:
me->GetMap()->CreatureRelocation(me, x,y,z,0);
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 /*diff*/)
{
}
};
@@ -851,7 +851,7 @@ public:
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 /*type*/, uint32 id)
{
if (id == 1)
{
@@ -940,7 +940,7 @@ public:
}
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 /*diff*/)
{
if (!UpdateVictim())
return;
@@ -981,7 +981,7 @@ public:
{
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 /*diff*/)
{
if (!me->HasAura(AURA_DUMMY_BLUE))
me->AddAura(AURA_DUMMY_BLUE, me);
@@ -1012,7 +1012,7 @@ public:
me->SetReactState(REACT_PASSIVE);
}
void WaypointReached(uint32 i)
void WaypointReached(uint32 /*i*/)
{
}
@@ -1084,7 +1084,7 @@ public:
{
}
void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 /*diff*/)
{
if (!me->HasAura(AURA_DUMMY_GREEN))
me->AddAura(AURA_DUMMY_GREEN, me);
@@ -1331,7 +1331,7 @@ class go_ulduar_tower : public GameObjectScript
public:
go_ulduar_tower() : GameObjectScript("go_ulduar_tower") { }
void OnDestroyed(Player* pPlayer, GameObject* pGO, uint32 value)
void OnDestroyed(Player* /*pPlayer*/, GameObject* pGO, uint32 /*value*/)
{
InstanceScript* pInstance = pGO->GetInstanceScript();
if (pGO->GetGOValue()->building.health == 0)
@@ -1361,7 +1361,7 @@ class at_RX_214_repair_o_matic_station : public AreaTriggerScript
public:
at_RX_214_repair_o_matic_station() : AreaTriggerScript("at_RX_214_repair_o_matic_station") { }
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry* pAt)
bool OnTrigger(Player* pPlayer, const AreaTriggerEntry* /*pAt*/)
{
if(Creature* vehicle = pPlayer->GetVehicleCreatureBase())
{
@@ -442,12 +442,14 @@ public:
//Enrage stuff
if (!enraged)
{
if (uiEnrageTimer <= diff)
{
DoScriptText(SAY_BERSERK, me);
DoCast(me, SPELL_ENRAGE);
enraged = true;
} else uiEnrageTimer -= diff;
}
}
void exposeHeart()
@@ -559,10 +561,10 @@ public:
if (pXT002->AI())
{
uint32 health = me->GetHealth();
health -= damage;
if (health < 0)
if (health <= damage)
health = 0;
else
health -= damage;
pXT002->AI()->SetData(DATA_TRANSFERED_HEALTH, me->GetMaxHealth() - health);
}
}
@@ -202,7 +202,7 @@ public:
}
}
void ProcessEvent(GameObject* pGO, uint32 uiEventId)
void ProcessEvent(GameObject* /*pGO*/, uint32 uiEventId)
{
// Flame Leviathan's Tower Event triggers
Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID);
@@ -192,12 +192,14 @@ public:
if (bEventInProgress)
{
if (uiSpawnResTimer)
{
if (uiSpawnResTimer <= diff)
{
DoCast(me, SPELL_SUMMON_BANSHEE); // Summons directly on caster position
// DoCast(me, SPELL_SCOURG_RESURRECTION, true); // Not needed ?
uiSpawnResTimer = 0;
} else uiSpawnResTimer -= diff;
}
return;
}
@@ -356,6 +358,7 @@ public:
void UpdateAI(const uint32 diff)
{
if (uiResurectTimer)
{
if (uiResurectTimer <= diff)
{
if (uiResurectPhase == 1)
@@ -383,11 +386,10 @@ public:
uiResurectTimer = 0;
}
}
} else uiResurectTimer -= diff;
}
}
};
};
@@ -212,6 +212,7 @@ public:
} else ShadowboltTimer -= diff;
if (!Skeletons)
{
if ((SummonSkeletonsTimer <= diff))
{
Creature* Skeleton;
@@ -229,6 +230,7 @@ public:
}
Skeletons = true;
} else SummonSkeletonsTimer -= diff;
}
if (FrostTombTimer <= diff)
{
@@ -167,6 +167,7 @@ public:
if (!ghost)
{
if (Check_Timer)
{
if (Check_Timer <= diff)
{
Check_Timer = 5000;
@@ -178,15 +179,16 @@ public:
Check_Timer = 0;
}
} else Check_Timer -= diff;
}
if (Response_Timer && Dalronn_isDead)
{
if (Response_Timer <= diff)
{
DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST,me);
if (Response_Timer)
if (Dalronn_isDead)
if (Response_Timer <= diff)
{
DoScriptText(YELL_SKARVALD_DAL_DIEDFIRST,me);
Response_Timer = 0;
} else Response_Timer -= diff;
Response_Timer = 0;
} else Response_Timer -= diff;
}
}
if (Charge_Timer <= diff)
@@ -278,6 +280,7 @@ public:
{
Unit* skarvald = Unit::GetUnit((*me),pInstance->GetData64(DATA_SKARVALD));
if (skarvald)
{
if (skarvald->isDead())
{
DoScriptText(YELL_DALRONN_SKA_DIED,me);
@@ -298,6 +301,7 @@ public:
temp->AI()->AttackStart(Killer);
}
}
}
}
}
@@ -321,16 +325,19 @@ public:
return;
if (AggroYell_Timer)
{
if (AggroYell_Timer <= diff)
{
DoScriptText(YELL_DALRONN_AGGRO,me);
AggroYell_Timer = 0;
} else AggroYell_Timer -= diff;
}
if (!ghost)
{
if (Check_Timer)
{
if (Check_Timer <= diff)
{
Check_Timer = 5000;
@@ -342,15 +349,16 @@ public:
Check_Timer = 0;
}
} else Check_Timer -= diff;
}
if (Response_Timer)
if (Skarvald_isDead)
if (Response_Timer <= diff)
{
DoScriptText(YELL_DALRONN_SKA_DIEDFIRST,me);
Response_Timer = 0;
} else Response_Timer -= diff;
if (Response_Timer && Skarvald_isDead)
{
if (Response_Timer <= diff)
{
DoScriptText(YELL_DALRONN_SKA_DIEDFIRST,me);
Response_Timer = 0;
} else Response_Timer -= diff;
}
}
if (ShadowBolt_Timer <= diff)
@@ -372,6 +380,7 @@ public:
} else Debilitate_Timer -= diff;
if (IsHeroic())
{
if (Summon_Timer <= diff)
{
if (!me->IsNonMeleeSpellCasted(false))
@@ -380,6 +389,7 @@ public:
Summon_Timer = (rand()%10000) + 20000;
}
} else Summon_Timer -= diff;
}
DoMeleeAttackIfReady();
}
@@ -789,6 +789,7 @@ public:
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_MASSIVE_JORMUNGAR) : 0); break;
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_FEROCIOUS_RHINO) : 0); break;
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
default: break;
}
if (pNext)
@@ -809,7 +810,7 @@ public:
{
if (type != POINT_MOTION_TYPE)
return;
if (id<0 || id>4)
if (id > 4)
return;
Creature *pNext = NULL;
switch(id)
@@ -819,6 +820,7 @@ public:
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_MASSIVE_JORMUNGAR) : 0); break;
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_FEROCIOUS_RHINO) : 0); break;
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
default: break;
}
if (pNext)
DoCast(pNext, SPELL_ORB_CHANNEL, false);
@@ -77,9 +77,9 @@ enum CombatPhase
static Position RitualChannelerPos[]=
{
{296.42f, -355.01f, 90.94f},
{302.36f, -352.01f, 90.54f},
{291.39f, -350.89f, 90.54f}
{296.42f, -355.01f, 90.94f, 0.0f},
{302.36f, -352.01f, 90.54f, 0.0f},
{291.39f, -350.89f, 90.54f, 0.0f}
};
static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
static Position SvalaPos = { 296.632f, -346.075f, 90.6307f, 1.58f };
@@ -189,7 +189,7 @@ public:
uiIntroTimer = 200;
break;
case 6:
if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS))
if (me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS))
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(DATA_SVALA_DISPLAY_ID);
@@ -341,6 +341,7 @@ public:
} else uiCallFlamesTimer -= diff;
if (!bSacrificed)
{
if (uiRitualOfSwordTimer <= diff)
{
if (Unit* pSacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
@@ -364,6 +365,7 @@ public:
bSacrificed = true;
}
} else uiRitualOfSwordTimer -= diff;
}
DoMeleeAttackIfReady();
}
+3 -3
View File
@@ -518,16 +518,16 @@ public:
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action )
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*sender*/, uint32 action)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch(action)
{
case GOSSIP_ACTION_TRAIN:
pPlayer->SEND_TRAINERLIST( pCreature->GetGUID() );
pPlayer->SEND_TRAINERLIST(pCreature->GetGUID());
break;
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST( pCreature->GetGUID() );
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
break;
}
return true;
@@ -93,6 +93,7 @@ EndScriptData */
#define OLUM_Z -7.54773f
#define OLUM_O 0.401581f
#define MAX_ADVISORS 3
//Fathom-Lord Karathress AI
class boss_fathomlord_karathress : public CreatureScript
{
@@ -122,7 +123,7 @@ public:
bool BlessingOfTides;
uint64 Advisors[3];
uint64 Advisors[MAX_ADVISORS];
void Reset()
{
@@ -134,24 +135,23 @@ public:
if (pInstance)
{
uint64 RAdvisors[3];
uint64 RAdvisors[MAX_ADVISORS];
RAdvisors[0] = pInstance->GetData64(DATA_SHARKKIS);
RAdvisors[1] = pInstance->GetData64(DATA_TIDALVESS);
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
//Respawn of the 3 Advisors
Creature* pAdvisor = NULL;
for (int i=0; i<3; ++i)
if (RAdvisors[i])
{
pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
if (pAdvisor && !pAdvisor->isAlive())
for (int i=0; i<MAX_ADVISORS; ++i)
if (RAdvisors[i])
{
pAdvisor->Respawn();
pAdvisor->AI()->EnterEvadeMode();
pAdvisor->GetMotionMaster()->MoveTargetedHome();
pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
if (pAdvisor && !pAdvisor->isAlive())
{
pAdvisor->Respawn();
pAdvisor->AI()->EnterEvadeMode();
pAdvisor->GetMotionMaster()->MoveTargetedHome();
}
}
}
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
@@ -280,7 +280,7 @@ public:
BlessingOfTides = true;
bool continueTriggering = false;
Creature* Advisor;
for (uint8 i = 0; i < 4; ++i)
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
if (Advisors[i])
{
Advisor = (Unit::GetCreature(*me, Advisors[i]));
+2 -2
View File
@@ -979,7 +979,7 @@ public:
case 17:
case 29:
//Find Object and "work"
if ( GameObject* pGO = GetClosestGameObjectWithEntry(me,GO_DRAENEI_MACHINE,INTERACTION_DISTANCE))
if (GetClosestGameObjectWithEntry(me,GO_DRAENEI_MACHINE,INTERACTION_DISTANCE))
{
// take the GO -> animation
me->HandleEmoteCommand(EMOTE_STATE_LOOT);
@@ -994,7 +994,7 @@ public:
}
}
void JustDied(Unit* pKiller)
void JustDied(Unit* /*pKiller*/)
{
Player* pPlayer = GetPlayerForEscort();
if (pPlayer)
+2 -2
View File
@@ -46,7 +46,7 @@ public:
{
if (IsEventActive(HALLOWEEN_EVENTID) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED))
{
char* localizedEntry;
const char* localizedEntry;
switch (pPlayer->GetSession()->GetSessionDbcLocale())
{
case LOCALE_frFR: localizedEntry = LOCALE_TRICK_OR_TREAT_2; break;
@@ -65,7 +65,7 @@ public:
if (pCreature->isInnkeeper())
{
char* localizedEntry;
const char* localizedEntry;
switch (pPlayer->GetSession()->GetSessionDbcLocale())
{
case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break;