Core/Packets: Implemented SMSG_GAME_OBJECT_UI_ACTION
This commit is contained in:
@@ -1864,6 +1864,18 @@ namespace Game.Entities
|
||||
player.SendPacket(artifactForgeOpened);
|
||||
return;
|
||||
}
|
||||
case GameObjectTypes.UILink:
|
||||
{
|
||||
Player player = user.ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
GameObjectUIAction gameObjectUIAction = new GameObjectUIAction();
|
||||
gameObjectUIAction.ObjectGUID = GetGUID();
|
||||
gameObjectUIAction.UILink = (int)GetGoInfo().UILink.UILinkType;
|
||||
player.SendPacket(gameObjectUIAction);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
if (GetGoType() >= GameObjectTypes.Max)
|
||||
Log.outError(LogFilter.Server, "GameObject.Use(): unit (type: {0}, guid: {1}, name: {2}) tries to use object (guid: {3}, entry: {4}, name: {5}) of unknown type ({6})",
|
||||
|
||||
@@ -135,4 +135,18 @@ namespace Game.Network.Packets
|
||||
public uint CustomAnim;
|
||||
public bool PlayAsDespawn;
|
||||
}
|
||||
|
||||
class GameObjectUIAction : ServerPacket
|
||||
{
|
||||
public GameObjectUIAction() : base(ServerOpcodes.GameObjectUiAction, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(ObjectGUID);
|
||||
_worldPacket.WriteInt32(UILink);
|
||||
}
|
||||
|
||||
public ObjectGuid ObjectGUID;
|
||||
public int UILink;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user