void TeleportToMyBrother() { if (!pInstance) return; Teleport_Timer = TELEPORTTIME; if (IAmVeklor()) return; // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates Creature *pOtherBoss = GetOtherBoss(); if (pOtherBoss) { //me->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0); float other_x = pOtherBoss->GetPositionX(); float other_y = pOtherBoss->GetPositionY(); float other_z = pOtherBoss->GetPositionZ(); float other_o = pOtherBoss->GetOrientation(); Map *thismap = me->GetMap(); thismap->CreatureRelocation(pOtherBoss, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); thismap->CreatureRelocation(me, other_x, other_y, other_z, other_o); SetAfterTeleport(); CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->SetAfterTeleport(); } }
void TeleportToMyBrother() { if (!instance) return; Teleport_Timer = TELEPORTTIME; if (IAmVeklor()) return; // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates Creature* pOtherBoss = GetOtherBoss(); if (pOtherBoss) { //me->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0); Position thisPos; thisPos.Relocate(me); Position otherPos; otherPos.Relocate(pOtherBoss); pOtherBoss->SetPosition(thisPos); me->SetPosition(otherPos); SetAfterTeleport(); CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->SetAfterTeleport(); } }
void TeleportToMyBrother() { if (!m_pInstance) return; Teleport_Timer = TELEPORTTIME; if (IAmVeklor()) return; // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates Creature *pOtherBoss = GetOtherBoss(); if (pOtherBoss) { //m_creature->MonsterYell("Teleporting ...", LANG_UNIVERSAL); float other_x = pOtherBoss->GetPositionX(); float other_y = pOtherBoss->GetPositionY(); float other_z = pOtherBoss->GetPositionZ(); float other_o = pOtherBoss->GetOrientation(); pOtherBoss->RelocateCreature(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); pOtherBoss->GetMotionMaster()->MoveIdle(); m_creature->RelocateCreature(other_x, other_y, other_z, other_o); m_creature->GetMotionMaster()->MoveIdle(); SetAfterTeleport(); if (boss_twinemperorsAI* pOtherAI = dynamic_cast<boss_twinemperorsAI*>(pOtherBoss->AI())) pOtherAI->SetAfterTeleport(); } }