diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index b107dba80..112d97cc4 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -324,12 +324,6 @@ namespace Framework.Constants } } - public struct PhaseMasks - { - public const uint Normal = 0x00000001; - public const uint Anywhere = 0xFFFFFFFF; - } - public enum LocaleConstant { enUS = 0, diff --git a/Source/Game/BattleFields/BattleField.cs b/Source/Game/BattleFields/BattleField.cs index 11524d81a..886333140 100644 --- a/Source/Game/BattleFields/BattleField.cs +++ b/Source/Game/BattleFields/BattleField.cs @@ -683,7 +683,7 @@ namespace Game.BattleFields pos.GetPosition(out x, out y, out z, out o); Creature creature = new Creature(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, PhaseMasks.Normal, entry, x, y, z, o)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, entry, x, y, z, o)) { Log.outError(LogFilter.Battlefield, "Battlefield:SpawnCreature: Can't create creature entry: {0}", entry); return null; @@ -715,7 +715,7 @@ namespace Game.BattleFields // Create gameobject GameObject go = new GameObject(); - if (!go.Create(entry, map, PhaseMasks.Normal, pos, rotation, 255, GameObjectState.Ready)) + if (!go.Create(entry, map, pos, rotation, 255, GameObjectState.Ready)) { Log.outError(LogFilter.Battlefield, "Battlefield:SpawnGameObject: Cannot create gameobject template {1}! Battlefield not created!", entry); return null; diff --git a/Source/Game/BattleGrounds/BattleGround.cs b/Source/Game/BattleGrounds/BattleGround.cs index 612658b85..610d0b085 100644 --- a/Source/Game/BattleGrounds/BattleGround.cs +++ b/Source/Game/BattleGrounds/BattleGround.cs @@ -1324,7 +1324,7 @@ namespace Game.BattleGrounds // and when loading it (in go.LoadFromDB()), a new guid would be assigned to the object, and a new object would be created // So we must create it specific for this instance GameObject go = new GameObject(); - if (!go.Create(entry, GetBgMap(), PhaseMasks.Normal, new Position(x, y, z, o), rotation, 100, goState)) + if (!go.Create(entry, GetBgMap(), new Position(x, y, z, o), rotation, 100, goState)) { Log.outError(LogFilter.Battleground, "Battleground.AddObject: cannot create gameobject (entry: {0}) for BG (map: {1}, instance id: {2})!", entry, m_MapId, m_InstanceID); return false; @@ -1440,7 +1440,7 @@ namespace Game.BattleGrounds } Creature creature = new Creature(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, PhaseMasks.Normal, entry, x, y, z, o)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, entry, x, y, z, o)) { Log.outError(LogFilter.Battleground, "Battleground.AddCreature: cannot create creature (entry: {0}) for BG (map: {1}, instance id: {2})!", entry, m_MapId, m_InstanceID); diff --git a/Source/Game/Chat/Commands/DebugCommands.cs b/Source/Game/Chat/Commands/DebugCommands.cs index 1142c6d8a..235d91c21 100644 --- a/Source/Game/Chat/Commands/DebugCommands.cs +++ b/Source/Game/Chat/Commands/DebugCommands.cs @@ -941,7 +941,7 @@ namespace Game.Chat Creature creature = new Creature(); Map map = handler.GetSession().GetPlayer().GetMap(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Vehicle), map, handler.GetSession().GetPlayer().GetPhaseMask(), entry, x, y, z, o, null, id)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Vehicle), map, entry, x, y, z, o, null, id)) return false; map.AddToMap(creature.ToCreature()); diff --git a/Source/Game/Chat/Commands/GameObjectCommands.cs b/Source/Game/Chat/Commands/GameObjectCommands.cs index def02bd4d..48700acb7 100644 --- a/Source/Game/Chat/Commands/GameObjectCommands.cs +++ b/Source/Game/Chat/Commands/GameObjectCommands.cs @@ -476,7 +476,7 @@ namespace Game.Chat GameObject obj = new GameObject(); Quaternion rotation = new Quaternion(Matrix3.fromEulerAnglesZYX(player.GetOrientation(), 0.0f, 0.0f)); - if (!obj.Create(objectInfo.entry, map, 0, player, rotation, 255, GameObjectState.Ready)) + if (!obj.Create(objectInfo.entry, map, player, rotation, 255, GameObjectState.Ready)) return false; obj.CopyPhaseFrom(player); diff --git a/Source/Game/Chat/Commands/GroupCommands.cs b/Source/Game/Chat/Commands/GroupCommands.cs index cd0031b2e..0576d6b87 100644 --- a/Source/Game/Chat/Commands/GroupCommands.cs +++ b/Source/Game/Chat/Commands/GroupCommands.cs @@ -240,7 +240,6 @@ namespace Game.Chat { // Get ALL the variables! Player playerTarget; - uint phase = 0; ObjectGuid guidTarget; string nameTarget; string zoneName = ""; @@ -317,11 +316,12 @@ namespace Game.Chat // Check if iterator is online. If is... Player p = Global.ObjAccessor.FindPlayer(slot.guid); + string phases = ""; if (p && p.IsInWorld) { // ... than, it prints information like "is online", where he is, etc... onlineState = "online"; - phase = (!p.IsGameMaster() ? p.GetPhaseMask() : uint.MaxValue); + phases = string.Join(", ", p.GetPhases()); AreaTableRecord area = CliDB.AreaTableStorage.LookupByKey(p.GetAreaId()); if (area != null) @@ -336,12 +336,11 @@ namespace Game.Chat // ... else, everything is set to offline or neutral values. zoneName = ""; onlineState = "Offline"; - phase = 0; } // Now we can print those informations for every single member of each group! handler.SendSysMessage(CypherStrings.GroupPlayerNameGuid, slot.name, onlineState, - zoneName, phase, slot.guid.ToString(), flags, LFGQueue.GetRolesString(slot.roles)); + zoneName, phases, slot.guid.ToString(), flags, LFGQueue.GetRolesString(slot.roles)); } // And finish after every iterator is done. diff --git a/Source/Game/Chat/Commands/MiscCommands.cs b/Source/Game/Chat/Commands/MiscCommands.cs index fdd24342a..b58d31794 100644 --- a/Source/Game/Chat/Commands/MiscCommands.cs +++ b/Source/Game/Chat/Commands/MiscCommands.cs @@ -224,7 +224,7 @@ namespace Game.Chat mapId, (mapEntry != null ? mapEntry.MapName[handler.GetSessionDbcLocale()] : unknown), zoneId, (zoneEntry != null ? zoneEntry.AreaName[handler.GetSessionDbcLocale()] : unknown), areaId, (areaEntry != null ? areaEntry.AreaName[handler.GetSessionDbcLocale()] : unknown), - obj.GetPhaseMask(), string.Join(", ", obj.GetPhases()), obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ(), obj.GetOrientation()); + string.Join(", ", obj.GetPhases()), obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ(), obj.GetOrientation()); Transport transport = obj.GetTransport(); if (transport) diff --git a/Source/Game/Chat/Commands/NPCCommands.cs b/Source/Game/Chat/Commands/NPCCommands.cs index 46676e1b1..82f872f52 100644 --- a/Source/Game/Chat/Commands/NPCCommands.cs +++ b/Source/Game/Chat/Commands/NPCCommands.cs @@ -1120,7 +1120,7 @@ namespace Game.Chat } Creature creature = new Creature(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, chr.GetPhaseMask(), id, x, y, z, o)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, id, x, y, z, o)) return false; creature.CopyPhaseFrom(chr); diff --git a/Source/Game/Chat/Commands/WPCommands.cs b/Source/Game/Chat/Commands/WPCommands.cs index d77ca8502..03adf0118 100644 --- a/Source/Game/Chat/Commands/WPCommands.cs +++ b/Source/Game/Chat/Commands/WPCommands.cs @@ -546,7 +546,7 @@ namespace Game.Chat.Commands // re-create Creature wpCreature = new Creature(); - if (!wpCreature.Create(map.GenerateLowGuid(HighGuid.Creature), map, chr.GetPhaseMask(), 1, chr.GetPositionX(), chr.GetPositionY(), chr.GetPositionZ(), chr.GetOrientation())) + if (!wpCreature.Create(map.GenerateLowGuid(HighGuid.Creature), map, 1, chr.GetPositionX(), chr.GetPositionY(), chr.GetPositionZ(), chr.GetOrientation())) { wpCreature.CopyPhaseFrom(chr); wpCreature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode()); @@ -755,7 +755,7 @@ namespace Game.Chat.Commands float o = chr.GetOrientation(); Creature wpCreature = new Creature(); - if (!wpCreature.Create(map.GenerateLowGuid(HighGuid.Creature), map, chr.GetPhaseMask(), id, x, y, z, o)) + if (!wpCreature.Create(map.GenerateLowGuid(HighGuid.Creature), map, id, x, y, z, o)) { handler.SendSysMessage(CypherStrings.WaypointVpNotcreated, id); return false; @@ -815,7 +815,7 @@ namespace Game.Chat.Commands Map map = chr.GetMap(); Creature creature = new Creature(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, chr.GetPhaseMask(), id, x, y, z, o)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, id, x, y, z, o)) { handler.SendSysMessage(CypherStrings.WaypointVpNotcreated, id); return false; @@ -863,7 +863,7 @@ namespace Game.Chat.Commands Map map = chr.GetMap(); Creature creature = new Creature(); - if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, chr.GetPhaseMask(), id, x, y, z, o)) + if (!creature.Create(map.GenerateLowGuid(HighGuid.Creature), map, id, x, y, z, o)) { handler.SendSysMessage(CypherStrings.WaypointNotcreated, id); return false; diff --git a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs index bb0958bce..db8a5710f 100644 --- a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs +++ b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs @@ -96,7 +96,6 @@ namespace Game.Entities } _Create(ObjectGuid.Create(HighGuid.AreaTrigger, GetMapId(), GetTemplate().Id, caster.GetMap().GenerateLowGuid(HighGuid.AreaTrigger))); - SetPhaseMask(caster.GetPhaseMask(), false); SetEntry(GetTemplate().Id); SetDuration(duration); diff --git a/Source/Game/Entities/Conversation.cs b/Source/Game/Entities/Conversation.cs index 0e349e88c..ff4ee8539 100644 --- a/Source/Game/Entities/Conversation.cs +++ b/Source/Game/Entities/Conversation.cs @@ -111,7 +111,6 @@ namespace Game.Entities Relocate(pos); base._Create(ObjectGuid.Create(HighGuid.Conversation, GetMapId(), conversationEntry, lowGuid)); - SetPhaseMask(creator.GetPhaseMask(), false); CopyPhaseFrom(creator); SetEntry(conversationEntry); diff --git a/Source/Game/Entities/Corpse.cs b/Source/Game/Entities/Corpse.cs index e2eaaf3be..c35a80631 100644 --- a/Source/Game/Entities/Corpse.cs +++ b/Source/Game/Entities/Corpse.cs @@ -78,7 +78,6 @@ namespace Game.Entities } _Create(ObjectGuid.Create(HighGuid.Corpse, owner.GetMapId(), 0, guidlow)); - SetPhaseMask(owner.GetPhaseMask(), false); SetObjectScale(1); SetGuidValue(CorpseFields.Owner, owner.GetGUID()); diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index bff983f4e..8ad7432a5 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -720,7 +720,7 @@ namespace Game.Entities GetMotionMaster().Initialize(); } - public bool Create(ulong guidlow, Map map, uint phaseMask, uint entry, float x, float y, float z, float ang, CreatureData data = null, uint vehId = 0) + public bool Create(ulong guidlow, Map map, uint entry, float x, float y, float z, float ang, CreatureData data = null, uint vehId = 0) { SetMap(map); @@ -1044,8 +1044,8 @@ namespace Game.Entities data.unit_flags3 = unitFlags3; data.dynamicflags = dynamicflags; - data.phaseId = (uint)(GetDBPhase() > 0 ? GetDBPhase() : 0); - data.phaseGroup = (uint)(GetDBPhase() < 0 ? Math.Abs(GetDBPhase()) : 0); + data.phaseId = GetDBPhase() > 0 ? (uint)GetDBPhase() : data.phaseId; + data.phaseGroup = GetDBPhase() < 0 ? (uint)-GetDBPhase() : data.phaseGroup; // update in DB SQLTransaction trans = new SQLTransaction(); @@ -1319,7 +1319,7 @@ namespace Game.Entities m_spawnId = spawnId; m_creatureData = data; - if (!Create(map.GenerateLowGuid(HighGuid.Creature), map, PhaseMasks.Normal, data.id, data.posX, data.posY, data.posZ, data.orientation, data)) + if (!Create(map.GenerateLowGuid(HighGuid.Creature), map, data.id, data.posX, data.posY, data.posZ, data.orientation, data)) return false; //We should set first home position, because then AI calls home movement diff --git a/Source/Game/Entities/DynamicObject.cs b/Source/Game/Entities/DynamicObject.cs index 0a7b29eda..ae2c3ef8a 100644 --- a/Source/Game/Entities/DynamicObject.cs +++ b/Source/Game/Entities/DynamicObject.cs @@ -88,7 +88,6 @@ namespace Game.Entities } _Create(ObjectGuid.Create(HighGuid.DynamicObject, GetMapId(), spell.Id, guidlow)); - SetPhaseMask(caster.GetPhaseMask(), false); SetEntry(spell.Id); SetObjectScale(1f); diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index 4f88e7267..3fa39982f 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -158,7 +158,7 @@ namespace Game.Entities } } - public bool Create(uint name_id, Map map, uint phaseMask, Position pos, Quaternion rotation, uint animprogress, GameObjectState go_state, uint artKit = 0) + public bool Create(uint name_id, Map map, Position pos, Quaternion rotation, uint animprogress, GameObjectState go_state, uint artKit = 0) { Contract.Assert(map); SetMap(map); @@ -341,7 +341,7 @@ namespace Game.Entities if (linkedEntry != 0) { GameObject linkedGO = new GameObject(); - if (linkedGO.Create(linkedEntry, map, phaseMask, pos, rotation, 255, GameObjectState.Ready)) + if (linkedGO.Create(linkedEntry, map, pos, rotation, 255, GameObjectState.Ready)) { SetLinkedTrap(linkedGO); map.AddToMap(linkedGO); @@ -877,8 +877,8 @@ namespace Game.Entities data.artKit = GetGoArtKit(); Global.ObjectMgr.NewGOData(m_spawnId, data); - data.phaseId = (uint)(GetDBPhase() > 0 ? GetDBPhase() : 0); - data.phaseGroup = (uint)(GetDBPhase() < 0 ? Math.Abs(GetDBPhase()) : 0); + data.phaseId = GetDBPhase() > 0 ? (uint)GetDBPhase() : data.phaseId; + data.phaseGroup = GetDBPhase() < 0 ? (uint)-GetDBPhase() : data.phaseGroup; // Update in DB byte index = 0; @@ -925,7 +925,7 @@ namespace Game.Entities uint artKit = data.artKit; m_spawnId = spawnId; - if (!Create(entry, map, PhaseMasks.Normal, pos, data.rotation, animprogress, go_state, artKit)) + if (!Create(entry, map, pos, data.rotation, animprogress, go_state, artKit)) return false; if (data.phaseId != 0) diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 01a71e859..681ab8276 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -43,7 +43,6 @@ namespace Game.Entities { _name = ""; m_isWorldObject = isWorldObject; - phaseMask = PhaseMasks.Normal; m_serverSideVisibility.SetValue(ServerSideVisibilityType.Ghost, GhostVisibilityType.Alive | GhostVisibilityType.Ghost); m_serverSideVisibilityDetect.SetValue(ServerSideVisibilityType.Ghost, GhostVisibilityType.Alive); @@ -2045,7 +2044,7 @@ namespace Game.Entities Map map = GetMap(); GameObject go = new GameObject(); - if (!go.Create(entry, map, GetPhaseMask(), pos, rotation, 255, GameObjectState.Ready)) + if (!go.Create(entry, map, pos, rotation, 255, GameObjectState.Ready)) return null; go.CopyPhaseFrom(this); @@ -2155,14 +2154,6 @@ namespace Game.Entities return (valuesCount > (uint)UnitFields.CombatReach) ? GetFloatValue(UnitFields.CombatReach) : SharedConst.DefaultWorldObjectSize; } - public virtual void SetPhaseMask(uint newPhaseMask, bool update) - { - phaseMask = newPhaseMask; - - if (update && IsInWorld) - UpdateObjectVisibility(); - } - bool HasInPhaseList(uint phase) { return _phases.Contains(phase); @@ -2209,20 +2200,14 @@ namespace Game.Entities foreach (var eff in auraPhaseList) { uint phase = (uint)eff.GetMiscValueB(); - bool up = SetInPhase(phase, false, true); - if (!updateNeeded && up) - updateNeeded = true; + updateNeeded = SetInPhase(phase, false, true) || updateNeeded; } var auraPhaseGroupList = unit.GetAuraEffectsByType(AuraType.PhaseGroup); foreach (var eff in auraPhaseGroupList) { - bool up = false; uint phaseGroup = (uint)eff.GetMiscValueB(); foreach (uint phase in Global.DB2Mgr.GetPhasesForGroup(phaseGroup)) - up = SetInPhase(phase, false, true); - - if (!updateNeeded && up) - updateNeeded = true; + updateNeeded = SetInPhase(phase, false, true) || updateNeeded; } } @@ -2242,13 +2227,17 @@ namespace Game.Entities { if (apply) { - if (HasInPhaseList(id)) // do not run the updates if we are already in this phase + // do not run the updates if we are already in this phase + if (_phases.Contains(id)) return false; _phases.Add(id); } else { + if (!_phases.Contains(id)) + return false; + // if area phase passes the condition we should not remove it (ie: if remove called from aura remove) // this however breaks the .mod phase command, you wont be able to remove any area based phases with it var phases = Global.ObjectMgr.GetPhasesForArea(GetAreaId()); @@ -2262,8 +2251,6 @@ namespace Game.Entities } } - if (!HasInPhaseList(id)) // do not run the updates if we are not in this phase - return false; _phases.Remove(id); } } @@ -2400,7 +2387,6 @@ namespace Game.Entities } } - public uint GetPhaseMask() { return phaseMask; } public List GetPhases() { return _phases; } public List GetTerrainSwaps() { return _terrainSwaps; } public List GetWorldMapAreaSwaps() { return _worldMapAreaSwaps; } @@ -3172,7 +3158,6 @@ namespace Game.Entities Transport m_transport; Map _currMap; uint instanceId; - uint phaseMask; List _phases = new List(); List _terrainSwaps = new List(); List _worldMapAreaSwaps = new List(); diff --git a/Source/Game/Entities/Transport.cs b/Source/Game/Entities/Transport.cs index 87918141a..3b2349ad9 100644 --- a/Source/Game/Entities/Transport.cs +++ b/Source/Game/Entities/Transport.cs @@ -474,7 +474,7 @@ namespace Game.Entities pos.GetPosition(out x, out y, out z, out o); CalculatePassengerPosition(ref x, ref y, ref z, ref o); - if (!summon.Create(map.GenerateLowGuid(HighGuid.Creature), map, 0, entry, x, y, z, o, null, vehId)) + if (!summon.Create(map.GenerateLowGuid(HighGuid.Creature), map, entry, x, y, z, o, null, vehId)) return null; foreach (var phase in phases) diff --git a/Source/Game/Garrisons/Garrisons.cs b/Source/Game/Garrisons/Garrisons.cs index 77fa6dab2..dc9e2f126 100644 --- a/Source/Game/Garrisons/Garrisons.cs +++ b/Source/Game/Garrisons/Garrisons.cs @@ -709,7 +709,7 @@ namespace Game.Garrisons Position pos = PacketInfo.PlotPos; GameObject go = new GameObject(); - if (!go.Create(entry, map, 0, pos, Quaternion.WAxis, 255, GameObjectState.Active)) + if (!go.Create(entry, map, pos, Quaternion.WAxis, 255, GameObjectState.Active)) return null; if (BuildingInfo.CanActivate() && BuildingInfo.PacketInfo.HasValue && !BuildingInfo.PacketInfo.Value.Active) @@ -719,7 +719,7 @@ namespace Game.Garrisons { Position pos2 = finalizeInfo.factionInfo[faction].Pos; GameObject finalizer = new GameObject(); - if (finalizer.Create(finalizeInfo.factionInfo[faction].GameObjectId, map, 0, pos2, Quaternion.WAxis, 255, GameObjectState.Ready)) + if (finalizer.Create(finalizeInfo.factionInfo[faction].GameObjectId, map, pos2, Quaternion.WAxis, 255, GameObjectState.Ready)) { // set some spell id to make the object delete itself after use finalizer.SetSpellId(finalizer.GetGoInfo().Goober.spell); diff --git a/Source/Game/Maps/Map.cs b/Source/Game/Maps/Map.cs index d93b7fd44..179b4d50d 100644 --- a/Source/Game/Maps/Map.cs +++ b/Source/Game/Maps/Map.cs @@ -3203,7 +3203,7 @@ namespace Game.Maps return null; } - if (!summon.Create(GenerateLowGuid(HighGuid.Creature), this, 0, entry, pos.posX, pos.posY, pos.posZ, pos.Orientation, null, vehId)) + if (!summon.Create(GenerateLowGuid(HighGuid.Creature), this, entry, pos.posX, pos.posY, pos.posZ, pos.Orientation, null, vehId)) return null; // Set the summon to the summoner's phase diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 02ad07e7c..aabe7d9de 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -2852,7 +2852,7 @@ namespace Game.Spells Map map = target.GetMap(); Quaternion rotation = new Quaternion(Matrix3.fromEulerAnglesZYX(target.GetOrientation(), 0.0f, 0.0f)); - if (!pGameObj.Create(gameobject_id, map, m_caster.GetPhaseMask(), new Position(x, y, z, target.GetOrientation()), rotation, 255, GameObjectState.Ready)) + if (!pGameObj.Create(gameobject_id, map, new Position(x, y, z, target.GetOrientation()), rotation, 255, GameObjectState.Ready)) return; pGameObj.CopyPhaseFrom(m_caster); @@ -3516,7 +3516,7 @@ namespace Game.Spells Map map = m_caster.GetMap(); Quaternion rotation = new Quaternion(Matrix3.fromEulerAnglesZYX(pos.GetOrientation(), 0.0f, 0.0f)); - if (!pGameObj.Create((uint)gameobject_id, map, m_caster.GetPhaseMask(), pos, rotation, 0, GameObjectState.Ready)) + if (!pGameObj.Create((uint)gameobject_id, map, pos, rotation, 0, GameObjectState.Ready)) return; pGameObj.CopyPhaseFrom(m_caster); @@ -3860,7 +3860,7 @@ namespace Game.Spells Map map = m_caster.GetMap(); Quaternion rotation = new Quaternion(Matrix3.fromEulerAnglesZYX(m_caster.GetOrientation(), 0.0f, 0.0f)); - if (!go.Create(go_id, map, m_caster.GetPhaseMask(), new Position(x, y, z, m_caster.GetOrientation()), rotation, 255, GameObjectState.Ready)) + if (!go.Create(go_id, map, new Position(x, y, z, m_caster.GetOrientation()), rotation, 255, GameObjectState.Ready)) return; go.CopyPhaseFrom(m_caster); @@ -4548,7 +4548,7 @@ namespace Game.Spells Position pos = new Position(fx, fy, fz, m_caster.GetOrientation()); Quaternion rotation = new Quaternion(Matrix3.fromEulerAnglesZYX(m_caster.GetOrientation(), 0.0f, 0.0f)); - if (!pGameObj.Create(name_id, cMap, m_caster.GetPhaseMask(), pos, rotation, 255, GameObjectState.Ready)) + if (!pGameObj.Create(name_id, cMap, pos, rotation, 255, GameObjectState.Ready)) return; pGameObj.CopyPhaseFrom(m_caster); diff --git a/Source/Scripts/Northrend/Nexus/EyeOfEternity/EyeOfEternity.cs b/Source/Scripts/Northrend/Nexus/EyeOfEternity/EyeOfEternity.cs index 8c80619fc..04f6958de 100644 --- a/Source/Scripts/Northrend/Nexus/EyeOfEternity/EyeOfEternity.cs +++ b/Source/Scripts/Northrend/Nexus/EyeOfEternity/EyeOfEternity.cs @@ -144,7 +144,7 @@ namespace Scripts.Northrend.Nexus.EyeOfEternity void SpawnGameObject(uint entry, Position pos) { GameObject go = new GameObject(); - if (go.Create(entry, instance, PhaseMasks.Normal, pos, Quaternion.WAxis, 255, GameObjectState.Ready)) + if (go.Create(entry, instance, pos, Quaternion.WAxis, 255, GameObjectState.Ready)) instance.AddToMap(go); }