Implemented more of the Guildleve Director. Correct script is now autoloaded based on leveplate. Players are now added to the contentgroup on leve start. Moved animation and stuff to C# side of things. Cleaned up code.

This commit is contained in:
Filip Maj 2017-06-25 14:25:54 -04:00
parent c42f1a08de
commit 875b76634a
9 changed files with 292 additions and 55 deletions

View file

@ -368,6 +368,12 @@ namespace FFXIVClassic_Map_Server.Actors
}
}
public void BroadcastPacketsAroundActor(Actor actor, List<SubPacket> packets)
{
foreach (SubPacket packet in packets)
BroadcastPacketAroundActor(actor, packet);
}
public void BroadcastPacketAroundActor(Actor actor, SubPacket packet)
{
if (isIsolated)
@ -501,11 +507,48 @@ namespace FFXIVClassic_Map_Server.Actors
}
}
public Director CreateGuildleveDirector(string path, uint glid, params object[] args)
public Director CreateGuildleveDirector(uint glid, byte difficulty, Player owner, params object[] args)
{
String directorScriptPath = "";
uint type = Server.GetGuildleveGamedata(glid).plateId;
if (glid == 10801 || glid == 12401 || glid == 11601)
directorScriptPath = "Guildleve/PrivateGLBattleTutorial";
else
{
switch (type)
{
case 20021:
directorScriptPath = "Guildleve/PrivateGLBattleSweepNormal";
break;
case 20022:
directorScriptPath = "Guildleve/PrivateGLBattleChaseNormal";
break;
case 20023:
directorScriptPath = "Guildleve/PrivateGLBattleOrbNormal";
break;
case 20024:
directorScriptPath = "Guildleve/PrivateGLBattleHuntNormal";
break;
case 20025:
directorScriptPath = "Guildleve/PrivateGLBattleGatherNormal";
break;
case 20026:
directorScriptPath = "Guildleve/PrivateGLBattleRoundNormal";
break;
case 20027:
directorScriptPath = "Guildleve/PrivateGLBattleSurviveNormal";
break;
case 20028:
directorScriptPath = "Guildleve/PrivateGLBattleDetectNormal";
break;
}
}
lock (directorLock)
{
GuildleveDirector director = new GuildleveDirector(directorIdCount, this, path, glid, args);
GuildleveDirector director = new GuildleveDirector(directorIdCount, this, directorScriptPath, glid, difficulty, owner, args);
currentDirectors.Add(directorIdCount, director);
directorIdCount++;
return director;
@ -518,7 +561,8 @@ namespace FFXIVClassic_Map_Server.Actors
{
if (currentDirectors.ContainsKey(id))
{
currentDirectors[id].RemoveMembers();
if (!currentDirectors[id].IsDeleted())
currentDirectors[id].EndDirector();
currentDirectors.Remove(id);
}
}