Page 1 of 1

WHM AF Pants Barspell Mods

Posted: Wed Sep 25, 2013 7:53 pm
by StyxRiver
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;

Re: WHM AF Pants Barspell Mods

Posted: Fri Sep 27, 2013 4:20 pm
by StyxRiver
Probably would've helped if I uploaded the patch. :oops:

Re: WHM AF Pants Barspell Mods

Posted: Sat Sep 28, 2013 4:07 pm
by lautan
Would make more sense to add a new function in magic.lua that all resist spells can use.

Re: WHM AF Pants Barspell Mods

Posted: Sat Sep 28, 2013 4:50 pm
by StyxRiver
True. I'll do that, thanks for the heads up.

Re: WHM AF Pants Barspell Mods

Posted: Sat Sep 28, 2013 5:50 pm
by StyxRiver
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.

Re: WHM AF Pants Barspell Mods

Posted: Sat Oct 05, 2013 9:21 am
by whasf
Committed r4045
Thanks!