Scripts: Fixed uninitialized variables, unreferenced parameters and virtual overrides
--HG-- branch : trunk
This commit is contained in:
@@ -146,7 +146,7 @@ public:
|
|||||||
explicit PacketFilter(WorldSession * pSession) : m_pSession(pSession) {}
|
explicit PacketFilter(WorldSession * pSession) : m_pSession(pSession) {}
|
||||||
virtual ~PacketFilter() {}
|
virtual ~PacketFilter() {}
|
||||||
|
|
||||||
virtual bool Process(WorldPacket * packet) { return true; }
|
virtual bool Process(WorldPacket * /*packet*/) { return true; }
|
||||||
virtual bool ProcessLogout() const { return true; }
|
virtual bool ProcessLogout() const { return true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetData(uint32 uiType, uint32 /*uiData*/)
|
uint32 GetData(uint32 uiType)
|
||||||
{
|
{
|
||||||
switch(uiType)
|
switch(uiType)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class boss_netherspite : public CreatureScript
|
|||||||
public:
|
public:
|
||||||
boss_netherspite() : CreatureScript("boss_netherspite") { }
|
boss_netherspite() : CreatureScript("boss_netherspite") { }
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature *pCreature)
|
CreatureAI* GetAI(Creature *pCreature) const
|
||||||
{
|
{
|
||||||
return new boss_netherspiteAI(pCreature);
|
return new boss_netherspiteAI(pCreature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ public:
|
|||||||
for (uint8 i = 0; i < 4; ++i)
|
for (uint8 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
Unit *pTarget;
|
Unit *pTarget = NULL;
|
||||||
for (uint8 z = 0; z < 6; ++z)
|
for (uint8 z = 0; z < 6; ++z)
|
||||||
{
|
{
|
||||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||||
@@ -748,7 +748,7 @@ public:
|
|||||||
case TIMER_LEGION_LIGHTNING:
|
case TIMER_LEGION_LIGHTNING:
|
||||||
if (!me->IsNonMeleeSpellCasted(false))
|
if (!me->IsNonMeleeSpellCasted(false))
|
||||||
{
|
{
|
||||||
Unit* pRandomPlayer;
|
Unit* pRandomPlayer = NULL;
|
||||||
|
|
||||||
me->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
|
me->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
|
||||||
for (uint8 z = 0; z < 6; ++z)
|
for (uint8 z = 0; z < 6; ++z)
|
||||||
@@ -844,7 +844,7 @@ public:
|
|||||||
TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true;
|
TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true;
|
||||||
break;
|
break;
|
||||||
case TIMER_ARMAGEDDON: //Phase 4
|
case TIMER_ARMAGEDDON: //Phase 4
|
||||||
Unit *pTarget;
|
Unit *pTarget = NULL;
|
||||||
for (uint8 z = 0; z < 6; ++z)
|
for (uint8 z = 0; z < 6; ++z)
|
||||||
{
|
{
|
||||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
// When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70,000 health.
|
// When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70,000 health.
|
||||||
DoCast(me, SPELL_CAPTURESOUL);
|
DoCast(me, SPELL_CAPTURESOUL);
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ public:
|
|||||||
|
|
||||||
struct instance_dark_portal_InstanceMapScript : public InstanceScript
|
struct instance_dark_portal_InstanceMapScript : public InstanceScript
|
||||||
{
|
{
|
||||||
instance_dark_portal_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {Initialize();};
|
instance_dark_portal_InstanceMapScript(Map* pMap) : InstanceScript(pMap)
|
||||||
|
{
|
||||||
|
Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||||
|
|
||||||
@@ -114,7 +117,7 @@ public:
|
|||||||
DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0);
|
DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEncounterInProgress()
|
bool IsEncounterInProgress() const
|
||||||
{
|
{
|
||||||
if (GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
if (GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
DoScriptText(SAY_AGGRO, me);
|
DoScriptText(SAY_AGGRO, me);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_KILL, me);
|
DoScriptText(SAY_KILL, me);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ public:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit* GetAuraEffectTriggerTarget(uint32 spellId, uint8 /*effIndex*/) const
|
Unit* GetAuraEffectTriggerTarget(uint32 spellId, uint8 /*effIndex*/)
|
||||||
{
|
{
|
||||||
switch (spellId)
|
switch (spellId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ public:
|
|||||||
nWeaver = 0;
|
nWeaver = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied()
|
void JustDied(Unit* /*killer*/)
|
||||||
{
|
{
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
me->GetPosition(x,y,z);
|
me->GetPosition(x,y,z);
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ public:
|
|||||||
|
|
||||||
void SpawnTrigger()
|
void SpawnTrigger()
|
||||||
{
|
{
|
||||||
uint8 iStart,iEnd;
|
uint8 iStart = 0, iEnd = 0;
|
||||||
switch (urand(0,1))
|
switch (urand(0,1))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -447,6 +447,8 @@ public:
|
|||||||
iStart = 38;
|
iStart = 38;
|
||||||
iEnd = 68;
|
iEnd = 68;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
for (uint32 i = iStart; i < iEnd; ++i)
|
for (uint32 i = iStart; i < iEnd; ++i)
|
||||||
me->SummonCreature(CREATURE_TRIGGER, Location[i]);
|
me->SummonCreature(CREATURE_TRIGGER, Location[i]);
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// called by svala sorrowgrave to set guid of victim
|
// called by svala sorrowgrave to set guid of victim
|
||||||
void DoAction(uint32 /*action*/)
|
void DoAction(const int32 /*action*/)
|
||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
if (Unit *pVictim = me->GetUnit(*me, pInstance->GetData64(DATA_SACRIFICED_PLAYER)))
|
if (Unit *pVictim = me->GetUnit(*me, pInstance->GetData64(DATA_SACRIFICED_PLAYER)))
|
||||||
|
|||||||
@@ -2418,7 +2418,7 @@ public:
|
|||||||
me->RestoreFaction();
|
me->RestoreFaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(const int32 iParam)
|
void DoAction(const int32 /*iParam*/)
|
||||||
{
|
{
|
||||||
me->StopMoving();
|
me->StopMoving();
|
||||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||||
@@ -2431,7 +2431,7 @@ public:
|
|||||||
uiEventPhase = 1;
|
uiEventPhase = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetGUID(const uint64 &uiGuid, int32 iId)
|
void SetGUID(const uint64 &uiGuid, int32 /*iId*/)
|
||||||
{
|
{
|
||||||
uiPlayerGUID = uiGuid;
|
uiPlayerGUID = uiGuid;
|
||||||
}
|
}
|
||||||
@@ -2546,7 +2546,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||||
{
|
{
|
||||||
pPlayer->PlayerTalkClass->ClearMenus();
|
pPlayer->PlayerTalkClass->ClearMenus();
|
||||||
|
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ public:
|
|||||||
me->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30*IN_MILLISECONDS);
|
me->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30*IN_MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDies(Creature* pSummoned, Unit* pKiller)
|
void SummonedCreatureDies(Creature* pSummoned, Unit* /*pKiller*/)
|
||||||
{
|
{
|
||||||
uint32 uiEntry = 0;
|
uint32 uiEntry = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ public:
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit * /*who*/) {}
|
void MoveInLineOfSight(Unit * /*who*/) {}
|
||||||
|
|
||||||
void DoAction(const uint32 /*info*/)
|
void DoAction(const int32 /*info*/)
|
||||||
{
|
{
|
||||||
me->RemoveAura(SPELL_VOLCANIC_ERUPTION);
|
me->RemoveAura(SPELL_VOLCANIC_ERUPTION);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public:
|
|||||||
pInstance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ public:
|
|||||||
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ class boss_kaelthas : public CreatureScript
|
|||||||
StartEvent();
|
StartEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
DoScriptText(RAND(SAY_SLAY1,SAY_SLAY2,SAY_SLAY3), me);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user