mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
-Fixed up the quest flag functions.
-Renamed the ActorSpecialGraphicPacket to SetActorQuestGraphic as those icons all have to do with questing. -Got onSpawn to work and implemented the quest graphics. -Added new QuestDirector class.
This commit is contained in:
@@ -35,7 +35,14 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/Area/PrivateArea/" + className, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
|
||||
string path = className;
|
||||
|
||||
if (className.ToLower().Contains("content"))
|
||||
path = "Content/" + className;
|
||||
|
||||
lParams = LuaUtils.createLuaParamList("/Area/PrivateArea/" + path, false, true, zoneName, privateAreaName, 0x9E, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false);
|
||||
ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams).debugPrintSubPacket();
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
|
@@ -81,11 +81,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return SetActorIdleAnimationPacket.buildPacket(actorId, playerActorId, animationId);
|
||||
}
|
||||
|
||||
public void setQuestIcon(Player player, bool hasIcon)
|
||||
public void setQuestGraphic(Player player, int graphicNum)
|
||||
{
|
||||
ActorSpecialGraphicPacket.buildPacket(player.actorId, actorId, hasIcon ? ActorSpecialGraphicPacket.QUEST : 0x0).debugPrintSubPacket();
|
||||
//player.queuePacket(ActorSpecialGraphicPacket.buildPacket(player.actorId, actorId, hasIcon ? ActorSpecialGraphicPacket.QUEST : 0x0));
|
||||
|
||||
player.queuePacket(SetActorQuestGraphicPacket.buildPacket(player.actorId, actorId, graphicNum));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -125,7 +125,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
public Quest[] questScenario = new Quest[16];
|
||||
public Quest[] questGuildleve = new Quest[8];
|
||||
|
||||
public Director currentDirector;// = new OpeningDirector(0x46080012);
|
||||
public Director currentDirector = new OpeningDirector(0x46080012);
|
||||
|
||||
public PlayerWork playerWork = new PlayerWork();
|
||||
|
||||
@@ -590,6 +590,12 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
playerSession.queuePacket(packet, true, false);
|
||||
}
|
||||
|
||||
public void queuePackets(List<SubPacket> packets)
|
||||
{
|
||||
foreach (SubPacket subpacket in packets)
|
||||
playerSession.queuePacket(subpacket, true, false);
|
||||
}
|
||||
|
||||
public void broadcastPacket(SubPacket packet, bool sendToSelf)
|
||||
{
|
||||
if (sendToSelf)
|
||||
@@ -969,7 +975,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
for (int i = 0; i < questScenario.Length; i++)
|
||||
{
|
||||
if (questScenario[i] != null && questScenario[i].actorName.Equals(name))
|
||||
if (questScenario[i] != null && questScenario[i].actorName.ToLower().Equals(name.ToLower()))
|
||||
return questScenario[i];
|
||||
}
|
||||
|
||||
@@ -991,7 +997,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
if (directorType.Equals("openingDirector"))
|
||||
{
|
||||
currentDirector = new OpeningDirector(0x46080012);
|
||||
currentDirector = new OpeningDirector(0x46080012);
|
||||
}
|
||||
else if (directorType.Equals("QuestDirectorMan0l001"))
|
||||
{
|
||||
currentDirector = new QuestDirectorMan0l001(0x46080012);
|
||||
}
|
||||
|
||||
queuePacket(RemoveActorPacket.buildPacket(actorId, 0x46080012));
|
||||
@@ -1077,12 +1087,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
|
||||
//Update Instance
|
||||
List<BasePacket> instanceUpdatePackets = playerSession.updateInstance(zone.getActorsAroundActor(this, 50));
|
||||
foreach (BasePacket bp in instanceUpdatePackets)
|
||||
{
|
||||
// bp.debugPrintPacket();
|
||||
queuePacket(bp);
|
||||
}
|
||||
playerSession.updateInstance(zone.getActorsAroundActor(this, 50));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,39 @@
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.actors.director
|
||||
{
|
||||
class QuestDirectorMan0l001 : Director
|
||||
{
|
||||
public QuestDirectorMan0l001(uint id) : base(id)
|
||||
{
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = "questDirect_ocn0Btl02_01";
|
||||
|
||||
this.actorName = "questDirect_ocn0Btl02_01@0C196";
|
||||
this.className = "QuestDirectorMan0l001";
|
||||
|
||||
this.eventConditions = new EventList();
|
||||
|
||||
List<EventList.NoticeEventCondition> noticeEventList = new List<EventList.NoticeEventCondition>();
|
||||
|
||||
noticeEventList.Add(new EventList.NoticeEventCondition("noticeEvent", 0xE, 0x0));
|
||||
noticeEventList.Add(new EventList.NoticeEventCondition("noticeRequest", 0x0, 0x1));
|
||||
|
||||
this.eventConditions.noticeEventConditions = noticeEventList;
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/Director/Quest/QuestDirectorMan0l001", false, false, false, false, 0x7532);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
}
|
||||
}
|
@@ -68,7 +68,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return (questFlags & (1 << bitIndex)) == 1;
|
||||
return (questFlags & (1 << bitIndex)) == (1 << bitIndex);
|
||||
}
|
||||
|
||||
public int GetPhase()
|
||||
|
Reference in New Issue
Block a user