-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOnSpellCast.lua
More file actions
18 lines (17 loc) · 916 Bytes
/
Copy pathOnSpellCast.lua
File metadata and controls
18 lines (17 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local function AntiDonatorBuff(event, player, spell, skipCheck)
local sEntry = spell:GetEntry();
local pMap = player:GetMapId();
if(sEntry == 80873 or sEntry == 80875)then
if(player:InArena() == true or player:InBattleground() == true)then
player:SendAreaTriggerMessage( "Tu ne peux pas avoir le buff donateur en PvP !" );
spell:Cancel();
end
elseif(sEntry == 100001 or sEntry == 100003 or sEntry == 100009 or sEntry == 100011 or sEntry == 100013 or sEntry == 100015 or sEntry == 100021 or sEntry == 100023 or sEntry == 100025 or sEntry == 100032 or sEntry == 100042 or sEntry == 100044 or sEntry == 100046 or sEntry == 100050 or sEntry == 100052 or sEntry == 100056 or sEntry == 100058 or sEntry == 100060)then
if(pMap == 571 or pMap == 530) then
local pToCast = sEntry+1;
player:AddAura(pToCast, player);
player:RemoveAura(sEntry);
end
end
end
RegisterPlayerEvent( 5, AntiDonatorBuff )