*Implement some new functions by WarHead (not really sure if they're needed, could probably be done another way)
--HG-- branch : trunk
This commit is contained in:
@@ -63,6 +63,8 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
|||||||
bolttimer,
|
bolttimer,
|
||||||
spawntimer;
|
spawntimer;
|
||||||
|
|
||||||
|
bool FirstTime;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
roottimer = urand(5000,9000);
|
roottimer = urand(5000,9000);
|
||||||
@@ -73,11 +75,13 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
|
|||||||
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||||
|
|
||||||
if (pInstance && !FirstTime) pInstance->SetData(DATA_AMANITAR, FAIL);
|
if (pInstance && !FirstTime)
|
||||||
|
pInstance->SetData(DATA_AMANITAR, FAIL);
|
||||||
|
|
||||||
FirstTime = false;
|
FirstTime = false;
|
||||||
|
|
||||||
if (pInstance) pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
if (pInstance)
|
||||||
|
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit *Killer)
|
void JustDied(Unit *Killer)
|
||||||
|
|||||||
@@ -296,3 +296,39 @@ void InstanceData::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
|
|||||||
else
|
else
|
||||||
debug_log("TSCR: DoUpdateWorldState attempt send data but no players in map.");
|
debug_log("TSCR: DoUpdateWorldState attempt send data but no players in map.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Not used anywhere yet, not sure if they're needed:
|
||||||
|
// Send Notify to all players in instance
|
||||||
|
void InstanceData::DoSendNotifyToInstance(const char *format, ...)
|
||||||
|
{
|
||||||
|
InstanceMap::PlayerList const &PlayerList = instance->GetPlayers();
|
||||||
|
InstanceMap::PlayerList::const_iterator i;
|
||||||
|
|
||||||
|
if (!PlayerList.isEmpty())
|
||||||
|
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
|
if ((*i).getSource() && (*i).getSource()->GetSession())
|
||||||
|
(*i).getSource()->GetSession()->SendNotification(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Complete Achievement for all players in instance
|
||||||
|
void InstanceData::DoCompleteAchievement(uint32 achievement)
|
||||||
|
{
|
||||||
|
AchievementEntry const* AE = GetAchievementStore()->LookupEntry(achievement);
|
||||||
|
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||||
|
|
||||||
|
if (!PlayerList.isEmpty())
|
||||||
|
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
|
if (i->getSource())
|
||||||
|
i->getSource()->CompletedAchievement(AE);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Remove Auras due to Spell on all players in instance
|
||||||
|
void InstanceData::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
|
||||||
|
{
|
||||||
|
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||||
|
|
||||||
|
if (!PlayerList.isEmpty())
|
||||||
|
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
|
if (i->getSource() && i->getSource()->HasAura(spell)) i->getSource()->RemoveAurasDueToSpell(spell);
|
||||||
|
}
|
||||||
|
|||||||
@@ -152,6 +152,17 @@ class TRINITY_DLL_SPEC InstanceData : public ZoneScript
|
|||||||
//sends world state update to all players in instance
|
//sends world state update to all players in instance
|
||||||
void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData);
|
void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData);
|
||||||
|
|
||||||
|
/* Not used anywhere yet, not sure if they're needed:
|
||||||
|
// Send Notify to all players in instance
|
||||||
|
void DoSendNotifyToInstance(const char *format,...);
|
||||||
|
|
||||||
|
// Complete Achievement for all players in instance
|
||||||
|
void DoCompleteAchievement(uint32 achievement);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Remove Auras due to Spell on all players in instance
|
||||||
|
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell);
|
||||||
|
|
||||||
virtual bool SetBossState(uint32 id, EncounterState state);
|
virtual bool SetBossState(uint32 id, EncounterState state);
|
||||||
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
||||||
const BossBoundaryMap * GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : NULL; }
|
const BossBoundaryMap * GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : NULL; }
|
||||||
|
|||||||
Reference in New Issue
Block a user