1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-21 20:27:47 +00:00

Merge branch 'director_and_questing' into develop

This commit is contained in:
Filip Maj 2016-04-01 23:24:28 -04:00
commit 1dd04e2174
24 changed files with 462 additions and 73 deletions

View file

@ -638,6 +638,9 @@ namespace FFXIVClassic_Lobby_Server
{ {
int index = reader.GetUInt16(0); int index = reader.GetUInt16(0);
player.playerWork.questScenario[index] = 0xA0F00000 | reader.GetUInt32(1); player.playerWork.questScenario[index] = 0xA0F00000 | reader.GetUInt32(1);
string questName = Server.getStaticActors(player.playerWork.questScenario[index]).actorName;
player.questScenario[index] = new Quest(player.playerWork.questScenario[index], questName);
} }
} }

View file

@ -70,6 +70,8 @@
<Compile Include="actors\chara\player\Inventory.cs" /> <Compile Include="actors\chara\player\Inventory.cs" />
<Compile Include="actors\chara\Work.cs" /> <Compile Include="actors\chara\Work.cs" />
<Compile Include="actors\debug\Debug.cs" /> <Compile Include="actors\debug\Debug.cs" />
<Compile Include="actors\director\Director.cs" />
<Compile Include="actors\director\OpeningDirector.cs" />
<Compile Include="actors\director\WeatherDirector.cs" /> <Compile Include="actors\director\WeatherDirector.cs" />
<Compile Include="actors\EventList.cs" /> <Compile Include="actors\EventList.cs" />
<Compile Include="actors\judge\Judge.cs" /> <Compile Include="actors\judge\Judge.cs" />
@ -115,6 +117,7 @@
<Compile Include="packets\receive\events\EventUpdatePacket.cs" /> <Compile Include="packets\receive\events\EventUpdatePacket.cs" />
<Compile Include="packets\receive\events\EventStartPacket.cs" /> <Compile Include="packets\receive\events\EventStartPacket.cs" />
<Compile Include="packets\receive\HandshakePacket.cs" /> <Compile Include="packets\receive\HandshakePacket.cs" />
<Compile Include="packets\receive\LangaugeCodePacket.cs" />
<Compile Include="packets\receive\ParameterDataRequestPacket.cs" /> <Compile Include="packets\receive\ParameterDataRequestPacket.cs" />
<Compile Include="packets\receive\recruitment\RecruitmentDetailsRequestPacket.cs" /> <Compile Include="packets\receive\recruitment\RecruitmentDetailsRequestPacket.cs" />
<Compile Include="packets\receive\recruitment\RecruitmentSearchRequestPacket.cs" /> <Compile Include="packets\receive\recruitment\RecruitmentSearchRequestPacket.cs" />
@ -127,6 +130,8 @@
<Compile Include="packets\receive\supportdesk\FaqListRequestPacket.cs" /> <Compile Include="packets\receive\supportdesk\FaqListRequestPacket.cs" />
<Compile Include="packets\receive\supportdesk\GMSupportTicketPacket.cs" /> <Compile Include="packets\receive\supportdesk\GMSupportTicketPacket.cs" />
<Compile Include="packets\receive\supportdesk\GMTicketIssuesRequestPacket.cs" /> <Compile Include="packets\receive\supportdesk\GMTicketIssuesRequestPacket.cs" />
<Compile Include="packets\receive\_0x02ReceivePacket.cs" />
<Compile Include="packets\receive\_0x07Packet.cs" />
<Compile Include="packets\send\actor\ActorDoEmotePacket.cs" /> <Compile Include="packets\send\actor\ActorDoEmotePacket.cs" />
<Compile Include="packets\send\actor\ActorInstantiatePacket.cs" /> <Compile Include="packets\send\actor\ActorInstantiatePacket.cs" />
<Compile Include="packets\send\actor\BattleAction1Packet.cs" /> <Compile Include="packets\send\actor\BattleAction1Packet.cs" />
@ -172,6 +177,7 @@
<Compile Include="packets\send\actor\SetActorStatusPacket.cs" /> <Compile Include="packets\send\actor\SetActorStatusPacket.cs" />
<Compile Include="packets\send\actor\_0xFPacket.cs" /> <Compile Include="packets\send\actor\_0xFPacket.cs" />
<Compile Include="packets\send\events\EndEventPacket.cs" /> <Compile Include="packets\send\events\EndEventPacket.cs" />
<Compile Include="packets\send\events\KickEventPacket.cs" />
<Compile Include="packets\send\events\RunEventFunctionPacket.cs" /> <Compile Include="packets\send\events\RunEventFunctionPacket.cs" />
<Compile Include="packets\send\GameMessagePacket.cs" /> <Compile Include="packets\send\GameMessagePacket.cs" />
<Compile Include="packets\send\list\ListEntry.cs" /> <Compile Include="packets\send\list\ListEntry.cs" />
@ -236,6 +242,7 @@
<Compile Include="packets\send\supportdesk\FaqListResponsePacket.cs" /> <Compile Include="packets\send\supportdesk\FaqListResponsePacket.cs" />
<Compile Include="packets\send\supportdesk\GMTicketPacket.cs" /> <Compile Include="packets\send\supportdesk\GMTicketPacket.cs" />
<Compile Include="packets\send\supportdesk\GMTicketSentResponsePacket.cs" /> <Compile Include="packets\send\supportdesk\GMTicketSentResponsePacket.cs" />
<Compile Include="packets\send\_0x02Packet.cs" />
<Compile Include="packets\send\_0xE2Packet.cs" /> <Compile Include="packets\send\_0xE2Packet.cs" />
<Compile Include="packets\SubPacket.cs" /> <Compile Include="packets\SubPacket.cs" />
<Compile Include="packets\receive\PingPacket.cs" /> <Compile Include="packets\receive\PingPacket.cs" />

