mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Merge branch 'develop'
# Conflicts: # FFXIVClassic Map Server/packets/send/Actor/events/SetEmoteEventCondition.cs
This commit is contained in:
commit
8da3a6ff9c
@ -76,6 +76,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
|
||||
public void disconnect()
|
||||
{
|
||||
socket.Shutdown(SocketShutdown.Both);
|
||||
socket.Disconnect(false);
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ namespace FFXIVClassic_Lobby_Server
|
||||
#region Socket Handling
|
||||
public bool startServer()
|
||||
{
|
||||
cleanupThread = new Thread(new ThreadStart(socketCleanup));
|
||||
cleanupThread.Name = "LobbyThread:Cleanup";
|
||||
cleanupThread.Start();
|
||||
//cleanupThread = new Thread(new ThreadStart(socketCleanup));
|
||||
//cleanupThread.Name = "LobbyThread:Cleanup";
|
||||
//cleanupThread.Start();
|
||||
|
||||
IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), FFXIV_LOBBY_PORT);
|
||||
|
||||
@ -147,7 +147,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
|
||||
bytesRead += conn.lastPartialSize;
|
||||
|
||||
if (bytesRead >= 0)
|
||||
if (bytesRead > 0)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
@ -187,6 +187,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
|
||||
lock (mConnectionList)
|
||||
{
|
||||
conn.disconnect();
|
||||
mConnectionList.Remove(conn);
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
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);
|
||||
mServer.GetWorldManager().DoLogin(player.getActor());
|
||||
Server.GetWorldManager().DoLogin(player.getActor());
|
||||
|
||||
|
||||
break;
|
||||
@ -239,23 +239,23 @@ namespace FFXIVClassic_Lobby_Server
|
||||
}
|
||||
*/
|
||||
player.getActor().eventCurrentOwner = eventStart.scriptOwnerActorID;
|
||||
player.getActor().eventCurrentStarter = eventStart.eventStarter;
|
||||
player.getActor().eventCurrentStarter = eventStart.triggerName;
|
||||
|
||||
//Is it a static actor? If not look in the player's instance
|
||||
Actor ownerActor = Server.getStaticActors(player.getActor().eventCurrentOwner);
|
||||
if (ownerActor == null)
|
||||
{
|
||||
ownerActor = mServer.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
|
||||
ownerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
|
||||
if (ownerActor == null)
|
||||
{
|
||||
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.eventStarter, 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;
|
||||
}
|
||||
}
|
||||
|
||||
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.eventStarter, 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;
|
||||
//Event Result
|
||||
case 0x012E:
|
||||
@ -267,7 +267,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
Actor updateOwnerActor = Server.getStaticActors(player.getActor().eventCurrentOwner);
|
||||
if (updateOwnerActor == null)
|
||||
{
|
||||
updateOwnerActor = mServer.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
|
||||
updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
|
||||
if (updateOwnerActor == null)
|
||||
break;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
private List<ClientConnection> mConnectionList = new List<ClientConnection>();
|
||||
private LuaEngine mLuaEngine = new LuaEngine();
|
||||
|
||||
private WorldManager mWorldManager;
|
||||
private static WorldManager mWorldManager;
|
||||
private static Dictionary<uint, Item> gamedataItems;
|
||||
private static StaticActors mStaticActors;
|
||||
|
||||
@ -450,7 +450,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||
}
|
||||
}
|
||||
|
||||
public WorldManager GetWorldManager()
|
||||
public static WorldManager GetWorldManager()
|
||||
{
|
||||
return mWorldManager;
|
||||
}
|
||||
|
@ -403,6 +403,46 @@ namespace FFXIVClassic_Map_Server
|
||||
LuaEngine.onZoneIn(player);
|
||||
}
|
||||
|
||||
//Moves actor within zone to spawn position
|
||||
public void DoPlayerMoveInZone(Player player, uint zoneEntrance)
|
||||
{
|
||||
if (!zoneEntranceList.ContainsKey(zoneEntrance))
|
||||
{
|
||||
Log.error("Given zone entrance was not found: " + zoneEntrance);
|
||||
return;
|
||||
}
|
||||
|
||||
ZoneEntrance ze = zoneEntranceList[zoneEntrance];
|
||||
|
||||
if (ze.zoneId != player.zoneId)
|
||||
return;
|
||||
|
||||
DoPlayerMoveInZone(player, ze.spawnType, ze.spawnX, ze.spawnY, ze.spawnZ, ze.spawnRotation);
|
||||
}
|
||||
|
||||
//Moves actor within the zone
|
||||
public void DoPlayerMoveInZone(Player player, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
{
|
||||
//Remove player from currentZone if transfer else it's login
|
||||
if (player.zone != null)
|
||||
{
|
||||
player.zone.removeActorFromZone(player);
|
||||
player.zone.addActorToZone(player);
|
||||
|
||||
//Update player actor's properties;
|
||||
player.positionX = spawnX;
|
||||
player.positionY = spawnY;
|
||||
player.positionZ = spawnZ;
|
||||
player.rotation = spawnRotation;
|
||||
|
||||
//Send packets
|
||||
player.playerSession.queuePacket(_0xE2Packet.buildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.queuePacket(player.createSpawnTeleportPacket(player.actorId, 0x0f), true, false);
|
||||
player.sendInstanceUpdate();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Login Zone In
|
||||
public void DoLogin(Player player)
|
||||
{
|
||||
|
@ -93,6 +93,22 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
//return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
|
||||
spawnedFirstTime = true;
|
||||
|
||||
spawnPacket.debugPrintSubPacket();
|
||||
|
||||
return spawnPacket;
|
||||
}
|
||||
|
||||
public SubPacket createSpawnTeleportPacket(uint playerActorId, uint spawnType)
|
||||
{
|
||||
SubPacket spawnPacket;
|
||||
|
||||
spawnPacket = SetActorPositionPacket.buildPacket(actorId, playerActorId, 0xFFFFFFFF, positionX, positionY, positionZ, rotation, spawnType, false);
|
||||
|
||||
//return SetActorPositionPacket.buildPacket(actorId, playerActorId, -211.895477f, 190.000000f, 29.651011f, 2.674819f, SetActorPositionPacket.SPAWNTYPE_PLAYERWAKE);
|
||||
|
||||
spawnPacket.debugPrintSubPacket();
|
||||
|
||||
return spawnPacket;
|
||||
}
|
||||
|
||||
@ -176,7 +192,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
if (eventConditions.emoteEventConditions != null)
|
||||
{
|
||||
foreach (EventList.EmoteEventCondition condition in eventConditions.emoteEventConditions)
|
||||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 1, condition.conditionName));
|
||||
subpackets.Add(SetEventStatus.buildPacket(playerActorId, actorId, 1, 3, condition.conditionName));
|
||||
}
|
||||
|
||||
if (eventConditions.pushWithCircleEventConditions != null)
|
||||
|
@ -18,7 +18,7 @@ namespace FFXIVClassic_Map_Server.actors
|
||||
public class TalkEventCondition
|
||||
{
|
||||
public byte unknown1;
|
||||
public byte unknown2;
|
||||
public bool isDisabled = false;
|
||||
public string conditionName;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
|
||||
Player player = Server.getServer().GetWorldManager().GetPCInWorld(playerActorId);
|
||||
Player player = Server.GetWorldManager().GetPCInWorld(playerActorId);
|
||||
lParams = LuaEngine.doActorOnInstantiate(player, this);
|
||||
|
||||
if (lParams == null)
|
||||
|
@ -118,6 +118,10 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
private int lastPosition = 0;
|
||||
private int lastStep = 0;
|
||||
|
||||
//Quest Actors (MUST MATCH playerWork.questScenario/questGuildleve)
|
||||
public Quest[] questScenario = new Quest[16];
|
||||
public Quest[] questGuildleve = new Quest[8];
|
||||
|
||||
public PlayerWork playerWork = new PlayerWork();
|
||||
|
||||
public ConnectedPlayer playerSession;
|
||||
@ -704,34 +708,34 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
if (msgParams.Length == 0)
|
||||
{
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log));
|
||||
}
|
||||
else
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
}
|
||||
|
||||
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams)
|
||||
{
|
||||
if (msgParams.Length == 0)
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log));
|
||||
else
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
}
|
||||
|
||||
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams)
|
||||
{
|
||||
if (msgParams.Length == 0)
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log));
|
||||
else
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
}
|
||||
|
||||
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams)
|
||||
{
|
||||
if (msgParams.Length == 0)
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log));
|
||||
else
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.getServer().GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.createLuaParamList(msgParams)));
|
||||
}
|
||||
|
||||
public void broadcastWorldMessage(ushort worldMasterId, params object[] msgParams)
|
||||
|
@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
class Quest : Actor
|
||||
{
|
||||
private int currentPhase = 0;
|
||||
private uint questFlags = 0;
|
||||
private Dictionary<string, Object> questData = new Dictionary<string, object>();
|
||||
|
||||
public Quest(uint actorID, string name)
|
||||
: base(actorID)
|
||||
@ -15,5 +16,70 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
actorName = name;
|
||||
}
|
||||
|
||||
public void InitQuestData(string dataName, object initialValue)
|
||||
{
|
||||
questData[dataName] = initialValue;
|
||||
}
|
||||
|
||||
public void UpdateQuestData(string dataName, object data)
|
||||
{
|
||||
if (questData.ContainsKey(dataName))
|
||||
questData[dataName] = data;
|
||||
|
||||
//Inform update
|
||||
}
|
||||
|
||||
public object GetQuestData(string dataName)
|
||||
{
|
||||
if (questData.ContainsKey(dataName))
|
||||
return questData[dataName];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public uint GetQuestId()
|
||||
{
|
||||
return actorId;
|
||||
}
|
||||
|
||||
public void SetQuestFlag(int bitIndex, bool value)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Log.error(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId));
|
||||
return;
|
||||
}
|
||||
|
||||
int mask = 1 << bitIndex;
|
||||
|
||||
if (value)
|
||||
questFlags |= (uint)(1 << bitIndex);
|
||||
else
|
||||
questFlags &= (uint)~(1 << bitIndex);
|
||||
|
||||
//Inform update
|
||||
}
|
||||
|
||||
public bool GetQuestFlag(int bitIndex)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Log.error(String.Format("Tried to access bit flag >= 32 for questId: {0}", actorId));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return (questFlags & (1 << bitIndex)) == 1;
|
||||
}
|
||||
|
||||
public int GetPhase()
|
||||
{
|
||||
return currentPhase;
|
||||
}
|
||||
|
||||
public void NextPhase()
|
||||
{
|
||||
currentPhase++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
Script script = new Script();
|
||||
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
|
||||
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getServer().GetWorldManager().GetActor;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
|
||||
script.DoFile(luaPath);
|
||||
DynValue result = script.Call(script.Globals["onInstantiate"], target);
|
||||
@ -76,8 +76,9 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
{
|
||||
Script script = new Script();
|
||||
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
|
||||
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
|
||||
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getServer().GetWorldManager().GetActor;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
|
||||
script.DoFile(luaPath);
|
||||
|
||||
@ -85,6 +86,7 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
List<Object> objects = new List<Object>();
|
||||
objects.Add(player);
|
||||
objects.Add(target);
|
||||
objects.Add(eventStart.triggerName);
|
||||
objects.AddRange(LuaUtils.createLuaParamObjectList(eventStart.luaParams));
|
||||
|
||||
//Run Script
|
||||
@ -113,8 +115,9 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
{
|
||||
Script script = new Script();
|
||||
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
|
||||
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
|
||||
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getServer().GetWorldManager().GetActor;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
|
||||
script.DoFile(luaPath);
|
||||
|
||||
@ -145,8 +148,9 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
{
|
||||
Script script = new Script();
|
||||
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
|
||||
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
|
||||
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getServer().GetWorldManager().GetActor;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
|
||||
script.DoFile(luaPath);
|
||||
|
||||
@ -161,8 +165,9 @@ namespace FFXIVClassic_Map_Server.lua
|
||||
{
|
||||
Script script = new Script();
|
||||
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
|
||||
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
|
||||
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getServer().GetWorldManager().GetActor;
|
||||
script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
|
||||
script.DoFile(FILEPATH_PLAYER);
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events
|
||||
public uint errorNum;
|
||||
public string error = null;
|
||||
|
||||
public string eventStarter;
|
||||
public string triggerName;
|
||||
|
||||
public List<LuaParam> luaParams;
|
||||
|
||||
@ -62,7 +62,7 @@ namespace FFXIVClassic_Map_Server.packets.receive.events
|
||||
{
|
||||
strList.Add(curByte);
|
||||
}
|
||||
eventStarter = Encoding.ASCII.GetString(strList.ToArray());
|
||||
triggerName = Encoding.ASCII.GetString(strList.ToArray());
|
||||
|
||||
binReader.BaseStream.Seek(0x31, SeekOrigin.Begin);
|
||||
|
||||
|
@ -22,9 +22,8 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((Byte)condition.unknown1);
|
||||
binWriter.Write((Byte)condition.unknown2);
|
||||
binWriter.Write((UInt16)condition.emoteId);
|
||||
binWriter.Write((Byte)condition.unknown1); //4
|
||||
binWriter.Write((UInt16)condition.emoteId); //82, 76, 6E
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(condition.conditionName));
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,9 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.events
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
condition.unknown1 = 4;
|
||||
binWriter.Write((Byte)condition.unknown1);
|
||||
binWriter.Write((Byte)condition.unknown2);
|
||||
binWriter.Write((Byte)(condition.isDisabled ? 0x1 : 0x0));
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(condition.conditionName), 0, Encoding.ASCII.GetByteCount(condition.conditionName) >= 0x24 ? 0x24 : Encoding.ASCII.GetByteCount(condition.conditionName));
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Switches between active and passive mode states
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor)
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
if (player:getState() == 0) then
|
||||
player:changeState(2);
|
||||
|
@ -8,7 +8,7 @@ Finds the correct weaponskill subscript to fire when a weaponskill actor is acti
|
||||
|
||||
|
||||
|
||||
function onEventStarted(player, actor)
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
|
||||
worldMaster = getWorldMaster();
|
||||
|
||||
|
@ -8,7 +8,7 @@ operateUI(pointsAvailable, pointsLimit, str, vit, dex, int, min, pie)
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor)
|
||||
function onEventStarted(player, actor, triggerName)
|
||||
--local points = player:getAttributePoints();
|
||||
--player:runEventFunction("delegateCommand", actor, "operateUI", points.available, points.limit, points.inSTR, points.inVIT, points.inDEX, points.inINT, points.inMIN, points.inPIT);
|
||||
player:runEventFunction("delegateCommand", actor, "operateUI", 10, 10, 10, 10, 10, 10, 10, 10);
|
||||
|
@ -6,7 +6,7 @@ Handles player examining someone
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, commandactor, arg1, arg2, arg3, arg4, checkedActorId)
|
||||
function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId)
|
||||
|
||||
actor = player:getActorInInstance(checkedActorId);
|
||||
|
||||
|
@ -6,7 +6,7 @@ Handles mounting and dismounting the Chocobo and Goobbue
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, isGoobbue)
|
||||
function onEventStarted(player, actor, triggerName, isGoobbue)
|
||||
|
||||
if (player:getState() == 0) then
|
||||
|
||||
|
@ -4,7 +4,7 @@ DiceCommand Script
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, maxNumber)
|
||||
function onEventStarted(player, actor, triggerName, maxNumber)
|
||||
|
||||
if (maxNumber == nil) then
|
||||
maxNumber = 999;
|
||||
|
@ -4,7 +4,7 @@ EmoteSitCommand Script
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, emoteId)
|
||||
function onEventStarted(player, actor, triggerName, emoteId)
|
||||
|
||||
if (player:getState() == 0) then
|
||||
if (emoteId == 0x2712) then
|
||||
|
@ -9,7 +9,7 @@ emoteTable = {
|
||||
};
|
||||
|
||||
|
||||
function onEventStarted(player, actor, emoteId)
|
||||
function onEventStarted(player, actor, triggerName, emoteId)
|
||||
|
||||
if (player:getState() == 0) then
|
||||
player:doEmote(emoteId);
|
||||
|
@ -53,7 +53,7 @@ GRAPHICSLOT_L_RINGFINGER = 24;
|
||||
GRAPHICSLOT_R_INDEXFINGER = 25;
|
||||
GRAPHICSLOT_L_INDEXFINGER = 26;
|
||||
|
||||
function onEventStarted(player, actor, invActionInfo, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds)
|
||||
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, equipSlot, itemDBIds)
|
||||
equipSlot = equipSlot-1;
|
||||
|
||||
--Equip Item
|
||||
|
@ -9,7 +9,7 @@ The param "itemDBIds" has the vars: item1 and item2.
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
|
||||
function onEventStarted(player, actor, triggerName, invActionInfo, param1, param2, param3, param4, param5, param6, param7, param8, itemDBIds)
|
||||
player:getInventory(0x00):removeItem(invActionInfo.slot);
|
||||
player:endEvent();
|
||||
end
|
||||
|
@ -20,7 +20,7 @@ function onEventStarted(player, command)
|
||||
player:runEventFunction("delegateCommand", command, "eventConfirm");
|
||||
end
|
||||
|
||||
function onEventUpdate(player, command, step, arg1, arg2)
|
||||
function onEventUpdate(player, command, triggerName, step, arg1, arg2)
|
||||
|
||||
currentMenuId = player:getCurrentMenuId();
|
||||
|
||||
|
@ -8,6 +8,6 @@ function onEventStarted(player, actor, questId)
|
||||
-- player:sendRequestedInfo("requestedData", "glHist", 10, 0x1D4F2, 1009, 12464, 11727, 12485, 12526);
|
||||
end
|
||||
|
||||
function onEventUpdate(player, actor, step, arg1)
|
||||
function onEventUpdate(player, actor, triggerName, step, arg1)
|
||||
|
||||
end
|
@ -7,6 +7,6 @@ function onEventStarted(player, actor, questId)
|
||||
player:sendRequestedInfo("requestedData", "qtdata", 0x1D4F2);
|
||||
end
|
||||
|
||||
function onEventUpdate(player, actor, step, arg1)
|
||||
function onEventUpdate(player, actor, triggerName, step, arg1)
|
||||
|
||||
end
|
@ -16,7 +16,7 @@ Confirm Menu: 2
|
||||
|
||||
--]]
|
||||
|
||||
function onEventStarted(player, actor, isTeleport)
|
||||
function onEventStarted(player, actor, triggerName, isTeleport)
|
||||
if (isTeleport == 0) then
|
||||
player:setCurrentMenuId(0);
|
||||
player:runEventFunction("delegateCommand", actor, "eventRegion", 100);
|
||||
|
@ -24,7 +24,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Object/Aetheryte/AetheryteParent", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
player:runEventFunction("eventAetheryteParentSelect", 0x0, false, 0x61, 0x0,0,0,0,0);
|
||||
end
|
||||
|
||||
|
13
scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua
Normal file
13
scripts/zones/166/npcs/openingStop_fstBtl03_03@0A600.lua
Normal file
@ -0,0 +1,13 @@
|
||||
function onInstantiate(npc)
|
||||
return "/Chara/Npc/Object/OpeningStoperF0B1", false, false, false, false, false, 0x10A350, false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
if (triggerName == "caution") then
|
||||
worldMaster = getWorldMaster();
|
||||
player:sendGameMessage(player, worldMaster, 34109, 0x20);
|
||||
elseif (triggerName == "exit") then
|
||||
getWorldManager():DoPlayerMoveInZone(player, 5);
|
||||
end
|
||||
player:endEvent();
|
||||
end
|
10
scripts/zones/166/zone.lua
Normal file
10
scripts/zones/166/zone.lua
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
function onZoneInit(zone)
|
||||
end
|
||||
|
||||
function onZoneIn(zone, player)
|
||||
end
|
||||
|
||||
function onZoneOut(zone, player)
|
||||
end
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Populace/PopulaceTutorial", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
man0l0Quest = getStaticActor("Man0l0");
|
||||
player:runEventFunction("delegateEvent", player, man0l0Quest, "processTtrNomal003", nil, nil, nil);
|
||||
--player:runEventFunction("delegateEvent", player, defaultSea, "defaultTalkWithFrithuric_002", nil, nil, nil); --LTW
|
||||
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Object/ObjectBed", false, false, false, false, false, 0x1250FB, false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
player:runEventFunction("askLogout", player);
|
||||
end
|
||||
|
||||
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Object/ObjectInnDoor", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Object/ObjectItemStorage", false, false, false, false, false, 0x1250F8, false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Populace/PopulaceCutScenePlayer", false, false, false, false, false, 0x107B38, false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
|
@ -2,7 +2,7 @@ function onInstantiate(npc)
|
||||
return "/Chara/Npc/Populace/PopulaceStandard", false, false, false, false, false, npc.getActorClassId(), false, false, 0, 1, "TEST";
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc)
|
||||
|
Loading…
Reference in New Issue
Block a user