mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 13:47:46 +00:00
More bug fixes
Fixed loading status effects on login Fixed barrage issues Added untraited version of Protect Added sanguine rite
This commit is contained in:
parent
a7e59fa7e4
commit
8de606051a
14 changed files with 99 additions and 43 deletions
|
@ -958,9 +958,6 @@ namespace FFXIVClassic_Map_Server
|
|||
var tier = reader.GetByte(4);
|
||||
var extra = reader.GetUInt64(5);
|
||||
|
||||
player.charaWork.status[count] = reader.GetUInt16(0);
|
||||
player.charaWork.statusShownTime[count] = reader.GetUInt32(1);
|
||||
|
||||
var effect = Server.GetWorldManager().GetStatusEffect(id);
|
||||
if (effect != null)
|
||||
{
|
||||
|
@ -973,6 +970,7 @@ namespace FFXIVClassic_Map_Server
|
|||
// dont wanna send ton of messages on login (i assume retail doesnt)
|
||||
player.statusEffects.AddStatusEffect(effect, null, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2229,8 +2227,7 @@ namespace FFXIVClassic_Map_Server
|
|||
string queries = "";
|
||||
foreach (var effect in player.statusEffects.GetStatusEffects())
|
||||
{
|
||||
var duration = effect.GetDuration() + effect.GetStartTime().Second - Program.Tick.Second;
|
||||
|
||||
var duration = Utils.UnixTimeStampUTC(effect.GetEndTime()) - Utils.UnixTimeStampUTC();
|
||||
queries += Environment.NewLine + $"REPLACE INTO characters_statuseffect(characterId, statusId, magnitude, duration, tick, tier, extra) VALUES ({player.actorId}, {effect.GetStatusEffectId()}, {effect.GetMagnitude()}, {duration}, {effect.GetTickMs()}, {effect.GetTier()}, {effect.GetExtra()});";
|
||||
}
|
||||
|
||||
|
|
|
@ -1079,7 +1079,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
lua.LuaEngine.CallLuaBattleCommandFunction(this, command, folder, "onSkillFinish", this, chara, command, action, actions);
|
||||
//cached script
|
||||
//skill.CallLuaFunction(owner, "onSkillFinish", this, chara, command, action, actions);
|
||||
|
||||
if (action.hitType > HitType.Evade && action.hitType != HitType.Resist)
|
||||
{
|
||||
hitTarget = true;
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
|
|||
Resonance = 223114,
|
||||
Soughspeak = 223115,
|
||||
PresenceofMind2 = 223116,
|
||||
SanguineRite = 223117,
|
||||
SanguineRite = 223117, //old effect
|
||||
PunishingBarbs = 223118,
|
||||
DarkSeal = 223119,
|
||||
Emulate = 223120,
|
||||
|
@ -143,7 +143,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
|
|||
SkullSunder = 223126,
|
||||
Bloodletter = 223127, //comboed effect
|
||||
Levinbolt = 223128,
|
||||
Protect = 223129, //old Protect
|
||||
Protect = 223129, //untraited protect
|
||||
Shell = 223130, //old shell
|
||||
Reraise = 223131,
|
||||
ShockSpikes = 223132,
|
||||
|
@ -246,13 +246,13 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
|
|||
Excruciate = 223231,
|
||||
Necrogenesis = 223232,
|
||||
Parsimony = 223233,
|
||||
SanguineRite2 = 223234,
|
||||
SanguineRite2 = 223234, //untraited effect
|
||||
Aero = 223235,
|
||||
Outmaneuver2 = 223236,
|
||||
Blindside2 = 223237,
|
||||
Decoy2 = 223238, //Traited
|
||||
Protect2 = 223239, //new Protect
|
||||
SanguineRite3 = 223240,
|
||||
Protect2 = 223239, //Traited
|
||||
SanguineRite3 = 223240, //Traited
|
||||
Bloodletter2 = 223241, //uncomboed effect
|
||||
FullyBlissfulMind = 223242,
|
||||
MagicEvasionDown = 223243,
|
||||
|
|
|
@ -10,11 +10,11 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
ability.statusMagnitude = 4;
|
||||
skill.statusMagnitude = 4;
|
||||
|
||||
--27242: Enhanced Barrage: Adds an additional attack to barrage ( 4 -> 5 )
|
||||
if caster.HasTrait(27242) then
|
||||
ability.statusMagnitude = 5;
|
||||
skill.statusMagnitude = 5;
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
|
|
|
@ -10,6 +10,10 @@ function onAbilityStart(caster, target, ability)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--For some reason, light shot's hitNum is always 1 (or 0, idk), even with barrage.
|
||||
--If you set the hitnum like any other multi-hit WS it will play the animation repeatedly.
|
||||
action.hitNum = 1;
|
||||
|
||||
action.amount = skill.basePotency;
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
|
|
@ -19,10 +19,10 @@ end;
|
|||
-- A bonus from INT (2INT=1HP)
|
||||
-- An additional random integer (580 at level 50. +/- 3%)
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Base formula isn't quit known yet
|
||||
local amount = 100;
|
||||
--Heals can vary by up to ~3.5% in either direction
|
||||
amount = math.Clamp(amount * (0.965 + (math.rand() * 7.0)), 0, 9999);
|
||||
--Base amount seems to be 0.215x^2 - 0.35x + 60
|
||||
local amount = (0.215 * math.pow(caster.GetLevel(), 2)) - (0.35 * caster.GetLevel()) + 60;
|
||||
--Heals can vary by up to 3%
|
||||
amount = math.Clamp(amount * (0.97 + (math.rand() * 3.0)), 0, 9999);
|
||||
|
||||
--PGL gets an INT bonus for Second Wind
|
||||
if caster.GetClass() == 2 then
|
||||
|
|
|
@ -16,7 +16,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
|||
|
||||
--27365: Enhanced Protect: Increases magic defense gained from Protect.
|
||||
if caster.HasTrait(27365) then
|
||||
skill.statusTier = 2;
|
||||
skill.statusId = 223129
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
|
|
|
@ -10,6 +10,12 @@ function onMagicStart(caster, target, spell)
|
|||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
||||
--27324: Enhanced Sanguine Rite: Reduces damage taken
|
||||
if caster.HasTrait(27365) then
|
||||
skill.statusId = 223240
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
18
data/scripts/effects/protect.lua
Normal file
18
data/scripts/effects/protect.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
--Magnitude is caster's Enhancing Magic Potency.
|
||||
--http://forum.square-enix.com/ffxiv/threads/41900-White-Mage-A-Guide
|
||||
--5-4-5-4-5-4-5-4-5 repeating points of Enhancing for 1 defense
|
||||
--4.56 * Enhancing Potency
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
|
||||
target.AddMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
local defenseBuff = 4.56 * effect.GetMagnitude();
|
||||
|
||||
target.SubtractMod(modifiersGlobal.Defense, defenseBuff);
|
||||
end;
|
||||
|
8
data/scripts/effects/sanguine_rite2.lua
Normal file
8
data/scripts/effects/sanguine_rite2.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
require("modifiers")
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender, 33011, mpToRestore);
|
||||
end
|
22
data/scripts/effects/sanguine_rite3.lua
Normal file
22
data/scripts/effects/sanguine_rite3.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
--Traited Sanguine Rite reduces damage taken by 25%.
|
||||
--The icon in game says it's 50%, but it's lying
|
||||
local amount = 25;
|
||||
|
||||
target.AddMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
local amount = 25;
|
||||
|
||||
target.SubtractMod(modifiersGlobal.DamageTakenDown, amount);
|
||||
end;
|
||||
|
||||
--Sanguine Rite restores 30% of damage taken as MP
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
local mpToRestore = action.amount * 0.30;
|
||||
defender.AddMP(mpToRestore);
|
||||
actionContainer.AddMPAction(defender, 33011, mpToRestore);
|
||||
end
|
|
@ -24,9 +24,9 @@ DROP TABLE IF EXISTS `characters_statuseffect`;
|
|||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `characters_statuseffect` (
|
||||
`characterId` int(10) unsigned NOT NULL,
|
||||
`statusId` mediumint(8) unsigned NOT NULL,
|
||||
`statusId` smallint(5) unsigned NOT NULL,
|
||||
`magnitude` bigint(20) unsigned NOT NULL,
|
||||
`duration` int(10) unsigned NOT NULL,
|
||||
`endTime` int(10) unsigned NOT NULL,
|
||||
`tick` int(10) unsigned NOT NULL,
|
||||
`tier` tinyint(3) unsigned NOT NULL,
|
||||
`extra` bigint(20) unsigned NOT NULL,
|
||||
|
@ -52,4 +52,4 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2018-02-15 0:04:42
|
||||
-- Dump completed on 2018-05-27 16:12:00
|
||||
|
|
|
@ -39,8 +39,8 @@ CREATE TABLE `server_statuseffects` (
|
|||
LOCK TABLES `server_statuseffects` WRITE;
|
||||
/*!40000 ALTER TABLE `server_statuseffects` DISABLE KEYS */;
|
||||
set autocommit=0;
|
||||
INSERT INTO `server_statuseffects` VALUES (223001,'quick',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223002,'haste',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223001,'quick',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223002,'haste',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223004,'petrification',264241194,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223005,'paralysis',42,2,3000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223006,'silence',4194346,2,0);
|
||||
|
@ -53,28 +53,29 @@ INSERT INTO `server_statuseffects` VALUES (223013,'pacification',8388650,2,0);
|
|||
INSERT INTO `server_statuseffects` VALUES (223014,'amnesia',16777258,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223015,'stun',264241194,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223016,'daze',264241194,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223029,'hp_boost',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223029,'hp_boost',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223030,'hp_penalty',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223038,'defense_down',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223058,'aegis_boon',528434,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223062,'sentinel',1048626,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223063,'cover',16434,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223064,'rampart',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223068,'tempered_will',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223064,'rampart',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223068,'tempered_will',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223075,'featherfoot',131122,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223078,'enduring_march',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223078,'enduring_march',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223081,'bloodbath',1048626,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223083,'foresight',262194,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223091,'keen_flurry',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223094,'invigorate',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223091,'keen_flurry',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223094,'invigorate',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223097,'collusion',1048626,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223104,'quelling_strike',1058,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223106,'hawks_eye',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223106,'hawks_eye',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223108,'decoy',4130,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223127,'bloodletter',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223133,'stoneskin',16402,1,3000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223129,'protect',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223133,'stoneskin',16402,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223173,'covered',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223180,'regen',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223180,'regen',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223205,'combo',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223206,'goring_blade',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223207,'berserk2',1074806818,1,3000);
|
||||
|
@ -89,23 +90,24 @@ INSERT INTO `server_statuseffects` VALUES (223215,'life_surge_I',1048626,2,0);
|
|||
INSERT INTO `server_statuseffects` VALUES (223216,'life_surge_II',1048626,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223217,'life_surge_III',1048626,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223218,'dread_spike',16418,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223220,'barrage',3090,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223221,'raging_strike2',1074855970,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223227,'cleric_stance',8226,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223228,'blissful_mind',1073741858,1,1000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223234,'sanguinerite2',0,1,3000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223234,'sanguine_rite2',16402,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223236,'outmaneuver2',524338,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223237,'blindside2',8226,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223238,'decoy2',4130,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223239,'protect2',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223240,'sanguinerite3',0,1,3000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223239,'protect2',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223240,'sanguine_rite3',16402,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223241,'bloodletter2',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223242,'fully_blissful_mind',1073741858,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223243,'magic_evasion_down',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223245,'spinning_heel',50,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223243,'magic_evasion_down',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223245,'spinning_heel',18,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223248,'divine_veil',36914,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223250,'vengeance',16418,1,5000);
|
||||
INSERT INTO `server_statuseffects` VALUES (223251,'antagonize',1048626,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223264,'divine_regen',50,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (223264,'divine_regen',18,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (228021,'heavy',42,2,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (253003,'evade_proc',34,1,0);
|
||||
INSERT INTO `server_statuseffects` VALUES (253004,'block_proc',34,1,0);
|
||||
|
@ -125,4 +127,4 @@ commit;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2018-05-27 14:40:45
|
||||
-- Dump completed on 2018-05-27 17:59:13
|
||||
|
|
Loading…
Add table
Reference in a new issue