Core/GameObjects: Implemented per player gameobject state and visibility for looted non-consumable chests
Port From (https://github.com/TrinityCore/TrinityCore/commit/879c0cccfcb9224f9e15cbed926c57a4e010a070)
This commit is contained in:
@@ -4997,7 +4997,7 @@ namespace Game.Entities
|
||||
data.WriteFloat(rotation.Z);
|
||||
data.WriteFloat(rotation.W);
|
||||
data.WriteUInt32(FactionTemplate);
|
||||
data.WriteInt8(State);
|
||||
data.WriteInt8(GetViewerGameObjectState(this, owner, receiver));
|
||||
data.WriteInt8(TypeID);
|
||||
data.WriteUInt8(PercentHealth);
|
||||
data.WriteUInt32(ArtKit);
|
||||
@@ -5104,7 +5104,7 @@ namespace Game.Entities
|
||||
}
|
||||
if (changesMask[14])
|
||||
{
|
||||
data.WriteInt8(State);
|
||||
data.WriteInt8(GetViewerGameObjectState(this, owner, receiver));
|
||||
}
|
||||
if (changesMask[15])
|
||||
{
|
||||
@@ -5167,6 +5167,11 @@ namespace Game.Entities
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
sbyte GetViewerGameObjectState(GameObjectFieldData gameObjectData, GameObject gameObject, Player receiver)
|
||||
{
|
||||
return (sbyte)gameObject.GetGoStateFor(receiver.GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
public class DynamicObjectData : BaseUpdateData<DynamicObject>
|
||||
|
||||
Reference in New Issue
Block a user