Skip to content

Commit

Permalink
fix bugs and up wow version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitaarwerk committed May 3, 2023
1 parent d1f1540 commit fd0c48a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 67 deletions.
4 changes: 2 additions & 2 deletions Public/NurseNancy.toc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Interface: 100007
## Interface: 100100
## Title: Nurse Nancy
## Version: @project-version@
## Author: Darkrider - Dunemaul (EU),
## Notes: Tells in party, instance or raid who you are ressing

## X-Min-Interface: 100007
## X-Min-Interface: 100100
## X-Curse-Project-ID: 846566
## X-Category: Boss encounters, Raid, Chat, Healer
## X-License: All Rights Reserved
Expand Down
90 changes: 35 additions & 55 deletions Public/Src/ConfigurationScreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@

NurseNancy_ConfigScreen_NurseNancy:SetChecked(NurseNancyVars.nurseNancyIsOn);

-- single channel
_G[NurseNancy_ConfigScreen_SingleRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_SingleRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_SingleRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_SingleRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_SingleRess_Channel:SetMinMaxValues(0,3)

-- mass channel
_G[NurseNancy_ConfigScreen_MassRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_MassRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_MassRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_MassRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_MassRess_Channel:SetMinMaxValues(0,3)

-- combat ress channel
_G[NurseNancy_ConfigScreen_CombatRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_CombatRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_CombatRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_CombatRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_CombatRess_Channel:SetMinMaxValues(0,3)

-- self ress channel
_G[NurseNancy_ConfigScreen_SelfRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_SelfRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_SelfRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_SelfRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_SelfRess_Channel:SetMinMaxValues(0,3)


_G[NurseNancy_ConfigScreen_SingleRess_Channel:GetName().."Text"]:SetText(NurseNancyVars.singleRess_text)
NurseNancy_ConfigScreen_SingleRess_Channel:SetValue(NurseNancyVars.singleRess_channel)
NurseNancy_ConfigScreen_SingleRess_Instance:SetChecked(NurseNancyVars.singleRess_instance)
Expand Down Expand Up @@ -80,19 +109,11 @@
</Size>
<Anchors>
<Anchor point="CENTER"/>
<Offset><AbsDimension x="0" y="0"/></Offset>
</Anchors>

<Layers>
<Layer level="BACKGROUND">
<Texture name="$parent_Background" setAllPoints="true">
<Color r="0" g="0" b="0" a="0.65" />
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize val="16"/>
<TileSize val="32"/>
<BackgroundInsets left="5" right="5" top="5" bottom="5"/>
</Backdrop>
</Texture>
</Layer>
<Layer level="BORDER" textureSubLevel="-5">
Expand Down Expand Up @@ -230,14 +251,6 @@
</Layer>
</Layers>
<Scripts>
<OnLoad>
_G[NurseNancy_ConfigScreen_SingleRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_SingleRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_SingleRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_SingleRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_SingleRess_Channel:SetMinMaxValues(0,3)
NurseNancy_ConfigScreen_SingleRess_Channel:SetValue(NurseNancyVars.selfRess_channel)
</OnLoad>
<OnValueChanged>
NurseNancy_ConfigScreen_SetChannel('singleRess', value)
</OnValueChanged>
Expand All @@ -259,14 +272,6 @@
</Layer>
</Layers>
<Scripts>
<OnLoad>
_G[NurseNancy_ConfigScreen_MassRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_MassRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_MassRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_MassRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_MassRess_Channel:SetMinMaxValues(0,3)
NurseNancy_ConfigScreen_MassRess_Channel:SetValue(NurseNancyVars.selfRess_channel)
</OnLoad>
<OnValueChanged>
NurseNancy_ConfigScreen_SetChannel('massRess', value)
</OnValueChanged>
Expand All @@ -288,14 +293,6 @@
</Layer>
</Layers>
<Scripts>
<OnLoad>
_G[NurseNancy_ConfigScreen_CombatRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_CombatRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_CombatRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_CombatRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_CombatRess_Channel:SetMinMaxValues(0,3)
NurseNancy_ConfigScreen_CombatRess_Channel:SetValue(NurseNancyVars.selfRess_channel)
</OnLoad>
<OnValueChanged>
NurseNancy_ConfigScreen_SetChannel('combatRess', value)
</OnValueChanged>
Expand All @@ -318,12 +315,7 @@
</Layers>
<Scripts>
<OnLoad>
_G[NurseNancy_ConfigScreen_SelfRess_Channel:GetName().."Low"]:SetText("none")
_G[NurseNancy_ConfigScreen_SelfRess_Channel:GetName().."High"]:SetText("raid")
NurseNancy_ConfigScreen_SelfRess_Channel:SetValueStep(1)
NurseNancy_ConfigScreen_SelfRess_Channel:SetStepsPerPage(1)
NurseNancy_ConfigScreen_SelfRess_Channel:SetMinMaxValues(0,3)
NurseNancy_ConfigScreen_SelfRess_Channel:SetValue(NurseNancyVars.selfRess_channel)

</OnLoad>
<OnValueChanged>
NurseNancy_ConfigScreen_SetChannel('selfRess', value)
Expand All @@ -332,7 +324,7 @@
</Slider>

<!-- nurse nancy -->
<CheckButton name="NurseNancy_ConfigScreen_NurseNancy" inherits="OptionsCheckButtonTemplate" motionScriptsWhileDisabled="true" virtual="false">
<CheckButton name="NurseNancy_ConfigScreen_NurseNancy" inherits="UIPanelButtonTemplate " motionScriptsWhileDisabled="true" virtual="false">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
Expand Down Expand Up @@ -360,7 +352,7 @@
</CheckButton>

<!-- single ress -->
<CheckButton name="NurseNancy_ConfigScreen_SingleRess_Instance" inherits="OptionsCheckButtonTemplate" motionScriptsWhileDisabled="true" virtual="false">
<CheckButton name="NurseNancy_ConfigScreen_SingleRess_Instance" inherits="UIPanelButtonTemplate " motionScriptsWhileDisabled="true" virtual="false">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
Expand All @@ -372,9 +364,6 @@
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
NurseNancy_ConfigScreen_SingleRess_Instance:SetChecked(NurseNancyVars.singleRess_instance)
</OnLoad>
<OnClick>
if (NurseNancy_ConfigScreen_SingleRess_Instance:GetChecked() == true) then
NurseNancy_ConfigScreen_SingleRess_Instance:SetValue(false)
Expand All @@ -392,7 +381,7 @@
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
</CheckButton>

<CheckButton name="NurseNancy_ConfigScreen_MassRess_Instance" inherits="OptionsCheckButtonTemplate" motionScriptsWhileDisabled="true" virtual="false">
<CheckButton name="NurseNancy_ConfigScreen_MassRess_Instance" inherits="UIPanelButtonTemplate " motionScriptsWhileDisabled="true" virtual="false">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
Expand All @@ -404,9 +393,6 @@
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
NurseNancy_ConfigScreen_MassRess_Instance:SetChecked(NurseNancyVars.massRess_instance)
</OnLoad>
<OnClick>
if (NurseNancy_ConfigScreen_MassRess_Instance:GetChecked() == true) then
NurseNancy_ConfigScreen_MassRess_Instance:SetValue(false)
Expand All @@ -424,7 +410,7 @@
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
</CheckButton>

<CheckButton name="NurseNancy_ConfigScreen_CombatRess_Instance" inherits="OptionsCheckButtonTemplate" motionScriptsWhileDisabled="true" virtual="false">
<CheckButton name="NurseNancy_ConfigScreen_CombatRess_Instance" inherits="UIPanelButtonTemplate " motionScriptsWhileDisabled="true" virtual="false">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
Expand All @@ -436,9 +422,6 @@
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
NurseNancy_ConfigScreen_CombatRess_Instance:SetChecked(NurseNancyVars.combatRess_instance)
</OnLoad>
<OnClick>
if (NurseNancy_ConfigScreen_CombatRess_Instance:GetChecked() == true) then
NurseNancy_ConfigScreen_CombatRess_Instance:SetValue(false)
Expand All @@ -456,7 +439,7 @@
<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
</CheckButton>

<CheckButton name="NurseNancy_ConfigScreen_SelfRess_Instance" inherits="OptionsCheckButtonTemplate" motionScriptsWhileDisabled="true" virtual="false">
<CheckButton name="NurseNancy_ConfigScreen_SelfRess_Instance" inherits="UIPanelButtonTemplate " motionScriptsWhileDisabled="true" virtual="false">
<Size>
<AbsDimension x="25" y="25"/>
</Size>
Expand All @@ -468,9 +451,6 @@
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
NurseNancy_ConfigScreen_SelfRess_Instance:SetChecked(NurseNancyVars.selfRess_instance)
</OnLoad>
<OnClick>
if (NurseNancy_ConfigScreen_SelfRess_Instance:GetChecked() == true) then
NurseNancy_ConfigScreen_SelfRess_Instance:SetValue(false)
Expand Down
24 changes: 14 additions & 10 deletions Public/Src/NurseNancy/NurseNancy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,26 @@ local function getBroadcastChannel(broadCastChannels, canBroadcastToInstance)
local canBroadcastToParty = canBroadcastParty(broadCastChannels)
local canBroadcastToRaid = canBroadcastRaid(broadCastChannels)
local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceID, instanceGroupSize, LfgDungeonID = GetInstanceInfo();
local isInInstance = str_to_bool(LfgDungeonID)
local isInInstance = false;

if (LfgDungeonID) then
isInInstance = true;
end

local groupSetup = IsInRaid() and "raid" or "party";

if (not(instanceType == "party" or instanceType == "raid")) then
return nil;
end

if (instanceType == "party" and canBroadcastToParty == true and canBroadcastToInstance == true and isInInstance == true) then
return "INSTANCE_CHAT"
end

if (instanceType == "raid" and canBroadcastToRaid == true and canBroadcastToInstance == true and isInInstance == true) then
return "INSTANCE_CHAT"
end

if (instanceType == "party" and groupSetup == "party" and canBroadcastToParty == true and isInInstance == false) then
return "PARTY"
end
Expand All @@ -404,14 +416,6 @@ local function getBroadcastChannel(broadCastChannels, canBroadcastToInstance)
if ((instanceType == "raid" and groupSetup == "raid") and canBroadcastToRaid == true and isInInstance == false) then
return "RAID"
end

if (instanceType == "party" and canBroadcastToParty == true and canBroadcastToInstance == true and isInInstance == true) then
return "INSTANCE_CHAT"
end

if (instanceType == "raid" and canBroadcastToRaid == true and canBroadcastToInstance == true and isInInstance == true) then
return "INSTANCE_CHAT"
end
end


Expand Down Expand Up @@ -470,7 +474,7 @@ function NurseNancy.NurseNancy.Run()
return
end

local unitIdentificator = UnitGUID(target)
local unitIdentificator = UnitGUID(target or "player")

local isCombatRess = NurseNancy.SpellIds.isCombatRess(spellId)
local isSingleRess = NurseNancy.SpellIds.isSingleRess(spellId)
Expand Down

0 comments on commit fd0c48a

Please sign in to comment.