Core/Misc: removed some useless map checks
(cherry picked from commit cf1e80e3d09067ca4d0078a8113a09227a9f91ae)
This commit is contained in:
1 parent
f7e6f7a105
commit
df88c7f278
30 files changed
+162
-308
No files matched your search
@@ -308,7 +308,7 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
|
||||
fullcmd.c_str(), player->GetName().c_str(), player->GetGUID().ToString().c_str(),
|
||||
m_session->GetAccountId(), player->GetPositionX(), player->GetPositionY(),
|
||||
player->GetPositionZ(), player->GetMapId(),
|
||||
player->GetMap() ? player->GetMap()->GetMapName() : "Unknown",
|
||||
player->FindMap() ? player->FindMap()->GetMapName() : "Unknown",
|
||||
areaId, areaName.c_str(), zoneName.c_str(),
|
||||
(player->GetSelectedUnit()) ? player->GetSelectedUnit()->GetName().c_str() : "",
|
||||
guid.ToString().c_str());
|
||||
|
||||
@@ -231,7 +231,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
case CONDITION_INSTANCE_INFO:
|
||||
{
|
||||
Map* map = object->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
if (map->IsDungeon())
|
||||
{
|
||||
if (InstanceScript const* instance = ((InstanceMap*)map)->GetInstanceScript())
|
||||
{
|
||||
|
||||
@@ -6920,7 +6920,7 @@ void Player::RewardReputation(Unit* victim, float rate)
|
||||
{
|
||||
// support for: Championing - http://www.wowwiki.com/Championing
|
||||
Map const* map = GetMap();
|
||||
if (map && map->IsNonRaidDungeon())
|
||||
if (map->IsNonRaidDungeon())
|
||||
if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty()))
|
||||
if (dungeon->reclevel == 80)
|
||||
ChampioningFaction = GetChampioningFaction();
|
||||
@@ -20264,7 +20264,7 @@ void Player::ResetInstances(uint8 method, bool isRaid)
|
||||
// if the map is loaded, reset it
|
||||
Map* map = sMapMgr->FindMap(p->GetMapId(), p->GetInstanceId());
|
||||
if (map && map->IsDungeon())
|
||||
if (!((InstanceMap*)map)->Reset(method))
|
||||
if (!map->ToInstanceMap()->Reset(method))
|
||||
{
|
||||
++itr;
|
||||
continue;
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace Trinity
|
||||
if (creature->isElite())
|
||||
{
|
||||
// Elites in instances have a 2.75x XP bonus instead of the regular 2x world bonus.
|
||||
if (u->GetMap() && u->GetMap()->IsDungeon())
|
||||
if (u->GetMap()->IsDungeon())
|
||||
xpMod *= 2.75f;
|
||||
else
|
||||
xpMod *= 2.0f;
|
||||
|
||||
@@ -168,22 +168,22 @@ public:
|
||||
static bool HandleInstanceSaveDataCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
Map* map = player->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
InstanceMap* map = player->GetMap()->ToInstanceMap();
|
||||
if (!map)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NOT_DUNGEON);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!((InstanceMap*)map)->GetInstanceScript())
|
||||
if (!map->GetInstanceScript())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NO_INSTANCE_DATA);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
((InstanceMap*)map)->GetInstanceScript()->SaveToDB();
|
||||
map->GetInstanceScript()->SaveToDB();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -225,15 +225,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Map* map = player->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
InstanceMap* map = player->GetMap()->ToInstanceMap();
|
||||
if (!map)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NOT_DUNGEON);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!map->ToInstanceMap()->GetInstanceScript())
|
||||
if (!map->GetInstanceScript())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NO_INSTANCE_DATA);
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -244,14 +244,14 @@ public:
|
||||
state = atoi(param2);
|
||||
|
||||
// Reject improper values.
|
||||
if (state > TO_BE_DECIDED || encounterId > map->ToInstanceMap()->GetInstanceScript()->GetEncounterCount())
|
||||
if (state > TO_BE_DECIDED || encounterId > map->GetInstanceScript()->GetEncounterCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
map->ToInstanceMap()->GetInstanceScript()->SetBossState(encounterId, (EncounterState)state);
|
||||
map->GetInstanceScript()->SetBossState(encounterId, EncounterState(state));
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
@@ -292,15 +292,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Map* map = player->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
InstanceMap* map = player->GetMap()->ToInstanceMap();
|
||||
if (!map)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NOT_DUNGEON);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!map->ToInstanceMap()->GetInstanceScript())
|
||||
if (!map->GetInstanceScript())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_NO_INSTANCE_DATA);
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -309,14 +309,14 @@ public:
|
||||
|
||||
encounterId = atoi(param1);
|
||||
|
||||
if (encounterId > map->ToInstanceMap()->GetInstanceScript()->GetEncounterCount())
|
||||
if (encounterId > map->GetInstanceScript()->GetEncounterCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8 state = map->ToInstanceMap()->GetInstanceScript()->GetBossState(encounterId);
|
||||
uint32 state = map->GetInstanceScript()->GetBossState(encounterId);
|
||||
std::string stateName = InstanceScript::GetBossStateName(state);
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName);
|
||||
return true;
|
||||
|
||||
@@ -203,10 +203,6 @@ public:
|
||||
void AggroAllPlayers(Creature* temp)
|
||||
{
|
||||
Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
|
||||
|
||||
if (PlList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
|
||||
@@ -181,23 +181,21 @@ public:
|
||||
// temporary store for the best suitable beam reciever
|
||||
Unit* target = me;
|
||||
|
||||
if (Map* map = me->GetMap())
|
||||
{
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
|
||||
// get the best suitable target
|
||||
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
Player* p = i->GetSource();
|
||||
if (p && p->IsAlive() // alive
|
||||
&& (!target || target->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j]) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3]) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3])
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
target = p;
|
||||
}
|
||||
// get the best suitable target
|
||||
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
Player* p = i->GetSource();
|
||||
if (p && p->IsAlive() // alive
|
||||
&& (!target || target->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j]) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3]) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3])
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
target = p;
|
||||
}
|
||||
|
||||
// buff the target
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->AddAura(PlayerBuff[j], target);
|
||||
|
||||
@@ -309,11 +309,7 @@ public:
|
||||
{
|
||||
if (WipeTimer <= diff)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
@@ -518,8 +514,6 @@ public:
|
||||
|
||||
uint32 NextStep(uint32 step)
|
||||
{
|
||||
Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID);
|
||||
Map* map = me->GetMap();
|
||||
switch (step)
|
||||
{
|
||||
case 0: return 9999999;
|
||||
@@ -527,21 +521,21 @@ public:
|
||||
me->Yell(SAY_DIALOG_MEDIVH_1, LANG_UNIVERSAL);
|
||||
return 10000;
|
||||
case 2:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
arca->Yell(SAY_DIALOG_ARCANAGOS_2, LANG_UNIVERSAL);
|
||||
return 20000;
|
||||
case 3:
|
||||
me->Yell(SAY_DIALOG_MEDIVH_3, LANG_UNIVERSAL);
|
||||
return 10000;
|
||||
case 4:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
arca->Yell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL);
|
||||
return 20000;
|
||||
case 5:
|
||||
me->Yell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL);
|
||||
return 20000;
|
||||
case 6:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
arca->Yell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL);
|
||||
return 10000;
|
||||
case 7:
|
||||
@@ -555,15 +549,15 @@ public:
|
||||
me->TextEmote(EMOTE_DIALOG_MEDIVH_7);
|
||||
return 10000;
|
||||
case 10:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
DoCast(arca, SPELL_CONFLAGRATION_BLAST, false);
|
||||
return 1000;
|
||||
case 11:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
arca->Yell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL);
|
||||
return 5000;
|
||||
case 12:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
{
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
|
||||
arca->setActive(true);
|
||||
@@ -575,27 +569,27 @@ public:
|
||||
me->Yell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL);
|
||||
return 10000;
|
||||
case 14:
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->ClearInCombat();
|
||||
|
||||
if (map->IsDungeon())
|
||||
InstanceMap::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
InstanceMap::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (i->GetSource()->IsAlive())
|
||||
{
|
||||
if (i->GetSource()->IsAlive())
|
||||
{
|
||||
if (i->GetSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
|
||||
i->GetSource()->CompleteQuest(9645);
|
||||
}
|
||||
if (i->GetSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
|
||||
i->GetSource()->CompleteQuest(9645);
|
||||
}
|
||||
}
|
||||
return 50000;
|
||||
}
|
||||
case 15:
|
||||
if (arca)
|
||||
if (Creature* arca = ObjectAccessor::GetCreature(*me, ArcanagosGUID))
|
||||
arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return 5000;
|
||||
default : return 9999999;
|
||||
default:
|
||||
return 9999999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -145,39 +145,13 @@ public:
|
||||
m_uiTransformTimer = MINUTE*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
// some targeting issues with the spell, so use this workaround as temporary solution
|
||||
void DoWorkaroundForQuestCredit()
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
|
||||
if (!map || map->IsHeroic())
|
||||
return;
|
||||
|
||||
Map::PlayerList const &lList = map->GetPlayers();
|
||||
|
||||
if (lList.isEmpty())
|
||||
return;
|
||||
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_ORB_KILL_CREDIT);
|
||||
|
||||
for (Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (spell && spell->Effects[0].MiscValue)
|
||||
player->KilledMonsterCredit(spell->Effects[0].MiscValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
{
|
||||
if (m_uiTransformTimer)
|
||||
{
|
||||
if (m_uiTransformTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me, SPELL_ORB_KILL_CREDIT, false);
|
||||
DoWorkaroundForQuestCredit();
|
||||
DoCast(me, SPELL_ORB_KILL_CREDIT, true);
|
||||
|
||||
// Transform and update entry, now ready for quest/read gossip
|
||||
DoCast(me, SPELL_TRANSFORM_TO_KAEL, false);
|
||||
|
||||
@@ -1293,8 +1293,8 @@ public:
|
||||
//if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light
|
||||
// go->SetPhaseMask(0, true);
|
||||
{
|
||||
Map* map = me->GetMap(); // search players with in 50 yards for quest credit
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
// search players with in 50 yards for quest credit
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
|
||||
@@ -538,11 +538,7 @@ public:
|
||||
|
||||
Player* SelectRandomPlayer(float range = 0.0f, bool checkLoS = true)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return NULL;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -551,13 +551,9 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
Map* map = go->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return true;
|
||||
|
||||
#if MAX_PLAYERS_IN_SPECTRAL_REALM > 0
|
||||
uint8 SpectralPlayers = 0;
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = go->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->GetSource() && i->GetSource()->GetPositionZ() < DEMON_REALM_Z + 5)
|
||||
@@ -688,12 +684,8 @@ public:
|
||||
|
||||
void TeleportAllPlayersBack()
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
Map::PlayerList const &playerList = map->GetPlayers();
|
||||
Position homePos = me->GetHomePosition();
|
||||
Map::PlayerList const &playerList = me->GetMap()->GetPlayers();
|
||||
Position const& homePos = me->GetHomePosition();
|
||||
for (Map::PlayerList::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
|
||||
@@ -433,15 +433,11 @@ public:
|
||||
}
|
||||
|
||||
//kill credit Creature for quest
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
if (!players.isEmpty() && map->IsDungeon())
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* player = itr->GetSource())
|
||||
player->KilledMonsterCredit(20156);
|
||||
}
|
||||
if (Player* player = itr->GetSource())
|
||||
player->KilledMonsterCredit(20156);
|
||||
}
|
||||
|
||||
//alot will happen here, thrall and taretha talk, erozion appear at spot to explain
|
||||
|
||||
@@ -54,14 +54,10 @@ public:
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* player = itr->GetSource())
|
||||
return player;
|
||||
}
|
||||
if (Player* player = itr->GetSource())
|
||||
return player;
|
||||
}
|
||||
TC_LOG_DEBUG("scripts", "Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
|
||||
@@ -143,8 +143,6 @@ class boss_ossirian : public CreatureScript
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_WEATHER, (4+4+4));
|
||||
data << uint32(WEATHER_STATE_HEAVY_SANDSTORM) << float(1) << uint8(0);
|
||||
@@ -153,7 +151,7 @@ class boss_ossirian : public CreatureScript
|
||||
for (uint8 i = 0; i < NUM_TORNADOS; ++i)
|
||||
{
|
||||
Position Point = me->GetRandomPoint(RoomCenter, RoomRadius);
|
||||
if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point))
|
||||
if (Creature* Tornado = map->SummonCreature(NPC_SAND_VORTEX, Point))
|
||||
Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -586,21 +586,10 @@ public:
|
||||
//WisperTimer
|
||||
if (WisperTimer <= diff)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
//Play random sound to the zone
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
{
|
||||
if (Player* pPlr = itr->GetSource())
|
||||
pPlr->PlayDirectSound(RANDOM_SOUND_WHISPER, pPlr);
|
||||
}
|
||||
}
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
me->PlayDirectSound(RANDOM_SOUND_WHISPER, itr->GetSource());
|
||||
|
||||
//One random wisper every 90 - 300 seconds
|
||||
WisperTimer = urand(90000, 300000);
|
||||
|
||||
@@ -230,11 +230,7 @@ public:
|
||||
// Roll Insanity
|
||||
uint32 spell = GetSpellForPhaseMask(phase);
|
||||
uint32 spell2 = GetSpellForPhaseMask(nextPhase);
|
||||
Map* map = me->GetMap();
|
||||
if (!map)
|
||||
return;
|
||||
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
}
|
||||
else if (me->GetMap()->IsDungeon())
|
||||
else
|
||||
{
|
||||
who->SetInCombatWith(me);
|
||||
me->AddThreat(who, 0.0f);
|
||||
|
||||
+24
-32
@@ -652,23 +652,19 @@ class npc_acolyte_of_shadron : public CreatureScript
|
||||
if (ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADRON)))
|
||||
instance->SetBossState(DATA_PORTAL_OPEN, NOT_STARTED);
|
||||
|
||||
Map* map = me->GetMap();
|
||||
if (map->IsDungeon())
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList const& PlayerList = map->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT) && !i->GetSource()->GetVictim())
|
||||
{
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT) && !i->GetSource()->GetVictim())
|
||||
{
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
|
||||
}
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,26 +736,22 @@ class npc_acolyte_of_vesperon : public CreatureScript
|
||||
vesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
|
||||
}
|
||||
|
||||
Map* map = me->GetMap();
|
||||
if (map->IsDungeon())
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT) && !i->GetSource()->GetVictim())
|
||||
{
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_SHIFT) && !i->GetSource()->GetVictim())
|
||||
{
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
|
||||
}
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP) && !i->GetSource()->GetVictim())
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_SHIFT_REMOVAL_ALL, true);
|
||||
i->GetSource()->CastSpell(i->GetSource(), SPELL_TWILIGHT_RESIDUE, true);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
|
||||
}
|
||||
if (i->GetSource()->IsAlive() && i->GetSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP) && !i->GetSource()->GetVictim())
|
||||
i->GetSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
|
||||
}
|
||||
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TWILIGHT_TORMENT_VESP_ACO);
|
||||
|
||||
+4
-4
@@ -254,7 +254,7 @@ public:
|
||||
if (uiChargeTimer <= uiDiff)
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (me->GetMap()->IsDungeon() && !players.isEmpty())
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
if (Unit* pPassenger = pVehicle->GetPassenger(SEAT_ID_0))
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (me->GetMap()->IsDungeon() && !players.isEmpty())
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
if (uiInterceptTimer <= uiDiff)
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (me->GetMap()->IsDungeon() && !players.isEmpty())
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -867,7 +867,7 @@ public:
|
||||
else
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (me->GetMap()->IsDungeon() && !players.isEmpty())
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -470,21 +470,11 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
|
||||
if (target->HasAura(SPELL_ORANGE_BLIGHT_RESIDUE))
|
||||
return;
|
||||
|
||||
if (target->GetMap() && !target->GetMap()->Is25ManRaid())
|
||||
{
|
||||
if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
uint32 questId = target->GetMap()->Is25ManRaid() ? QUEST_RESIDUE_RENDEZVOUS_25 : QUEST_RESIDUE_RENDEZVOUS_10;
|
||||
if (target->GetQuestStatus(questId) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
target->CastSpell(target, SPELL_ORANGE_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
if (target->GetMap() && target->GetMap()->Is25ManRaid())
|
||||
{
|
||||
if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
target->CastSpell(target, SPELL_ORANGE_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
target->CastSpell(target, SPELL_ORANGE_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -892,21 +892,11 @@ class spell_rotface_slime_spray : public SpellScriptLoader
|
||||
if (target->HasAura(SPELL_GREEN_BLIGHT_RESIDUE))
|
||||
return;
|
||||
|
||||
if (target->GetMap() && !target->GetMap()->Is25ManRaid())
|
||||
{
|
||||
if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
uint32 questId = target->GetMap()->Is25ManRaid() ? QUEST_RESIDUE_RENDEZVOUS_25 : QUEST_RESIDUE_RENDEZVOUS_10;
|
||||
if (target->GetQuestStatus(questId) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
target->CastSpell(target, SPELL_GREEN_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
if (target->GetMap() && target->GetMap()->Is25ManRaid())
|
||||
{
|
||||
if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
target->CastSpell(target, SPELL_GREEN_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
target->CastSpell(target, SPELL_GREEN_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -317,37 +317,30 @@ class boss_gothik : public CreatureScript
|
||||
|
||||
bool CheckGroupSplitted()
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
bool checklife = false;
|
||||
bool checkdead = false;
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() &&
|
||||
i->GetSource()->GetPositionX() <= POS_X_NORTH &&
|
||||
i->GetSource()->GetPositionX() >= POS_X_SOUTH &&
|
||||
i->GetSource()->GetPositionY() <= POS_Y_GATE &&
|
||||
i->GetSource()->GetPositionY() >= POS_Y_EAST)
|
||||
{
|
||||
bool checklife = false;
|
||||
bool checkdead = false;
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() &&
|
||||
i->GetSource()->GetPositionX() <= POS_X_NORTH &&
|
||||
i->GetSource()->GetPositionX() >= POS_X_SOUTH &&
|
||||
i->GetSource()->GetPositionY() <= POS_Y_GATE &&
|
||||
i->GetSource()->GetPositionY() >= POS_Y_EAST)
|
||||
{
|
||||
checklife = true;
|
||||
}
|
||||
else if (i->GetSource() && i->GetSource()->IsAlive() &&
|
||||
i->GetSource()->GetPositionX() <= POS_X_NORTH &&
|
||||
i->GetSource()->GetPositionX() >= POS_X_SOUTH &&
|
||||
i->GetSource()->GetPositionY() >= POS_Y_GATE &&
|
||||
i->GetSource()->GetPositionY() <= POS_Y_WEST)
|
||||
{
|
||||
checkdead = true;
|
||||
}
|
||||
|
||||
if (checklife && checkdead)
|
||||
return true;
|
||||
}
|
||||
checklife = true;
|
||||
}
|
||||
else if (i->GetSource() && i->GetSource()->IsAlive() &&
|
||||
i->GetSource()->GetPositionX() <= POS_X_NORTH &&
|
||||
i->GetSource()->GetPositionX() >= POS_X_SOUTH &&
|
||||
i->GetSource()->GetPositionY() >= POS_Y_GATE &&
|
||||
i->GetSource()->GetPositionY() <= POS_Y_WEST)
|
||||
{
|
||||
checkdead = true;
|
||||
}
|
||||
|
||||
if (checklife && checkdead)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -555,20 +548,13 @@ class npc_gothik_minion : public CreatureScript
|
||||
if (!_EnterEvadeMode())
|
||||
return;
|
||||
|
||||
Map* map = me->GetMap();
|
||||
if (map->IsDungeon())
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && isOnSameSide(i->GetSource()))
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && isOnSameSide(i->GetSource()))
|
||||
{
|
||||
AttackStart(i->GetSource());
|
||||
return;
|
||||
}
|
||||
}
|
||||
AttackStart(i->GetSource());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -234,16 +234,12 @@ class boss_general_vezax : public CreatureScript
|
||||
|
||||
void CheckShamanisticRage()
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
// If Shaman has Shamanistic Rage and use it during the fight, it will cast Corrupted Rage on him
|
||||
Map::PlayerList const& Players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = Players.begin(); itr != Players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->HasSpell(SPELL_SHAMANTIC_RAGE))
|
||||
player->CastSpell(player, SPELL_CORRUPTED_RAGE, false);
|
||||
}
|
||||
// If Shaman has Shamanistic Rage and use it during the fight, it will cast Corrupted Rage on him
|
||||
Map::PlayerList const& Players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = Players.begin(); itr != Players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->HasSpell(SPELL_SHAMANTIC_RAGE))
|
||||
player->CastSpell(player, SPELL_CORRUPTED_RAGE, false);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
@@ -280,34 +276,28 @@ class boss_general_vezax : public CreatureScript
|
||||
*/
|
||||
Unit* CheckPlayersInRange(uint8 playersMin, float rangeMin, float rangeMax)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
std::list<Player*> PlayerList;
|
||||
Map::PlayerList const& Players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = Players.begin(); itr != Players.end(); ++itr)
|
||||
{
|
||||
std::list<Player*> PlayerList;
|
||||
Map::PlayerList const& Players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = Players.begin(); itr != Players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
{
|
||||
if (Player* player = itr->GetSource())
|
||||
{
|
||||
float distance = player->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
if (rangeMin > distance || distance > rangeMax)
|
||||
continue;
|
||||
float distance = player->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
if (rangeMin > distance || distance > rangeMax)
|
||||
continue;
|
||||
|
||||
PlayerList.push_back(player);
|
||||
}
|
||||
PlayerList.push_back(player);
|
||||
}
|
||||
|
||||
if (PlayerList.empty())
|
||||
return NULL;
|
||||
|
||||
size_t size = PlayerList.size();
|
||||
if (size < playersMin)
|
||||
return NULL;
|
||||
|
||||
return Trinity::Containers::SelectRandomContainerElement(PlayerList);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
if (PlayerList.empty())
|
||||
return NULL;
|
||||
|
||||
size_t size = PlayerList.size();
|
||||
if (size < playersMin)
|
||||
return NULL;
|
||||
|
||||
return Trinity::Containers::SelectRandomContainerElement(PlayerList);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -162,11 +162,6 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
// he dropped it further, summon mound
|
||||
GameObject* go = new GameObject;
|
||||
Map* map = player->GetMap();
|
||||
if (!map)
|
||||
{
|
||||
delete go;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
|
||||
{
|
||||
@@ -196,11 +191,6 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
// he dropped it further, summon mound
|
||||
GameObject* go = new GameObject;
|
||||
Map* map = player->GetMap();
|
||||
if (!map)
|
||||
{
|
||||
delete go;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
|
||||
{
|
||||
|
||||
+1
-2
@@ -109,8 +109,7 @@ public:
|
||||
if (Inhibitmagic_Timer <= diff)
|
||||
{
|
||||
float dist;
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->GetSource())
|
||||
if (i_pl->IsAlive() && (dist = i_pl->GetDistance(me)) < 45)
|
||||
|
||||
@@ -182,8 +182,7 @@ class boss_grandmaster_vorpil : public CreatureScript
|
||||
break;
|
||||
case EVENT_DRAW_SHADOWS:
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->GetSource())
|
||||
if (i_pl->IsAlive() && !i_pl->HasAura(SPELL_BANISH))
|
||||
|
||||
@@ -257,8 +257,7 @@ public:
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
// remove old tainted cores to prevent cheating in phase 2
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
|
||||
+1
-2
@@ -788,8 +788,7 @@ public:
|
||||
|
||||
if (Earthshock_Timer <= diff)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
{
|
||||
if (Player* i_pl = itr->GetSource())
|
||||
|
||||
@@ -259,8 +259,7 @@ public:
|
||||
if (CheckTimer <= diff)//check if there are players in melee range
|
||||
{
|
||||
InRange = false;
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -274,15 +273,11 @@ public:
|
||||
|
||||
if (RotTimer)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (map->IsDungeon())
|
||||
Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(diff/20000.f*float(M_PI)*2.f, i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater())
|
||||
DoCast(i->GetSource(), SPELL_SPOUT, true); // only knock back players in arc, in 100yards, not in water
|
||||
}
|
||||
if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(diff/20000.f*float(M_PI)*2.f, i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater())
|
||||
DoCast(i->GetSource(), SPELL_SPOUT, true); // only knock back players in arc, in 100yards, not in water
|
||||
}
|
||||
|
||||
if (SpoutAnimTimer <= diff)
|
||||
|
||||
Reference in new issue
Block a user