Fix most of the recently introduced warnings
--HG-- branch : trunk
This commit is contained in:
@@ -740,7 +740,7 @@ void Battleground::EndBattleground(uint32 winner)
|
|||||||
if (sWorld.getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
|
if (sWorld.getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
|
||||||
for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); itr++)
|
for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); itr++)
|
||||||
if (Player* player = sObjectMgr.GetPlayer(itr->first))
|
if (Player* player = sObjectMgr.GetPlayer(itr->first))
|
||||||
sLog.outArena("Statistics for %s (GUID: %llu, Team: %d, IP: %s): %u damage, %u healing, %u killing blows", player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows);
|
sLog.outArena("Statistics for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
|
|||||||
itr2 = itr++;
|
itr2 = itr++;
|
||||||
if (!bg->IsPlayerInBattleground(itr2->first))
|
if (!bg->IsPlayerInBattleground(itr2->first))
|
||||||
{
|
{
|
||||||
sLog.outError("Player %llu has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
|
sLog.outError("Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ void LFGMgr::Update(uint32 diff)
|
|||||||
LfgGuidList firstNew;
|
LfgGuidList firstNew;
|
||||||
while (!m_newToQueue.empty())
|
while (!m_newToQueue.empty())
|
||||||
{
|
{
|
||||||
sLog.outDebug("LFGMgr::Update: checking [" UI64FMTD "] m_newToQueue(%u), m_currentQueue(%u)", m_newToQueue.front(), m_newToQueue.size(), m_currentQueue.size());
|
sLog.outDebug("LFGMgr::Update: checking [" UI64FMTD "] m_newToQueue(%u), m_currentQueue(%u)", m_newToQueue.front(), uint32(m_newToQueue.size()), uint32(m_currentQueue.size()));
|
||||||
|
|
||||||
firstNew.push_back(m_newToQueue.front());
|
firstNew.push_back(m_newToQueue.front());
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ void LFGMgr::Update(uint32 diff)
|
|||||||
|
|
||||||
if (proposals.size()) // Group found!
|
if (proposals.size()) // Group found!
|
||||||
{
|
{
|
||||||
sLog.outDebug("LFGMgr::Update: Found %u size proposals for [" UI64FMTD "]", m_newToQueue.front());
|
sLog.outDebug("LFGMgr::Update: Found %u size proposals for [" UI64FMTD "]", uint32(m_newToQueue.front()), firstNew.front());
|
||||||
LfgProposal* pProposal = (*proposals.begin());
|
LfgProposal* pProposal = (*proposals.begin());
|
||||||
// TODO: Create algorithm to select better group based on GS (uses to be good tank with bad healer and viceversa)
|
// TODO: Create algorithm to select better group based on GS (uses to be good tank with bad healer and viceversa)
|
||||||
|
|
||||||
@@ -485,7 +485,7 @@ void LFGMgr::AddGuidToNewQueue(uint64 guid)
|
|||||||
|
|
||||||
// Add to queue
|
// Add to queue
|
||||||
m_newToQueue.push_back(guid);
|
m_newToQueue.push_back(guid);
|
||||||
sLog.outDebug("LFGMgr::AddGuidToNewQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, m_newToQueue.size());
|
sLog.outDebug("LFGMgr::AddGuidToNewQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, uint32(m_newToQueue.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -525,7 +525,7 @@ void LFGMgr::AddToQueue(uint64 guid, LfgRolesMap* roles, LfgDungeonSet* dungeons
|
|||||||
for (LfgDungeonSet::const_iterator it = dungeons->begin(); it != dungeons->end(); ++it)
|
for (LfgDungeonSet::const_iterator it = dungeons->begin(); it != dungeons->end(); ++it)
|
||||||
pqInfo->dungeons.insert(*it);
|
pqInfo->dungeons.insert(*it);
|
||||||
|
|
||||||
sLog.outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] joining with %u members", guid, pqInfo->roles.size());
|
sLog.outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] joining with %u members", guid, uint32(pqInfo->roles.size()));
|
||||||
m_QueueInfoMap[guid] = pqInfo;
|
m_QueueInfoMap[guid] = pqInfo;
|
||||||
AddGuidToNewQueue(guid);
|
AddGuidToNewQueue(guid);
|
||||||
}
|
}
|
||||||
@@ -551,7 +551,8 @@ bool LFGMgr::RemoveFromQueue(uint64 guid)
|
|||||||
m_QueueInfoMap.erase(it);
|
m_QueueInfoMap.erase(it);
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
sLog.outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] %s - Queue(%u)", guid, before != m_QueueInfoMap.size() ? "Removed": "Not in queue", m_QueueInfoMap.size());
|
sLog.outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] %s - Queue(%u)", guid,
|
||||||
|
before != m_QueueInfoMap.size() ? "Removed" : "Not in queue", uint32(m_QueueInfoMap.size()));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10450,7 +10450,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||||||
if (bonus->ap_dot_bonus > 0)
|
if (bonus->ap_dot_bonus > 0)
|
||||||
{
|
{
|
||||||
WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
||||||
float APbonus = attType == BASE_ATTACK ? pVictim->GetTotalAuraModifier(SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS) : pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
|
float APbonus = (float) pVictim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
|
||||||
APbonus += GetTotalAttackPowerValue(attType);
|
APbonus += GetTotalAttackPowerValue(attType);
|
||||||
DoneTotal += int32(bonus->ap_dot_bonus * stack * ApCoeffMod * APbonus);
|
DoneTotal += int32(bonus->ap_dot_bonus * stack * ApCoeffMod * APbonus);
|
||||||
}
|
}
|
||||||
@@ -10461,7 +10461,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||||||
if (bonus->ap_bonus > 0)
|
if (bonus->ap_bonus > 0)
|
||||||
{
|
{
|
||||||
WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
WeaponAttackType attType = (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE) ? RANGED_ATTACK : BASE_ATTACK;
|
||||||
float APbonus = attType == BASE_ATTACK ? pVictim->GetTotalAuraModifier(SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS) : pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
|
float APbonus = (float) pVictim->GetTotalAuraModifier(attType == BASE_ATTACK ? SPELL_AURA_MELEE_ATTACK_POWER_ATTACKER_BONUS : SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
|
||||||
APbonus += GetTotalAttackPowerValue(attType);
|
APbonus += GetTotalAttackPowerValue(attType);
|
||||||
DoneTotal += int32(bonus->ap_bonus * stack * ApCoeffMod * APbonus);
|
DoneTotal += int32(bonus->ap_bonus * stack * ApCoeffMod * APbonus);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ Unit * SpellScript::GetHitUnit()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return m_spell->unitTarget;
|
return m_spell->unitTarget;
|
||||||
@@ -265,7 +265,7 @@ Creature * SpellScript::GetHitCreature()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (m_spell->unitTarget)
|
if (m_spell->unitTarget)
|
||||||
@@ -278,7 +278,7 @@ Player * SpellScript::GetHitPlayer()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (m_spell->unitTarget)
|
if (m_spell->unitTarget)
|
||||||
@@ -291,7 +291,7 @@ Item * SpellScript::GetHitItem()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return m_spell->itemTarget;
|
return m_spell->itemTarget;
|
||||||
@@ -301,7 +301,7 @@ GameObject * SpellScript::GetHitGObj()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return m_spell->gameObjTarget;
|
return m_spell->gameObjTarget;
|
||||||
@@ -311,7 +311,7 @@ int32 SpellScript::GetHitDamage()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return m_spell->m_damage;
|
return m_spell->m_damage;
|
||||||
@@ -321,7 +321,7 @@ void SpellScript::SetHitDamage(int32 damage)
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_spell->m_damage = damage;
|
m_spell->m_damage = damage;
|
||||||
@@ -331,7 +331,7 @@ int32 SpellScript::GetHitHeal()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return m_spell->m_healing;
|
return m_spell->m_healing;
|
||||||
@@ -341,7 +341,7 @@ void SpellScript::SetHitHeal(int32 heal)
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_spell->m_healing = heal;
|
m_spell->m_healing = heal;
|
||||||
@@ -351,7 +351,7 @@ Aura* SpellScript::GetHitAura()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!m_spell->m_spellAura)
|
if (!m_spell->m_spellAura)
|
||||||
@@ -365,7 +365,7 @@ void SpellScript::PreventHitAura()
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_spell->m_spellAura)
|
if (m_spell->m_spellAura)
|
||||||
@@ -376,7 +376,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_hitPreventEffectMask |= 1 << effIndex;
|
m_hitPreventEffectMask |= 1 << effIndex;
|
||||||
@@ -387,7 +387,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
|
|||||||
{
|
{
|
||||||
if (!IsInHitPhase())
|
if (!IsInHitPhase())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_hitPreventDefaultEffectMask |= 1 << effIndex;
|
m_hitPreventDefaultEffectMask |= 1 << effIndex;
|
||||||
@@ -397,7 +397,7 @@ int32 SpellScript::GetEffectValue()
|
|||||||
{
|
{
|
||||||
if (!IsInEffectHook())
|
if (!IsInEffectHook())
|
||||||
{
|
{
|
||||||
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName, m_scriptSpellId);
|
sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return m_spell->damage;
|
return m_spell->damage;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class boss_professor_putricide : public CreatureScript
|
|||||||
}
|
}
|
||||||
case ACTION_ROTFACE_OOZE:
|
case ACTION_ROTFACE_OOZE:
|
||||||
DoScriptText(RAND(SAY_ROTFACE_OOZE_FLOOD1, SAY_ROTFACE_OOZE_FLOOD2), me);
|
DoScriptText(RAND(SAY_ROTFACE_OOZE_FLOOD1, SAY_ROTFACE_OOZE_FLOOD2), me);
|
||||||
if (Creature* rotface = Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
|
if (Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
|
||||||
if (Creature* dummy = Unit::GetCreature(*me, oozeFloodDummy[oozeFloodStage]))
|
if (Creature* dummy = Unit::GetCreature(*me, oozeFloodDummy[oozeFloodStage]))
|
||||||
dummy->CastSpell(dummy, oozeFloodSpells[oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
|
dummy->CastSpell(dummy, oozeFloodSpells[oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
|
||||||
if (++oozeFloodStage == 4)
|
if (++oozeFloodStage == 4)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class boss_rotface : public CreatureScript
|
|||||||
professor->AI()->EnterEvadeMode();
|
professor->AI()->EnterEvadeMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHitTarget(Unit* target, SpellEntry const* spell)
|
void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell)
|
||||||
{
|
{
|
||||||
if (spell->Id == SPELL_SLIME_SPRAY)
|
if (spell->Id == SPELL_SLIME_SPRAY)
|
||||||
DoScriptText(SAY_SLIME_SPRAY, me);
|
DoScriptText(SAY_SLIME_SPRAY, me);
|
||||||
@@ -190,7 +190,7 @@ class boss_rotface : public CreatureScript
|
|||||||
{
|
{
|
||||||
Position pos;
|
Position pos;
|
||||||
target->GetPosition(&pos);
|
target->GetPosition(&pos);
|
||||||
if (Creature* dummy = DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN))
|
if (DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN))
|
||||||
{
|
{
|
||||||
DoScriptText(EMOTE_SLIME_SPRAY, me);
|
DoScriptText(EMOTE_SLIME_SPRAY, me);
|
||||||
DoCastAOE(SPELL_SLIME_SPRAY);
|
DoCastAOE(SPELL_SLIME_SPRAY);
|
||||||
@@ -680,7 +680,7 @@ class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader
|
|||||||
// let Rotface handle the cast - caster dies before this executes
|
// let Rotface handle the cast - caster dies before this executes
|
||||||
if (InstanceScript* script = GetTargetUnit()->GetInstanceScript())
|
if (InstanceScript* script = GetTargetUnit()->GetInstanceScript())
|
||||||
if (Creature* rotface = script->instance->GetCreature(script->GetData64(DATA_ROTFACE)))
|
if (Creature* rotface = script->instance->GetCreature(script->GetData64(DATA_ROTFACE)))
|
||||||
rotface->CastSpell(x, y, z, GetSpellInfo()->EffectTriggerSpell[effIndex], true, NULL, NULL, GetCaster()->GetGUID(), GetTargetUnit());
|
rotface->CastSpell(x, y, z, triggered_spell_id, true, NULL, NULL, GetCaster()->GetGUID(), GetTargetUnit());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
vehicle->RemoveAllPassengers();
|
vehicle->RemoveAllPassengers();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit* /*who*/)
|
||||||
{
|
{
|
||||||
_EnterCombat();
|
_EnterCombat();
|
||||||
DoScriptText(SAY_AGGRO, me);
|
DoScriptText(SAY_AGGRO, me);
|
||||||
@@ -160,7 +160,7 @@ public:
|
|||||||
Shattered = false;
|
Shattered = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit *victim)
|
void JustDied(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
_JustDied();
|
_JustDied();
|
||||||
DoScriptText(SAY_DEATH, me);
|
DoScriptText(SAY_DEATH, me);
|
||||||
@@ -267,7 +267,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* Victim)
|
void KilledUnit(Unit* /*victim*/)
|
||||||
{
|
{
|
||||||
if (!(rand()%5))
|
if (!(rand()%5))
|
||||||
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
|
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
|
||||||
@@ -329,7 +329,7 @@ public:
|
|||||||
Brittled = false;
|
Brittled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit *attacker, uint32 &damage)
|
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||||
{
|
{
|
||||||
if (me->HasAura(SPELL_BRITTLE) && damage >= 5000)
|
if (me->HasAura(SPELL_BRITTLE) && damage >= 5000)
|
||||||
{
|
{
|
||||||
@@ -342,7 +342,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 uiDiff)
|
void UpdateAI(const uint32 /*uiDiff*/)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -392,9 +392,9 @@ public:
|
|||||||
uint8 random = urand(1,4);
|
uint8 random = urand(1,4);
|
||||||
for (uint8 i = 0; i < random; ++i)
|
for (uint8 i = 0; i < random; ++i)
|
||||||
{
|
{
|
||||||
float x = irand(540.0f, 640.0f); // Safe range is between 500 and 650
|
float x = float(irand(540, 640)); // Safe range is between 500 and 650
|
||||||
float y = irand(-230.0f, -195.0f); // Safe range is between -235 and -145
|
float y = float(irand(-230, -195)); // Safe range is between -235 and -145
|
||||||
float z = 391.5f; // Ground level
|
float z = 391.5f; // Ground level
|
||||||
me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -425,7 +425,6 @@ public:
|
|||||||
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();
|
||||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
|
||||||
switch(uiAction)
|
switch(uiAction)
|
||||||
{
|
{
|
||||||
case GOSSIP_ACTION_INFO_DEF:
|
case GOSSIP_ACTION_INFO_DEF:
|
||||||
@@ -588,7 +587,9 @@ public:
|
|||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
if (MoleMachine = me->SummonGameObject(GOB_MOLE_MACHINE,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),urand(0,6),0,0,0,0,300))
|
MoleMachine = me->SummonGameObject(GOB_MOLE_MACHINE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(),
|
||||||
|
float(urand(0, 6)), 0, 0, 0, 0, 300);
|
||||||
|
if (MoleMachine)
|
||||||
MoleMachine->SetGoState(GO_STATE_ACTIVE);
|
MoleMachine->SetGoState(GO_STATE_ACTIVE);
|
||||||
SummonTimer = 6000;
|
SummonTimer = 6000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ public:
|
|||||||
for (uint8 i = 0; i < 16; i++)
|
for (uint8 i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (!DoneAdds[i % 4])
|
if (!DoneAdds[i % 4])
|
||||||
|
{
|
||||||
if (next == 0)
|
if (next == 0)
|
||||||
{
|
{
|
||||||
move = (Phase)(i % 4);
|
move = (Phase)(i % 4);
|
||||||
@@ -248,6 +249,7 @@ public:
|
|||||||
}
|
}
|
||||||
else if (next > 0)
|
else if (next > 0)
|
||||||
--next;
|
--next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
++AddCount;
|
++AddCount;
|
||||||
DoneAdds[move] = true;
|
DoneAdds[move] = true;
|
||||||
|
|||||||
@@ -94,14 +94,14 @@ m_length(NULL)
|
|||||||
|
|
||||||
m_rowCount = mysql_stmt_num_rows(m_stmt);
|
m_rowCount = mysql_stmt_num_rows(m_stmt);
|
||||||
|
|
||||||
m_rows.resize(m_rowCount);
|
m_rows.resize(uint32(m_rowCount));
|
||||||
while (_NextRow())
|
while (_NextRow())
|
||||||
{
|
{
|
||||||
m_rows[m_rowPosition] = new Field[m_fieldCount];
|
m_rows[uint32(m_rowPosition)] = new Field[m_fieldCount];
|
||||||
for (uint64 fIndex = 0; fIndex < m_fieldCount; ++fIndex)
|
for (uint64 fIndex = 0; fIndex < m_fieldCount; ++fIndex)
|
||||||
{
|
{
|
||||||
if (!*m_rBind[fIndex].is_null)
|
if (!*m_rBind[fIndex].is_null)
|
||||||
m_rows[m_rowPosition][fIndex].SetByteValue( m_rBind[fIndex].buffer,
|
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( m_rBind[fIndex].buffer,
|
||||||
m_rBind[fIndex].buffer_length,
|
m_rBind[fIndex].buffer_length,
|
||||||
m_rBind[fIndex].buffer_type,
|
m_rBind[fIndex].buffer_type,
|
||||||
*m_rBind[fIndex].length );
|
*m_rBind[fIndex].length );
|
||||||
@@ -114,13 +114,13 @@ m_length(NULL)
|
|||||||
case MYSQL_TYPE_BLOB:
|
case MYSQL_TYPE_BLOB:
|
||||||
case MYSQL_TYPE_STRING:
|
case MYSQL_TYPE_STRING:
|
||||||
case MYSQL_TYPE_VAR_STRING:
|
case MYSQL_TYPE_VAR_STRING:
|
||||||
m_rows[m_rowPosition][fIndex].SetByteValue( "",
|
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( "",
|
||||||
m_rBind[fIndex].buffer_length,
|
m_rBind[fIndex].buffer_length,
|
||||||
m_rBind[fIndex].buffer_type,
|
m_rBind[fIndex].buffer_type,
|
||||||
*m_rBind[fIndex].length );
|
*m_rBind[fIndex].length );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_rows[m_rowPosition][fIndex].SetByteValue( 0,
|
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( 0,
|
||||||
m_rBind[fIndex].buffer_length,
|
m_rBind[fIndex].buffer_length,
|
||||||
m_rBind[fIndex].buffer_type,
|
m_rBind[fIndex].buffer_type,
|
||||||
*m_rBind[fIndex].length );
|
*m_rBind[fIndex].length );
|
||||||
@@ -141,7 +141,7 @@ ResultSet::~ResultSet()
|
|||||||
|
|
||||||
PreparedResultSet::~PreparedResultSet()
|
PreparedResultSet::~PreparedResultSet()
|
||||||
{
|
{
|
||||||
for (uint64 i = 0; i < m_rowCount; ++i)
|
for (uint32 i = 0; i < uint32(m_rowCount); ++i)
|
||||||
delete[] m_rows[i];
|
delete[] m_rows[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,14 +73,14 @@ class PreparedResultSet
|
|||||||
Field* Fetch() const
|
Field* Fetch() const
|
||||||
{
|
{
|
||||||
ASSERT(m_rowPosition < m_rowCount);
|
ASSERT(m_rowPosition < m_rowCount);
|
||||||
return m_rows[m_rowPosition];
|
return m_rows[uint32(m_rowPosition)];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Field & operator [] (uint32 index) const
|
const Field & operator [] (uint32 index) const
|
||||||
{
|
{
|
||||||
ASSERT(m_rowPosition < m_rowCount);
|
ASSERT(m_rowPosition < m_rowCount);
|
||||||
ASSERT(index < m_fieldCount);
|
ASSERT(index < m_fieldCount);
|
||||||
return m_rows[m_rowPosition][index];
|
return m_rows[uint32(m_rowPosition)][index];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user