View file

@ -54,8 +54,6 @@ namespace FFXIVClassic_Lobby_Server
if (packet.header.isCompressed == 0x01) if (packet.header.isCompressed == 0x01)
BasePacket.decryptPacket(client.blowfish, ref packet); BasePacket.decryptPacket(client.blowfish, ref packet);
// packet.debugPrintPacket();
List<SubPacket> subPackets = packet.getSubpackets(); List<SubPacket> subPackets = packet.getSubpackets();
foreach (SubPacket subpacket in subPackets) foreach (SubPacket subpacket in subPackets)
{ {
@ -65,7 +63,7 @@ namespace FFXIVClassic_Lobby_Server
byte[] reply1Data = { byte[] reply1Data = {
0x01, 0x00, 0x00, 0x00, 0x28, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x00,
0x18, 0x00, 0x07, 0x00, 0x00, 0x0, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0xFD, 0xFF, 0xFF, 0x18, 0x00, 0x07, 0x00, 0x00, 0x0, 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0xFD, 0xFF, 0xFF,
0x43, 0xEC, 0x00, 0xE0, 0x00, 0x0, 0x00, 0x0 0xE5, 0x6E, 0x01, 0xE0, 0x00, 0x0, 0x00, 0x0
}; };
BasePacket reply1 = new BasePacket(reply1Data); BasePacket reply1 = new BasePacket(reply1Data);
@ -177,7 +175,9 @@ namespace FFXIVClassic_Lobby_Server
//Unknown //Unknown
case 0x0002: case 0x0002:
client.queuePacket(SendMessagePacket.buildPacket(player.actorID, player.actorID, SendMessagePacket.MESSAGE_TYPE_GENERAL_INFO, "", "-------- Login Message --------\nWelcome to the 1.0 Dev Server"), true, false); subpacket.debugPrintSubPacket();
client.queuePacket(_0x2Packet.buildPacket(player.actorID), true, false);
Server.GetWorldManager().DoLogin(player.getActor()); Server.GetWorldManager().DoLogin(player.getActor());
@ -197,8 +197,15 @@ namespace FFXIVClassic_Lobby_Server
player.getActor().broadcastPacket(SendMessagePacket.buildPacket(player.actorID, player.actorID, chatMessage.logType, player.getActor().customDisplayName, chatMessage.message), false); player.getActor().broadcastPacket(SendMessagePacket.buildPacket(player.actorID, player.actorID, chatMessage.logType, player.getActor().customDisplayName, chatMessage.message), false);
break; break;
//Unknown //Langauge Code
case 0x0006:
LangaugeCodePacket langCode = new LangaugeCodePacket(subpacket.data);
player.languageCode = langCode.languageCode;
break;
//Unknown - Happens a lot at login, then once every time player zones
case 0x0007: case 0x0007:
//subpacket.debugPrintSubPacket();
_0x07Packet unknown07 = new _0x07Packet(subpacket.data);
break; break;
//Update Position //Update Position
case 0x00CA: case 0x00CA:
@ -207,6 +214,10 @@ namespace FFXIVClassic_Lobby_Server
UpdatePlayerPositionPacket posUpdate = new UpdatePlayerPositionPacket(subpacket.data); UpdatePlayerPositionPacket posUpdate = new UpdatePlayerPositionPacket(subpacket.data);
player.updatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState); player.updatePlayerActorPosition(posUpdate.x, posUpdate.y, posUpdate.z, posUpdate.rot, posUpdate.moveState);
player.getActor().sendInstanceUpdate(); player.getActor().sendInstanceUpdate();
if (player.getActor().isInZoneChange())
player.getActor().setZoneChanging(false);
break; break;
//Set Target //Set Target
case 0x00CD: case 0x00CD:
@ -245,18 +256,28 @@ namespace FFXIVClassic_Lobby_Server
Actor ownerActor = Server.getStaticActors(player.getActor().eventCurrentOwner); Actor ownerActor = Server.getStaticActors(player.getActor().eventCurrentOwner);
if (ownerActor == null) if (ownerActor == null)
{ {
//Is it a instance actor?
ownerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner); ownerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
if (ownerActor == null) if (ownerActor == null)
{
//Is it a Director?
if (player.getActor().currentDirector != null && player.getActor().eventCurrentOwner == player.getActor().currentDirector.actorId)
ownerActor = player.getActor().currentDirector;
else
{ {
Log.debug(String.Format("\n===Event START===\nCould not find actor 0x{0:X} for event started by caller: 0x{1:X}\nEvent Starter: {2}\nParams: {3}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams))); Log.debug(String.Format("\n===Event START===\nCould not find actor 0x{0:X} for event started by caller: 0x{1:X}\nEvent Starter: {2}\nParams: {3}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams)));
break; break;
} }
} }
}
LuaEngine.doActorOnEventStarted(player.getActor(), ownerActor, eventStart); LuaEngine.doActorOnEventStarted(player.getActor(), ownerActor, eventStart);
Log.debug(String.Format("\n===Event START===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nEvent Starter: {4}\nParams: {5}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.val1, eventStart.val2, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams))); Log.debug(String.Format("\n===Event START===\nSource Actor: 0x{0:X}\nCaller Actor: 0x{1:X}\nVal1: 0x{2:X}\nVal2: 0x{3:X}\nEvent Starter: {4}\nParams: {5}", eventStart.actorID, eventStart.scriptOwnerActorID, eventStart.val1, eventStart.val2, eventStart.triggerName, LuaUtils.dumpParams(eventStart.luaParams)));
break; break;
//Unknown, happens at npc spawn and cutscene play????
case 0x00CE:
break;
//Event Result //Event Result
case 0x012E: case 0x012E:
subpacket.debugPrintSubPacket(); subpacket.debugPrintSubPacket();
@ -268,6 +289,10 @@ namespace FFXIVClassic_Lobby_Server
if (updateOwnerActor == null) if (updateOwnerActor == null)
{ {
updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner); updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
if (player.getActor().currentDirector != null && player.getActor().eventCurrentOwner == player.getActor().currentDirector.actorId)
updateOwnerActor = player.getActor().currentDirector;
if (updateOwnerActor == null) if (updateOwnerActor == null)
break; break;
} }

View file

@ -659,9 +659,9 @@ namespace FFXIVClassic_Lobby_Server
} }
else if (split[0].Equals("resetzone")) else if (split[0].Equals("resetzone"))
{ {
Log.info(String.Format("Got request to reset zone: {0}", client.getActor().zoneId));
if (client != null) if (client != null)
{ {
Log.info(String.Format("Got request to reset zone: {0}", client.getActor().zoneId));
client.getActor().zone.clear(); client.getActor().zone.clear();
client.getActor().zone.addActorToZone(client.getActor()); client.getActor().zone.addActorToZone(client.getActor());
client.getActor().sendInstanceUpdate(); client.getActor().sendInstanceUpdate();

View file

@ -458,11 +458,7 @@ namespace FFXIVClassic_Map_Server
zone.addActorToZone(player); zone.addActorToZone(player);
//Send packets //Send packets
player.playerSession.queuePacket(DeleteAllActorsPacket.buildPacket(player.actorId), true, false);
player.playerSession.queuePacket(_0x2Packet.buildPacket(player.actorId), true, false);
player.sendZoneInPackets(this, 0x1); player.sendZoneInPackets(this, 0x1);
player.playerSession.clearInstance();
player.sendInstanceUpdate();
LuaEngine.onLogin(player); LuaEngine.onLogin(player);
LuaEngine.onZoneIn(player); LuaEngine.onZoneIn(player);

View file

@ -68,7 +68,7 @@ namespace FFXIVClassic_Map_Server.Actors
public SubPacket createNamePacket(uint playerActorId) public SubPacket createNamePacket(uint playerActorId)
{ {
return SetActorNamePacket.buildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF ? customDisplayName : ""); return SetActorNamePacket.buildPacket(actorId, playerActorId, displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 ? customDisplayName : "");
} }
public SubPacket createSpeedPacket(uint playerActorId) public SubPacket createSpeedPacket(uint playerActorId)
@ -94,8 +94,6 @@ namespace FFXIVClassic_Map_Server.Actors
//return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE); //return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
spawnedFirstTime = true; spawnedFirstTime = true;
spawnPacket.debugPrintSubPacket();
return spawnPacket; return spawnPacket;
} }
@ -180,37 +178,37 @@ namespace FFXIVClassic_Map_Server.Actors
if (eventConditions.talkEventConditions != null) if (eventConditions.talkEventConditions != null)
{ {
foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions) foreach (EventList.TalkEventCondition condition in eventConditions.talkEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 1, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 1, condition.conditionName));
} }
if (eventConditions.noticeEventConditions != null) if (eventConditions.noticeEventConditions != null)
{ {
foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions) foreach (EventList.NoticeEventCondition condition in eventConditions.noticeEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 1, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 1, condition.conditionName));
} }
if (eventConditions.emoteEventConditions != null) if (eventConditions.emoteEventConditions != null)
{ {
foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions) foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 3, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 3, condition.conditionName));
} }
if (eventConditions.pushWithCircleEventConditions != null) if (eventConditions.pushWithCircleEventConditions != null)
{ {
foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions) foreach (EventList.PushCircleEventCondition condition in eventConditions.pushWithCircleEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName));
} }
if (eventConditions.pushWithFanEventConditions != null) if (eventConditions.pushWithFanEventConditions != null)
{ {
foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions) foreach (EventList.PushFanEventCondition condition in eventConditions.pushWithFanEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName));
} }
if (eventConditions.pushWithBoxEventConditions != null) if (eventConditions.pushWithBoxEventConditions != null)
{ {
foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions) foreach (EventList.PushBoxEventCondition condition in eventConditions.pushWithBoxEventConditions)
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 2, condition.conditionName)); subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, true, 2, condition.conditionName));
} }
return BasePacket.createPacket(subpackets, true, false); return BasePacket.createPacket(subpackets, true, false);

