I don’t see why you guys are making this such a hard patch if you can do this with spells. Add spell_target_position for the triggered spell of this spell and make it add aura on zone enter…
Can someone please test it? I’ll be able to test it next week, so, it would be great if someone can test before and give some feedback /emoticons/default_tongue.png
I think it should work, but I’m not that proficient with spell/aura scripts.
Nice one, I must say. /emoticons/default_smile.png I am afraid big part of the script is not even needed because you can add spell_target_position to the periodically triggered spell. It will then teleport the player away to Shattrat/Dalaran/etc. on hit.
Well… I did some tests and it seems the aura is beeing applied before we get GM mode ON when logging in, cause if I’m at GM Island, logout and login again I’m teleported out. Also, I was using a wrong function to check if the GM is in the island while summoning a player, not applying the “Persuaded” aura as needed. I’m fixing it now.
Just one little problem now, http://www.wowhead.com/spell=73954 keeps active on login/logout and server restart. So if you don’t use “.recall” or “.unaura 73954” the player can still access the island. We have to find another one I guess /emoticons/default_tongue.png
Then moderators would not have access to the island. We could use:
return player && AccountMgr::IsModeratorAccount(player->GetSession()->GetSecurity());
Works for moderators and higher security level.
PS: Check my edit in the post above yours /emoticons/default_tongue.png
EDIT:
There’s no need to check the player pointer, cause the “if” casting the target to Player* will only continue if the unit is actually a Player. (the hook sends us a Unit*)