Core/Refactor: Part 2

This commit is contained in:
hondacrx
2018-05-07 22:07:35 -04:00
parent 216db1c23a
commit 9b40067017
93 changed files with 321 additions and 388 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ namespace Game.Entities
public override string ToString()
{
string str = string.Format("GUID Full: 0x{0}, Type: {1}", _high + _low, GetHigh());
string str = $"GUID Full: 0x{_high + _low}, Type: {GetHigh()}";
if (HasEntry())
str += (IsPet() ? " Pet number: " : " Entry: ") + GetEntry() + " ";
+2 -2
View File
@@ -311,7 +311,7 @@ namespace Game.Entities
public override string ToString()
{
return string.Format("X: {0} Y: {1} Z: {2} O: {3}", posX, posY, posZ, Orientation);
return $"X: {posX} Y: {posY} Z: {posZ} O: {Orientation}";
}
public float posX;
@@ -356,7 +356,7 @@ namespace Game.Entities
}
public uint GetMapId() { return _mapId; }
public void SetMapId(uint _mapId) { this._mapId = _mapId; }
public void SetMapId(uint mapId) { _mapId = mapId; }
public Cell GetCurrentCell()
{
+2 -2
View File
@@ -1526,7 +1526,7 @@ namespace Game.Entities
SetDynamicValue(index, (ushort)((offset + 1) * BlockCount - 1), 0); // reserve space
for (ushort i = 0; i < BlockCount; ++i)
SetDynamicValue(index, (ushort)(offset * BlockCount + i), Extensions.SerializeObject(value)[i]);
SetDynamicValue(index, (ushort)(offset * BlockCount + i), value.SerializeObject()[i]);
}
public void AddDynamicStructuredValue<T>(object index, T value)
@@ -1535,7 +1535,7 @@ namespace Game.Entities
ushort offset = (ushort)(_dynamicValues[(int)index].Length / BlockCount);
SetDynamicValue(index, (ushort)((offset + 1) * BlockCount - 1), 0); // reserve space
for (ushort i = 0; i < BlockCount; ++i)
SetDynamicValue(index, (ushort)(offset * BlockCount + i), Extensions.SerializeObject(value)[i]);
SetDynamicValue(index, (ushort)(offset * BlockCount + i), value.SerializeObject()[i]);
}
bool PrintIndexError(object index, bool set)