View file

@ -27,6 +27,13 @@ namespace FFXIVClassic_Map_Server.actors
public byte unknown1; public byte unknown1;
public byte unknown2; public byte unknown2;
public string conditionName; public string conditionName;
public NoticeEventCondition(string name, byte unk1, byte unk2)
{
conditionName = name;
unknown1 = unk1;
unknown2 = unk2;
}
} }
public class EmoteEventCondition public class EmoteEventCondition

View file

@ -88,7 +88,6 @@ namespace FFXIVClassic_Map_Server.Actors
subpackets.Add(createStatePacket(playerActorId)); subpackets.Add(createStatePacket(playerActorId));
subpackets.Add(createIsZoneingPacket(playerActorId)); subpackets.Add(createIsZoneingPacket(playerActorId));
subpackets.Add(createScriptBindPacket(playerActorId)); subpackets.Add(createScriptBindPacket(playerActorId));
subpackets[6].debugPrintSubPacket();
return BasePacket.createPacket(subpackets, true, false); return BasePacket.createPacket(subpackets, true, false);
} }

View file

@ -3,11 +3,13 @@ using FFXIVClassic_Lobby_Server.common;
using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.actors.area; using FFXIVClassic_Map_Server.actors.area;
using FFXIVClassic_Map_Server.actors.chara.player; using FFXIVClassic_Map_Server.actors.chara.player;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.dataobjects.chara; using FFXIVClassic_Map_Server.dataobjects.chara;
using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send; using FFXIVClassic_Map_Server.packets.send;
using FFXIVClassic_Map_Server.packets.send.actor; using FFXIVClassic_Map_Server.packets.send.actor;
using FFXIVClassic_Map_Server.packets.send.actor.events;
using FFXIVClassic_Map_Server.packets.send.actor.inventory; using FFXIVClassic_Map_Server.packets.send.actor.inventory;
using FFXIVClassic_Map_Server.packets.send.Actor.inventory; using FFXIVClassic_Map_Server.packets.send.Actor.inventory;
using FFXIVClassic_Map_Server.packets.send.events; using FFXIVClassic_Map_Server.packets.send.events;
@ -89,6 +91,7 @@ namespace FFXIVClassic_Map_Server.Actors
public uint playTime; public uint playTime;
public uint lastPlayTimeUpdate; public uint lastPlayTimeUpdate;
public bool isGM = false; public bool isGM = false;
public bool isZoneChanging = true;
//Inventory //Inventory
private Dictionary<ushort, Inventory> inventories = new Dictionary<ushort, Inventory>(); private Dictionary<ushort, Inventory> inventories = new Dictionary<ushort, Inventory>();
@ -122,6 +125,8 @@ namespace FFXIVClassic_Map_Server.Actors
public Quest[] questScenario = new Quest[16]; public Quest[] questScenario = new Quest[16];
public Quest[] questGuildleve = new Quest[8]; public Quest[] questGuildleve = new Quest[8];
public Director currentDirector;// = new OpeningDirector(0x46080012);
public PlayerWork playerWork = new PlayerWork(); public PlayerWork playerWork = new PlayerWork();
public ConnectedPlayer playerSession; public ConnectedPlayer playerSession;
@ -250,6 +255,9 @@ namespace FFXIVClassic_Map_Server.Actors
List<LuaParam> lParams; List<LuaParam> lParams;
if (isMyPlayer(playerActorId)) if (isMyPlayer(playerActorId))
{ {
if (currentDirector != null)
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, true, currentDirector, 0, false, timers, true);
else
lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true); lParams = LuaUtils.createLuaParamList("/Chara/Player/Player_work", false, false, false, true, 0, false, timers, true);
} }
else else
@ -482,6 +490,7 @@ namespace FFXIVClassic_Map_Server.Actors
queuePacket(SetWeatherPacket.buildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR)); queuePacket(SetWeatherPacket.buildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR));
queuePacket(getSpawnPackets(actorId, spawnType)); queuePacket(getSpawnPackets(actorId, spawnType));
//getSpawnPackets(actorId, spawnType).debugPrintPacket();
#region grouptest #region grouptest
//Retainers //Retainers
@ -518,19 +527,43 @@ namespace FFXIVClassic_Map_Server.Actors
BasePacket areaMasterSpawn = zone.getSpawnPackets(actorId); BasePacket areaMasterSpawn = zone.getSpawnPackets(actorId);
BasePacket debugSpawn = world.GetDebugActor().getSpawnPackets(actorId); BasePacket debugSpawn = world.GetDebugActor().getSpawnPackets(actorId);
BasePacket worldMasterSpawn = world.GetActor().getSpawnPackets(actorId); BasePacket worldMasterSpawn = world.GetActor().getSpawnPackets(actorId);
BasePacket directorSpawn = null;
if (currentDirector != null)
directorSpawn = currentDirector.getSpawnPackets(actorId);
playerSession.queuePacket(areaMasterSpawn); playerSession.queuePacket(areaMasterSpawn);
playerSession.queuePacket(debugSpawn); playerSession.queuePacket(debugSpawn);
if (directorSpawn != null)
{
directorSpawn.debugPrintPacket();
currentDirector.getInitPackets(actorId).debugPrintPacket();
queuePacket(directorSpawn);
queuePacket(currentDirector.getInitPackets(actorId));
//queuePacket(currentDirector.getSetEventStatusPackets(actorId));
}
playerSession.queuePacket(worldMasterSpawn); playerSession.queuePacket(worldMasterSpawn);
if (zone.isInn)
{
SetCutsceneBookPacket cutsceneBookPacket = new SetCutsceneBookPacket();
for (int i = 64; i < 1200; i++)
cutsceneBookPacket.cutsceneFlags[i] = true;
SubPacket packet = cutsceneBookPacket.buildPacket(actorId, "Test PathCompanion", 11, 1, 1);
packet.debugPrintSubPacket();
queuePacket(packet);
}
#region hardcode #region hardcode
BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door created BasePacket reply10 = new BasePacket("./packets/login/login10.bin"); //Item Storage, Inn Door created
BasePacket reply11 = new BasePacket("./packets/login/login11.bin"); //NPC Create ??? Final init BasePacket reply11 = new BasePacket("./packets/login/login11.bin"); //NPC Create ??? Final init
reply10.replaceActorID(actorId); reply10.replaceActorID(actorId);
reply11.replaceActorID(actorId); reply11.replaceActorID(actorId);
playerSession.queuePacket(reply10); //playerSession.queuePacket(reply10);
playerSession.queuePacket(reply11); // playerSession.queuePacket(reply11);
#endregion #endregion
} }
private void sendRemoveInventoryPackets(List<ushort> slots) private void sendRemoveInventoryPackets(List<ushort> slots)
@ -555,32 +588,6 @@ namespace FFXIVClassic_Map_Server.Actors
} }
/*
private void sendEquipmentPackets(List<int> indexes)
{
int currentIndex = 0;
InventorySetBeginPacket.buildPacket(actorId, MAXSIZE_INVENTORY_EQUIPMENT, InventorySetBeginPacket.CODE_EQUIPMENT);
while (true)
{
if (indexes.Count - currentIndex >= 64)
queuePacket(EquipmentListX64Packet.buildPacket(actorId, indexes, ref currentIndex));
else if (indexes.Count - currentIndex >= 32)
queuePacket(EquipmentListX32Packet.buildPacket(actorId, indexes, ref currentIndex));
else if (indexes.Count - currentIndex >= 16)
queuePacket(EquipmentListX16Packet.buildPacket(actorId, indexes, ref currentIndex));
else if (indexes.Count - currentIndex >= 8)
queuePacket(EquipmentListX08Packet.buildPacket(actorId, indexes, ref currentIndex));
else if (indexes.Count - currentIndex == 1)
queuePacket(EquipmentListX01Packet.buildPacket(actorId, indexes[currentIndex]));
else
break;
}
InventorySetEndPacket.buildPacket(actorId);
}
*/
public bool isMyPlayer(uint otherActorId) public bool isMyPlayer(uint otherActorId)
{ {
return actorId == otherActorId; return actorId == otherActorId;
@ -945,11 +952,63 @@ namespace FFXIVClassic_Map_Server.Actors
return null; return null;
} }
public void setZoneChanging(bool flag)
{
isZoneChanging = flag;
}
public bool isInZoneChange()
{
return isZoneChanging;
}
public Equipment getEquipment() public Equipment getEquipment()
{ {
return equipment; return equipment;
} }
public Quest getQuest(uint id)
{
for (int i = 0; i < questScenario.Length; i++)
{
if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id))
return questScenario[i];
}
return null;
}
public bool hasQuest(uint id)
{
for (int i = 0; i < questScenario.Length; i++)
{
if (questScenario[i] != null && questScenario[i].actorId == (0xA0F00000 | id))
return true;
}
return false;
}
public void setDirector(string directorType)
{
if (directorType.Equals("openingDirector"))
{
currentDirector = new OpeningDirector(0x46080012);
}
queuePacket(RemoveActorPacket.buildPacket(actorId, 0x46080012));
queuePacket(currentDirector.getSpawnPackets(actorId));
queuePacket(currentDirector.getInitPackets(actorId));
// queuePacket(currentDirector.getSetEventStatusPackets(actorId));
// currentDirector.getSpawnPackets(actorId).debugPrintPacket();
// currentDirector.getInitPackets(actorId).debugPrintPacket();
}
public Director getDirector()
{
return currentDirector;
}
public void examinePlayer(Actor examinee) public void examinePlayer(Actor examinee)
{ {
Player toBeExamined; Player toBeExamined;
@ -971,6 +1030,22 @@ namespace FFXIVClassic_Map_Server.Actors
queuePacket(spacket); queuePacket(spacket);
} }
public void kickEvent(Actor actor, string conditionName, params object[] parameters)
{
if (actor == null)
return;
List<LuaParam> lParams = LuaUtils.createLuaParamList(parameters);
SubPacket spacket = KickEventPacket.buildPacket(actorId, actor.actorId, conditionName, lParams);
spacket.debugPrintSubPacket();
queuePacket(spacket);
}
public void setEventStatus(Actor actor, string conditionName, bool enabled, byte unknown)
{
queuePacket(SetEventStatus.buildPacket(actorId, actor.actorId, enabled, unknown, conditionName));
}
public void runEventFunction(string functionName, params object[] parameters) public void runEventFunction(string functionName, params object[] parameters)
{ {
List<LuaParam> lParams = LuaUtils.createLuaParamList(parameters); List<LuaParam> lParams = LuaUtils.createLuaParamList(parameters);
@ -982,6 +1057,7 @@ namespace FFXIVClassic_Map_Server.Actors
public void endEvent() public void endEvent()
{ {
SubPacket p = EndEventPacket.buildPacket(actorId, eventCurrentOwner, eventCurrentStarter); SubPacket p = EndEventPacket.buildPacket(actorId, eventCurrentOwner, eventCurrentStarter);
p.debugPrintSubPacket();
queuePacket(p); queuePacket(p);
eventCurrentOwner = 0; eventCurrentOwner = 0;

View file

@ -0,0 +1,41 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.Actors;
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 Director : Actor
{
public Director(uint id) : base(id)
{
}
public virtual BasePacket getSpawnPackets(uint playerActorId, uint spawnType)
{
List<SubPacket> subpackets = new List<SubPacket>();
subpackets.Add(createAddActorPacket(playerActorId, 0));
subpackets.AddRange(getEventConditionPackets(playerActorId));
subpackets.Add(createSpeedPacket(playerActorId));
subpackets.Add(createSpawnPositonPacket(playerActorId, 0));
subpackets.Add(createNamePacket(playerActorId));
subpackets.Add(createStatePacket(playerActorId));
subpackets.Add(createIsZoneingPacket(playerActorId));
subpackets.Add(createScriptBindPacket(playerActorId));
return BasePacket.createPacket(subpackets, true, false);
}
public override BasePacket getInitPackets(uint playerActorId)
{
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
initProperties.addTarget();
return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false);
}
}
}

View file

@ -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 OpeningDirector : Director
{
public OpeningDirector(uint id) : base(id)
{
this.displayNameId = 0;
this.customDisplayName = "openingDire";
this.actorName = "openingDire";
this.className = "OpeningDirector";
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/OpeningDirector", false, false, false, false, 0x13881);
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
}
}
}

View file

@ -1,4 +1,5 @@
using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.lua; using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor; using FFXIVClassic_Map_Server.packets.send.actor;
@ -10,12 +11,12 @@ using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.Actors namespace FFXIVClassic_Map_Server.Actors
{ {
class WeatherDirector : Actor class WeatherDirector : Director
{ {
private uint weatherId; private uint weatherId;
public WeatherDirector(uint weatherId) public WeatherDirector(uint weatherId)
: base(0x5FF80002) : base(0x5FF80003)
{ {
this.weatherId = weatherId; this.weatherId = weatherId;

View file

@ -17,6 +17,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
Player playerActor; Player playerActor;
public List<Actor> actorInstanceList = new List<Actor>(); public List<Actor> actorInstanceList = new List<Actor>();
public uint languageCode = 1;
private ClientConnection zoneConnection; private ClientConnection zoneConnection;
private ClientConnection chatConnection; private ClientConnection chatConnection;
@ -95,7 +97,6 @@ namespace FFXIVClassic_Map_Server.dataobjects
public void updatePlayerActorPosition(float x, float y, float z, float rot, ushort moveState) public void updatePlayerActorPosition(float x, float y, float z, float rot, ushort moveState)
{ {
playerActor.oldPositionX = playerActor.positionX; playerActor.oldPositionX = playerActor.positionX;
playerActor.oldPositionY = playerActor.positionY; playerActor.oldPositionY = playerActor.positionY;
playerActor.oldPositionZ = playerActor.positionZ; playerActor.oldPositionZ = playerActor.positionZ;

View file

@ -1,5 +1,6 @@
using FFXIVClassic_Lobby_Server; using FFXIVClassic_Lobby_Server;
using FFXIVClassic_Lobby_Server.packets; using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.actors.director;
using FFXIVClassic_Map_Server.Actors; using FFXIVClassic_Map_Server.Actors;
using FFXIVClassic_Map_Server.dataobjects; using FFXIVClassic_Map_Server.dataobjects;
using FFXIVClassic_Map_Server.packets.receive.events; using FFXIVClassic_Map_Server.packets.receive.events;
@ -22,6 +23,7 @@ namespace FFXIVClassic_Map_Server.lua
const string FILEPATH_PLAYER = "./scripts/player.lua"; const string FILEPATH_PLAYER = "./scripts/player.lua";
const string FILEPATH_ZONE = "./scripts/zones/{0}/zone.lua"; const string FILEPATH_ZONE = "./scripts/zones/{0}/zone.lua";
const string FILEPATH_COMMANDS = "./scripts/commands/{0}.lua"; const string FILEPATH_COMMANDS = "./scripts/commands/{0}.lua";
const string FILEPATH_DIRECTORS = "./scripts/directors/{0}.lua";
const string FILEPATH_NPCS = "./scripts/zones/{0}/npcs/{1}.lua"; const string FILEPATH_NPCS = "./scripts/zones/{0}/npcs/{1}.lua";
public LuaEngine() public LuaEngine()
@ -69,6 +71,10 @@ namespace FFXIVClassic_Map_Server.lua
{ {
luaPath = String.Format(FILEPATH_COMMANDS, target.getName()); luaPath = String.Format(FILEPATH_COMMANDS, target.getName());
} }
else if (target is Director)
{
luaPath = String.Format(FILEPATH_DIRECTORS, target.getName());
}
else else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName());
@ -87,6 +93,8 @@ namespace FFXIVClassic_Map_Server.lua
objects.Add(player); objects.Add(player);
objects.Add(target); objects.Add(target);
objects.Add(eventStart.triggerName); objects.Add(eventStart.triggerName);
if (eventStart.luaParams != null)
objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams)); objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams));
//Run Script //Run Script
@ -108,6 +116,8 @@ namespace FFXIVClassic_Map_Server.lua
if (target is Command) if (target is Command)
luaPath = String.Format(FILEPATH_COMMANDS, target.getName()); luaPath = String.Format(FILEPATH_COMMANDS, target.getName());
else if (target is Director)
luaPath = String.Format(FILEPATH_DIRECTORS, target.getName());
else else
luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName()); luaPath = String.Format(FILEPATH_NPCS, target.zoneId, target.getName());

View file

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.receive
{
class LangaugeCodePacket
{
public bool invalidPacket = false;
public uint languageCode;
public LangaugeCodePacket(byte[] data)
{
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryReader binReader = new BinaryReader(mem))
{
try{
binReader.ReadUInt32();
languageCode = binReader.ReadUInt32();
}
catch (Exception){
invalidPacket = true;
}
}
}
}
}
}

View file

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.receive
{
class _0x02ReceivePacket
{
bool invalidPacket = false;
uint unknown;
public _0x02ReceivePacket(byte[] data)
{
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryReader binReader = new BinaryReader(mem))
{
try
{
binReader.BaseStream.Seek(0x14, SeekOrigin.Begin);
unknown = binReader.ReadUInt32();
}
catch (Exception)
{
invalidPacket = true;
}
}
}
}
}
}

