void NeedCheckCubeStatus() { uint32 ClickerNum = 0; // now checking if every clicker has debuff from manticron(it is dispelable atm rev 6110 : S) // if not - apply mind exhaustion and delete from clicker's list for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i) { Unit* clicker = Unit::GetUnit(*me, (*i).second); if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP)) { DebuffClicker(clicker); (*i).second = 0; } else ++ClickerNum; } // if 5 clickers from other cubes apply shadow cage if (ClickerNum >= CLICKERS_COUNT && !me->HasAura(SPELL_SHADOW_CAGE)) { Talk(SAY_BANISH); DoCast(me, SPELL_SHADOW_CAGE, true); } else if (ClickerNum < CLICKERS_COUNT && me->HasAura(SPELL_SHADOW_CAGE)) me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); if (!ClickerNum) NeedCheckCube = false; }
void NeedCheckCubeStatus() { uint32 ClickerNum = 0; // now checking if every clicker has debuff from manticron // if not - apply mind exhaustion and delete from clicker's list for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i) { Unit *clicker = Unit::GetUnit(*m_creature, (*i).second); if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) { DebuffClicker(clicker); (*i).second = 0; } else ++ClickerNum; } // if 5 clickers from other cubes apply shadow cage if (ClickerNum >= MAX_CLICK && !m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0) && m_creature->HasAura(SPELL_BLASTNOVA, EFFECT_INDEX_0)) { DoScriptText(SAY_BANISH, m_creature); m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); } else { if (ClickerNum < MAX_CLICK && m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0)) m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); } if (!ClickerNum) m_bNeedCheckCube = false; }
void SetClicker(uint64 cubeGUID, uint64 clickerGUID) { // to avoid multiclicks from 1 cube if (uint64 guid = Cube[cubeGUID]) DebuffClicker(Unit::GetUnit(*me, guid)); Cube[cubeGUID] = clickerGUID; NeedCheckCube = true; }
void SetClicker(ObjectGuid cubeGUID, ObjectGuid clickerGUID) { // to avoid multiclicks from 1 cube if (ObjectGuid guid = Cube[cubeGUID]) DebuffClicker(ObjectAccessor::GetUnit(*me, guid)); Cube[cubeGUID] = clickerGUID; NeedCheckCube = true; }
void SetClicker(uint64 uiCubeGUID, uint64 uiClickerGUID) { // to avoid multiclicks from 1 cube if (uint64 guid = Cube[uiCubeGUID]) DebuffClicker(Unit::GetUnit(*m_creature, guid)); Cube[uiCubeGUID] = uiClickerGUID; m_bNeedCheckCube = true; }