2016-01-24 17:11:35 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.Actors;
|
2016-01-01 14:03:55 -05:00
|
|
|
|
using FFXIVClassic_Map_Server.packets.send;
|
2016-01-24 17:11:35 -05:00
|
|
|
|
using MoonSharp.Interpreter;
|
2016-01-01 14:03:55 -05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace FFXIVClassic_Map_Server.lua
|
|
|
|
|
{
|
2016-01-24 17:11:35 -05:00
|
|
|
|
[MoonSharpUserData]
|
2016-01-01 14:03:55 -05:00
|
|
|
|
class LuaPlayer
|
|
|
|
|
{
|
2016-01-24 17:11:35 -05:00
|
|
|
|
private Player player;
|
2016-01-01 14:03:55 -05:00
|
|
|
|
|
2016-01-24 17:11:35 -05:00
|
|
|
|
public LuaPlayer(Player player)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
|
|
|
|
this.player = player;
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void SetMusic(ushort musicID, ushort playMode)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
player.playerSession.QueuePacket(SetMusicPacket.BuildPacket(player.actorId, musicID, playMode), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void SetWeather(ushort weatherID)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
player.playerSession.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weatherID, 1), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void GetParameter(string paramName)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void SetParameter(string paramName, object value, string uiToRefresh)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void GetAttributePoints()
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void SetAttributePoints(int str, int vit, int dex, int inte, int min, int pie)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void Logout()
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
player.playerSession.QueuePacket(LogoutPacket.BuildPacket(player.actorId), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void QuitGame()
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
player.playerSession.QueuePacket(QuitPacket.BuildPacket(player.actorId), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void RunEvent(string functionName, params object[] parameters)
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
List<LuaParam> lParams = LuaUtils.CreateLuaParamList(parameters);
|
|
|
|
|
// player.playerSession.QueuePacket(RunEventFunctionPacket.BuildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter, functionName, lParams), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
2016-06-14 21:29:10 +01:00
|
|
|
|
public void EndEvent()
|
2016-01-01 14:03:55 -05:00
|
|
|
|
{
|
2016-06-14 21:29:10 +01:00
|
|
|
|
// player.playerSession.QueuePacket(EndEventPacket.BuildPacket(player.actorId, player.eventCurrentOwner, player.eventCurrentStarter), true, false);
|
2016-01-01 14:03:55 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|