Creature* SummonedPortalBoss(Creature* me) { uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss; if (entry == RIFT_BOSS) entry = RandRiftBoss(); sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: Summoning rift boss entry %u.", entry); Position pos; me->GetRandomNearPosition(pos, 10.0f); //normalize Z-level if we can, if rift is not at ground level. pos.m_positionZ = std::max( me->GetMap()->GetHeight(pos.m_positionX, pos.m_positionY, MAX_HEIGHT), me->GetMap()->GetWaterLevel(pos.m_positionX, pos.m_positionY)); if (Creature *summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) return summon; sLog->outDebug( LOG_FILTER_TSCR, "TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun..."); return NULL; }
Creature* SummonedPortalBoss(Creature* me) { uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss; if (entry == RIFT_BOSS) entry = RandRiftBoss(); TC_LOG_DEBUG("scripts", "Instance The Black Morass: Summoning rift boss entry %u.", entry); Position pos = me->GetRandomNearPosition(10.0f); //normalize Z-level if we can, if rift is not at ground level. pos.m_positionZ = std::max(me->GetMap()->GetHeight(pos.m_positionX, pos.m_positionY, MAX_HEIGHT), me->GetMap()->GetWaterLevel(pos.m_positionX, pos.m_positionY)); if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) return summon; TC_LOG_DEBUG("scripts", "Instance The Black Morass: What just happened there? No boss, no loot, no fun..."); return NULL; }
Creature* SummonedPortalBoss(Creature* pSource) { uint32 uiEntry = RiftWaves[GetRiftWaveId()].PortalBoss; if (uiEntry == RIFT_BOSS) uiEntry = RandRiftBoss(); float x,y,z; pSource->GetRandomPoint(pSource->GetPositionX(),pSource->GetPositionY(),pSource->GetPositionZ(),10.0f,x,y,z); //normalize Z-level if we can, if rift is not at ground level. z = std::max(instance->GetHeight(x, y, MAX_HEIGHT), instance->GetWaterLevel(x, y)); debug_log("SD2: Instance Dark Portal: Summoning rift boss uiEntry %u.",uiEntry); if (Creature* pSummoned = pSource->SummonCreature(uiEntry,x,y,z,pSource->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000)) return pSummoned; debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); return NULL; }
Unit* SummonedPortalBoss(Unit* source) { uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss; if (entry == RIFT_BOSS) entry = RandRiftBoss(); debug_log("OSCR: Instance Dark Portal: Summoning rift boss entry %u.", entry); Position pos = source->GetRandomNearPosition(10.0f); //normalize Z-level if we can, if rift is not at ground level. pos.m_positionZ = std::max(source->GetMap()->GetHeight(pos.m_positionX, pos.m_positionY, MAX_HEIGHT), source->GetMap()->GetWaterLevel(pos.m_positionX, pos.m_positionY)); if (Unit* summon = source->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) return summon; debug_log("OSCR: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); return NULL; }