Scripts/Icecrown Citadel: Compile warning fixes

This commit is contained in:
Shauren
2011-03-19 11:44:04 +01:00
parent c5bf4f06ae
commit cb33b050d9
10 changed files with 43 additions and 40 deletions

View File

@@ -270,7 +270,7 @@ class boss_blood_council_controller : public CreatureScript
void SetData(uint32 /*type*/, uint32 data)
{
resetCounter += data;
resetCounter += uint8(data);
if (resetCounter == 3)
EnterEvadeMode();
}
@@ -334,7 +334,7 @@ class boss_blood_council_controller : public CreatureScript
if (newPrince)
{
newPrince->SetHealth(me->GetHealth());
newPrince->AI()->Talk(invocationOrder[invocationStage].textId);
newPrince->AI()->Talk(uint8(invocationOrder[invocationStage].textId));
}
DoCast(me, invocationOrder[invocationStage].spellId);
@@ -352,10 +352,10 @@ class boss_blood_council_controller : public CreatureScript
{
uint64 guid;
uint32 spellId;
uint8 textId;
uint32 textId;
uint32 visualSpell;
InvocationData(uint64 _guid, uint32 _spellId, int32 _textId, uint32 _visualSpell)
InvocationData(uint64 _guid, uint32 _spellId, uint32 _textId, uint32 _visualSpell)
{
guid = _guid;
spellId = _spellId;
@@ -365,8 +365,8 @@ class boss_blood_council_controller : public CreatureScript
InvocationData() : guid(0), spellId(0), textId(0), visualSpell(0) { }
} invocationOrder[3];
uint8 invocationStage;
uint8 resetCounter;
uint32 invocationStage;
uint32 resetCounter;
};
CreatureAI* GetAI(Creature* creature) const
@@ -564,8 +564,8 @@ class boss_prince_keleseth_icc : public CreatureScript
private:
static const Position roomCenter;
bool isEmpowered; // bool check faster than map lookup
uint32 spawnHealth;
bool isEmpowered; // bool check faster than map lookup
};
CreatureAI* GetAI(Creature* creature) const
@@ -1180,8 +1180,8 @@ class npc_ball_of_flame : public CreatureScript
}
private:
InstanceScript* instance;
uint64 chaseGUID;
InstanceScript* instance;
uint32 despawnTimer;
};
@@ -1247,7 +1247,9 @@ class npc_kinetic_bomb : public CreatureScript
private:
EventMap events;
float x, y, groundZ;
float x;
float y;
float groundZ;
};
CreatureAI* GetAI(Creature* creature) const

View File

@@ -717,7 +717,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader
SpellEntry const* damageSpell = sSpellStore.LookupEntry(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
int32 damage = SpellMgr::CalculateSpellEffectAmount(damageSpell, EFFECT_0);
float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)
damage = uint32(damage * multiplier);
damage = int32(damage * multiplier);
GetTarget()->CastCustomSpell(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true);
}

View File

@@ -277,7 +277,7 @@ class boss_festergut : public CreatureScript
private:
uint64 gasDummyGUID;
uint32 maxInoculatedStack;
uint8 inhaleCounter;
uint32 inhaleCounter;
};
CreatureAI* GetAI(Creature* creature) const

View File

@@ -252,9 +252,9 @@ class boss_lord_marrowgar : public CreatureScript
}
private:
Position coldflameLastPos;
uint32 boneStormDuration;
float baseSpeed;
Position coldflameLastPos;
bool introDone;
bool boneSlice;
};

View File

@@ -233,7 +233,7 @@ class boss_rotface : public CreatureScript
private:
uint32 infectionCooldown;
uint8 infectionStage;
uint32 infectionStage;
};
CreatureAI* GetAI(Creature* creature) const

View File

@@ -922,8 +922,8 @@ class npc_sindragosa_trash : public CreatureScript
}
private:
InstanceScript* instance;
EventMap events;
InstanceScript* instance;
uint32 frostwyrmId;
bool isTaunted; // Frostwing Whelp only
};
@@ -1011,7 +1011,7 @@ class spell_sindragosa_unchained_magic : public SpellScriptLoader
void FilterTargets(std::list<Unit*>& unitList)
{
unitList.remove_if(UnchainedMagicTargetSelector());
uint32 maxSize = GetCaster()->GetMap()->GetSpawnMode() & 1 ? 5 : 2;
uint32 maxSize = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 5 : 2);
if (unitList.size() > maxSize)
Trinity::RandomResizeList(unitList, maxSize);
}

View File

