WHM AF Pants Barspell Mods

Post Reply
StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

WHM AF Pants Barspell Mods

Post by StyxRiver » Wed Sep 25, 2013 7:53 pm

Just updated my first patch! I think, not used SVN before, but I followed the directons posted by bluekirby0, so hopefully it worked. "WhmAfLegsBarspellUpdate"

A minor patch, the WHM barspells were not taking into account the Cleric's pants resistance modifiers. The only thing added is the equippedLegs section of code. A minor update to all elemental barspells (both self-target RDM and party WHM spells). 12 spell scripts updated.

Code: Select all

function onSpellCast(caster,target,spell)
	local enchanceSkill = caster:getSkillLevel(34);

	local power = 40 + 0.2 * enchanceSkill;
	
	local equippedLegs = caster:getEquipID(SLOT_LEGS);
	if(equippedLegs == 15119) then
		power = power + 20;
	elseif(equippedLegs == 15582) then
		power = power + 22;
	elseif(equippedLegs == 10712) then
		power = power + 25;
	end

	local duration = 150;

	if(enchanceSkill >180)then
		duration = 150 + 0.8 * (enchanceSkill - 180);
	end

	if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then
		duration = duration * 3;
	end

	target:addStatusEffect(EFFECT_BARBLIZZARD,power,0,duration,0,1);

	return EFFECT_BARBLIZZARD;
end;

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: WHM AF Pants Barspell Mods

Post by StyxRiver » Fri Sep 27, 2013 4:20 pm

Probably would've helped if I uploaded the patch. :oops:
Attachments
WhmAfLegsBarspellUpdate.patch
(7.3 KiB) Downloaded 271 times

lautan
Developer
Posts: 164
Joined: Mon Jul 30, 2012 6:17 pm

Re: WHM AF Pants Barspell Mods

Post by lautan » Sat Sep 28, 2013 4:07 pm

Would make more sense to add a new function in magic.lua that all resist spells can use.

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: WHM AF Pants Barspell Mods

Post by StyxRiver » Sat Sep 28, 2013 4:50 pm

True. I'll do that, thanks for the heads up.

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: WHM AF Pants Barspell Mods

Post by StyxRiver » Sat Sep 28, 2013 5:50 pm

Lautan, thanks for the advice. I'm just dipping my little toe into this massive project, so the assist is greatly appreciated.

Attached is the patch with your suggestion. A modification to the main magic.lua with minor changes to all elemental barspells.
Attachments
WhmAfLegsBarspellUpdate.patch
(6.9 KiB) Downloaded 272 times

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: WHM AF Pants Barspell Mods

Post by whasf » Sat Oct 05, 2013 9:21 am

Committed r4045
Thanks!
-- Whasf

Post Reply