diff --git a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj index 2bd335eb..6afd806e 100644 --- a/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj +++ b/FFXIVClassic Map Server/FFXIVClassic Map Server.csproj @@ -200,7 +200,7 @@ - + diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 00db9417..e4d57460 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1138,10 +1138,10 @@ namespace FFXIVClassic_Map_Server.Actors QueuePacket(InventoryEndChangePacket.BuildPacket(toBeExamined.actorId, actorId)); } - public void SendRequestedInfo(params object[] parameters) + public void SendDataPacket(params object[] parameters) { List lParams = LuaUtils.CreateLuaParamList(parameters); - SubPacket spacket = InfoRequestResponsePacket.BuildPacket(actorId, actorId, lParams); + SubPacket spacket = GenericDataPacket.BuildPacket(actorId, actorId, lParams); spacket.DebugPrintSubPacket(); QueuePacket(spacket); } diff --git a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs b/FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs similarity index 95% rename from FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs rename to FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs index 73780b4c..679f0f08 100644 --- a/FFXIVClassic Map Server/packets/send/player/InfoRequestResponsePacket.cs +++ b/FFXIVClassic Map Server/packets/send/player/GenericDataPacket.cs @@ -4,7 +4,7 @@ using System.IO; namespace FFXIVClassic_Map_Server.packets.send.player { - class InfoRequestResponsePacket + class GenericDataPacket { public const ushort OPCODE = 0x0133; public const uint PACKET_SIZE = 0xE0; diff --git a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua index 065f7f20..939073ac 100644 --- a/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua +++ b/data/scripts/base/chara/npc/populace/PopulaceChocoboLender.lua @@ -27,6 +27,12 @@ local startAppearances = { [1000840] = CHOCOBO_ULDAH1 }; +local cityExits = { + [1500006] = 15, + [1500061] = 14, + [1000840] = 16 +}; + function init(npc) return false, false, 0, 0; end @@ -60,14 +66,18 @@ function onEventStarted(player, npc, triggerName) else local appearance = startAppearances[npc:GetActorClassId()]; player:IssueChocobo(appearance, nameResponse); - callClientFunction(player, "eventAfterChocoboName", player); + callClientFunction(player, "eventAfterChocoboName", player); mountChocobo(player); - teleportOutOfCity(player, npc); + GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()]); + player:SendGameMessage(player, GetWorldMaster(), 25248, 0x20, 2001007); + player:SendDataPacket("attention", GetWorldMaster(), "", 25248, 2001007); + player:EndEvent(); + return; end elseif(menuChoice == 2) then -- Summon Bird - teleportOutOfCity(player, npc); mountChocobo(player); + GetWorldManager():DoZoneChange(player, cityExits[npc:GetActorClassId()]); elseif(menuChoice == 3) then -- Change Barding callClientFunction(player, "eventTalkStepBreak", player); elseif(menuChoice == 5) then -- Rent Bird @@ -80,29 +90,12 @@ function onEventStarted(player, npc, triggerName) end function mountChocobo(player) - local worldMaster = GetWorldMaster(); - player:ChangeMusic(83); player:SendChocoboAppearance(); - player:SendGameMessage(player, worldMaster, 26001, 0x20); player:SetMountState(1); + player:ChangeSpeed(0.0, 5.0, 10.0); + player:ChangeState(15); end function issueRentalChocobo(player) --TODO: Write issue rental chocobo code end - -function teleportOutOfCity(player, npc) - local zoneId = player:GetPos()[4]; - local worldManager = GetWorldManager(); - local exitPoints = { - [1500061] = {150, 319, 4, 996, 0.00}, -- Gridania - [1500006] = {133, -83, 30, 169, 2.00}, -- Limsa - [1000840] = {170, -32, 183, -74, 2} -- Ul'dah - }; - --print "Getting exit point for npc [" ..npc:GetActorClassId().."]"; - local exitPoint = exitPoints[npc:GetActorClassId()]; - if (exitPoint == nil) then - return - end - worldManager:DoZoneChange(player, exitPoint[0], nil, 0x02, exitPoint[1], exitPoint[2], exitPoint[3], exitPoint[4]); -end diff --git a/sql/server_zones_spawnlocations.sql b/sql/server_zones_spawnlocations.sql index 6aaa8298..dbe9e0b2 100644 --- a/sql/server_zones_spawnlocations.sql +++ b/sql/server_zones_spawnlocations.sql @@ -4,12 +4,10 @@ Source Host: localhost Source Database: ffxiv_server Target Host: localhost Target Database: ffxiv_server -Date: 8/14/2016 9:43:22 AM +Date: 8/21/2016 7:50:14 PM */ -SET FOREIGN_KEY_CHECKS = 0; -SET autocommit = 0; - +SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for server_zones_spawnlocations -- ---------------------------- @@ -23,7 +21,7 @@ CREATE TABLE `server_zones_spawnlocations` ( `spawnZ` float NOT NULL, `spawnRotation` float NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records @@ -41,5 +39,6 @@ INSERT INTO `server_zones_spawnlocations` VALUES ('10', '166', null, '16', '356. INSERT INTO `server_zones_spawnlocations` VALUES ('11', '244', null, '15', '0.048', '0', '-5.737', '0'); INSERT INTO `server_zones_spawnlocations` VALUES ('12', '244', null, '15', '-160.048', '0', '-165.737', '0'); INSERT INTO `server_zones_spawnlocations` VALUES ('13', '244', null, '15', '160.048', '0', '154.263', '0'); - -COMMIT; \ No newline at end of file +INSERT INTO `server_zones_spawnlocations` VALUES ('14', '150', null, '15', '333.271', '5.889', '-943.275', '0.794'); +INSERT INTO `server_zones_spawnlocations` VALUES ('15', '133', null, '15', '-8.062', '45.429', '139.364', '2.955'); +INSERT INTO `server_zones_spawnlocations` VALUES ('16', '170', null, '15', '-27.015', '181.798', '-79.72', '2.513');