View file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.receive
{
class _0x07Packet
{
public bool invalidPacket = false;
public uint timestamp;
public uint unknown;
public _0x07Packet(byte[] data)
{
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryReader binReader = new BinaryReader(mem))
{
try{
timestamp = binReader.ReadUInt32();
unknown = binReader.ReadUInt32();
}
catch (Exception){
invalidPacket = true;
}
}
}
}
}
}

View file

@ -22,8 +22,8 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
{ {
using (BinaryWriter binWriter = new BinaryWriter(mem)) using (BinaryWriter binWriter = new BinaryWriter(mem))
{ {
int value1 = 0x02; //Instance ID? int value1 = 0x00; //Instance ID?
int value2 = 0x2bc0; int value2 = 0x3040;
binWriter.Write((Int16)value1); binWriter.Write((Int16)value1);
binWriter.Write((Int16)value2); binWriter.Write((Int16)value2);
binWriter.Write(Encoding.ASCII.GetBytes(objectName), 0, Encoding.ASCII.GetByteCount(objectName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(objectName)); binWriter.Write(Encoding.ASCII.GetBytes(objectName), 0, Encoding.ASCII.GetByteCount(objectName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(objectName));

View file

@ -23,7 +23,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor
{ {
binWriter.Write((UInt32)displayNameID); binWriter.Write((UInt32)displayNameID);
if (displayNameID == 0 || displayNameID == 0xFFFFFFFF) if (customName != null && (displayNameID == 0 || displayNameID == 0xFFFFFFFF))
{ {
binWriter.Write(Encoding.ASCII.GetBytes(customName), 0, Encoding.ASCII.GetByteCount(customName) >= 0x20 ? 0x19 : Encoding.ASCII.GetByteCount(customName)); binWriter.Write(Encoding.ASCII.GetBytes(customName), 0, Encoding.ASCII.GetByteCount(customName) >= 0x20 ? 0x19 : Encoding.ASCII.GetByteCount(customName));
} }

View file

@ -13,7 +13,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
public const ushort OPCODE = 0x0136; public const ushort OPCODE = 0x0136;
public const uint PACKET_SIZE = 0x48; public const uint PACKET_SIZE = 0x48;
public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, uint unknown1, byte unknown2, string conditionName) public static SubPacket buildPacket(uint playerActorID, uint sourceActorID, bool enabled, byte unknown2, string conditionName)
{ {
byte[] data = new byte[PACKET_SIZE - 0x20]; byte[] data = new byte[PACKET_SIZE - 0x20];
@ -21,7 +21,7 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
{ {
using (BinaryWriter binWriter = new BinaryWriter(mem)) using (BinaryWriter binWriter = new BinaryWriter(mem))
{ {
binWriter.Write((UInt32)unknown1); binWriter.Write((UInt32)(enabled ? 1 : 0));
binWriter.Write((Byte)unknown2); binWriter.Write((Byte)unknown2);
binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(conditionName)); binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(conditionName));
} }

View file

@ -0,0 +1,32 @@
using FFXIVClassic_Lobby_Server.packets;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.send
{
class _0x02Packet
{
public const ushort OPCODE = 0x0002;
public const uint PACKET_SIZE = 0x30;
public static SubPacket buildPacket(uint playerActorId, int val)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Seek(8, SeekOrigin.Begin);
binWriter.Write((UInt32)playerActorId);
}
}
return new SubPacket(OPCODE, playerActorId, playerActorId, data);
}
}
}

View file

@ -0,0 +1,44 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.lua;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.packets.send.events
{
class KickEventPacket
{
public const ushort OPCODE = 0x012F;
public const uint PACKET_SIZE = 0x90;
public static SubPacket buildPacket(uint playerActorId, uint targetActorId, string conditionName, List<LuaParam> luaParams)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)playerActorId);
binWriter.Write((UInt32)targetActorId);
binWriter.Write((Byte)0x5);
binWriter.Write((Byte)0x87);
binWriter.Write((Byte)0xDC);
binWriter.Write((Byte)0x75);
binWriter.Write((UInt32)0x30400000);
binWriter.Write(Encoding.ASCII.GetBytes(conditionName), 0, Encoding.ASCII.GetByteCount(conditionName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(conditionName));
binWriter.Seek(0x30, SeekOrigin.Begin);
LuaUtils.writeLuaParams(binWriter, luaParams);
}
}
return new SubPacket(OPCODE, playerActorId, playerActorId, data);
}
}
}

View file

@ -26,7 +26,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
{ {
binWriter.Write((UInt32)playerActorID); binWriter.Write((UInt32)playerActorID);
binWriter.Write((UInt32)eventOwnerActorID); binWriter.Write((UInt32)eventOwnerActorID);
binWriter.Write((Byte)1); binWriter.Write((Byte)5);
binWriter.Write(Encoding.ASCII.GetBytes(eventStarter), 0, Encoding.ASCII.GetByteCount(eventStarter) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(eventStarter)); binWriter.Write(Encoding.ASCII.GetBytes(eventStarter), 0, Encoding.ASCII.GetByteCount(eventStarter) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(eventStarter));
binWriter.Seek(0x29, SeekOrigin.Begin); binWriter.Seek(0x29, SeekOrigin.Begin);
binWriter.Write(Encoding.ASCII.GetBytes(callFunction), 0, Encoding.ASCII.GetByteCount(callFunction) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(callFunction)); binWriter.Write(Encoding.ASCII.GetBytes(callFunction), 0, Encoding.ASCII.GetByteCount(callFunction) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(callFunction));

View file

@ -64,7 +64,7 @@ namespace FFXIVClassic_Map_Server.packets.send.player
public bool[] cutsceneFlags = new bool[2432]; public bool[] cutsceneFlags = new bool[2432];
public SubPacket buildPacket(uint playerActorID) public SubPacket buildPacket(uint playerActorID, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality)
{ {
byte[] data = new byte[PACKET_SIZE - 0x20]; byte[] data = new byte[PACKET_SIZE - 0x20];
@ -77,6 +77,17 @@ namespace FFXIVClassic_Map_Server.packets.send.player
binWriter.Write(binStream); binWriter.Write(binStream);
else else
Log.error("Failed making SetCutsceneBook packet. Bin Stream was too big!"); Log.error("Failed making SetCutsceneBook packet. Bin Stream was too big!");
//Temp Path Companion SNPC Stuff
binWriter.Seek(0x01 ,SeekOrigin.Begin);
binWriter.Write((Int16)2);
binWriter.Write((Byte)0);
binWriter.Write((Int16)sNpcActorIdOffset);
binWriter.Write((Byte)sNpcSkin);
binWriter.Write((Byte)sNpcPersonality);
binWriter.Seek(0x109, SeekOrigin.Begin);
binWriter.Write(Encoding.ASCII.GetBytes(sNpcName), 0, Encoding.ASCII.GetByteCount(sNpcName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sNpcName));
} }
} }