Core/Entities: Remove phasemask

This commit is contained in:
hondacrx
2018-01-10 22:26:47 -05:00
parent ae9b786784
commit 79980e3dd2
21 changed files with 41 additions and 67 deletions
+1 -1
View File
@@ -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());
@@ -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);
+3 -4
View File
@@ -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 = "<ERROR>";
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.
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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);
+4 -4
View File
@@ -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;