Added a "silent" option for LuaEngine calls. More content instance work. Full classpath now used for zones.

This commit is contained in:
Filip Maj
2017-04-29 20:30:54 -04:00
parent cc44d6b63c
commit 8c9ecebae6
15 changed files with 313 additions and 136 deletions

View File

@@ -54,6 +54,7 @@ namespace FFXIVClassic_Map_Server.Actors
public CharaWork charaWork = new CharaWork();
public Group currentParty = null;
public ContentGroup currentContentGroup = null;
public Character(uint actorID) : base(actorID)
{
@@ -88,9 +89,14 @@ namespace FFXIVClassic_Map_Server.Actors
player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(player.actorId, actorId, graphicNum));
}
public void SetCurrentContentGroup(uint groupType, Player player = null)
public void SetCurrentContentGroup(ContentGroup group, Player player = null)
{
charaWork.currentContentGroup = groupType;
if (group != null)
charaWork.currentContentGroup = group.GetTypeId();
else
charaWork.currentContentGroup = 0;
currentContentGroup = group;
if (player != null)
{

View File

@@ -83,7 +83,7 @@ namespace FFXIVClassic_Map_Server.Actors
List<LuaParam> lParams;
Player player = Server.GetWorldManager().GetPCInWorld(playerActorId);
lParams = LuaEngine.GetInstance().CallLuaFunctionForReturn(player, this, "init");
lParams = LuaEngine.GetInstance().CallLuaFunctionForReturn(player, this, "init", false);
if (uniqueIdentifier.Equals("1"))
{
@@ -381,12 +381,12 @@ namespace FFXIVClassic_Map_Server.Actors
public void DoOnActorSpawn(Player player)
{
LuaEngine.GetInstance().CallLuaFunction(player, this, "onSpawn");
LuaEngine.GetInstance().CallLuaFunction(player, this, "onSpawn", true);
}
public void Update(double deltaTime)
{
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", deltaTime);
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime);
}
//A party member list packet came, set the party

View File

@@ -552,7 +552,10 @@ namespace FFXIVClassic_Map_Server.Actors
director.GetSpawnPackets(actorId).DebugPrintPacket();
QueuePacket(director.GetSpawnPackets(actorId));
QueuePacket(director.GetInitPackets(actorId));
}
}
if (currentContentGroup != null)
currentContentGroup.SendGroupPackets(playerSession);
}
@@ -1526,7 +1529,7 @@ namespace FFXIVClassic_Map_Server.Actors
public void Update(double delta)
{
LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", delta);
LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", true, delta);
}
}