@@ -329,25 +329,25 @@ enum WorldStatesICC
class spell_trigger_spell_from_caster : public SpellScriptLoader
{
public:
spell_trigger_spell_from_caster(char const* scriptName, uint32 _triggerId) : SpellScriptLoader(scriptName), triggerId(_triggerId) { }
spell_trigger_spell_from_caster(char const* scriptName, uint32 triggerId) : SpellScriptLoader(scriptName), _triggerId(triggerId) { }
class spell_trigger_spell_from_caster_SpellScript : public SpellScript
{
PrepareSpellScript(spell_trigger_spell_from_caster_SpellScript);
public:
spell_trigger_spell_from_caster_SpellScript(uint32 _triggerId) : SpellScript(), triggerId(_triggerId) { }
spell_trigger_spell_from_caster_SpellScript(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { }
bool Validate(SpellEntry const* /*spell*/)
{
if (!sSpellStore.LookupEntry(triggerId))
if (!sSpellStore.LookupEntry(_triggerId))
return false;
return true;
}
void HandleTrigger()
{
GetCaster()->CastSpell(GetHitUnit(), triggerId, true);
GetCaster()->CastSpell(GetHitUnit(), _triggerId, true);
}
void Register()
@@ -355,7 +355,7 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader
AfterHit += SpellHitFn(spell_trigger_spell_from_caster_SpellScript::HandleTrigger);
}
uint32 triggerId;
uint32 _triggerId;
};
SpellScript* GetSpellScript() const
@@ -364,7 +364,7 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader
}
private:
uint32 triggerId;
uint32 _triggerId;
};
#endif // ICECROWN_CITADEL_H_

View File

@@ -252,7 +252,7 @@ class instance_icecrown_citadel : public InstanceMapScript
{
if (WeeklyQuestData[questIndex].creatureEntry == entry)
{
uint8 diffIndex = instance->GetSpawnMode() & 1;
uint8 diffIndex = uint8(instance->GetSpawnMode() & 1);
if (!sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[questIndex].questId[diffIndex]))
entry = 0;
break;
@@ -855,8 +855,8 @@ class instance_icecrown_citadel : public InstanceMapScript
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << "I C " << GetBossSaveData() << uint32(coldflameJetsState)
<< " " << uint32(bloodQuickeningState) << " " << bloodQuickeningMinutes;
saveStream << "I C " << GetBossSaveData() << coldflameJetsState
<< " " << bloodQuickeningState << " " << bloodQuickeningMinutes;
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
@@ -930,6 +930,7 @@ class instance_icecrown_citadel : public InstanceMapScript
}
private:
std::set<uint64> coldflameJets;
uint64 ladyDeathwisperElevator;
uint64 deathbringerSaurfang;
uint64 saurfangDoor;
@@ -952,15 +953,14 @@ class instance_icecrown_citadel : public InstanceMapScript
uint64 sindragosa;
uint64 spinestalker;
uint64 rimefang;
std::set<uint64> coldflameJets;
uint32 teamInInstance;
uint32 bloodQuickeningTimer;
uint32 coldflameJetsState;
uint32 frostwyrms;
uint32 spinestalkerTrash;
uint32 rimefangTrash;
uint32 bloodQuickeningState;
uint16 heroicAttempts;
uint16 coldflameJetsState;
uint16 frostwyrms;
uint16 spinestalkerTrash;
uint16 rimefangTrash;
uint16 bloodQuickeningState;
uint16 bloodQuickeningMinutes;
bool isBonedEligible;
bool isOozeDanceEligible;

View File

@@ -385,7 +385,7 @@ public:
}
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
return;
uint32 eventId = events.GetEvent();
@@ -795,7 +795,7 @@ public:
me->GetMotionMaster()->MoveRandom(50);
}
void JustDied(Unit* pKiller)
void JustDied(Unit* /*pKiller*/)
{
me->GetMotionMaster()->MoveTargetedHome();
DoCast(SPELL_DUSTY_EXPLOSION);

View File

@@ -27,7 +27,7 @@ class spell_generic_quest_update_entry_SpellScript : public SpellScript
{
PrepareSpellScript(spell_generic_quest_update_entry_SpellScript)
private:
uint32 _spellEffect;
uint16 _spellEffect;
uint8 _effIndex;
uint32 _originalEntry;
uint32 _newEntry;
@@ -35,21 +35,21 @@ private:
uint32 _despawnTime;
public:
spell_generic_quest_update_entry_SpellScript(uint32 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime = 0) :
spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, uint32 despawnTime = 0) :
SpellScript(), _spellEffect(spellEffect), _effIndex(effIndex), _originalEntry(originalEntry),
_newEntry(newEntry), _shouldAttack(shouldAttack), _despawnTime(despawnTime) { }
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Creature* pCreatureTarget = GetHitCreature())
if (!pCreatureTarget->isPet() && pCreatureTarget->GetEntry() == _originalEntry)
if (Creature* creatureTarget = GetHitCreature())
if (!creatureTarget->isPet() && creatureTarget->GetEntry() == _originalEntry)
{
pCreatureTarget->UpdateEntry(_newEntry);
if (_shouldAttack && pCreatureTarget->IsAIEnabled)
pCreatureTarget->AI()->AttackStart(GetCaster());
creatureTarget->UpdateEntry(_newEntry);
if (_shouldAttack && creatureTarget->IsAIEnabled)
creatureTarget->AI()->AttackStart(GetCaster());
if (_despawnTime)
pCreatureTarget->DespawnOrUnsummon(_despawnTime);
creatureTarget->DespawnOrUnsummon(_despawnTime);
}
}
@@ -756,6 +756,7 @@ class spell_q10041_q10040_who_are_they : public SpellScriptLoader
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (!GetHitUnit() || !GetHitUnit()->ToPlayer())
return;