Core: Fix more warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-23 14:10:24 +02:00
parent 16d95d3115
commit 58e94dcb9d
49 changed files with 529 additions and 516 deletions

View File

@@ -242,7 +242,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
continue;
// player can see MODERATOR, GAME MASTER, ADMINISTRATOR only if CONFIG_GM_IN_WHO_LIST
if ((itr->second->GetSession()->GetSecurity() > gmLevelInWhoList))
if ((itr->second->GetSession()->GetSecurity() > AccountTypes(gmLevelInWhoList)))
continue;
}
@@ -376,7 +376,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
//instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf
if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() ||
GetSecurity() >= sWorld.getConfig(CONFIG_INSTANT_LOGOUT))
GetSecurity() >= AccountTypes(sWorld.getConfig(CONFIG_INSTANT_LOGOUT)))
{
WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4);
data << uint8(0);
@@ -746,7 +746,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
return;
// prevent resurrect before 30-sec delay after body release not finished
if (corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP) > time(NULL))
if (corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType() == CORPSE_RESURRECTABLE_PVP) > time_t(time(NULL)))
return;
if (!corpse->IsWithinDistInMap(GetPlayer(), CORPSE_RECLAIM_RADIUS, true))

View File

@@ -288,7 +288,7 @@ class WorldSession
time_t m_timeOutTime;
void UpdateTimeOutTime(uint32 diff)
{
if (diff > m_timeOutTime)
if (time_t(diff) > m_timeOutTime)
m_timeOutTime = 0;
else
m_timeOutTime -= diff;

View File

@@ -57,9 +57,9 @@ class ReactorRunnable : protected ACE_Task_Base
public:
ReactorRunnable() :
m_ThreadId(-1),
m_Reactor(0),
m_Connections(0),
m_Reactor(0)
m_ThreadId(-1)
{
ACE_Reactor_Impl* imp = 0;

View File

@@ -251,36 +251,36 @@ void UpdateWorldState(Map *map, uint32 id, uint32 state)
static Locations LightofDawnLoc[]=
{
{2281.335f, -5300.409f, 85.170f, 0}, // 0 Tirion Fordring loc
{2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
{2281.461f, -5263.014f, 81.164f, 0}, // 2 Tirion charges
{2262.277f, -5293.477f, 82.167f, 0}, // 3 Tirion run
{2270.286f, -5287.73f, 82.262f, 0}, // 4 Tirion relocate
{2269.511f, -5288.289f, 82.225f, 0}, // 5 Tirion forward
{2262.277f, -5293.477f, 82.167f, 0}, // 6 Tirion runs to Darion
{2270.286f, -5287.73f, 82.262f, 0},
{2269.511f, -5288.289f, 82.225f, 0},
{2273.205f, -5288.848f, 82.617f, 0}, // 9 Korfax loc1
{2274.739f, -5287.926f, 82.684f, 0}, // 10 Korfax loc2
{2253.673f, -5318.004f, 81.724f, 0}, // 11 Korfax kicked
{2287.028f, -5309.644f, 87.253f, 0}, // 12 Maxwell loc1
{2286.978f, -5308.025f, 86.83f, 0}, // 13 Maxwell loc2
{2248.877f, -5307.586f, 82.166f, 0}, // 14 maxwell kicked
{2278.58f, -5316.933f, 88.319f, 0}, // 15 Eligor loc1
{2278.535f, -5315.479f, 88.08f, 0}, // 16 Eligor loc2
{2259.416f, -5304.505f, 82.149f, 0}, // 17 eligor kicked
{2289.259f, -5280.355f, 82.112f, 0}, // 18 Koltira loc1
{2289.02f, -5281.985f, 82.207f, 0}, // 19 Koltira loc2
{2273.289f, -5273.675f, 81.701f, 0}, // 20 Thassarian loc1
{2273.332f, -5275.544f, 81.849f, 0}, // 21 Thassarian loc2
{2281.198f, -5257.397f, 80.224f, 4.66f}, // 22 Alexandros loc1
{2281.156f, -5259.934f, 80.647f, 0}, // 23 Alexandros loc2
{2281.294f, -5281.895f, 82.445f, 1.35f}, // 24 Darion loc1
{2281.093f, -5263.013f, 81.125f, 0}, // 25 Darion loc1
{2281.313f, -5250.282f, 79.322f, 4.69f}, // 26 Lich King spawns
{2281.523f, -5261.058f, 80.877f, 0}, // 27 Lich king move forwards
{2272.709f, -5255.552f, 78.226f, 0}, // 28 Lich king kicked
{2273.972f, -5257.676f, 78.862f, 0} // 29 Lich king moves forward
{2281.335f, -5300.409f, 85.170f, 0 ,0}, // 0 Tirion Fordring loc
{2283.896f, -5287.914f, 83.066f, 1.55f ,0}, // 1 Tirion Fordring loc2
{2281.461f, -5263.014f, 81.164f, 0 ,0}, // 2 Tirion charges
{2262.277f, -5293.477f, 82.167f, 0 ,0}, // 3 Tirion run
{2270.286f, -5287.73f, 82.262f, 0 ,0}, // 4 Tirion relocate
{2269.511f, -5288.289f, 82.225f, 0 ,0}, // 5 Tirion forward
{2262.277f, -5293.477f, 82.167f, 0 ,0}, // 6 Tirion runs to Darion
{2270.286f, -5287.73f, 82.262f, 0 ,0},
{2269.511f, -5288.289f, 82.225f, 0 ,0},
{2273.205f, -5288.848f, 82.617f, 0 ,0}, // 9 Korfax loc1
{2274.739f, -5287.926f, 82.684f, 0 ,0}, // 10 Korfax loc2
{2253.673f, -5318.004f, 81.724f, 0 ,0}, // 11 Korfax kicked
{2287.028f, -5309.644f, 87.253f, 0 ,0}, // 12 Maxwell loc1
{2286.978f, -5308.025f, 86.83f, 0 ,0}, // 13 Maxwell loc2
{2248.877f, -5307.586f, 82.166f, 0 ,0}, // 14 maxwell kicked
{2278.58f, -5316.933f, 88.319f, 0 ,0}, // 15 Eligor loc1
{2278.535f, -5315.479f, 88.08f, 0 ,0}, // 16 Eligor loc2
{2259.416f, -5304.505f, 82.149f, 0 ,0}, // 17 eligor kicked
{2289.259f, -5280.355f, 82.112f, 0 ,0}, // 18 Koltira loc1
{2289.02f, -5281.985f, 82.207f, 0 ,0}, // 19 Koltira loc2
{2273.289f, -5273.675f, 81.701f, 0 ,0}, // 20 Thassarian loc1
{2273.332f, -5275.544f, 81.849f, 0 ,0}, // 21 Thassarian loc2
{2281.198f, -5257.397f, 80.224f, 4.66f ,0}, // 22 Alexandros loc1
{2281.156f, -5259.934f, 80.647f, 0 ,0}, // 23 Alexandros loc2
{2281.294f, -5281.895f, 82.445f, 1.35f ,0}, // 24 Darion loc1
{2281.093f, -5263.013f, 81.125f, 0 ,0}, // 25 Darion loc1
{2281.313f, -5250.282f, 79.322f, 4.69f ,0}, // 26 Lich King spawns
{2281.523f, -5261.058f, 80.877f, 0 ,0}, // 27 Lich king move forwards
{2272.709f, -5255.552f, 78.226f, 0 ,0}, // 28 Lich king kicked
{2273.972f, -5257.676f, 78.862f, 0, 0}, // 29 Lich king moves forward
};
class npc_highlord_darion_mograine : public CreatureScript
@@ -936,7 +936,7 @@ public:
break;
case 33: // Darion supports to jump to lich king here
if (Creature* pTemp = Unit::GetCreature(*me, uiLichKingGUID))
if (Unit::GetCreature(*me, uiLichKingGUID))
DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge
// doesn't make it looks well, so workarounds, Darion charges, looks better
me->SetSpeed(MOVE_RUN, 3.0f);

View File

@@ -271,7 +271,7 @@ class example_creature : public CreatureScript
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
if (action == GOSSIP_ACTION_INFO_DEF+1)
{

View File

@@ -197,7 +197,7 @@ class example_escort : public CreatureScript
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
npc_escortAI* pEscortAI = CAST_AI(example_escort::example_escortAI, creature->AI());

View File

@@ -58,7 +58,7 @@ class example_gossip_codebox : public CreatureScript
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
if (action == GOSSIP_ACTION_INFO_DEF+2)
{

View File

@@ -40,7 +40,7 @@ class AT_example_areatrigger : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
DoScriptText(SAY_HI, player);
return true;
@@ -56,7 +56,7 @@ class ItemUse_example_item : public ItemScript
{
}
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/)
{
sScriptMgr.LoadDatabase();
return true;
@@ -72,7 +72,7 @@ class GOHello_example_go_teleporter : public GameObjectScript
{
}
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* player, GameObject* /*go*/)
{
player->TeleportTo(0, 1807.07f, 336.105f, 70.3975f, 0.0f);
return false;

View File

@@ -35,11 +35,10 @@ class spell_ex_49375 : public SpellHandlerScript
char * localVariable2;
// effect handler hook - effIndex - effIndex of handled effect of a spell
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
// we're handling SPELL_EFFECT_DUMMY in effIndex 0 here
sLog.outError("WE ARE HANDLING DUMMY!");
sLog.outError(localVariable.c_str());
// make caster cast a spell on a unit target of effect
if (Unit * target = GetHitUnit())
GetCaster()->CastSpell(target, 70522, true);
@@ -81,7 +80,7 @@ class spell_ex_49375 : public SpellHandlerScript
// function called on server startup
// checks if script has data required for it to work
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
// check if spellid 1 exists in dbc
if (!sSpellStore.LookupEntry(70522))
@@ -149,4 +148,4 @@ void AddSC_example_spell_scripts()
/* Commented out to prevent loading errors
new spell_ex_49375;
*/
}
}

View File

@@ -69,52 +69,52 @@ struct Wave
static 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},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{{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},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
// All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron
{RAGE_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
{{RAGE_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true},
// Anetheron 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, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
{NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, BANSHEE, BANSHEE, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, GHOUL, GHOUL, 0, 0, 0, 0, 120000, false},
{GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{{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, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 120000, false},
{{NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 120000, false},
{{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, BANSHEE, BANSHEE, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, GHOUL, GHOUL, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
// All 8 Waves are summoned, summon Anatheron
{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}
{{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
{ // 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},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, FROST_WYRM, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, FROST_WYRM, 0, 0, 0, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 240000, false},
{{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},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
{{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
{{GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, FROST_WYRM, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, FROST_WYRM, 0, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0}, 240000, false},
// All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor
{KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
{{KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true},
// Azgalor Wave 1-8
{ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, FROST_WYRM, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0, 180000, false},
{GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, 0, 0, 0, 0, 180000, false},
{FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
{NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0, 180000, false},
{GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0, 180000, false},
{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 240000, false},
{{ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, FROST_WYRM, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0}, 180000, false},
{{GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, 0, 0, 0, 0}, 180000, false},
{{FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, FEL_STALKER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0}, 180000, false},
{{NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0}, 180000, false},
{{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0}, 240000, false},
// All 8 Waves are summoned, summon Azgalor
{AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}
{{AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}
};
enum TargetType // Used in the spell cast system for the AI

View File

@@ -109,12 +109,12 @@ enum SummonActions
};
const Position SphereSpawn[6] =
{
{ 786.6439f, 108.2498f, 155.6701f },
{ 806.8429f, 150.5902f, 155.6701f },
{ 759.1386f, 163.9654f, 155.6701f },
{ 744.3701f, 119.5211f, 155.6701f },
{ 710.0211f, 120.8152f, 155.6701f },
{
{ 786.6439f, 108.2498f, 155.6701f, 0 },
{ 806.8429f, 150.5902f, 155.6701f, 0 },
{ 759.1386f, 163.9654f, 155.6701f, 0 },
{ 744.3701f, 119.5211f, 155.6701f, 0 },
{ 710.0211f, 120.8152f, 155.6701f, 0 },
{ 706.6383f, 161.5266f, 155.6701f, 0 },
};
@@ -188,7 +188,7 @@ public:
DoScriptText(urand(0,1) ? SAY_KILL1 : SAY_KILL2,me);
if (m_pInstance)
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
}
}
void MoveInLineOfSight(Unit* /*pWho*/)
@@ -207,7 +207,7 @@ public:
//Summon Scarab Swarms neutral at random places
for (int i=0; i < 10; i++)
if (Creature* pTemp = me->SummonCreature(NPC_SCARAB,AnubarakLoc[1].GetPositionX()+urand(0,50)-25,AnubarakLoc[1].GetPositionY()+urand(0,50)-25,AnubarakLoc[1].GetPositionZ()))
pTemp->setFaction(31);
pTemp->setFaction(31);
}
void JustDied(Unit* /*pKiller*/)
@@ -243,7 +243,7 @@ public:
case NPC_SPIKE:
m_uiPursuingSpikeTimer = 2*IN_MILLISECONDS;
break;
}
}
}
void EnterCombat(Unit* /*pWho*/)
@@ -575,7 +575,7 @@ public:
m_uiPermafrostTimer = 0;
me->SetReactState(REACT_PASSIVE);
me->SetFlying(true);
me->SetDisplayId(25144);
me->SetDisplayId(25144);
me->SetSpeed(MOVE_RUN, 0.5, false);
me->GetMotionMaster()->MoveRandom(20.0f);
DoCast(SPELL_FROST_SPHERE);
@@ -595,7 +595,7 @@ public:
//At hit the ground
me->GetMotionMaster()->MoveFall(142.2f, 0);
//me->FallGround(); //need correct vmap use (i believe it isn't working properly right now)
}
}
}
}
@@ -663,7 +663,7 @@ public:
void EnterCombat(Unit *pWho)
{
m_uiTargetGUID = pWho->GetGUID();
DoCast(pWho,SPELL_MARK);
DoCast(pWho,SPELL_MARK);
me->SetSpeed(MOVE_RUN, 0.5f);
m_uiSpeed = 0;
m_uiIncreaseSpeedTimer = 1*IN_MILLISECONDS;
@@ -680,6 +680,7 @@ public:
Unit* pTarget = Unit::GetPlayer(*me, m_uiTargetGUID);
if (!pTarget || !pTarget->isAlive() || !pTarget->HasAura(SPELL_MARK))
{
if (Creature* pAnubarak = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ANUBARAK)))
pAnubarak->CastSpell(pAnubarak,SPELL_SPIKE_TELE,false);
me->DisappearAndDie();
return;
@@ -701,6 +702,7 @@ public:
DoCast(me,SPELL_SPIKE_SPEED2);
m_uiSpeed = 2;
m_uiIncreaseSpeedTimer = 7*IN_MILLISECONDS;
break;
case 2:
DoCast(me,SPELL_SPIKE_SPEED3);
m_uiIncreaseSpeedTimer = 0;

View File

@@ -255,7 +255,7 @@ struct boss_faction_championsAI : public ScriptedAI
}
void JustReachedHome()
{
{
if (m_pInstance)
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, FAIL);
@@ -274,12 +274,12 @@ struct boss_faction_championsAI : public ScriptedAI
{
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator itr;
bool empty = true;
bool empty = true;
for (itr = tList.begin(); itr!=tList.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*me), (*itr)->getUnitGuid());
if (pUnit && me->getThreatManager().getThreat(pUnit))
{
{
if (pUnit->GetTypeId()==TYPEID_PLAYER)
{
float threat = CalculateThreat(me->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth());
@@ -292,9 +292,9 @@ struct boss_faction_championsAI : public ScriptedAI
}
void UpdatePower()
{
{
if (me->getPowerType() == POWER_MANA)
me->ModifyPower(POWER_MANA, me->GetMaxPower(POWER_MANA) / 3);
me->ModifyPower(POWER_MANA, me->GetMaxPower(POWER_MANA) / 3);
//else if (me->getPowerType() == POWER_ENERGY)
// me->ModifyPower(POWER_ENERGY, 100);
}
@@ -308,19 +308,19 @@ struct boss_faction_championsAI : public ScriptedAI
me->RemoveAurasByType(SPELL_AURA_MOD_CONFUSE);
//DoCast(me, SPELL_PVP_TRINKET);
}
void JustDied(Unit* /*killer*/)
{
if(mAIType != AI_PET)
{
if (mAIType != AI_PET)
if (m_pInstance)
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, DONE);
}
void EnterCombat(Unit* /*who*/)
{
DoCast(me, SPELL_ANTI_AOE, true);
me->SetInCombatWithZone();
me->SetInCombatWithZone();
if (m_pInstance)
if (Creature* pChampionController = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_CHAMPIONS_CONTROLLER)))
pChampionController->AI()->SetData(2, IN_PROGRESS);
@@ -339,8 +339,10 @@ struct boss_faction_championsAI : public ScriptedAI
if (m_pInstance)
{
if (TeamInInstance == ALLIANCE)
{
if (Creature* pTemp = Unit::GetCreature(*me,m_pInstance->GetData64(NPC_VARIAN)))
DoScriptText(SAY_VARIAN_KILL_HORDE_PLAYER4+urand(0,3), pTemp); // + cause we are on negative
}
else
if (Creature* pTemp = me->FindNearestCreature(NPC_GARROSH, 300.f))
@@ -354,22 +356,22 @@ struct boss_faction_championsAI : public ScriptedAI
Creature* SelectRandomFriendlyMissingBuff(uint32 spell)
{
std::list<Creature *> lst = DoFindFriendlyMissingBuff(40.0f, spell);
std::list<Creature *>::const_iterator itr = lst.begin();
std::list<Creature *>::const_iterator itr = lst.begin();
if (lst.empty())
return NULL;
advance(itr, rand()%lst.size());
return (*itr);
}
Unit* SelectEnemyCaster(bool /*casting*/)
{
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator iter;
std::list<HostileReference*>::const_iterator iter;
Unit *target;
for (iter = tList.begin(); iter!=tList.end(); ++iter)
{
Unit *target;
if(target = Unit::GetUnit((*me),(*iter)->getUnitGuid()))
if(target->getPowerType() == POWER_MANA)
{
target = Unit::GetUnit((*me),(*iter)->getUnitGuid());
if (target && target->getPowerType() == POWER_MANA)
return target;
}
return NULL;
@@ -379,11 +381,11 @@ struct boss_faction_championsAI : public ScriptedAI
{
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator iter;
uint32 count = 0;
uint32 count = 0;
Unit *target;
for (iter = tList.begin(); iter!=tList.end(); ++iter)
{
Unit *target;
if(target = Unit::GetUnit((*me),(*iter)->getUnitGuid()))
{
target = Unit::GetUnit((*me),(*iter)->getUnitGuid());
if (target && me->GetDistance2d(target) < distance)
++count;
}
@@ -399,7 +401,7 @@ struct boss_faction_championsAI : public ScriptedAI
me->AddThreat(pWho, 10.0f);
me->SetInCombatWith(pWho);
pWho->SetInCombatWith(me);
if (mAIType == AI_MELEE || mAIType == AI_PET)
DoStartMovement(pWho);
else
@@ -409,7 +411,7 @@ struct boss_faction_championsAI : public ScriptedAI
}
void UpdateAI(const uint32 uiDiff)
{
{
if (ThreatTimer < uiDiff)
{
UpdatePower();
@@ -417,15 +419,17 @@ struct boss_faction_championsAI : public ScriptedAI
ThreatTimer = 4000;
}
else ThreatTimer -= uiDiff;
if(mAIType != AI_PET)
if (mAIType != AI_PET)
{
if (CCTimer < uiDiff)
{
RemoveCC();
CCTimer = 8000+rand()%2000;
}
else CCTimer -= uiDiff;
}
if (mAIType == AI_MELEE || mAIType == AI_PET) DoMeleeAttackIfReady();
}
};
@@ -512,7 +516,7 @@ public:
break;
case 3:
DoCast(me,SPELL_REJUVENATION);
break;
break;
case 4:
if (Creature* pTarget = SelectRandomFriendlyMissingBuff(SPELL_THORNS))
DoCast(pTarget,SPELL_THORNS);
@@ -572,8 +576,10 @@ public:
{
if (!UpdateVictim()) return;
if (m_uiHeroismOrBloodlustTimer <= uiDiff)
{
if (me->getFaction()) //Am i alliance?
{
if (!me->HasAura(AURA_EXHAUSTION))
DoCastAOE(SPELL_HEROISM);
}
@@ -604,7 +610,7 @@ public:
DoCast(me,SPELL_EARTH_SHOCK);
break;
case 4:
DoCast(me,SPELL_SPIRIT_CLEANSE);
DoCast(me,SPELL_SPIRIT_CLEANSE);
break;
case 5:
if (Unit *pTarget = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD))
@@ -668,15 +674,15 @@ public:
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim()) return;
if (m_uiBubbleTimer <= uiDiff)
{
//cast bubble at 20% hp
if (HealthBelowPct(20))
DoCast(me,SPELL_BUBBLE);
m_uiBubbleTimer = urand(0*IN_MILLISECONDS,360*IN_MILLISECONDS);
} else m_uiBubbleTimer -= uiDiff;
} else m_uiBubbleTimer -= uiDiff;
if (m_uiHandOfProtectionTimer <= uiDiff)
{
if (Unit *pTarget = DoSelectLowestHpFriendly(40.0f))
@@ -690,7 +696,7 @@ public:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
DoCast(pTarget,SPELL_HOLY_SHOCK);
m_uiHolyShockTimer = urand(6*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else m_uiHolyShockTimer -= uiDiff;
} else m_uiHolyShockTimer -= uiDiff;
if (m_uiHandOfFreedomTimer <= uiDiff)
{
@@ -764,7 +770,7 @@ public:
SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
}
void UpdateAI(const uint32 uiDiff)
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim()) return;
@@ -783,7 +789,7 @@ public:
DoCast(me,SPELL_RENEW);
break;
case 1:
DoCast(me,SPELL_SHIELD);
DoCast(me,SPELL_SHIELD);
break;
case 2: case 3:
DoCast(me,SPELL_FLASH_HEAL);
@@ -856,21 +862,21 @@ public:
{
boss_faction_championsAI::EnterCombat(pWho);
}
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim()) return;
if (m_uiPsychicScreamTimer <= uiDiff)
{
if(EnemiesInRange(10.0f) > 2)
if (EnemiesInRange(10.0f) > 2)
DoCastAOE(SPELL_PSYCHIC_SCREAM);
m_uiPsychicScreamTimer = urand(5*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else m_uiPsychicScreamTimer -= uiDiff;
if (m_uiDispersionTimer <= uiDiff)
{
if(HealthBelowPct(20))
if (HealthBelowPct(20))
DoCast(me,SPELL_DISPERSION);
m_uiDispersionTimer = urand(1*IN_MILLISECONDS,180*IN_MILLISECONDS);
} else m_uiDispersionTimer -= uiDiff;
@@ -899,7 +905,7 @@ public:
break;
case 2:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
DoCast(pTarget,SPELL_VAMPIRIC_TOUCH);
DoCast(pTarget,SPELL_VAMPIRIC_TOUCH);
break;
case 3:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
@@ -1176,14 +1182,14 @@ public:
m_uiFrostTrapTimer = urand(12*IN_MILLISECONDS,30*IN_MILLISECONDS);
m_uiWingClipTimer = urand(4*IN_MILLISECONDS,8*IN_MILLISECONDS);
m_uiCommonTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711);
SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711);
m_uiSummonPetTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
DoCast(SPELL_CALL_PET);
}
void UpdateAI(const uint32 uiDiff)
{
{
if (!UpdateVictim()) return;
if (m_uiDisengageTimer <= uiDiff)
@@ -1500,14 +1506,14 @@ public:
uint32 m_uiDeathGripTimer;
void Reset()
{
{
boss_faction_championsAI::Reset();
m_uiIceboundFortitudeTimer = urand(5*IN_MILLISECONDS,90*IN_MILLISECONDS);
m_uiChainsOfIceTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
m_uiDeathCoilTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
m_uiStrangulateTimer = urand(10*IN_MILLISECONDS,90*IN_MILLISECONDS);
m_uiFrostStrikeTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
m_uiIcyTouchTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS);
m_uiIcyTouchTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS);
m_uiDeathGripTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
SetEquipmentSlots(false, 47518, 51021, EQUIP_NO_CHANGE);
}
@@ -1520,7 +1526,7 @@ public:
{
if (HealthBelowPct(50))
DoCast(me,SPELL_ICEBOUND_FORTITUDE);
m_uiIceboundFortitudeTimer = urand(5*IN_MILLISECONDS,90*IN_MILLISECONDS);
m_uiIceboundFortitudeTimer = urand(5*IN_MILLISECONDS,90*IN_MILLISECONDS);
} else m_uiIceboundFortitudeTimer -= uiDiff;
if (m_uiChainsOfIceTimer <= uiDiff)
@@ -1539,7 +1545,7 @@ public:
if (m_uiStrangulateTimer <= uiDiff)
{
if (Unit *pTarget = SelectEnemyCaster(false))
DoCast(pTarget,SPELL_STRANGULATE);
DoCast(pTarget,SPELL_STRANGULATE);
m_uiStrangulateTimer = urand(10*IN_MILLISECONDS,90*IN_MILLISECONDS);
} else m_uiStrangulateTimer -= uiDiff;
@@ -1600,7 +1606,7 @@ public:
uint32 m_uiBlindTimer;
uint32 m_uiCloakTimer;
uint32 m_uiBladeFlurryTimer;
void Reset()
{
boss_faction_championsAI::Reset();
@@ -1619,22 +1625,22 @@ public:
if (!UpdateVictim()) return;
if (m_uiFanOfKnivesTimer <= uiDiff)
{
{
if (EnemiesInRange(15.0f) > 2)
DoCastAOE(SPELL_FAN_OF_KNIVES);
m_uiFanOfKnivesTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
} else m_uiFanOfKnivesTimer -= uiDiff;
if (m_uiHemorrhageTimer <= uiDiff)
{
DoCastVictim(SPELL_HEMORRHAGE);
{
DoCastVictim(SPELL_HEMORRHAGE);
m_uiHemorrhageTimer = urand(5*IN_MILLISECONDS,8*IN_MILLISECONDS);
} else m_uiHemorrhageTimer -= uiDiff;
if (m_uiEviscerateTimer <= uiDiff)
{
DoCastVictim(SPELL_EVISCERATE);
m_uiEviscerateTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS);
m_uiEviscerateTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS);
} else m_uiEviscerateTimer -= uiDiff;
if (m_uiShadowstepTimer <= uiDiff)
@@ -1701,7 +1707,7 @@ public:
uint32 m_uiDeployTotemTimer;
uint8 m_uiTotemCount;
float m_fTotemOldCenterX, m_fTotemOldCenterY;
void Reset()
{
boss_faction_championsAI::Reset();
@@ -1737,8 +1743,10 @@ public:
-Grounding (redirects one harmful magic spell to the totem)
-Healing Stream (unable to find amount of healing in our logs)
-Tremor (prevents fear effects)
-Strength of Earth (155 strength and agil for the opposing team)
-Searing (average ~3500 damage on a random target every ~3.5 seconds)
*/
}
@@ -1833,7 +1841,7 @@ public:
void Reset()
{
boss_faction_championsAI::Reset();
boss_faction_championsAI::Reset();
m_uiRepeteanceTimer = 60*IN_MILLISECONDS;
m_uiCrusaderStrikeTimer = urand(6*IN_MILLISECONDS,18*IN_MILLISECONDS);
m_uiAvengingWrathTimer = 180*IN_MILLISECONDS;
@@ -1852,7 +1860,7 @@ public:
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim()) return;
if (m_uiRepeteanceTimer <= uiDiff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))

View File

@@ -117,7 +117,7 @@ public:
uint32 m_uiSummonInfernalEruptionTimer;
void Reset()
{
{
if (m_pInstance)
m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED);
SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED);
@@ -149,7 +149,7 @@ public:
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
}
void JustDied(Unit* /*pKiller*/)
{
Summons.DespawnAll();
@@ -162,7 +162,7 @@ public:
{
Summons.Summon(pSummoned);
}
void EnterCombat(Unit* /*pWho*/)
{
me->SetInCombatWithZone();
@@ -270,7 +270,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetInCombatWithZone();
DoCast(SPELL_LEGION_FLAME_EFFECT);
}
}
void UpdateAI(const uint32 /*uiDiff*/)
{
@@ -330,7 +330,7 @@ public:
void JustSummoned(Creature* pSummoned)
{
Summons.Summon(pSummoned);
pSummoned->SetCorpseDelay(0);
pSummoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*pKiller*/)
@@ -514,7 +514,7 @@ public:
void Reset()
{
m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
m_uiMistressKissTimer = 15*IN_MILLISECONDS;
me->SetInCombatWithZone();

View File

@@ -146,7 +146,7 @@ public:
Summons.DespawnAll();
}
void JustDied(Unit* /*pKiller*/)
{
if (m_pInstance)
@@ -159,7 +159,7 @@ public:
m_pInstance->SetData(TYPE_NORTHREND_BEASTS,FAIL);
me->ForcedDespawn();
}
void EnterCombat(Unit* /*pWho*/)
{
me->SetInCombatWithZone();
@@ -279,7 +279,7 @@ public:
uiDamage = 0;
}
void MovementInform(uint32 uiType, uint32 uiId)
void MovementInform(uint32 uiType, uint32 uiId)
{
if (uiType != POINT_MOTION_TYPE) return;
@@ -290,7 +290,7 @@ public:
me->ForcedDespawn();
break;
}
}
}
void JustDied(Unit* /*pKiller*/)
{
@@ -396,14 +396,18 @@ struct boss_jormungarAI : public ScriptedAI
m_uiSpitTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
m_uiSprayTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
m_uiSweepTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
}
}
void JustDied(Unit* /*pKiller*/)
{
if (m_pInstance)
{
if (Creature* pSister = Unit::GetCreature((*me),m_pInstance->GetData64(m_uiSisterID)))
{
if (!pSister->isAlive())
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE);
else
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL);
}
}
}
@@ -422,7 +426,7 @@ struct boss_jormungarAI : public ScriptedAI
if (m_pInstance)
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
}
}
void EnterCombat(Unit* /*pWho*/)
{
@@ -646,7 +650,7 @@ public:
bool casted;
void Reset()
{
casted = false;
casted = false;
me->SetReactState(REACT_PASSIVE);
me->ForcedDespawn(60*IN_MILLISECONDS);
}
@@ -706,7 +710,7 @@ public:
m_bMovementFinish = false;
m_bTrampleCasted = false;
m_uiTrampleTargetGUID = 0;
m_fTrampleTargetX = 0;
m_fTrampleTargetX = 0;
m_fTrampleTargetY = 0;
m_fTrampleTargetZ = 0;
m_uiStage = 0;
@@ -714,7 +718,7 @@ public:
void JustDied(Unit* /*pKiller*/)
{
if (m_pInstance)
if (m_pInstance)
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE);
}
@@ -727,7 +731,7 @@ public:
case 0: // JUMP!? Fuck! THAT'S BEEZARR! Would someone PLEASE make MotionMaster->Move* work better?
if (me->GetDistance2d(ToCCommonLoc[1].GetPositionX(),ToCCommonLoc[1].GetPositionY()) < 6.0f)
{
// Middle of the room
// Middle of the room
m_uiStage = 1;
}
else
@@ -755,7 +759,7 @@ public:
void KilledUnit(Unit *pWho)
{
if (pWho->GetTypeId() == TYPEID_PLAYER)
{
{
if (m_pInstance)
m_pInstance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
@@ -764,7 +768,7 @@ public:
void EnterCombat(Unit* /*pWho*/)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS);
me->SetInCombatWithZone();
}
@@ -831,7 +835,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_uiTrampleTimer = 4*IN_MILLISECONDS;
m_uiStage = 3;
m_uiStage = 3;
} else m_uiStage = 6;
break;
case 3:
@@ -863,7 +867,7 @@ public:
{
if (m_uiTrampleTimer <= uiDiff) DoCastAOE(SPELL_TRAMPLE);
m_bMovementFinish = false;
m_uiStage = 6;
m_uiStage = 6;
return;
}
if (m_uiTrampleTimer <= uiDiff)

View File

@@ -172,7 +172,7 @@ struct boss_twin_baseAI : public ScriptedAI
void MovementInform(uint32 uiType, uint32 uiId)
{
if(uiType != POINT_MOTION_TYPE) return;
if (uiType != POINT_MOTION_TYPE) return;
switch (uiId)
{
@@ -218,7 +218,7 @@ struct boss_twin_baseAI : public ScriptedAI
case NPC_DARK_ESSENCE:
Map* pMap = me->GetMap();
Map::PlayerList const &lPlayers = pMap->GetPlayers();
for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
{
Unit* pPlayer = itr->getSource();
if (!pPlayer) continue;
@@ -243,12 +243,12 @@ struct boss_twin_baseAI : public ScriptedAI
if (pDoneBy->GetTypeId() == TYPEID_PLAYER)
{
if(pDoneBy->HasAura(m_uiOtherEssenceSpellId))
if (pDoneBy->HasAura(m_uiOtherEssenceSpellId))
uiDamage += uiDamage/2;
if(pDoneBy->HasAura(m_uiEmpoweredWeaknessSpellId))
if (pDoneBy->HasAura(m_uiEmpoweredWeaknessSpellId))
uiDamage += uiDamage;
else
if(pDoneBy->HasAura(m_uiMyEssenceSpellId))
if (pDoneBy->HasAura(m_uiMyEssenceSpellId))
uiDamage /= 2;
}
@@ -279,19 +279,21 @@ struct boss_twin_baseAI : public ScriptedAI
}
}
void JustDied(Unit* pKiller)
void JustDied(Unit* /*pKiller*/)
{
DoScriptText(SAY_DEATH,me);
if (m_pInstance)
{
m_pInstance->SetData(DATA_HEALTH_TWIN_SHARED, 0);
if (Creature* pSister = GetSister())
{
if (!pSister->isAlive())
{
m_pInstance->SetData(TYPE_VALKIRIES, DONE);
Summons.DespawnAll();
}
else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL);
}
}
Summons.DespawnAll();
}
@@ -302,7 +304,7 @@ struct boss_twin_baseAI : public ScriptedAI
return Unit::GetCreature((*me),m_pInstance->GetData64(m_uiSisterNpcId));
}
void EnterCombat(Unit* pWho)
void EnterCombat(Unit* /*pWho*/)
{
me->SetInCombatWithZone();
if (m_pInstance)
@@ -579,7 +581,7 @@ struct mob_unleashed_ballAI : public ScriptedAI
MoveToNextPoint();
m_uiRangeCheckTimer = IN_MILLISECONDS;
}
void MovementInform(uint32 uiType, uint32 uiId)
{
if (uiType != POINT_MOTION_TYPE) return;

View File

@@ -113,7 +113,7 @@ public:
}
bool IsEncounterInProgress() const
{
{
for (uint8 i = 0; i < MAX_ENCOUNTERS ; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
@@ -134,9 +134,9 @@ public:
Map::PlayerList const &players = instance->GetPlayers();
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
{
if (Player* pPlayer = i->getSource())
{
{
if (pPlayer->isAlive())
return false;
}
@@ -145,16 +145,16 @@ public:
}
void OpenDoor(uint64 guid)
{
{
if (!guid) return;
GameObject* pGo = instance->GetGameObject(guid);
GameObject* pGo = instance->GetGameObject(guid);
if (pGo) pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
}
void CloseDoor(uint64 guid)
{
{
if (!guid) return;
GameObject* pGo = instance->GetGameObject(guid);
GameObject* pGo = instance->GetGameObject(guid);
if (pGo) pGo->SetGoState(GO_STATE_READY);
}
@@ -179,24 +179,24 @@ public:
case NPC_ANUBARAK: m_uiAnubarakGUID = pCreature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject* pGO, bool /*bAdd*/)
{
switch(pGO->GetEntry())
{
case GO_CRUSADERS_CACHE_10:
case GO_CRUSADERS_CACHE_10:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_NORMAL)
m_uiCrusadersCacheGUID = pGO->GetGUID();
break;
case GO_CRUSADERS_CACHE_25:
case GO_CRUSADERS_CACHE_25:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_NORMAL)
m_uiCrusadersCacheGUID = pGO->GetGUID();
break;
case GO_CRUSADERS_CACHE_10_H:
case GO_CRUSADERS_CACHE_10_H:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
m_uiCrusadersCacheGUID = pGO->GetGUID();
break;
case GO_CRUSADERS_CACHE_25_H:
case GO_CRUSADERS_CACHE_25_H:
if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
m_uiCrusadersCacheGUID = pGO->GetGUID();
break;
@@ -520,20 +520,18 @@ public:
}
void Update(uint32 uiDiff)
{
{
if (GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && m_uiNotOneButTwoJormungarsTimer)
{
if (m_uiNotOneButTwoJormungarsTimer)
if (m_uiNotOneButTwoJormungarsTimer <= uiDiff)
m_uiNotOneButTwoJormungarsTimer = 0;
{
if (m_uiNotOneButTwoJormungarsTimer <= uiDiff)
m_uiNotOneButTwoJormungarsTimer = 0;
else m_uiNotOneButTwoJormungarsTimer -= uiDiff;
}
if (GetData(TYPE_CRUSADERS) == IN_PROGRESS && m_uiResilienceWillFixItTimer)
{
if (m_uiResilienceWillFixItTimer)
if (m_uiResilienceWillFixItTimer <= uiDiff)
m_uiResilienceWillFixItTimer = 0;
{
if (m_uiResilienceWillFixItTimer <= uiDiff)
m_uiResilienceWillFixItTimer = 0;
else m_uiResilienceWillFixItTimer -= uiDiff;
}
}
@@ -543,7 +541,7 @@ public:
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
saveStream << m_auiEncounter[i] << " ";
@@ -571,7 +569,7 @@ public:
OUT_LOAD_INST_DATA(strIn);
std::istringstream loadStream(strIn);
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
{
loadStream >> m_auiEncounter[i];

View File

@@ -112,13 +112,13 @@ class npc_announcer_toc10 : public CreatureScript
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if(Creature *pAlly = GetClosestCreatureWithEntry(me, NPC_THRALL, 300.0f))
if (Creature *pAlly = GetClosestCreatureWithEntry(me, NPC_THRALL, 300.0f))
pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if(Creature *pAlly = GetClosestCreatureWithEntry(me, NPC_PROUDMOORE, 300.0f))
if (Creature *pAlly = GetClosestCreatureWithEntry(me, NPC_PROUDMOORE, 300.0f))
pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
void AttackStart(Unit* pWho) {}
void AttackStart(Unit* /*pWho*/) {}
};
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
@@ -133,7 +133,7 @@ class npc_announcer_toc10 : public CreatureScript
return true;
uint8 i;
for(i = 0; i < NUM_MESSAGES; i++)
for (i = 0; i < NUM_MESSAGES; i++)
{
if ((!_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) != DONE)
|| (_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) == DONE))
@@ -147,7 +147,7 @@ class npc_announcer_toc10 : public CreatureScript
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
InstanceScript* m_pInstance;
m_pInstance = (InstanceScript*)pCreature->GetInstanceScript();
@@ -319,7 +319,7 @@ class boss_lich_king_toc : public CreatureScript
if (GameObject* pGoFloor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
pGoFloor->TakenDamage(1000000);
me->CastSpell(me,69016,false);
if(m_pInstance) m_pInstance->SetData(TYPE_LICH_KING,DONE);
if (m_pInstance) m_pInstance->SetData(TYPE_LICH_KING,DONE);
Creature* pTemp = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_ANUBARAK));
if (!pTemp || !pTemp->isAlive())
pTemp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
@@ -379,7 +379,7 @@ class npc_fizzlebang_toc : public CreatureScript
void MovementInform(uint32 uiType, uint32 uiId)
{
if(uiType != POINT_MOTION_TYPE) return;
if (uiType != POINT_MOTION_TYPE) return;
switch (uiId)
{
@@ -402,7 +402,7 @@ class npc_fizzlebang_toc : public CreatureScript
void UpdateAI(const uint32 uiDiff)
{
if(!m_pInstance) return;
if (!m_pInstance) return;
if (m_pInstance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG) return;
@@ -524,7 +524,7 @@ class npc_tirion_toc : public CreatureScript
void Reset() {}
void AttackStart(Unit* pWho) {}
void AttackStart(Unit* /*pWho*/) {}
void UpdateAI(const uint32 uiDiff)
{
@@ -838,7 +838,7 @@ class npc_garrosh_toc : public CreatureScript
void Reset() {}
void AttackStart(Unit* pWho) {}
void AttackStart(Unit* /*pWho*/) {}
void UpdateAI(const uint32 uiDiff)
{
@@ -916,7 +916,7 @@ class npc_varian_toc : public CreatureScript
void Reset() {}
void AttackStart(Unit* pWho) {}
void AttackStart(Unit* /*pWho*/) {}
void UpdateAI(const uint32 uiDiff)
{

View File

@@ -37,91 +37,91 @@ enum
DESPAWN_TIME = 300000,
};
static Position ToCCommonLoc[]=
const Position ToCCommonLoc[]=
{
{559.257996f, 90.266197f, 395.122986f}, // 0 Barrent
{559.257996f, 90.266197f, 395.122986f, 0}, // 0 Barrent
{563.672974f, 139.571f, 393.837006f}, // 1 Center
{563.833008f, 187.244995f, 394.5f}, // 2 Backdoor
{577.347839f, 195.338888f, 395.14f}, // 3 - Right
{550.955933f, 195.338888f, 395.14f}, // 4 - Left
{563.833008f, 195.244995f, 394.585561f}, // 5 - Center
{573.5f, 180.5f, 395.14f}, // 6 Move 0 Right
{553.5f, 180.5f, 395.14f}, // 7 Move 0 Left
{585.5f, 170.0f, 395.14f}, // 8 Move 1 Right
{545.5f, 170.0f, 395.14f}, // 9 Move 1 Left
{563.8f, 216.1f, 395.1f}, // 10 Behind the door
{563.672974f, 139.571f, 393.837006f, 0}, // 1 Center
{563.833008f, 187.244995f, 394.5f, 0}, // 2 Backdoor
{577.347839f, 195.338888f, 395.14f, 0}, // 3 - Right
{550.955933f, 195.338888f, 395.14f, 0}, // 4 - Left
{563.833008f, 195.244995f, 394.585561f, 0}, // 5 - Center
{573.5f, 180.5f, 395.14f, 0}, // 6 Move 0 Right
{553.5f, 180.5f, 395.14f, 0}, // 7 Move 0 Left
{585.5f, 170.0f, 395.14f, 0}, // 8 Move 1 Right
{545.5f, 170.0f, 395.14f, 0}, // 9 Move 1 Left
{563.8f, 216.1f, 395.1f, 0}, // 10 Behind the door
{575.042358f, 195.260727f, 395.137146f}, // 5
{552.248901f, 195.331955f, 395.132658f}, // 6
{573.342285f, 195.515823f, 395.135956f}, // 7
{554.239929f, 195.825577f, 395.137909f}, // 8
{571.042358f, 195.260727f, 395.137146f}, // 9
{556.720581f, 195.015472f, 395.132658f}, // 10
{569.534119f, 195.214478f, 395.139526f}, // 11
{569.231201f, 195.941071f, 395.139526f}, // 12
{558.811610f, 195.985779f, 394.671661f}, // 13
{567.641724f, 195.351501f, 394.659943f}, // 14
{560.633972f, 195.391708f, 395.137543f}, // 15
{565.816956f, 195.477921f, 395.136810f}, // 16
{575.042358f, 195.260727f, 395.137146f, 0}, // 5
{552.248901f, 195.331955f, 395.132658f, 0}, // 6
{573.342285f, 195.515823f, 395.135956f, 0}, // 7
{554.239929f, 195.825577f, 395.137909f, 0}, // 8
{571.042358f, 195.260727f, 395.137146f, 0}, // 9
{556.720581f, 195.015472f, 395.132658f, 0}, // 10
{569.534119f, 195.214478f, 395.139526f, 0}, // 11
{569.231201f, 195.941071f, 395.139526f, 0}, // 12
{558.811610f, 195.985779f, 394.671661f, 0}, // 13
{567.641724f, 195.351501f, 394.659943f, 0}, // 14
{560.633972f, 195.391708f, 395.137543f, 0}, // 15
{565.816956f, 195.477921f, 395.136810f, 0}, // 16
};
static Position JaraxxusLoc[]=
const Position JaraxxusLoc[]=
{
{508.104767f, 138.247345f, 395.128052f}, // 0 - Fizzlebang start location
{548.610596f, 139.807800f, 394.321838f}, // 1 - fizzlebang end
{581.854187f, 138.0f, 394.319f}, // 2 - Portal Right
{550.558838f, 138.0f, 394.319f}, // 3 - Portal Left
{508.104767f, 138.247345f, 395.128052f, 0}, // 0 - Fizzlebang start location
{548.610596f, 139.807800f, 394.321838f, 0}, // 1 - fizzlebang end
{581.854187f, 138.0f, 394.319f, 0}, // 2 - Portal Right
{550.558838f, 138.0f, 394.319f, 0}, // 3 - Portal Left
};
static Position FactionChampionLoc[]=
const Position FactionChampionLoc[]=
{
{514.231f,105.569f,418.234f}, // 0 - Horde Initial Pos 0
{508.334f,115.377f,418.234f}, // 1 - Horde Initial Pos 1
{506.454f,126.291f,418.234f}, // 2 - Horde Initial Pos 2
{506.243f,106.596f,421.592f}, // 3 - Horde Initial Pos 3
{499.885f,117.717f,421.557f}, // 4 - Horde Initial Pos 4
{514.231f,105.569f,418.234f, 0}, // 0 - Horde Initial Pos 0
{508.334f,115.377f,418.234f, 0}, // 1 - Horde Initial Pos 1
{506.454f,126.291f,418.234f, 0}, // 2 - Horde Initial Pos 2
{506.243f,106.596f,421.592f, 0}, // 3 - Horde Initial Pos 3
{499.885f,117.717f,421.557f, 0}, // 4 - Horde Initial Pos 4
{613.127f,100.443f,419.74f}, // 5 - Ally Initial Pos 0
{621.126f,128.042f,418.231f}, // 6 - Ally Initial Pos 1
{618.829f,113.606f,418.232f}, // 7 - Ally Initial Pos 2
{625.845f,112.914f,421.575f}, // 8 - Ally Initial Pos 3
{615.566f,109.653f,418.234f}, // 9 - Ally Initial Pos 4
{613.127f,100.443f,419.74f, 0}, // 5 - Ally Initial Pos 0
{621.126f,128.042f,418.231f, 0}, // 6 - Ally Initial Pos 1
{618.829f,113.606f,418.232f, 0}, // 7 - Ally Initial Pos 2
{625.845f,112.914f,421.575f, 0}, // 8 - Ally Initial Pos 3
{615.566f,109.653f,418.234f, 0}, // 9 - Ally Initial Pos 4
{535.469f,113.012f,394.66f}, // 10 - Horde Final Pos 0
{526.417f,137.465f,394.749f}, // 11 - Horde Final Pos 1
{528.108f,111.057f,395.289f}, // 12 - Horde Final Pos 2
{519.92f,134.285f,395.289f}, // 13 - Horde Final Pos 3
{533.648f,119.148f,394.646f}, // 14 - Horde Final Pos 4
{531.399f,125.63f,394.708f}, // 15 - Horde Final Pos 5
{528.958f,131.47f,394.73f}, // 16 - Horde Final Pos 6
{526.309f,116.667f,394.833f}, // 17 - Horde Final Pos 7
{524.238f,122.411f,394.819f}, // 18 - Horde Final Pos 8
{521.901f,128.488f,394.832f}, // 19 - Horde Final Pos 9
{535.469f,113.012f,394.66f, 0}, // 10 - Horde Final Pos 0
{526.417f,137.465f,394.749f, 0}, // 11 - Horde Final Pos 1
{528.108f,111.057f,395.289f, 0}, // 12 - Horde Final Pos 2
{519.92f,134.285f,395.289f, 0}, // 13 - Horde Final Pos 3
{533.648f,119.148f,394.646f, 0}, // 14 - Horde Final Pos 4
{531.399f,125.63f,394.708f, 0}, // 15 - Horde Final Pos 5
{528.958f,131.47f,394.73f, 0}, // 16 - Horde Final Pos 6
{526.309f,116.667f,394.833f, 0}, // 17 - Horde Final Pos 7
{524.238f,122.411f,394.819f, 0}, // 18 - Horde Final Pos 8
{521.901f,128.488f,394.832f, 0}, // 19 - Horde Final Pos 9
};
static Position TwinValkyrsLoc[]=
const Position TwinValkyrsLoc[]=
{
{586.060242f, 117.514809f, 394.314026f}, // 0 - Dark essence 1
{541.602112f, 161.879837f, 394.587952f}, // 1 - Dark essence 2
{541.021118f, 117.262932f, 395.314819f}, // 2 - Light essence 1
{586.200562f, 162.145523f, 394.626129f}, // 3 - Light essence 2
{586.060242f, 117.514809f, 394.314026f, 0}, // 0 - Dark essence 1
{541.602112f, 161.879837f, 394.587952f, 0}, // 1 - Dark essence 2
{541.021118f, 117.262932f, 395.314819f, 0}, // 2 - Light essence 1
{586.200562f, 162.145523f, 394.626129f, 0}, // 3 - Light essence 2
};
static Position LichKingLoc[]=
const Position LichKingLoc[]=
{
{563.549f, 152.474f, 394.393f}, // 0 - Lich king start
{563.547f, 141.613f, 393.908f}, // 1 - Lich king end
{563.549f, 152.474f, 394.393f, 0}, // 0 - Lich king start
{563.547f, 141.613f, 393.908f, 0}, // 1 - Lich king end
};
static Position AnubarakLoc[]=
const Position AnubarakLoc[]=
{
{787.932556f, 133.289780f, 142.612152f}, // 0 - Anub'arak start location
{695.240051f, 137.834824f, 142.200000f}, // 1 - Anub'arak move point location
{694.886353f, 102.484665f, 142.119614f}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f}, // 5 - Nerub Spawn
{731.987244f, 83.3824690f, 142.119614f}, // 2 - Nerub Spawn
{740.184509f, 193.443390f, 142.117584f}, // 4 - Nerub Spawn
{787.932556f, 133.289780f, 142.612152f, 0}, // 0 - Anub'arak start location
{695.240051f, 137.834824f, 142.200000f, 0}, // 1 - Anub'arak move point location
{694.886353f, 102.484665f, 142.119614f, 0}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f, 0}, // 5 - Nerub Spawn
{731.987244f, 83.3824690f, 142.119614f, 0}, // 2 - Nerub Spawn
{740.184509f, 193.443390f, 142.117584f, 0}, // 4 - Nerub Spawn
};
enum euiWorldStates

View File

@@ -85,36 +85,36 @@ enum eEnum
DISPLAY_DESIRE = 30150,
};
struct
struct outroPosition
{
uint32 entry[2];
Position movePosition;
} outroPositions[] =
{
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5590.47f, 2427.79f, 705.935f, 0.802851f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5593.59f, 2428.34f, 705.935f, 0.977384f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5600.81f, 2429.31f, 705.935f, 0.890118f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5600.81f, 2421.12f, 705.935f, 0.890118f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5601.43f, 2426.53f, 705.935f, 0.890118f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5601.55f, 2418.36f, 705.935f, 1.15192f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5598, 2429.14f, 705.935f, 1.0472f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5594.04f, 2424.87f, 705.935f, 1.15192f } },
{ NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE, { 5597.89f, 2421.54f, 705.935f, 0.610865f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5598.57f, 2434.62f, 705.935f, 1.13446f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5585.46f, 2417.99f, 705.935f, 1.06465f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5605.81f, 2428.42f, 705.935f, 0.820305f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5591.61f, 2412.66f, 705.935f, 0.925025f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5593.9f, 2410.64f, 705.935f, 0.872665f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE, { 5586.76f, 2416.73f, 705.935f, 0.942478f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE, { 5592.23f, 2419.14f, 705.935f, 0.855211f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE, { 5594.61f, 2416.87f, 705.935f, 0.907571f } },
{ NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE, { 5589.77f, 2421.03f, 705.935f, 0.855211f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5590.47f, 2427.79f, 705.935f, 0.802851f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5593.59f, 2428.34f, 705.935f, 0.977384f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5600.81f, 2429.31f, 705.935f, 0.890118f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5600.81f, 2421.12f, 705.935f, 0.890118f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5601.43f, 2426.53f, 705.935f, 0.890118f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5601.55f, 2418.36f, 705.935f, 1.15192f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5598, 2429.14f, 705.935f, 1.0472f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5594.04f, 2424.87f, 705.935f, 1.15192f } },
{ { NPC_CHAMPION_1_ALLIANCE, NPC_CHAMPION_1_HORDE }, { 5597.89f, 2421.54f, 705.935f, 0.610865f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5598.57f, 2434.62f, 705.935f, 1.13446f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5585.46f, 2417.99f, 705.935f, 1.06465f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5605.81f, 2428.42f, 705.935f, 0.820305f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5591.61f, 2412.66f, 705.935f, 0.925025f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5593.9f, 2410.64f, 705.935f, 0.872665f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_2_HORDE }, { 5586.76f, 2416.73f, 705.935f, 0.942478f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE }, { 5592.23f, 2419.14f, 705.935f, 0.855211f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE }, { 5594.61f, 2416.87f, 705.935f, 0.907571f } },
{ { NPC_CHAMPION_2_ALLIANCE, NPC_CHAMPION_3_HORDE }, { 5589.77f, 2421.03f, 705.935f, 0.855211f } },
{ NPC_KORELN, NPC_LORALEN, { 5602.58f, 2435.95f, 705.935f, 0.959931f } },
{ NPC_ELANDRA, NPC_KALIRA, { 5606.13f, 2433.16f, 705.935f, 0.785398f } },
{ NPC_JAINA_PART2, NPC_SYLVANAS_PART2, { 5606.12f, 2436.6f, 705.935f, 0.890118f } },
{ { NPC_KORELN, NPC_LORALEN }, { 5602.58f, 2435.95f, 705.935f, 0.959931f } },
{ { NPC_ELANDRA, NPC_KALIRA }, { 5606.13f, 2433.16f, 705.935f, 0.785398f } },
{ { NPC_JAINA_PART2, NPC_SYLVANAS_PART2 }, { 5606.12f, 2436.6f, 705.935f, 0.890118f } },
{ 0, 0, { 0.0f, 0.0f, 0.0f, 0.0f } }
{ { 0, 0 }, { 0.0f, 0.0f, 0.0f, 0.0f } }
};
class boss_devourer_of_souls : public CreatureScript
@@ -176,7 +176,7 @@ public:
{
if (Player *pPlayer = Unit::GetPlayer(*me, uiMirroredSoulTarget))
{
if (Aura *pAura = pPlayer->GetAura(SPELL_MIRRORED_SOUL))
if (pPlayer->GetAura(SPELL_MIRRORED_SOUL))
{
int32 mirrorDamage = (uiDamage * 45)/100;
me->CastCustomSpell(pPlayer, 69034, &mirrorDamage, 0, 0, true);
@@ -196,7 +196,7 @@ public:
void JustDied(Unit* /*killer*/)
{
Position spawnPoint = { 5618.139f, 2451.873f, 705.854f };
Position spawnPoint = { 5618.139f, 2451.873f, 705.854f, 0 };
DoScriptText(RAND(SAY_FACE_SORROW_DEATH,SAY_FACE_DESIRE_DEATH), me);

View File

@@ -43,85 +43,85 @@ enum eYells
SAY_DRAKE_BREATH_3 = -1575013,
};
static Position SpawnLoc = {468.931f, -513.555f, 104.723f};
static Position SpawnLoc = {468.931f, -513.555f, 104.723f, 0};
static Position Location[]=
{
// Boss
{341.740997f, -516.955017f, 104.66900f}, // 0
{293.299f, -505.95f, 142.03f}, // 1
{301.664f, -535.164f, 146.097f}, // 2
{521.031006f, -544.667847f, 128.80064f}, // 3
{477.311981f, -509.296814f, 104.72308f}, // 4
{341.740997f, -516.955017f, 104.66900f}, // 5
{341.740997f, -516.955017f, 104.66900f}, // 6
{341.740997f, -516.955017f, 104.66900f}, // 7
{341.740997f, -516.955017f, 104.66900f, 0}, // 0
{293.299f, -505.95f, 142.03f, 0}, // 1
{301.664f, -535.164f, 146.097f, 0}, // 2
{521.031006f, -544.667847f, 128.80064f, 0}, // 3
{477.311981f, -509.296814f, 104.72308f, 0}, // 4
{341.740997f, -516.955017f, 104.66900f, 0}, // 5
{341.740997f, -516.955017f, 104.66900f, 0}, // 6
{341.740997f, -516.955017f, 104.66900f, 0}, // 7
// Triggers Left
{469.661f, -484.546f, 104.712f}, // 8
{483.315f, -485.028f, 104.718f}, // 9
{476.87f, -487.994f, 104.735f}, //10
{477.512f, -497.772f, 104.728f}, //11
{486.287f, -500.759f, 104.722f}, //12
{480.1f, -503.895f, 104.722f}, //13
{472.391f, -505.103f, 104.723f}, //14
{478.885f, -510.803f, 104.723f}, //15
{489.529f, -508.615f, 104.723f}, //16
{484.272f, -508.589f, 104.723f}, //17
{465.328f, -506.495f, 104.427f}, //18
{456.885f, -508.104f, 104.447f}, //19
{450.177f, -507.989f, 105.247f}, //20
{442.273f, -508.029f, 104.813f}, //21
{434.225f, -508.19f, 104.787f}, //22
{423.902f, -508.525f, 104.274f}, //23
{414.551f, -508.645f, 105.136f}, //24
{405.787f, -508.755f, 104.988f}, //25
{398.812f, -507.224f, 104.82f}, //26
{389.702f, -506.846f, 104.729f}, //27
{381.856f, -506.76f, 104.756f}, //28
{372.881f, -507.254f, 104.779f}, //29
{364.978f, -508.182f, 104.673f}, //30
{357.633f, -508.075f, 104.647f}, //31
{350.008f, -506.826f, 104.588f}, //32
{341.69f, -506.77f, 104.499f}, //33
{335.31f, -505.745f, 105.18f}, //34
{471.178f, -510.74f, 104.723f}, //35
{461.759f, -510.365f, 104.199f}, //36
{424.07287f, -510.082916f, 104.711082f}, //37
{469.661f, -484.546f, 104.712f, 0}, // 8
{483.315f, -485.028f, 104.718f, 0}, // 9
{476.87f, -487.994f, 104.735f, 0}, //10
{477.512f, -497.772f, 104.728f, 0}, //11
{486.287f, -500.759f, 104.722f, 0}, //12
{480.1f, -503.895f, 104.722f, 0}, //13
{472.391f, -505.103f, 104.723f, 0}, //14
{478.885f, -510.803f, 104.723f, 0}, //15
{489.529f, -508.615f, 104.723f, 0}, //16
{484.272f, -508.589f, 104.723f, 0}, //17
{465.328f, -506.495f, 104.427f, 0}, //18
{456.885f, -508.104f, 104.447f, 0}, //19
{450.177f, -507.989f, 105.247f, 0}, //20
{442.273f, -508.029f, 104.813f, 0}, //21
{434.225f, -508.19f, 104.787f, 0}, //22
{423.902f, -508.525f, 104.274f, 0}, //23
{414.551f, -508.645f, 105.136f, 0}, //24
{405.787f, -508.755f, 104.988f, 0}, //25
{398.812f, -507.224f, 104.82f, 0}, //26
{389.702f, -506.846f, 104.729f, 0}, //27
{381.856f, -506.76f, 104.756f, 0}, //28
{372.881f, -507.254f, 104.779f, 0}, //29
{364.978f, -508.182f, 104.673f, 0}, //30
{357.633f, -508.075f, 104.647f, 0}, //31
{350.008f, -506.826f, 104.588f, 0}, //32
{341.69f, -506.77f, 104.499f, 0}, //33
{335.31f, -505.745f, 105.18f, 0}, //34
{471.178f, -510.74f, 104.723f, 0}, //35
{461.759f, -510.365f, 104.199f, 0}, //36
{424.07287f, -510.082916f, 104.711082f, 0}, //37
// Triggers Right
{489.46f, -513.297f, 105.413f}, //38
{485.706f, -517.175f, 104.724f}, //39
{480.98f, -519.313f, 104.724f}, //40
{475.05f, -520.52f, 104.724f}, //41
{482.97f, -512.099f, 104.724f}, //42
{477.082f, -514.172f, 104.724f}, //43
{468.991f, -516.691f, 104.724f}, //44
{461.722f, -517.063f, 104.627f}, //45
{455.88f, -517.681f, 104.707f}, //46
{450.499f, -519.099f, 104.701f}, //47
{444.889f, -518.963f, 104.82f}, //48
{440.181f, -518.893f, 104.861f}, //49
{434.393f, -518.758f, 104.891f}, //50
{429.328f, -518.583f, 104.904f}, //51
{423.844f, -518.394f, 105.004f}, //52
{418.707f, -518.266f, 105.135f}, //53
{413.377f, -518.085f, 105.153f}, //54
{407.277f, -517.844f, 104.893f}, //55
{401.082f, -517.443f, 104.723f}, //56
{394.933f, -514.64f, 104.724f}, //57
{388.917f, -514.688f, 104.734f}, //58
{383.814f, -515.834f, 104.73f}, //59
{377.887f, -518.653f, 104.777f}, //60
{371.376f, -518.289f, 104.781f}, //61
{365.669f, -517.822f, 104.758f}, //62
{359.572f, -517.314f, 104.706f}, //63
{353.632f, -517.146f, 104.647f}, //64
{347.998f, -517.038f, 104.538f}, //65
{341.803f, -516.98f, 104.584f}, //66
{335.879f, -516.674f, 104.628f}, //67
{329.871f, -515.92f, 104.711f}, //68
{489.46f, -513.297f, 105.413f, 0}, //38
{485.706f, -517.175f, 104.724f, 0}, //39
{480.98f, -519.313f, 104.724f, 0}, //40
{475.05f, -520.52f, 104.724f, 0}, //41
{482.97f, -512.099f, 104.724f, 0}, //42
{477.082f, -514.172f, 104.724f, 0}, //43
{468.991f, -516.691f, 104.724f, 0}, //44
{461.722f, -517.063f, 104.627f, 0}, //45
{455.88f, -517.681f, 104.707f, 0}, //46
{450.499f, -519.099f, 104.701f, 0}, //47
{444.889f, -518.963f, 104.82f, 0}, //48
{440.181f, -518.893f, 104.861f, 0}, //49
{434.393f, -518.758f, 104.891f, 0}, //50
{429.328f, -518.583f, 104.904f, 0}, //51
{423.844f, -518.394f, 105.004f, 0}, //52
{418.707f, -518.266f, 105.135f, 0}, //53
{413.377f, -518.085f, 105.153f, 0}, //54
{407.277f, -517.844f, 104.893f, 0}, //55
{401.082f, -517.443f, 104.723f, 0}, //56
{394.933f, -514.64f, 104.724f, 0}, //57
{388.917f, -514.688f, 104.734f, 0}, //58
{383.814f, -515.834f, 104.73f, 0}, //59
{377.887f, -518.653f, 104.777f, 0}, //60
{371.376f, -518.289f, 104.781f, 0}, //61
{365.669f, -517.822f, 104.758f, 0}, //62
{359.572f, -517.314f, 104.706f, 0}, //63
{353.632f, -517.146f, 104.647f, 0}, //64
{347.998f, -517.038f, 104.538f, 0}, //65
{341.803f, -516.98f, 104.584f, 0}, //66
{335.879f, -516.674f, 104.628f, 0}, //67
{329.871f, -515.92f, 104.711f, 0}, //68
// Breach Zone
{485.4577f, -511.2515f, 115.3011f}, //69
{435.1892f, -514.5232f, 118.6719f}, //70
{413.9327f, -540.9407f, 138.2614f}, //71
{485.4577f, -511.2515f, 115.3011f, 0}, //69
{435.1892f, -514.5232f, 118.6719f, 0}, //70
{413.9327f, -540.9407f, 138.2614f, 0}, //71
};
enum eCombatPhase
@@ -276,7 +276,7 @@ public:
Summons.Despawn(pSummoned);
}
void SpellHit(Unit *caster, const SpellEntry *spell)
void SpellHit(Unit * /*caster*/, const SpellEntry *spell)
{
if (spell->Id == SPELL_HARPOON_DAMAGE)
{

View File

@@ -171,7 +171,7 @@ void OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower(uint32 team)
else
ct=EP_EWT_Summons_H;
for (int i = 0; i < EP_EWT_NUM_CREATURES; ++i)
for (uint8 i = 0; i < EP_EWT_NUM_CREATURES; ++i)
{
DelCreature(i);
AddCreature(i,ct[i].entry,ct[i].teamval,ct[i].map,ct[i].x,ct[i].y,ct[i].z,ct[i].o,1000000);
@@ -623,7 +623,7 @@ OutdoorPvPEP::OutdoorPvPEP()
bool OutdoorPvPEP::SetupOutdoorPvP()
{
for (int i = 0; i < EPBuffZonesNum; ++i)
for (uint8 i = 0; i < EPBuffZonesNum; ++i)
RegisterZone(EPBuffZones[i]);
AddCapturePoint(new OPvPCapturePointEP_EWT(this));

View File

@@ -30,7 +30,7 @@ const uint32 EP_GraveYardZone = 139;
const uint32 EP_GraveYardId = 927;
const uint32 EPBuffZonesNum = 3;
const uint8 EPBuffZonesNum = 3;
const uint32 EP_EWT_CM = 17690;
const uint32 EP_CGT_CM = 17689;
@@ -149,8 +149,8 @@ const uint32 EPTowerPlayerEnterEvents[EP_TOWER_NUM] = {10691,10699,10701,10705};
const uint32 EPTowerPlayerLeaveEvents[EP_TOWER_NUM] = {10692,10698,10700,10704};
const uint32 EP_NUM_CREATURES = 6;
const uint32 EP_EWT_NUM_CREATURES = 5;
const uint8 EP_NUM_CREATURES = 6;
const uint8 EP_EWT_NUM_CREATURES = 5;
// one lordaeron commander, 4 soldiers
// should be spawned at EWT and follow a path, but trans-grid pathing isn't safe, so summon them directly at NPT

View File

@@ -412,7 +412,7 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player * plr, uint32 spellId, GameObj
int32 OPvPCapturePointNA::HandleOpenGo(Player *plr, uint64 guid)
{
uint32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid);
int32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid);
if (retval >= 0)
{
const go_type * gos = NULL;

View File

@@ -58,7 +58,7 @@ void OutdoorPvPSI::UpdateWorldState()
bool OutdoorPvPSI::SetupOutdoorPvP()
{
for (int i = 0; i < OutdoorPvPSIBuffZonesNum; ++i)
for (uint8 i = 0; i < OutdoorPvPSIBuffZonesNum; ++i)
RegisterZone(OutdoorPvPSIBuffZones[i]);
return true;
}

View File

@@ -31,7 +31,7 @@ enum OutdoorPvPSISpells
const uint32 SI_MAX_RESOURCES = 200;
const uint32 OutdoorPvPSIBuffZonesNum = 3;
const uint8 OutdoorPvPSIBuffZonesNum = 3;
const uint32 OutdoorPvPSIBuffZones[OutdoorPvPSIBuffZonesNum] = { 1377, 3428, 3429 };

View File

@@ -222,7 +222,7 @@ bool OutdoorPvPTF::SetupOutdoorPvP()
first_digit = 0;
// add the zones affected by the pvp buff
for (int i = 0; i < OutdoorPvPTFBuffZonesNum; ++i)
for (uint8 i = 0; i < OutdoorPvPTFBuffZonesNum; ++i)
RegisterZone(OutdoorPvPTFBuffZones[i]);
AddCapturePoint(new OPvPCapturePointTF(this,TF_TOWER_NW));

View File

@@ -21,7 +21,7 @@
#include "OutdoorPvP.h"
const uint32 OutdoorPvPTFBuffZonesNum = 5;
const uint8 OutdoorPvPTFBuffZonesNum = 5;
const uint32 OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum] =
{

View File

@@ -180,7 +180,7 @@ bool OutdoorPvPZM::SetupOutdoorPvP()
m_HordeTowersControlled = 0;
// add the zones affected by the pvp buff
for (int i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
for (uint8 i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
RegisterZone(OutdoorPvPZMBuffZones[i]);
AddCapturePoint(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_WEST));
@@ -211,7 +211,7 @@ bool OPvPCapturePointZM_GraveYard::Update(uint32 /*diff*/)
int32 OPvPCapturePointZM_GraveYard::HandleOpenGo(Player *plr, uint64 guid)
{
uint32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid);
int32 retval = OPvPCapturePoint::HandleOpenGo(plr, guid);
if (retval >= 0)
{
if (plr->HasAura(ZM_BATTLE_STANDARD_A) && m_GraveYardState != ZM_GRAVEYARD_A)
@@ -327,7 +327,7 @@ void OPvPCapturePointZM_GraveYard::SetBeaconState(uint32 controlling_faction)
UpdateTowerState();
}
bool OPvPCapturePointZM_GraveYard::CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso)
bool OPvPCapturePointZM_GraveYard::CanTalkTo(Player * plr, Creature * c, GossipMenuItems /*gso*/)
{
uint64 guid = c->GetGUID();
std::map<uint64,uint32>::iterator itr = m_CreatureTypes.find(guid);

View File

@@ -22,7 +22,7 @@
#include "Language.h"
#include "OutdoorPvP.h"
const uint32 OutdoorPvPZMBuffZonesNum = 5;
const uint8 OutdoorPvPZMBuffZonesNum = 5;
// the buff is cast in these zones
const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716};

View File

@@ -40,14 +40,14 @@ public:
class spell_dk_corpse_explosion_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_CORPSE_EXPLOSION_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
{
@@ -86,14 +86,14 @@ public:
class spell_dk_runic_power_feed_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_SUMMON_GARGOYLE))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* caster = GetCaster())
{
@@ -125,14 +125,14 @@ public:
class spell_dk_scourge_strike_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DK_SPELL_SCOURGE_STRIKE_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())

View File

@@ -38,7 +38,7 @@ public:
class spell_dru_glyph_of_starfire_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(DRUID_INCREASED_MOONFIRE_DURATION))
return false;
@@ -47,7 +47,7 @@ public:
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())

View File

@@ -38,7 +38,7 @@ public:
class spell_gen_remove_flight_auras_SpellScript : public SpellScript
{
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit *target = GetHitUnit();
if (!target)
@@ -66,7 +66,7 @@ public:
class spell_gen_pet_summonedSpellScript : public SpellScript
{
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)

View File

@@ -48,7 +48,7 @@ public:
class spell_hun_chimera_shot_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_SERPENT))
return false;
@@ -59,7 +59,7 @@ public:
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
Unit* unitTarget = GetHitUnit();
@@ -140,14 +140,14 @@ public:
class spell_hun_invigoration_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_SPELL_INVIGORATION_TRIGGERED))
return false;
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
if (AuraEffect* aurEff = unitTarget->GetDummyAuraEffect(SPELLFAMILY_HUNTER, 3487, 0))
@@ -174,14 +174,14 @@ public:
class spell_hun_last_stand_pet_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
int32 healthModSpellBasePoints0 = int32(caster->GetMaxHealth()*0.3);
@@ -208,7 +208,7 @@ public:
class spell_hun_masters_call_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_SPELL_MASTERS_CALL_TRIGGERED))
return false;
@@ -228,7 +228,7 @@ public:
pet->CastSpell(unitTarget, SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), effIndex), true);
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -259,7 +259,7 @@ public:
class spell_hun_readiness_SpellScript : public SpellScript
{
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -302,7 +302,7 @@ public:
class spell_hun_scatter_shot_SpellScript : public SpellScript
{
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -333,7 +333,7 @@ public:
class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
return false;
@@ -342,7 +342,7 @@ public:
return true;
}
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->HasAura(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
@@ -378,14 +378,14 @@ public:
class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (!GetHitUnit())
return;

View File

@@ -44,7 +44,7 @@ class spell_mage_cold_snap : public SpellHandlerScript
class spell_mage_cold_snap_SpellScript : public SpellScript
{
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
@@ -90,7 +90,7 @@ class spell_mage_polymorph_cast_visual : public SpellHandlerScript
{
static const uint32 spell_list[6];
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
// check if spell ids exist in dbc
for (int i = 0; i < 6; i++)
@@ -99,7 +99,7 @@ class spell_mage_polymorph_cast_visual : public SpellHandlerScript
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit *unitTarget = GetHitUnit())
if (unitTarget->GetTypeId() == TYPEID_UNIT)
@@ -136,7 +136,7 @@ class spell_mage_summon_water_elemental : public SpellHandlerScript
class spell_mage_summon_water_elemental_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(SPELL_MAGE_GLYPH_OF_ETERNAL_WATER))
return false;
@@ -147,7 +147,7 @@ class spell_mage_summon_water_elemental : public SpellHandlerScript
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit *unitTarget = GetHitUnit())
{

View File

@@ -58,7 +58,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit *unitTarget = GetHitUnit())
{
@@ -97,14 +97,14 @@ public:
class spell_pal_guarded_by_the_light_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(PALADIN_SPELL_DIVINE_PLEA))
return false;
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
// Divine Plea
if (Aura* aura = GetCaster()->GetAura(PALADIN_SPELL_DIVINE_PLEA))
@@ -148,7 +148,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit *unitTarget = GetHitUnit())
{
@@ -183,7 +183,7 @@ public:
class spell_pal_judgement_of_command_SpellScript : public SpellScript
{
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit *unitTarget = GetHitUnit())
if (SpellEntry const* spell_proto = sSpellStore.LookupEntry(GetEffectValue()))

View File

@@ -39,7 +39,7 @@ class spell_pri_pain_and_suffering_proc : public SpellHandlerScript
// 47948 Pain and Suffering (proc)
class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
{
void HandleEffectScriptEffect(SpellEffIndex effIndex)
void HandleEffectScriptEffect(SpellEffIndex /*effIndex*/)
{
// Refresh Shadow Word: Pain on target
if (Unit *unitTarget = GetHitUnit())
@@ -83,7 +83,7 @@ class spell_pri_penance : public SpellHandlerScript
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *unitTarget = GetHitUnit();
if (!unitTarget || !unitTarget->isAlive())

View File

@@ -39,7 +39,7 @@ public:
class spell_q11587_arcane_prisoner_rescue_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(QUEST11587_SPELL_SUMMON_ARCANE_PRISONER_MALE))
return false;
@@ -50,7 +50,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())
@@ -99,7 +99,7 @@ public:
class spell_q11730_ultrasonic_screwdriver_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(SPELL_QUEST_SUMMON_SCAVENGEBOT_004A8))
return false;
@@ -116,7 +116,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Item *castItem = GetCastItem();
if (!castItem)

View File

@@ -38,14 +38,14 @@ class spell_rog_cheat_death : public SpellHandlerScript
class spell_rog_cheat_death_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(ROGUE_SPELL_CHEATING_DEATH))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
caster->CastSpell(caster, ROGUE_SPELL_CHEATING_DEATH, true);
@@ -71,14 +71,14 @@ class spell_rog_hunger_for_blood : public SpellHandlerScript
class spell_rog_hunger_for_blood_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(ROGUE_SPELL_HUNGER_FOR_BLOOD_BUFF))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
caster->CastSpell(caster, ROGUE_SPELL_HUNGER_FOR_BLOOD_BUFF, true);
@@ -104,14 +104,14 @@ class spell_rog_preparation : public SpellHandlerScript
class spell_rog_preparation_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(ROGUE_SPELL_GLYPH_OF_PREPARATION))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -166,14 +166,14 @@ class spell_rog_shiv : public SpellHandlerScript
class spell_rog_shiv_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(ROGUE_SPELL_SHIV_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
if (caster->GetTypeId() != TYPEID_PLAYER)

View File

@@ -53,7 +53,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* caster = GetCaster())
{
@@ -89,7 +89,7 @@ public:
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE))
return false;
@@ -98,7 +98,7 @@ public:
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())

View File

@@ -44,7 +44,7 @@ public:
class spell_warl_demonic_empowerment_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_SUCCUBUS))
return false;
@@ -59,7 +59,7 @@ public:
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Creature* targetCreature = GetHitCreature())
{
@@ -113,7 +113,7 @@ public:
class spell_warl_everlasting_affliction_SpellScript : public SpellScript
{
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
// Refresh corruption on target
@@ -143,7 +143,7 @@ public:
{
static uint32 const iTypes[8][3];
bool Validate(SpellEntry const * spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(WARLOCK_IMPROVED_HEALTHSTONE_R1))
return false;

View File

@@ -35,14 +35,14 @@ class spell_warr_last_stand : public SpellHandlerScript
class spell_warr_last_stand_SpellScript : public SpellScript
{
bool Validate(SpellEntry const *spellEntry)
bool Validate(SpellEntry const * /*spellEntry*/)
{
if (!sSpellStore.LookupEntry(WARRIOR_SPELL_LAST_STAND_TRIGGERED))
return false;
return true;
}
void HandleDummy(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
int32 healthModSpellBasePoints0 = int32(GetCaster()->GetMaxHealth() * 0.3);
GetCaster()->CastCustomSpell(GetCaster(), WARRIOR_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);

View File

@@ -95,7 +95,7 @@ class AreaTrigger_at_coilfang_waterfall : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
if (GameObject* pGo = GetClosestGameObjectWithEntry(player, GO_COILFANG_WATERFALL, 35.0f))
if (pGo->getLootState() == GO_READY)
@@ -127,7 +127,7 @@ class AreaTrigger_at_legion_teleporter : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
if (player->isAlive() && !player->isInCombat())
{
@@ -164,7 +164,7 @@ class AreaTrigger_at_ravenholdt : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
if (player->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE)
player->KilledMonsterCredit(NPC_RAVENHOLDT, 0);
@@ -234,7 +234,7 @@ class AreaTrigger_at_stormwright_shelf : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
if (!player->isDead() && player->GetQuestStatus(QUEST_STRENGTH_OF_THE_TEMPEST) == QUEST_STATUS_INCOMPLETE)
player->CastSpell(player, SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST, false);
@@ -262,7 +262,7 @@ class AreaTrigger_at_scent_larkorwi : public AreaTriggerScript
{
}
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
{
if (!player->isDead() && player->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE)
{

View File

@@ -1176,7 +1176,7 @@ class go_massive_seaforium_charge : public GameObjectScript
public:
go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
bool OnGossipHello(Player* pPlayer, GameObject *pGo)
bool OnGossipHello(Player* /*pPlayer*/, GameObject *pGo)
{
pGo->SetLootState(GO_JUST_DEACTIVATED);
return true;

View File

@@ -62,6 +62,7 @@ public:
//Buff timer (only buff when we are alive and not in combat
if (!me->isInCombat() && me->isAlive())
{
if (BuffTimer <= diff)
{
//Find a spell that targets friendly and applies an aura (these are generally buffs)
@@ -80,6 +81,7 @@ public:
}//Try agian in 30 seconds
else BuffTimer = 30000;
} else BuffTimer -= diff;
}
//Return since we have no target
if (!UpdateVictim())

View File

@@ -185,17 +185,17 @@ there is no difference here (except that default text is chosen with `gameobject
# formulas to calculate unlearning cost
###*/
int32 DoLearnCost(Player* /*pPlayer*/) //tailor, alchemy
uint32 DoLearnCost(Player* /*pPlayer*/) //tailor, alchemy
{
return 200000;
}
int32 DoHighUnlearnCost(Player* /*pPlayer*/) //tailor, alchemy
uint32 DoHighUnlearnCost(Player* /*pPlayer*/) //tailor, alchemy
{
return 1500000;
}
int32 DoMedUnlearnCost(Player* pPlayer) //blacksmith, leatherwork
uint32 DoMedUnlearnCost(Player* pPlayer) //blacksmith, leatherwork
{
uint8 level = pPlayer->getLevel();
if (level < 51)
@@ -206,7 +206,7 @@ int32 DoMedUnlearnCost(Player* pPlayer) //blacksmith, leath
return 1000000;
}
int32 DoLowUnlearnCost(Player* pPlayer) //blacksmith
uint32 DoLowUnlearnCost(Player* pPlayer) //blacksmith
{
uint8 level = pPlayer->getLevel();
if (level < 66)

View File

@@ -634,7 +634,7 @@ public:
Reset();
}
void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point)
void PatientSaved(Creature* /*soldier*/, Player* pPlayer, Location* Point)
{
if (pPlayer && PlayerGUID == pPlayer->GetGUID())
{

View File

@@ -47,15 +47,15 @@ char * command_finder(const char* text, int state)
const char* ret;
ChatCommand *cmd = ChatHandler::getCommandTable();
if(!state)
if (!state)
{
idx = 0;
len = strlen(text);
}
while(ret = cmd[idx].Name)
while ((ret = cmd[idx].Name))
{
if(!cmd[idx].AllowConsole)
if (!cmd[idx].AllowConsole)
{
idx++;
continue;
@@ -65,7 +65,7 @@ char * command_finder(const char* text, int state)
//printf("Checking %s \n", cmd[idx].Name);
if (strncmp(ret, text, len) == 0)
return strdup(ret);
if(cmd[idx].Name == NULL)
if (cmd[idx].Name == NULL)
break;
}
@@ -77,7 +77,7 @@ char ** cli_completion(const char * text, int start, int /*end*/)
char ** matches;
matches = (char**)NULL;
if(start == 0)
if (start == 0)
matches = rl_completion_matches((char*)text,&command_finder);
else
rl_bind_key('\t',rl_abort);
@@ -90,7 +90,7 @@ void utf8print(void* /*arg*/, const char* str)
#if PLATFORM == PLATFORM_WINDOWS
wchar_t wtemp_buf[6000];
size_t wtemp_len = 6000-1;
if(!Utf8toWStr(str,strlen(str),wtemp_buf,wtemp_len))
if (!Utf8toWStr(str,strlen(str),wtemp_buf,wtemp_len))
return;
char temp_buf[6000];
@@ -115,7 +115,7 @@ void commandFinished(void*, bool /*success*/)
/// \todo This function has to be enhanced to respect the login/realm split (delete char, delete account chars in realm, delete account chars in realm then delete account
bool ChatHandler::HandleAccountDeleteCommand(const char* args)
{
if(!*args)
if (!*args)
return false;
///- Get the account name from the command line
@@ -124,7 +124,7 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args)
return false;
std::string account_name = account_name_str;
if(!AccountMgr::normalizeString(account_name))
if (!AccountMgr::normalizeString(account_name))
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
SetSentErrorMessage(true);
@@ -132,7 +132,7 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args)
}
uint32 account_id = sAccountMgr.GetId(account_name);
if(!account_id)
if (!account_id)
{
PSendSysMessage(LANG_ACCOUNT_NOT_EXIST,account_name.c_str());
SetSentErrorMessage(true);
@@ -142,7 +142,7 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args)
/// Commands not recommended call from chat, but support anyway
/// can delete only for account with less security
/// This is also reject self apply in fact
if(HasLowerSecurityAccount (NULL,account_id,true))
if (HasLowerSecurityAccount (NULL,account_id,true))
return false;
AccountOpResult result = sAccountMgr.DeleteAccount(account_id);
@@ -186,7 +186,7 @@ bool ChatHandler::GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::s
// search by name
else
{
if(!normalizePlayerName(searchString))
if (!normalizePlayerName(searchString))
return false;
resultChar = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Name, deleteInfos_Account, deleteDate FROM characters WHERE deleteDate IS NOT NULL AND deleteInfos_Name " _LIKE_ " " _CONCAT3_("'%%'", "'%s'", "'%%'"), searchString.c_str());
@@ -230,7 +230,7 @@ std::string ChatHandler::GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::
{
std::ostringstream wherestr;
wherestr << "guid IN ('";
for(; itr != itr_end; ++itr)
for (; itr != itr_end; ++itr)
{
wherestr << itr->lowguid;
@@ -241,7 +241,7 @@ std::string ChatHandler::GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::
}
DeletedInfoList::const_iterator itr2 = itr;
if(++itr2 != itr_end)
if (++itr2 != itr_end)
wherestr << "','";
}
wherestr << "')";
@@ -444,7 +444,7 @@ bool ChatHandler::HandleCharacterDeletedDeleteCommand(const char* args)
HandleCharacterDeletedListHelper(foundList);
// Call the appropriate function to delete them (current account for deleted characters is 0)
for(DeletedInfoList::const_iterator itr = foundList.begin(); itr != foundList.end(); ++itr)
for (DeletedInfoList::const_iterator itr = foundList.begin(); itr != foundList.end(); ++itr)
Player::DeleteFromDB(itr->lowguid, 0, false, true);
return true;
@@ -484,22 +484,22 @@ bool ChatHandler::HandleCharacterDeletedOldCommand(const char* args)
}
bool ChatHandler::HandleCharacterEraseCommand(const char* args){
if(!*args)
if (!*args)
return false;
char *character_name_str = strtok((char*)args," ");
if(!character_name_str)
if (!character_name_str)
return false;
std::string character_name = character_name_str;
if(!normalizePlayerName(character_name))
if (!normalizePlayerName(character_name))
return false;
uint64 character_guid;
uint32 account_id;
Player *player = sObjectMgr.GetPlayer(character_name.c_str());
if(player)
if (player)
{
character_guid = player->GetGUID();
account_id = player->GetSession()->GetAccountId();
@@ -508,7 +508,7 @@ bool ChatHandler::HandleCharacterEraseCommand(const char* args){
else
{
character_guid = sObjectMgr.GetPlayerGUIDByName(character_name);
if(!character_guid)
if (!character_guid)
{
PSendSysMessage(LANG_NO_PLAYER,character_name.c_str());
SetSentErrorMessage(true);
@@ -565,7 +565,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
"LEFT JOIN account_access aa "
"ON (a.id = aa.id) "
"WHERE a.id = '%u'", account);
if(resultLogin)
if (resultLogin)
{
Field *fieldsLogin = resultLogin->Fetch();
PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
@@ -574,7 +574,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
else
PSendSysMessage(LANG_ACCOUNT_LIST_ERROR,name.c_str());
}while(resultDB->NextRow());
}while (resultDB->NextRow());
SendSysMessage(LANG_ACCOUNT_LIST_BAR);
return true;
@@ -583,13 +583,13 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
/// Create an account
bool ChatHandler::HandleAccountCreateCommand(const char* args)
{
if(!*args)
if (!*args)
return false;
///- %Parse the command line arguments
char *szAcc = strtok((char*)args, " ");
char *szPassword = strtok(NULL, " ");
if(!szAcc || !szPassword)
if (!szAcc || !szPassword)
return false;
// normalized in sAccountMgr.CreateAccount
@@ -626,7 +626,7 @@ bool ChatHandler::HandleAccountCreateCommand(const char* args)
/// Set the level of logging
bool ChatHandler::HandleServerSetLogFileLevelCommand(const char *args)
{
if(!*args)
if (!*args)
return false;
char *NewLevel = strtok((char*)args, " ");
@@ -640,7 +640,7 @@ bool ChatHandler::HandleServerSetLogFileLevelCommand(const char *args)
/// Set the level of logging
bool ChatHandler::HandleServerSetLogLevelCommand(const char *args)
{
if(!*args)
if (!*args)
return false;
char *NewLevel = strtok((char*)args, " ");
@@ -654,15 +654,15 @@ bool ChatHandler::HandleServerSetLogLevelCommand(const char *args)
/// set diff time record interval
bool ChatHandler::HandleServerSetDiffTimeCommand(const char *args)
{
if(!*args)
if (!*args)
return false;
char *NewTimeStr = strtok((char*)args, " ");
if(!NewTimeStr)
if (!NewTimeStr)
return false;
int32 NewTime =atoi(NewTimeStr);
if(NewTime < 0)
if (NewTime < 0)
return false;
sWorld.SetRecordDiffInterval(NewTime);
@@ -713,14 +713,12 @@ void CliRunnable::run()
if (needInit)
MySQL::Thread_Init();
char commandbuf[256];
///- Display the list of available CLI functions then beep
sLog.outString("");
//sLog.outString("");
#if PLATFORM != WINDOWS
rl_attempted_completion_function = cli_completion;
#endif
if(sConfig.GetBoolDefault("BeepAtStart", true))
if (sConfig.GetBoolDefault("BeepAtStart", true))
printf("\a"); // \a = Alert
// print this here the first time
@@ -743,13 +741,13 @@ void CliRunnable::run()
if (command_str != NULL)
{
for (int x=0; command_str[x]; x++)
if(command_str[x]=='\r'||command_str[x]=='\n')
if (command_str[x]=='\r'||command_str[x]=='\n')
{
command_str[x]=0;
break;
}
if(!*command_str)
if (!*command_str)
{
#if PLATFORM == WINDOWS
printf("TC>");
@@ -758,7 +756,7 @@ void CliRunnable::run()
}
std::string command;
if(!consoleToUtf8(command_str,command)) // convert from console encoding to utf8
if (!consoleToUtf8(command_str,command)) // convert from console encoding to utf8
{
#if PLATFORM == WINDOWS
printf("TC>");

View File

@@ -71,7 +71,7 @@ void RASocket::OnRead()
TcpSocket::OnRead();
unsigned int sz=ibuf.GetLength();
if(iInputLength+sz>=RA_BUFF_SIZE)
if (iInputLength+sz>=RA_BUFF_SIZE)
{
sLog.outRemote("Input buffer overflow, possible DOS attack.\n");
SetCloseAndDelete();
@@ -82,9 +82,9 @@ void RASocket::OnRead()
ibuf.Read(inp,sz);
/// \todo Can somebody explain this 'Linux bugfix'?
if(stage==NONE)
if(sz>4) //linux remote telnet
if(memcmp(inp ,"USER ",5))
if (stage==NONE)
if (sz>4) //linux remote telnet
if (memcmp(inp ,"USER ",5))
{
delete [] inp;return;
printf("lin bugfix");
@@ -94,7 +94,7 @@ void RASocket::OnRead()
bool gotenter=false;
unsigned int y=0;
for (; y<sz; y++)
if(inp[y]=='\r'||inp[y]=='\n')
if (inp[y]=='\r'||inp[y]=='\n')
{
gotenter=true;
break;
@@ -104,7 +104,7 @@ void RASocket::OnRead()
memcpy(&buff[iInputLength],inp,y);
iInputLength+=y;
delete [] inp;
if(gotenter)
if (gotenter)
{
buff[iInputLength]=0;
@@ -113,7 +113,7 @@ void RASocket::OnRead()
{
/// <ul> <li> If the input is 'USER <username>'
case NONE:
if(!memcmp(buff,"USER ",5)) //got "USER" cmd
if (!memcmp(buff,"USER ",5)) //got "USER" cmd
{
szLogin=&buff[5];
@@ -129,11 +129,11 @@ void RASocket::OnRead()
QueryResult_AutoPtr result = LoginDatabase.PQuery("SELECT a.id, aa.gmlevel, aa.RealmID FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = '%s'",login.c_str ());
///- If the user is not found, deny access
if(!result)
if (!result)
{
Sendf("-No such user.\r\n");
sLog.outRemote("User %s does not exist.\n",szLogin.c_str());
if(bSecure)SetCloseAndDelete();
if (bSecure)SetCloseAndDelete();
}
else
{
@@ -142,18 +142,18 @@ void RASocket::OnRead()
//szPass=fields[0].GetString();
///- if gmlevel is too low, deny access
if(fields[1].GetUInt32()<iMinLevel || fields[1].GetUInt32() == NULL)
if (fields[1].GetUInt32() < iMinLevel)
{
Sendf("-Not enough privileges.\r\n");
sLog.outRemote("User %s has no privilege.\n",szLogin.c_str());
if(bSecure)SetCloseAndDelete();
if (bSecure)SetCloseAndDelete();
}
else if(fields[2].GetInt32() != -1)
else if (fields[2].GetInt32() != -1)
{
///- if RealmID isn't -1, deny access
Sendf("-Not enough privileges.\r\n");
sLog.outRemote("User %s has to be assigned on all realms (with RealmID = '-1').\n",szLogin.c_str());
if(bSecure)SetCloseAndDelete();
if (bSecure)SetCloseAndDelete();
}
else
{
@@ -164,7 +164,7 @@ void RASocket::OnRead()
break;
///<li> If the input is 'PASS <password>' (and the user already gave his username)
case LG:
if(!memcmp(buff,"PASS ",5)) //got "PASS" cmd
if (!memcmp(buff,"PASS ",5)) //got "PASS" cmd
{ //login+pass ok
///- If password is correct, increment the number of active administrators
std::string login = szLogin;
@@ -179,7 +179,7 @@ void RASocket::OnRead()
"SELECT 1 FROM account WHERE username = '%s' AND sha_pass_hash=SHA1(CONCAT('%s',':','%s'))",
login.c_str(), login.c_str(), pw.c_str());
if(check)
if (check)
{
GetSocket();
stage=OK;
@@ -193,13 +193,13 @@ void RASocket::OnRead()
///- Else deny access
Sendf("-Wrong pass.\r\n");
sLog.outRemote("User %s has failed to log in.\n",szLogin.c_str());
if(bSecure)SetCloseAndDelete();
if (bSecure)SetCloseAndDelete();
}
}
break;
///<li> If user is logged, parse and execute the command
case OK:
if(strlen(buff))
if (strlen(buff))
{
sLog.outRemote("Got '%s' cmd.\n",buff);
SetDeleteByHandler(false);
@@ -219,7 +219,7 @@ void RASocket::OnRead()
/// Output function
void RASocket::zprint(void* callbackArg, const char * szText )
{
if( !szText )
if ( !szText )
return;
unsigned int sz=strlen(szText);
@@ -232,6 +232,6 @@ void RASocket::commandFinished(void* callbackArg, bool /*success*/)
raSocket->Sendf("TC>");
uint64 remainingCommands = --raSocket->pendingCommands;
if(remainingCommands == 0)
if (remainingCommands == 0)
raSocket->SetDeleteByHandler(true);
}

View File

@@ -164,10 +164,10 @@ void SOAPCommand::commandFinished(void* soapconnection, bool success)
////////////////////////////////////////////////////////////////////////////////
struct Namespace namespaces[] =
{ { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" }, // must be first
{ "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/" }, // must be second
{ "xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance" },
{ "xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema" },
{ "ns1", "urn:TC" }, // "ns1" namespace prefix
{ NULL, NULL }
{ { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", NULL, NULL }, // must be first
{ "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", NULL, NULL }, // must be second
{ "xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL },
{ "xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL },
{ "ns1", "urn:TC", NULL, NULL }, // "ns1" namespace prefix
{ NULL, NULL, NULL, NULL }
};