void UpdateAI(const uint32 diff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge! CheckDistance(fMaxDistance, diff); if (m_creature->HasAura(SPELL_WEB_FRONT_DOORS) || m_creature->HasAura(SPELL_WEB_SIDE_DOORS)) { if (IsCombatMovement()) SetCombatMovement(false); } else if (!IsCombatMovement()) SetCombatMovement(true); if (uiPierceTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_PIERCE_ARMOR); uiPierceTimer = 8000; } else uiPierceTimer -= diff; if (uiAcidTimer <= diff) { if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_ACID_CLOUD); uiAcidTimer = urand(20000,30000); } else uiAcidTimer -= diff; if (uiLeechTimer <= diff) { if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_LEECH_POISON); uiLeechTimer = urand(11000,14000); } else uiLeechTimer -= diff; if (uiGrabTimer <= diff) { if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. DoCast(pTarget, SPELL_WEB_GRAB); uiGrabTimer = urand(15000,30000); } else uiGrabTimer -= diff; if (uiDoorsTimer <= diff) { //DoCast(me, urand(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); uiDoorsTimer = urand(30000,60000); } else uiDoorsTimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; // Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge! CheckDistance(MaxDistance, diff); if (m_creature->HasAura(SPELL_WEB_FRONT_DOORS) || m_creature->HasAura(SPELL_WEB_SIDE_DOORS)) { if (IsCombatMovement()) SetCombatMovement(false); } else if (!IsCombatMovement()) SetCombatMovement(true); if (piercetimer <= diff) { DoCast(m_creature->getVictim(), SPELL_PIERCE_ARMOR); piercetimer = 8000; } else piercetimer -= diff; if (acidtimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, HEROIC(SPELL_ACID_CLOUD, SPELL_ACID_CLOUD_H)); acidtimer = urand(20000,30000); } else acidtimer -= diff; if (leechtimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, HEROIC(SPELL_LEECH_POISON, SPELL_LEECH_POISON_H)); leechtimer = urand(11000,14000); } else leechtimer -= diff; if (grabtimer <= diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. DoCast(pTarget, HEROIC(SPELL_WEB_GRAB, SPELL_WEB_GRAB_H)); grabtimer = urand(15000,30000); } else grabtimer -= diff; if (doorstimer <= diff) {/* Debuff bleibt auf den Spielern bis zum Tod... DoCast(m_creature, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); */ doorstimer = urand(30000,60000); } else doorstimer -= diff; DoMeleeAttackIfReady(); }
void CUIActorMenu::Update() { { // all mode m_last_time = Device.dwTimeGlobal; m_ActorStateInfo->UpdateActorInfo( m_pActorInvOwner ); } switch ( m_currMenuMode ) { case mmUndefined: break; case mmInventory: { // m_clock_value->TextItemControl()->SetText( InventoryUtilities::GetGameTimeAsString( InventoryUtilities::etpTimeToMinutes ).c_str() ); CurrentGameUI()->UIMainIngameWnd->UpdateZoneMap(); break; } case mmTrade: { if(m_pPartnerInvOwner->inventory().ModifyFrame() != m_trade_partner_inventory_state) InitPartnerInventoryContents (); CheckDistance (); break; } case mmUpgrade: { UpdateUpgradeItem(); CheckDistance(); break; } case mmDeadBodySearch: { CheckDistance(); break; } default: R_ASSERT(0); break; } inherited::Update(); m_ItemInfo->Update(); m_hint_wnd->Update(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; // Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge! CheckDistance(fMaxDistance, diff); if (me->HasAura(SPELL_WEB_FRONT_DOORS) || me->HasAura(SPELL_WEB_SIDE_DOORS)) { if (IsCombatMovement()) SetCombatMovement(false); } else if (!IsCombatMovement()) SetCombatMovement(true); if (uiPierceTimer <= diff) { DoCast(me->getVictim(), SPELL_PIERCE_ARMOR); uiPierceTimer = 8*IN_MILISECONDS; } else uiPierceTimer -= diff; if (uiAcidTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_ACID_CLOUD); uiAcidTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); } else uiAcidTimer -= diff; if (uiLeechTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_LEECH_POISON); uiLeechTimer = urand(11*IN_MILISECONDS,14*IN_MILISECONDS); } else uiLeechTimer -= diff; if (uiGrabTimer <= diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. DoCast(pTarget, SPELL_WEB_GRAB); uiGrabTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS); } else uiGrabTimer -= diff; if (uiDoorsTimer <= diff) { //DoCast(me, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); uiDoorsTimer = urand(30*IN_MILISECONDS,60*IN_MILISECONDS); } else uiDoorsTimer -= diff; DoMeleeAttackIfReady(); }