mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Fixed work values not updating. GL UI now shows up though it isn't configured.
This commit is contained in:
parent
186d5b5cc5
commit
8fb4910320
@ -87,6 +87,8 @@
|
||||
<Compile Include="actors\chara\Work.cs" />
|
||||
<Compile Include="actors\debug\Debug.cs" />
|
||||
<Compile Include="actors\director\Director.cs" />
|
||||
<Compile Include="actors\director\GuildleveDirector.cs" />
|
||||
<Compile Include="actors\director\Work\GuildleveWork.cs" />
|
||||
<Compile Include="actors\EventList.cs" />
|
||||
<Compile Include="actors\group\ContentGroup.cs" />
|
||||
<Compile Include="actors\group\Work\ContentGroupWork.cs" />
|
||||
|
@ -110,6 +110,9 @@ namespace FFXIVClassic_Map_Server.actors.director
|
||||
p.QueuePacket(GetInitPackets(p.actorId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StartCoroutine("mainLoop", this);
|
||||
}
|
||||
|
||||
public void AddMember(Actor actor)
|
||||
@ -223,5 +226,21 @@ namespace FFXIVClassic_Map_Server.actors.director
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<LuaParam> StartCoroutine(string funcName, params object[] args)
|
||||
{
|
||||
if (directorScript != null)
|
||||
{
|
||||
if (!directorScript.Globals.Get(funcName).IsNil())
|
||||
{
|
||||
currentCoroutine = directorScript.CreateCoroutine(directorScript.Globals[funcName]).Coroutine;
|
||||
DynValue value = currentCoroutine.Resume(args);
|
||||
LuaEngine.GetInstance().ResolveResume(null, currentCoroutine, value);
|
||||
}
|
||||
else
|
||||
Program.Log.Error("Could not find script for director {0}.", GetName());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -38,7 +38,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
||||
|
||||
public void QueuePacket(SubPacket subPacket, bool isAuthed, bool isEncrypted)
|
||||
{
|
||||
//subPacket.header.targetId = id;
|
||||
subPacket.header.targetId = id;
|
||||
Server.GetWorldConnection().QueuePacket(subPacket, isAuthed, isEncrypted);
|
||||
}
|
||||
|
||||
|
@ -372,12 +372,12 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
CallLuaFunction(player, target, "onEventStarted", false, LuaUtils.CreateLuaParamObjectList(lparams));
|
||||
}
|
||||
|
||||
private DynValue ResolveResume(Player player, Coroutine coroutine, DynValue value)
|
||||
public DynValue ResolveResume(Player player, Coroutine coroutine, DynValue value)
|
||||
{
|
||||
if (value == null || value.IsVoid())
|
||||
return value;
|
||||
|
||||
if (value.String != null && value.String.Equals("_WAIT_EVENT"))
|
||||
if (player != null && value.String != null && value.String.Equals("_WAIT_EVENT"))
|
||||
{
|
||||
GetInstance().AddWaitEventCoroutine(player, coroutine);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
|
||||
string[] split = name.Split('.');
|
||||
int arrayIndex = 0;
|
||||
|
||||
if (!(split[0].Equals("work") || split[0].Equals("charaWork") || split[0].Equals("playerWork") || split[0].Equals("npcWork")))
|
||||
if (!(split[0].Equals("work") || split[0].Equals("charaWork") || split[0].Equals("playerWork") || split[0].Equals("npcWork") || split[0].Equals("guildleveWork")))
|
||||
return false;
|
||||
|
||||
Object curObj = actor;
|
||||
|
@ -3,25 +3,22 @@ require ("guildleve")
|
||||
|
||||
--DirectorId, GuildleveId, Aetheryte Location (6 or ~6), exMarkerX, exMarkerY, exMarkerZ
|
||||
|
||||
local guildleveId;
|
||||
|
||||
function init(thisDirector, glId)
|
||||
guildleveId = glId;
|
||||
|
||||
guildleveData = GetGuildleveGamedata(glId);
|
||||
function init(thisDirector)
|
||||
guildleveData = GetGuildleveGamedata(thisDirector.guildleveId);
|
||||
members = thisDirector:GetPlayerMembers();
|
||||
|
||||
if (members ~= nil and #members ~= 0) then
|
||||
player = members[0];
|
||||
player:SendGameMessage(GetWorldMaster(), 50036, 0x20, glId, player, 0); --"You have started the leve..."
|
||||
player:SendGameMessage(GetWorldMaster(), 50036, 0x20, thisDirector.guildleveId, player, 0); --"You have started the leve..."
|
||||
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, false));
|
||||
end
|
||||
|
||||
return "/Director/Guildleve/PrivateGLBattleDetectNormal", 0x4e25, glId, 6, 0, 0, 0;
|
||||
return "/Director/Guildleve/PrivateGLBattleDetectNormal", 0x4e25, thisDirector.guildleveId, 6, 0, 0, 0;
|
||||
end
|
||||
|
||||
function mainLoop(thisDirector)
|
||||
|
||||
|
||||
wait(3)
|
||||
thisDirector:StartGuildleve();
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user