Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SendOOM:ProcessPower(event, arg1)
- if not MrtWoo.db.profile.modules.oom_enable or arg1 ~= "player" then
- return false;
- end;
- local powerType, powerTypeString = UnitPowerType(arg1);
- if powerTypeString == "MANA" then
- local mana = (UnitPower(arg1) / UnitPowerMax(arg1));
- if ( mana <= MrtWoo.db.profile.modules.oom_level/100 ) then
- if ( not SendOOM.lowMana ) then
- --MrtWoo:Print(MrtWoo.db.profile.modules.oom_message, COMBAT_TEXT_LOW_MANA_THRESHOLD);
- if not UnitIsDeadOrGhost(arg1) then
- if GetNumRaidMembers() > 0 then
- SendChatMessage(MrtWoo.db.profile.modules.oom_message, "RAID");
- elseif GetNumPartyMembers() > 0 then
- SendChatMessage(MrtWoo.db.profile.modules.oom_message, "PARTY");
- else
- SendChatMessage(MrtWoo.db.profile.modules.oom_message, "WHISPER", nil, MrtWoo.MyName);
- end
- end;
- SendOOM.lowMana = 1;
- end
- elseif ( mana > MrtWoo.defaults.profile.modules.oom_reset/100 ) then
- SendOOM.lowMana = nil;
- end
- end;
- end;
Add Comment
Please, Sign In to add comment