Merge branch '4.3.4_phases' of https://github.com/TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
34572492dd
63 files changed
+623
-1039
No files matched your search
@@ -934,6 +934,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto phase : handler->GetSession()->GetPlayer()->GetPhases())
|
||||
v->SetInPhase(phase, false, true);
|
||||
|
||||
map->AddToMap(v->ToCreature());
|
||||
|
||||
return true;
|
||||
@@ -962,13 +965,14 @@ public:
|
||||
|
||||
std::set<uint32> terrainswap;
|
||||
std::set<uint32> phaseId;
|
||||
std::set<uint32> worldMapSwap;
|
||||
|
||||
terrainswap.insert((uint32)atoi(t));
|
||||
|
||||
if (p)
|
||||
phaseId.insert((uint32)atoi(p));
|
||||
|
||||
handler->GetSession()->SendSetPhaseShift(phaseId, terrainswap);
|
||||
handler->GetSession()->SendSetPhaseShift(phaseId, terrainswap, worldMapSwap);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1393,7 +1397,7 @@ public:
|
||||
if (unit && unit->GetTypeId() == TYPEID_PLAYER)
|
||||
player = unit->ToPlayer();
|
||||
|
||||
player->GetPhaseMgr().SendDebugReportToPlayer(handler->GetSession()->GetPlayer());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -152,12 +152,15 @@ public:
|
||||
GameObject* object = new GameObject;
|
||||
uint32 guidLow = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
|
||||
|
||||
if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMgr().GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
if (!object->Create(guidLow, objectInfo->entry, map, 0, x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
{
|
||||
delete object;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto phase : player->GetPhases())
|
||||
object->SetInPhase(phase, false, true);
|
||||
|
||||
if (spawntimeSecs)
|
||||
{
|
||||
uint32 value = atoi((char*)spawntimeSecs);
|
||||
@@ -165,7 +168,7 @@ public:
|
||||
}
|
||||
|
||||
// fill the gameobject data and save to the db
|
||||
object->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), player->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
object->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), player->GetPhaseMask());
|
||||
// delete the old object and do a clean load from DB with a fresh new GameObject instance.
|
||||
// this is required to avoid weird behavior and memory leaks
|
||||
delete object;
|
||||
@@ -507,7 +510,7 @@ public:
|
||||
//set phasemask for selected object
|
||||
static bool HandleGameObjectSetPhaseCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
|
||||
/*// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
|
||||
char* id = handler->extractKeyFromLink((char*)args, "Hgameobject");
|
||||
if (!id)
|
||||
return false;
|
||||
@@ -539,7 +542,7 @@ public:
|
||||
}
|
||||
|
||||
object->SetPhaseMask(phaseMask, true);
|
||||
object->SaveToDB();
|
||||
object->SaveToDB();*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,8 @@ public:
|
||||
target->GetContactPoint(_player, x, y, z);
|
||||
|
||||
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
|
||||
_player->SetPhaseMask(target->GetPhaseMask(), true);
|
||||
for (auto phase : target->GetPhases())
|
||||
_player->SetInPhase(phase, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -494,7 +495,8 @@ public:
|
||||
float x, y, z;
|
||||
handler->GetSession()->GetPlayer()->GetClosePoint(x, y, z, target->GetObjectSize());
|
||||
target->TeleportTo(handler->GetSession()->GetPlayer()->GetMapId(), x, y, z, target->GetOrientation());
|
||||
target->SetPhaseMask(handler->GetSession()->GetPlayer()->GetPhaseMask(), true);
|
||||
for (auto phase : handler->GetSession()->GetPlayer()->GetPhases())
|
||||
target->SetInPhase(phase, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1267,24 +1267,19 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//set temporary phase mask for player
|
||||
// Toggles a phaseid on a player
|
||||
static bool HandleModifyPhaseCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 phasemask = (uint32)atoi((char*)args);
|
||||
uint32 phase = (uint32)atoi((char*)args);
|
||||
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (target)
|
||||
{
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->ToPlayer()->GetPhaseMgr().SetCustomPhase(phasemask);
|
||||
else
|
||||
target->SetPhaseMask(phasemask, true);
|
||||
}
|
||||
target->SetInPhase(phase, true, !target->IsInPhase(phase));
|
||||
else
|
||||
handler->GetSession()->GetPlayer()->GetPhaseMgr().SetCustomPhase(phasemask);
|
||||
handler->GetSession()->GetPlayer()->SetInPhase(phase, true, !handler->GetSession()->GetPlayer()->IsInPhase(phase));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
uint32 guid = sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT);
|
||||
CreatureData& data = sObjectMgr->NewOrExistCreatureData(guid);
|
||||
data.id = id;
|
||||
data.phaseMask = chr->GetPhaseMgr().GetPhaseMaskForSpawn();
|
||||
data.phaseMask = chr->GetPhaseMask();
|
||||
data.posX = chr->GetTransOffsetX();
|
||||
data.posY = chr->GetTransOffsetY();
|
||||
data.posZ = chr->GetTransOffsetZ();
|
||||
@@ -272,20 +272,23 @@ public:
|
||||
|
||||
Creature* creature = trans->CreateNPCPassenger(guid, &data);
|
||||
|
||||
creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
creature->SaveToDB(trans->GetGOInfo()->moTransport.mapID, 1 << map->GetSpawnMode(), chr->GetPhaseMask());
|
||||
|
||||
sObjectMgr->AddCreatureToGrid(guid, &data);
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
|
||||
{
|
||||
delete creature;
|
||||
return false;
|
||||
}
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
for (auto phase : chr->GetPhases())
|
||||
creature->SetInPhase(phase, false, true);
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
|
||||
|
||||
uint32 db_guid = creature->GetDBTableGUIDLow();
|
||||
|
||||
@@ -1096,20 +1099,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//npc phasemask handling
|
||||
//change phasemask of creature or pet
|
||||
//npc phase handling
|
||||
//change phase of creature or pet
|
||||
static bool HandleNpcSetPhaseCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 phasemask = (uint32) atoi((char*)args);
|
||||
if (phasemask == 0)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
uint32 phase = (uint32) atoi((char*)args);
|
||||
|
||||
Creature* creature = handler->getSelectedCreature();
|
||||
if (!creature)
|
||||
@@ -1119,7 +1116,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
creature->SetPhaseMask(phasemask, true);
|
||||
creature->SetInPhase(phase, true, !creature->IsInPhase(phase));
|
||||
|
||||
if (!creature->IsPet())
|
||||
creature->SaveToDB();
|
||||
|
||||
@@ -694,7 +694,7 @@ public:
|
||||
}
|
||||
// re-create
|
||||
Creature* wpCreature2 = new Creature();
|
||||
if (!wpCreature2->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), VISUAL_WAYPOINT, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
|
||||
if (!wpCreature2->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), VISUAL_WAYPOINT, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), chr->GetOrientation()))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, VISUAL_WAYPOINT);
|
||||
delete wpCreature2;
|
||||
@@ -702,7 +702,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
for (auto phase : chr->GetPhases())
|
||||
wpCreature2->SetInPhase(phase, false, true);
|
||||
|
||||
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
/// @todo Should we first use "Create" then use "LoadFromDB"?
|
||||
if (!wpCreature2->LoadCreatureFromDB(wpCreature2->GetDBTableGUIDLow(), map))
|
||||
@@ -918,13 +921,16 @@ public:
|
||||
float o = chr->GetOrientation();
|
||||
|
||||
Creature* wpCreature = new Creature();
|
||||
if (!wpCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
|
||||
if (!wpCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
|
||||
delete wpCreature;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto phase : chr->GetPhases())
|
||||
wpCreature->SetInPhase(phase, false, true);
|
||||
|
||||
// Set "wpguid" column to the visual waypoint
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_WPGUID);
|
||||
|
||||
@@ -934,7 +940,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
if (!wpCreature->LoadCreatureFromDB(wpCreature->GetDBTableGUIDLow(), map))
|
||||
{
|
||||
@@ -982,14 +988,17 @@ public:
|
||||
Map* map = chr->GetMap();
|
||||
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
|
||||
delete creature;
|
||||
return false;
|
||||
}
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
for (auto phase : chr->GetPhases())
|
||||
creature->SetInPhase(phase, false, true);
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
|
||||
if (!creature->LoadCreatureFromDB(creature->GetDBTableGUIDLow(), map))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
|
||||
@@ -1031,14 +1040,17 @@ public:
|
||||
Map* map = chr->GetMap();
|
||||
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMgr().GetPhaseMaskForSpawn(), id, x, y, z, o))
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMask(), id, x, y, z, o))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
|
||||
delete creature;
|
||||
return false;
|
||||
}
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMgr().GetPhaseMaskForSpawn());
|
||||
for (auto phase : chr->GetPhases())
|
||||
creature->SetInPhase(phase, false, true);
|
||||
|
||||
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
|
||||
if (!creature->LoadCreatureFromDB(creature->GetDBTableGUIDLow(), map))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
|
||||
|
||||
@@ -178,7 +178,6 @@ public:
|
||||
_Reset();
|
||||
|
||||
me->SetVisible(true);
|
||||
me->SetPhaseMask(1, true);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
|
||||
me->setFaction(35);
|
||||
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
|
||||
|
||||
+2
-2
@@ -155,7 +155,7 @@ public:
|
||||
{
|
||||
case 177807: // Egg
|
||||
if (GetBossState(BOSS_FIREMAW) == DONE)
|
||||
go->SetPhaseMask(2, true);
|
||||
go->SetLootState(GO_JUST_DEACTIVATED);
|
||||
else
|
||||
EggList.push_back(go->GetGUID());
|
||||
break;
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr)
|
||||
if (GameObject* egg = instance->GetGameObject((*itr)))
|
||||
egg->SetPhaseMask(2, true);
|
||||
egg->SetLootState(GO_JUST_DEACTIVATED);
|
||||
}
|
||||
SetData(DATA_EGG_EVENT, NOT_STARTED);
|
||||
break;
|
||||
|
||||
@@ -111,8 +111,14 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
// phase mask
|
||||
target->CastSpell(target, SPELL_INSANITY_TARGET+insanityHandled, true);
|
||||
|
||||
// phase the player
|
||||
target->CastSpell(target, SPELL_INSANITY_TARGET + insanityHandled, true);
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_INSANITY_TARGET + insanityHandled);
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
// summon twisted party members for this target
|
||||
Map::PlayerList const &players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
@@ -125,21 +131,22 @@ public:
|
||||
{
|
||||
// clone
|
||||
player->CastSpell(summon, SPELL_CLONE_PLAYER, true);
|
||||
// set phase
|
||||
summon->SetPhaseMask((1<<(4+insanityHandled)), true);
|
||||
// phase the summon
|
||||
summon->SetInPhase(spellInfo->Effects[EFFECT_0].MiscValueB, true, true);
|
||||
}
|
||||
}
|
||||
++insanityHandled;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetPlayersPhaseMask()
|
||||
void ResetPlayersPhase()
|
||||
{
|
||||
Map::PlayerList const &players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
Player* player = i->GetSource();
|
||||
player->RemoveAurasDueToSpell(GetSpellForPhaseMask(player->GetPhaseMask()));
|
||||
for (uint32 index = 0; index <= 4; ++index)
|
||||
player->RemoveAurasDueToSpell(SPELL_INSANITY_TARGET + index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,11 +160,14 @@ public:
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_QUICK_DEMISE_START_EVENT);
|
||||
|
||||
// Visible for all players in insanity
|
||||
me->SetPhaseMask((1|16|32|64|128|256), true);
|
||||
me->SetInPhase(169, true, true);
|
||||
for (uint32 i = 173; i <= 177; ++i)
|
||||
me->SetInPhase(i, true, true);
|
||||
|
||||
// Used for Insanity handling
|
||||
insanityHandled = 0;
|
||||
|
||||
ResetPlayersPhaseMask();
|
||||
ResetPlayersPhase();
|
||||
|
||||
// Cleanup
|
||||
Summons.DespawnAll();
|
||||
@@ -178,33 +188,8 @@ public:
|
||||
Summons.Summon(summon);
|
||||
}
|
||||
|
||||
uint32 GetSpellForPhaseMask(uint32 phase)
|
||||
{
|
||||
uint32 spell = 0;
|
||||
switch (phase)
|
||||
{
|
||||
case 16:
|
||||
spell = SPELL_INSANITY_PHASING_1;
|
||||
break;
|
||||
case 32:
|
||||
spell = SPELL_INSANITY_PHASING_2;
|
||||
break;
|
||||
case 64:
|
||||
spell = SPELL_INSANITY_PHASING_3;
|
||||
break;
|
||||
case 128:
|
||||
spell = SPELL_INSANITY_PHASING_4;
|
||||
break;
|
||||
case 256:
|
||||
spell = SPELL_INSANITY_PHASING_5;
|
||||
break;
|
||||
}
|
||||
return spell;
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
uint32 phase = summon->GetPhaseMask();
|
||||
uint32 nextPhase = 0;
|
||||
Summons.Despawn(summon);
|
||||
|
||||
@@ -214,16 +199,17 @@ public:
|
||||
if (Creature* visage = ObjectAccessor::GetCreature(*me, *iter))
|
||||
{
|
||||
// Not all are dead
|
||||
if (phase == visage->GetPhaseMask())
|
||||
if (visage->IsInPhase(summon))
|
||||
return;
|
||||
else
|
||||
nextPhase = visage->GetPhaseMask();
|
||||
{
|
||||
nextPhase = *visage->GetPhases().begin();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Roll Insanity
|
||||
uint32 spell = GetSpellForPhaseMask(phase);
|
||||
uint32 spell2 = GetSpellForPhaseMask(nextPhase);
|
||||
Map* map = me->GetMap();
|
||||
if (!map)
|
||||
return;
|
||||
@@ -235,12 +221,9 @@ public:
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (player->HasAura(spell))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(spell);
|
||||
if (spell2) // if there is still some different mask cast spell for it
|
||||
player->CastSpell(player, spell2, true);
|
||||
}
|
||||
for (uint32 index = 0; index <= 4; ++index)
|
||||
player->RemoveAurasDueToSpell(SPELL_INSANITY_TARGET + index);
|
||||
player->CastSpell(player, SPELL_INSANITY_TARGET + nextPhase - 173, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -292,7 +275,7 @@ public:
|
||||
instance->SetBossState(DATA_HERALD_VOLAZJ, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
ResetPlayersPhaseMask();
|
||||
ResetPlayersPhase();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
|
||||
@@ -380,7 +380,7 @@ class boss_halion : public CreatureScript
|
||||
if (events.IsInPhase(PHASE_THREE))
|
||||
{
|
||||
// Don't consider copied damage.
|
||||
if (!me->InSamePhase(attacker))
|
||||
if (!me->IsInPhase(attacker))
|
||||
return;
|
||||
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HALION_CONTROLLER)))
|
||||
@@ -541,7 +541,7 @@ class boss_twilight_halion : public CreatureScript
|
||||
if (events.IsInPhase(PHASE_THREE))
|
||||
{
|
||||
// Don't consider copied damage.
|
||||
if (!me->InSamePhase(attacker))
|
||||
if (!me->IsInPhase(attacker))
|
||||
return;
|
||||
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_HALION_CONTROLLER)))
|
||||
|
||||
@@ -636,7 +636,7 @@ class npc_jaina_or_sylvanas_intro_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (GameObject* frostmourne = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_FROSTMOURNE)))
|
||||
frostmourne->SetPhaseMask(2, true);
|
||||
frostmourne->SetLootState(GO_JUST_DEACTIVATED);
|
||||
lichking->CastSpell(lichking, SPELL_TAKE_FROSTMOURNE, true);
|
||||
lichking->CastSpell(lichking, SPELL_FROSTMOURNE_VISUAL, true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
case GO_FROSTMOURNE:
|
||||
FrostmourneGUID = go->GetGUID();
|
||||
if (GetData(DATA_INTRO_EVENT) == DONE)
|
||||
go->SetPhaseMask(2, true);
|
||||
go->SetLootState(GO_JUST_DEACTIVATED);
|
||||
break;
|
||||
case GO_ENTRANCE_DOOR:
|
||||
EntranceDoorGUID = go->GetGUID();
|
||||
|
||||
@@ -618,7 +618,7 @@ class npc_the_lich_king_controller : public CreatureScript
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
// must not be in dream phase
|
||||
summon->SetPhaseMask((summon->GetPhaseMask() & ~0x10), true);
|
||||
summon->SetInPhase(173, true, false);
|
||||
if (summon->GetEntry() != NPC_SUPPRESSER)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
summon->AI()->AttackStart(target);
|
||||
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
if (GameObject* trigger = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_KELTHUZAD_TRIGGER)))
|
||||
{
|
||||
trigger->ResetDoorOrButton();
|
||||
trigger->SetPhaseMask(1, true);
|
||||
trigger->SetLootState(GO_READY);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i <= 3; ++i)
|
||||
@@ -394,7 +394,7 @@ public:
|
||||
break;
|
||||
case EVENT_TRIGGER:
|
||||
if (GameObject* trigger = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_KELTHUZAD_TRIGGER)))
|
||||
trigger->SetPhaseMask(2, true);
|
||||
trigger->SetLootState(GO_JUST_DEACTIVATED);
|
||||
break;
|
||||
case EVENT_PHASE:
|
||||
events.Reset();
|
||||
|
||||
@@ -90,7 +90,6 @@ public:
|
||||
delete go;
|
||||
return;
|
||||
}
|
||||
|
||||
instance->AddToMap(go);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class instance_oculus : public InstanceMapScript
|
||||
case NPC_VAROS:
|
||||
VarosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_UROM:
|
||||
UromGUID = creature->GetGUID();
|
||||
|
||||
@@ -190,7 +190,8 @@ public:
|
||||
{
|
||||
summon->AI()->AttackStart(me->GetVictim());
|
||||
summon->CastSpell((Unit*)NULL, SPELL_ZURAMAT_ADD_2);
|
||||
summon->SetPhaseMask(17, true);
|
||||
summon->SetInPhase(169, true, true); // Normal phase
|
||||
summon->SetInPhase(173, true, true); // Void phase
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1853,7 +1853,7 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
break;
|
||||
case 20:
|
||||
me->SetPhaseMask(1, true);
|
||||
me->SetInPhase(170, true, false);
|
||||
Talk(SAY_5);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
player->GroupEventHappens(QUEST_ESCAPING_THE_MIST, me);
|
||||
|
||||
@@ -170,6 +170,9 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (auto phase : player->GetPhases())
|
||||
go->SetInPhase(phase, false, true);
|
||||
|
||||
go->SetRespawnTime(0);
|
||||
|
||||
if (!map->AddToMap(go))
|
||||
@@ -204,6 +207,9 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (auto phase : player->GetPhases())
|
||||
go->SetInPhase(phase, false, true);
|
||||
|
||||
go->SetRespawnTime(0);
|
||||
|
||||
if (!map->AddToMap(go))
|
||||
|
||||
Reference in new issue
Block a user