#513 AddSkill() & RemoveSkill() not maintained on reload

Closed
opened 1 year ago by Dorbin · 1 comments
Dorbin commented 1 year ago

AddSkill() & RemoveSkill() do not maintain changes after a player re-logs or zones.

Partial example used in our Subclass to Commoner Script:

function SkillSwitch(NPC,player) if HasSkill(player, 609880714) then -- Defense

RemoveSkill(player, 609880714)

end

if HasSkill(player, 540022425) then -- Parry

RemoveSkill(player, 540022425)

end

if HasSkill(player, 2897193374) then -- Light Armor

RemoveSkill(player, 2897193374)

end

if HasSkill(player, 2246237129) then -- Medium Armor

RemoveSkill(player, 2246237129)

end

if HasSkill(player, 241174330) then -- Heavy Armor

RemoveSkill(player, 241174330)

end

--COMMONER GAINED SKILLS

if not HasSkill(player, 2072844078) then -- Magic Affinity

AddSkill(player, 2072844078,1,5)

end

if not HasSkill(player, 3539032716) then -- Very Light Armor

AddSkill(player, 3539032716,1,5)

end

if not HasSkill(player, 2383540775) then -- Spell Avoidance

AddSkill(player, 2383540775,30,30)

end

if not HasSkill(player, 609880714) then -- Defense

AddSkill(player, 609880714,30,30)

end

AddSkill() & RemoveSkill() do not maintain changes after a player re-logs or zones. Partial example used in our Subclass to Commoner Script: function SkillSwitch(NPC,player) if HasSkill(player, 609880714) then -- Defense RemoveSkill(player, 609880714) end if HasSkill(player, 540022425) then -- Parry RemoveSkill(player, 540022425) end if HasSkill(player, 2897193374) then -- Light Armor RemoveSkill(player, 2897193374) end if HasSkill(player, 2246237129) then -- Medium Armor RemoveSkill(player, 2246237129) end if HasSkill(player, 241174330) then -- Heavy Armor RemoveSkill(player, 241174330) end --COMMONER GAINED SKILLS if not HasSkill(player, 2072844078) then -- Magic Affinity AddSkill(player, 2072844078,1,5) end if not HasSkill(player, 3539032716) then -- Very Light Armor AddSkill(player, 3539032716,1,5) end if not HasSkill(player, 2383540775) then -- Spell Avoidance AddSkill(player, 2383540775,30,30) end if not HasSkill(player, 609880714) then -- Defense AddSkill(player, 609880714,30,30) end
image commented 11 months ago
Collaborator

Fixed by 716f9affa3

Fixed by https://git.eq2emu.com/devn00b/EQ2EMu/commit/716f9affa317edc358615fa9cca017ff21d2e31c
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.