Hello I have a problem with this piece of lua script.. it should cast a protective shield on the player, but instead it casts it on the unit itself..
Code:
function Crystal_OnGossipTalk(Antza, Event, Player)
Antza:GossipCreateMenu(300, Player , 0)
Antza:GossipMenuAddItem(0, "Use the power of the Crystal to protect yourself from explosions.", 0, 0)
Antza:GossipSendMenu(Player)
end
function Crystal_OnGossipSelect(Antza, Event, Player, Id, Intid, Code)
if (Intid == 0) then
Antza:FullCastSpellOnTarget(37538, Player)
Player:GossipComplete()
end
end
RegisterUnitGossipEvent(856675, 1, "Crystal_OnGossipTalk")
RegisterUnitGossipEvent(856675, 2, "Crystal_OnGossipSelect")
As you can see I replaced pUnit/Unit with Antza, as it does work too and it makes the script more "personal".. So there's no really difference between pUnit and Unit I guess..