Core/Refactor: Part 2
This commit is contained in:
@@ -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() + " ";
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user