Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: gazara353 on March 12, 2017, 08:12:34 am

Title: [ELUNA] All spells unlearn system
Post by: gazara353 on March 12, 2017, 08:12:34 am
Hello everyone i have a little problem with RemoveSpell() method on Eluna. What i'm trying to do is unlearn or remove multiple spells from a player. I used a code for learning multiple spells and made it to unlearn them but it don't work.

This works:
   local Spells = {48467, 48463, 48568, 49800, 48572, 48470, 48451, 48469, 50464}
       
   for k,v in ipairs(Spells) do
           plr:LearnSpell(v);
   end

but this not:
   local Spells = {48467, 48463, 48568, 49800, 48572, 48470, 48451, 48469, 50464}
   
   for k,v in ipairs(Spells) do
      plr:RemoveSpell(v);
   end


EDIT:
Now it works fine and i posted the updated code.