From a99a129d9a3bfc64500aa7bc01fd7763e29155e9 Mon Sep 17 00:00:00 2001 From: Yogurt Date: Fri, 31 May 2019 23:34:37 -0700 Subject: [PATCH 1/9] Pass result container to effect script when effect times out --- .../actors/chara/ai/StatusEffectContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFXIVClassic Map Server/actors/chara/ai/StatusEffectContainer.cs b/FFXIVClassic Map Server/actors/chara/ai/StatusEffectContainer.cs index a4f35405..e89dbf06 100644 --- a/FFXIVClassic Map Server/actors/chara/ai/StatusEffectContainer.cs +++ b/FFXIVClassic Map Server/actors/chara/ai/StatusEffectContainer.cs @@ -57,7 +57,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai // remove effects from this list foreach (var effect in removeEffects) { - RemoveStatusEffect(effect); + RemoveStatusEffect(effect, resultContainer); } resultContainer.CombineLists(); From 9cda72f1ab8233ef4d0b152c19ab6c08b8221d66 Mon Sep 17 00:00:00 2001 From: Yogurt Date: Fri, 31 May 2019 23:42:52 -0700 Subject: [PATCH 2/9] Remove MP and TP before setting combo ids to actually take combo into account for MP and TP cost --- FFXIVClassic Map Server/actors/chara/Character.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FFXIVClassic Map Server/actors/chara/Character.cs b/FFXIVClassic Map Server/actors/chara/Character.cs index 697be351..4959a655 100644 --- a/FFXIVClassic Map Server/actors/chara/Character.cs +++ b/FFXIVClassic Map Server/actors/chara/Character.cs @@ -1129,6 +1129,9 @@ namespace FFXIVClassic_Map_Server.Actors actions.AddAction(new CommandResult(actorId, 30202, 0)); } + DelMP(command.CalculateMpCost(this)); + DelTP(command.CalculateTpCost(this)); + //Now that we know if we hit the target we can check if the combo continues if (this is Player) { @@ -1139,8 +1142,6 @@ namespace FFXIVClassic_Map_Server.Actors ((Player)this).SetCombos(); } - DelMP(command.CalculateMpCost(this)); - DelTP(command.CalculateTpCost(this)); actions.CombineLists(); DoBattleAction(command.id, command.battleAnimation, actions.GetList()); From ef117204b35aecb9a83612dc9870f7f2a7c79e69 Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 00:39:22 -0700 Subject: [PATCH 3/9] Move raise in Teleport command so that it gets caught if isInn is true --- data/scripts/commands/TeleportCommand.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/data/scripts/commands/TeleportCommand.lua b/data/scripts/commands/TeleportCommand.lua index 6d6a4497..327608f4 100644 --- a/data/scripts/commands/TeleportCommand.lua +++ b/data/scripts/commands/TeleportCommand.lua @@ -92,6 +92,14 @@ function onEventStarted(player, actor, triggerName, isTeleport) if (choice == 1) then player:PlayAnimation(0x4000FFB); player:SendGameMessage(worldMaster, 34104, 0x20); + + --bandaid fix for returning while dead, missing things like weakness and the heal number + if (player:GetHP() == 0) then + player:SetHP(player.GetMaxHP()); + player:ChangeState(0); + player:PlayAnimation(0x01000066); + end + if (isInn) then --Return to Inn if (player:GetHomePointInn() == 1) then @@ -107,12 +115,6 @@ function onEventStarted(player, actor, triggerName, isTeleport) if (destination ~= nil) then randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5); rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]); - --bandaid fix for returning while dead, missing things like weakness and the heal number - if (player:IsDead()) then - player:SetHP(player.GetMaxHP()); - player:ChangeState(0); - player:PlayAnimation(0x01000066); - end GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation); end From e00bb483868b1fac51691736ee5765f4cba18bfd Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 00:57:31 -0700 Subject: [PATCH 4/9] Fix some incorrect CommandTypes in database --- sql/server_battle_commands.sql | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sql/server_battle_commands.sql b/sql/server_battle_commands.sql index 358c1b61..4093815c 100644 --- a/sql/server_battle_commands.sql +++ b/sql/server_battle_commands.sql @@ -114,10 +114,10 @@ INSERT INTO `server_battle_commands` VALUES (27142,'rampart',3,2,3,31,16445,0,8, INSERT INTO `server_battle_commands` VALUES (27143,'tempered_will',3,42,8,31,16415,0,0,0,0,0,1,100,1,0,0,0,0,0,10,2,223068,20,1,0,0,180,0,0,14,515,2,3,234889731,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27144,'outmaneuver',3,34,8,31,16415,0,0,0,0,0,1,100,1,0,0,0,0,0,10,2,223236,30,1,0,0,90,0,0,14,512,21,3,234967552,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27145,'flash',3,14,3,768,17152,0,8,0,0,0,0,100,1,0,0,15,0,0,10,2,223007,10,0,0,0,30,0,0,14,696,2,3,234889912,0,0,0,0,0,30101,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27146,'cover',16,30,0,28,16412,0,0,0,0,0,1,100,1,0,0,15,0,0,10,2,223173,15,1,0,0,60,0,0,14,725,2,3,234889941,0,0,0,0,0,30328,3,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27146,'cover',16,30,0,60,16412,0,0,0,0,0,1,100,1,0,0,15,0,0,10,2,223173,15,1,0,0,60,0,0,14,725,2,3,234889941,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27147,'divine_veil',16,35,0,31,16415,0,0,0,0,0,1,100,1,0,0,0,0,0,10,2,223248,20,1,0,0,60,0,0,14,713,2,3,234889929,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27148,'hallowed_ground',16,50,0,31,16415,0,0,0,0,0,1,100,1,0,0,0,0,0,10,2,223249,20,1,0,0,900,0,0,14,709,2,3,234889925,0,0,0,0,0,30328,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27149,'holy_succor',16,40,0,21,16405,0,0,0,0,0,1,100,1,0,0,15,0,0,10,2,0,0,0,3,2000,10,100,0,1,701,1,3,16782013,0,0,0,0,0,30328,3,3,13,0); +INSERT INTO `server_battle_commands` VALUES (27149,'holy_succor',16,40,0,53,16405,0,0,0,0,0,1,100,1,0,0,15,0,0,10,2,0,0,0,3,2000,10,100,0,1,701,1,3,16782013,0,0,0,0,0,30328,4,3,13,0); INSERT INTO `server_battle_commands` VALUES (27150,'fast_blade',3,1,1,768,17152,0,0,0,0,0,0,100,1,1,0,5,0,0,10,2,0,0,0,0,0,10,0,1000,18,1023,1,3,301995007,0,27151,27152,1,0,30301,2,1,1,0); INSERT INTO `server_battle_commands` VALUES (27151,'flat_blade',3,26,1,768,17152,0,0,0,0,0,0,100,1,0,0,5,0,0,10,2,0,0,0,0,0,10,0,1500,18,1024,2,3,301999104,0,0,0,2,0,30301,2,1,1,0); INSERT INTO `server_battle_commands` VALUES (27152,'savage_blade',3,10,1,768,17152,0,0,0,0,0,0,100,1,0,0,5,0,0,10,2,0,0,0,0,0,30,0,1000,18,1025,1,3,301995009,0,27153,0,2,0,30301,2,1,1,0); @@ -136,7 +136,7 @@ INSERT INTO `server_battle_commands` VALUES (27184,'rampage',4,34,32,31,16415,0, INSERT INTO `server_battle_commands` VALUES (27185,'enduring_march',4,42,32,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223078,20,1,0,0,180,0,0,14,539,2,3,234889755,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27186,'vengeance',17,30,0,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223250,15,1,0,0,150,0,0,14,714,2,3,234889930,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27187,'antagonize',17,35,0,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223251,15,1,0,0,120,0,0,14,715,2,3,234889931,0,0,0,0,0,30328,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27188,'collusion',17,40,0,28,16412,0,0,0,0,0,0,100,1,0,0,15,0,0,10,2,223097,15,1,0,0,90,0,0,14,711,2,3,234889927,0,0,0,0,0,30328,3,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27188,'collusion',17,40,0,60,16412,0,0,0,0,0,0,100,1,0,0,15,0,0,10,2,223097,15,1,0,0,90,0,0,14,711,2,3,234889927,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27189,'mighty_strikes',17,50,0,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223252,15,1,0,0,900,0,0,14,716,2,3,234889932,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27190,'heavy_swing',4,1,1,768,17152,0,0,0,0,0,0,100,1,1,0,5,0,0,10,2,0,0,0,0,0,10,0,1000,18,14,1,3,301993998,0,27191,0,1,0,30301,2,1,1,0); INSERT INTO `server_battle_commands` VALUES (27191,'skull_sunder',4,10,1,768,17152,0,0,0,0,0,0,100,1,0,0,5,0,0,10,2,0,0,0,0,0,30,0,1500,18,43,1,3,301994027,0,27192,0,2,0,30301,2,1,1,0); @@ -154,7 +154,7 @@ INSERT INTO `server_battle_commands` VALUES (27222,'decoy',7,2,3,31,16415,0,0,0, INSERT INTO `server_battle_commands` VALUES (27223,'chameleon',7,42,3,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,0,0,0,0,0,180,0,0,14,504,2,3,234889720,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27224,'barrage',7,34,64,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223220,60,1,0,0,90,0,0,14,683,2,3,234889899,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27225,'raging_strike',7,14,64,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223221,4294967295,1,0,0,10,0,0,14,632,2,3,234889848,0,0,0,0,0,30328,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27226,'swiftsong',7,26,64,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223224,180,1,0,0,10,100,0,1,150,1,3,16781462,0,0,0,0,0,30328,3,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27226,'swiftsong',7,26,64,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223224,180,1,0,0,10,100,0,1,150,1,3,16781462,0,0,0,0,0,30328,4,4,0,0); INSERT INTO `server_battle_commands` VALUES (27227,'battle_voice',18,50,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223029,60,1,0,0,900,0,0,14,721,2,3,234889937,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27228,'heavy_shot',7,1,1,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,8,10,2,0,0,0,0,0,10,0,1000,18,1036,4,3,302007308,0,27229,27231,1,0,30301,2,1,4,1); INSERT INTO `server_battle_commands` VALUES (27229,'leaden_arrow',7,10,1,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,228021,30,0.75,0,0,30,0,1500,18,1035,4,3,302007307,0,27230,0,2,0,30301,2,1,4,1); @@ -165,9 +165,9 @@ INSERT INTO `server_battle_commands` VALUES (27233,'piercing_arrow',7,4,1,768,17 INSERT INTO `server_battle_commands` VALUES (27234,'gloom_arrow',7,30,1,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223007,30,0,0,0,10,0,1000,18,1039,4,3,302007311,0,27235,0,2,0,30301,2,1,4,1); INSERT INTO `server_battle_commands` VALUES (27235,'bloodletter',7,46,64,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223241,30,0.75,0,0,80,0,1500,18,53,701,3,304861237,0,0,0,3,0,30301,2,1,4,1); INSERT INTO `server_battle_commands` VALUES (27236,'shadowbind',7,18,64,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,228011,15,0.9,0,0,40,0,250,18,17,4,3,302006289,0,0,0,2,0,30301,2,1,4,1); -INSERT INTO `server_battle_commands` VALUES (27237,'ballad_of_magi',18,30,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223254,180,1,8,3000,10,100,0,1,709,1,3,16782021,0,0,0,0,0,30328,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27238,'paeon_of_war',18,40,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223255,180,1,8,3000,10,50,1000,1,710,1,3,16782022,0,0,0,0,0,30328,3,4,0,0); -INSERT INTO `server_battle_commands` VALUES (27239,'minuet_of_rigor',18,35,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223256,180,1,8,3000,10,100,0,1,711,1,3,16782023,0,0,0,0,0,30328,3,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27237,'ballad_of_magi',18,30,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223254,180,1,8,3000,10,100,0,1,709,1,3,16782021,0,0,0,0,0,30328,4,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27238,'paeon_of_war',18,40,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223255,180,1,8,3000,10,50,1000,1,710,1,3,16782022,0,0,0,0,0,30328,4,4,0,0); +INSERT INTO `server_battle_commands` VALUES (27239,'minuet_of_rigor',18,35,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,223256,180,1,8,3000,10,100,0,1,711,1,3,16782023,0,0,0,0,0,30328,4,4,0,0); INSERT INTO `server_battle_commands` VALUES (27258,'refill',7,1,0,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,32613,3,0,0,0); INSERT INTO `server_battle_commands` VALUES (27259,'light_shot',7,1,0,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,0,0,0,0,0,17,0,1,3,285216768,0,0,0,0,0,30301,3,1,0,1); INSERT INTO `server_battle_commands` VALUES (27260,'invigorate',8,14,3,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223094,30,1,0,0,90,0,0,14,575,2,3,234889791,0,0,0,0,0,30328,3,4,0,0); @@ -216,19 +216,19 @@ INSERT INTO `server_battle_commands` VALUES (27342,'cleric_stance',23,10,512,31, INSERT INTO `server_battle_commands` VALUES (27343,'blissful_mind',23,14,512,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223228,4294967295,1,0,0,30,0,0,14,693,2,3,234889909,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27344,'presence_of_mind',27,30,0,31,16415,0,0,0,0,0,0,100,1,0,0,0,0,0,10,2,223116,30,1,0,0,300,0,0,14,722,2,3,234889938,0,0,0,0,0,30328,3,4,0,0); INSERT INTO `server_battle_commands` VALUES (27345,'benediction',27,50,0,31,16445,1,20,0,0,0,1,100,1,0,0,0,0,0,10,2,0,0,0,0,0,900,0,0,14,723,2,3,234889939,0,0,0,0,0,30320,3,3,13,0); -INSERT INTO `server_battle_commands` VALUES (27346,'cure',23,2,3,21,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,5,40,0,1,101,1,3,16781413,0,0,0,0,0,30320,4,3,13,0); -INSERT INTO `server_battle_commands` VALUES (27347,'cura',23,30,512,21,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,5,100,0,1,103,1,3,16781415,0,0,0,0,0,30320,4,3,13,0); +INSERT INTO `server_battle_commands` VALUES (27346,'cure',23,2,3,53,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,5,40,0,1,101,1,3,16781413,0,0,0,0,0,30320,4,3,13,0); +INSERT INTO `server_battle_commands` VALUES (27347,'cura',23,30,512,53,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,5,100,0,1,103,1,3,16781415,0,0,0,0,0,30320,4,3,13,0); INSERT INTO `server_battle_commands` VALUES (27348,'curaga',23,46,512,61,16445,1,15,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,3000,10,150,0,1,146,1,3,16781458,0,0,0,0,0,30320,4,3,13,0); -INSERT INTO `server_battle_commands` VALUES (27349,'raise',23,18,512,130,28724,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,10000,300,150,0,1,148,1,3,16781460,0,0,0,0,0,30101,4,4,11,0); -INSERT INTO `server_battle_commands` VALUES (27350,'stoneskin',23,26,3,21,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223133,300,1,3,3000,30,50,0,1,133,1,3,16781445,0,0,0,0,0,30328,4,4,8,0); -INSERT INTO `server_battle_commands` VALUES (27351,'protect',23,6,3,21,49205,1,20,0,0,0,0,100,1,0,0,20,0,0,10,2,223129,300,1,3,3000,30,80,0,1,1085,1,3,16782397,0,0,0,0,0,30328,4,4,11,0); +INSERT INTO `server_battle_commands` VALUES (27349,'raise',23,18,512,12340,28724,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,10000,300,150,0,1,148,1,3,16781460,0,0,0,0,0,30101,4,4,11,0); +INSERT INTO `server_battle_commands` VALUES (27350,'stoneskin',23,26,3,53,16393,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223133,300,1,3,3000,30,50,0,1,133,1,3,16781445,0,0,0,0,0,30328,4,4,8,0); +INSERT INTO `server_battle_commands` VALUES (27351,'protect',23,6,3,53,49205,1,20,0,0,0,0,100,1,0,0,20,0,0,10,2,223129,300,1,3,3000,30,80,0,1,1085,1,3,16782397,0,0,0,0,0,30328,4,4,11,0); INSERT INTO `server_battle_commands` VALUES (27352,'repose',23,50,0,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,228001,60,0.9,3,3000,0,80,0,1,151,1,3,16781463,0,0,0,0,0,30328,4,4,10,0); INSERT INTO `server_battle_commands` VALUES (27353,'aero',23,4,3,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223235,20,0.75,3,3000,6,75,0,1,510,1,3,16781822,0,27354,0,1,0,30301,4,2,7,0); INSERT INTO `server_battle_commands` VALUES (27354,'aerora',23,42,512,768,17152,1,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,4000,20,150,0,1,511,1,3,16781823,0,0,0,2,0,30301,4,2,7,0); INSERT INTO `server_battle_commands` VALUES (27355,'stone',23,1,3,768,17152,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223243,10,0.75,3,2000,6,75,0,1,513,1,3,16781825,0,27356,0,1,0,30301,4,2,8,0); INSERT INTO `server_battle_commands` VALUES (27356,'stonera',23,22,512,768,17152,1,0,0,0,0,0,100,1,0,0,20,0,0,10,2,228021,30,0.75,3,3000,30,150,0,1,514,1,3,16781826,0,0,0,2,0,30301,4,2,8,0); -INSERT INTO `server_battle_commands` VALUES (27357,'esuna',27,40,0,21,16405,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,10,40,0,1,702,1,3,16782014,0,0,0,0,0,30329,4,0,13,0); -INSERT INTO `server_battle_commands` VALUES (27358,'regen',27,35,0,21,16405,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223180,45,1,3,2000,5,20,0,1,703,1,3,16782015,0,0,0,0,0,30328,4,4,13,0); +INSERT INTO `server_battle_commands` VALUES (27357,'esuna',27,40,0,53,16405,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,0,0,0,3,2000,10,40,0,1,702,1,3,16782014,0,0,0,0,0,30329,4,0,13,0); +INSERT INTO `server_battle_commands` VALUES (27358,'regen',27,35,0,53,16405,0,0,0,0,0,0,100,1,0,0,20,0,0,10,2,223180,45,1,3,2000,5,20,0,1,703,1,3,16782015,0,0,0,0,0,30328,4,4,13,0); INSERT INTO `server_battle_commands` VALUES (27359,'holy',27,45,0,31,17152,1,8,0,0,0,1,100,1,0,0,0,0,0,10,2,228011,10,0.9,0,0,300,100,0,1,708,1,3,16782020,0,0,0,0,0,30301,4,2,11,0); /*!40000 ALTER TABLE `server_battle_commands` ENABLE KEYS */; UNLOCK TABLES; @@ -243,4 +243,4 @@ commit; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-05-29 23:06:50 +-- Dump completed on 2019-06-01 0:52:09 From 97dcd765eb0d186bffe6763333feee7044dc305e Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 02:10:40 -0700 Subject: [PATCH 5/9] Add new hit effect flag for hit effects that only show animations Fix SetMP setting MaxMP instead of MP Fix substate updates not being sent --- .../actors/chara/Character.cs | 4 ++-- .../actors/chara/ai/utils/BattleUtils.cs | 1 + .../send/Actor/battle/CommandResult.cs | 2 ++ data/scripts/commands/EsunaMagic.lua | 5 +++++ data/scripts/commands/magic/esuna.lua | 22 +++++++++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 data/scripts/commands/EsunaMagic.lua create mode 100644 data/scripts/commands/magic/esuna.lua diff --git a/FFXIVClassic Map Server/actors/chara/Character.cs b/FFXIVClassic Map Server/actors/chara/Character.cs index 4959a655..4cde4926 100644 --- a/FFXIVClassic Map Server/actors/chara/Character.cs +++ b/FFXIVClassic Map Server/actors/chara/Character.cs @@ -393,7 +393,7 @@ namespace FFXIVClassic_Map_Server.Actors if ((updateFlags & ActorUpdateFlags.SubState) != 0) { - //packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState)); + packets.Add(SetActorSubStatePacket.BuildPacket(actorId, currentSubState)); //packets.Add(CommandResultX00Packet.BuildPacket(actorId, 0x72000062, 0)); //packets.Add(CommandResultX01Packet.BuildPacket(actorId, 0x7C000062, 21001, new CommandResult(actorId, 0, 1))); @@ -614,7 +614,7 @@ namespace FFXIVClassic_Map_Server.Actors public void SetMP(uint mp) { - charaWork.parameterSave.mpMax = (short)mp; + charaWork.parameterSave.mp = (short)mp; if (mp > charaWork.parameterSave.mpMax) SetMaxMP(mp); diff --git a/FFXIVClassic Map Server/actors/chara/ai/utils/BattleUtils.cs b/FFXIVClassic Map Server/actors/chara/ai/utils/BattleUtils.cs index 9fddd194..fe3c929a 100644 --- a/FFXIVClassic Map Server/actors/chara/ai/utils/BattleUtils.cs +++ b/FFXIVClassic Map Server/actors/chara/ai/utils/BattleUtils.cs @@ -464,6 +464,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.utils FinishActionStatus(caster, target, skill, action, actionContainer); break; default: + action.effectId = (uint) HitEffect.AnimationEffectType; actionContainer.AddAction(action); break; } diff --git a/FFXIVClassic Map Server/packets/send/Actor/battle/CommandResult.cs b/FFXIVClassic Map Server/packets/send/Actor/battle/CommandResult.cs index bf710540..03200739 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/battle/CommandResult.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/battle/CommandResult.cs @@ -24,6 +24,8 @@ namespace FFXIVClassic_Map_Server.packets.send.actor.battle MagicEffectType = 48 << 24, //This places the number on the user regardless of the target this hit effect is for, used for things like bloodbath SelfHealType = 72 << 24, + //Plays the effect animation with no text or additional effects. Unsure if there are any flags. Used for things like Convert + AnimationEffectType = 96 << 24, //Each Type has it's own set of flags. These should be split into their own enums, //but for now just keep them all under HitEffect so we don't have to change anything. diff --git a/data/scripts/commands/EsunaMagic.lua b/data/scripts/commands/EsunaMagic.lua new file mode 100644 index 00000000..a349c17a --- /dev/null +++ b/data/scripts/commands/EsunaMagic.lua @@ -0,0 +1,5 @@ +function onEventStarted(player, command, triggerName, arg1, arg2, arg3, arg4, targetActor, arg5, arg6, arg7, arg8) + player.Cast(command.actorId, targetActor); + + player:endEvent(); +end \ No newline at end of file diff --git a/data/scripts/commands/magic/esuna.lua b/data/scripts/commands/magic/esuna.lua new file mode 100644 index 00000000..b20972dd --- /dev/null +++ b/data/scripts/commands/magic/esuna.lua @@ -0,0 +1,22 @@ +require("global"); +require("magic"); +require("battleutils"); + +function onMagicPrepare(caster, target, spell) + if not target.statusEffects.HasStatusEffectsByFlag(StatusEffectFlags.LoseOnDeath) then + return -1 + end + + return 0; +end; + +function onMagicStart(caster, target, spell) + return 0; +end; + +function onSkillFinish(caster, target, skill, action, actionContainer) + + removeEffect = target.statusEffects.GetRandomEffectByFlag(StatusEffectFlags.LoseOnDeath) + + target.statusEffects.RemoveStatusEffect(removeEffect, actionContainer, 30331); +end; \ No newline at end of file From 1a9a8c21165b367305baf3b2fb384ac7401ac4ea Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 02:12:37 -0700 Subject: [PATCH 6/9] Fix wrong flag in esuna --- data/scripts/commands/magic/esuna.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/scripts/commands/magic/esuna.lua b/data/scripts/commands/magic/esuna.lua index b20972dd..2e58b6ce 100644 --- a/data/scripts/commands/magic/esuna.lua +++ b/data/scripts/commands/magic/esuna.lua @@ -3,7 +3,7 @@ require("magic"); require("battleutils"); function onMagicPrepare(caster, target, spell) - if not target.statusEffects.HasStatusEffectsByFlag(StatusEffectFlags.LoseOnDeath) then + if not target.statusEffects.HasStatusEffectsByFlag(StatusEffectFlags.LoseOnEsuna) then return -1 end @@ -16,7 +16,7 @@ end; function onSkillFinish(caster, target, skill, action, actionContainer) - removeEffect = target.statusEffects.GetRandomEffectByFlag(StatusEffectFlags.LoseOnDeath) + removeEffect = target.statusEffects.GetRandomEffectByFlag(StatusEffectFlags.LoseOnEsuna) target.statusEffects.RemoveStatusEffect(removeEffect, actionContainer, 30331); end; \ No newline at end of file From 315452d1217b5238490193903f8be488a95b2c68 Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 02:13:41 -0700 Subject: [PATCH 7/9] Move shoulder tackle to abilities folder Add Convert --- data/scripts/commands/ability/convert.lua | 20 +++++++++++++++++++ .../shoulder_tackle.lua | 0 2 files changed, 20 insertions(+) create mode 100644 data/scripts/commands/ability/convert.lua rename data/scripts/commands/{weaponskill => ability}/shoulder_tackle.lua (100%) diff --git a/data/scripts/commands/ability/convert.lua b/data/scripts/commands/ability/convert.lua new file mode 100644 index 00000000..8b4fc608 --- /dev/null +++ b/data/scripts/commands/ability/convert.lua @@ -0,0 +1,20 @@ +require("global"); +require("ability"); + +function onAbilityPrepare(caster, target, ability) + return 0; +end; + +function onAbilityStart(caster, target, ability) + return 0; +end; + +function onSkillFinish(caster, target, skill, action, actionContainer) + newMP = math.min(caster.GetHP(), caster.GetMaxMP()) + newHP = math.min(caster.GetMP(), caster.GetMaxHP()) + caster.SetHP(newHP) + caster.SetMP(newMP) + + --Set effect id + action.DoAction(caster, target, skill, actionContainer); +end; \ No newline at end of file diff --git a/data/scripts/commands/weaponskill/shoulder_tackle.lua b/data/scripts/commands/ability/shoulder_tackle.lua similarity index 100% rename from data/scripts/commands/weaponskill/shoulder_tackle.lua rename to data/scripts/commands/ability/shoulder_tackle.lua From eb949a8602220883d3d81295c0f01778de372b38 Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 02:14:21 -0700 Subject: [PATCH 8/9] Move chimera abilities to Weaponskills --- .../commands/{ability => weaponskill}/breath_of_the_dragon.lua | 0 .../commands/{ability => weaponskill}/breath_of_the_ram.lua | 0 .../commands/{ability => weaponskill}/voice_of_the_dragon.lua | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename data/scripts/commands/{ability => weaponskill}/breath_of_the_dragon.lua (100%) rename data/scripts/commands/{ability => weaponskill}/breath_of_the_ram.lua (100%) rename data/scripts/commands/{ability => weaponskill}/voice_of_the_dragon.lua (100%) diff --git a/data/scripts/commands/ability/breath_of_the_dragon.lua b/data/scripts/commands/weaponskill/breath_of_the_dragon.lua similarity index 100% rename from data/scripts/commands/ability/breath_of_the_dragon.lua rename to data/scripts/commands/weaponskill/breath_of_the_dragon.lua diff --git a/data/scripts/commands/ability/breath_of_the_ram.lua b/data/scripts/commands/weaponskill/breath_of_the_ram.lua similarity index 100% rename from data/scripts/commands/ability/breath_of_the_ram.lua rename to data/scripts/commands/weaponskill/breath_of_the_ram.lua diff --git a/data/scripts/commands/ability/voice_of_the_dragon.lua b/data/scripts/commands/weaponskill/voice_of_the_dragon.lua similarity index 100% rename from data/scripts/commands/ability/voice_of_the_dragon.lua rename to data/scripts/commands/weaponskill/voice_of_the_dragon.lua From 4e054ca947d9ce6781d1f322572895a73bf9daec Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sat, 1 Jun 2019 02:16:44 -0700 Subject: [PATCH 9/9] Add DoAction to raise so it at least plays the animation --- data/scripts/commands/magic/raise.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/scripts/commands/magic/raise.lua b/data/scripts/commands/magic/raise.lua index ea794ea8..1ca7913f 100644 --- a/data/scripts/commands/magic/raise.lua +++ b/data/scripts/commands/magic/raise.lua @@ -15,4 +15,5 @@ end; --Not sure how raise works yet. function onSkillFinish(caster, target, skill, action, actionContainer) + action.DoAction(caster, target, skill, actionContainer) end; \ No newline at end of file