Skip to content

Commit

Permalink
[Lua] WSNM Quest Fix (#6854)
Browse files Browse the repository at this point in the history
Fixes an issue in the quest logic that could allow players to bypass "breaking" their weapons if someone else were to spawn the NM.
Added logic to ensure the player has the key item required
  • Loading branch information
dallano authored Jan 26, 2025
1 parent e6e34bb commit 57ebae0
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 14 deletions.
4 changes: 3 additions & 1 deletion scripts/quests/bastok/Inheritance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ quest.sections =
['Maharaja'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/bastok/Shoot_First_Ask_Questions_Later.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ quest.sections =
['Beet_Leafhopper'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/bastok/The_Walls_of_Your_Mind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ quest.sections =
['Bodach'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/bastok/The_Weight_of_Your_Limits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ quest.sections =
['Greenman'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/jeuno/Axe_the_Competition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ quest.sections =
['Yallery_Brown'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/outlands/Bugi_Soden.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ quest.sections =
['Megapod_Megalops'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/outlands/Cloak_and_Dagger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ quest.sections =
['Baronial_Bat'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/outlands/The_Potential_Within.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ quest.sections =
['Kettenkaefer'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/sandoria/Methods_Create_Madness.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ quest.sections =
['Water_Leaper'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/sandoria/Old_Wounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ quest.sections =
['Girtablulu'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/sandoria/Souls_in_Shadow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ quest.sections =
['Mokumokuren'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/windurst/Blood_and_Glory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ quest.sections =
['Cailleach_Bheur'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/windurst/From_Saplings_Grow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ quest.sections =
['Stolas'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down
4 changes: 3 additions & 1 deletion scripts/quests/windurst/Orastery_Woes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ quest.sections =
['Eldhrimnir'] =
{
onMobDeath = function(mob, player, optParams)
player:setLocalVar('killed_wsnm', 1)
if player:hasKeyItem(xi.ki.MAP_TO_THE_ANNALS_OF_TRUTH) then
player:setLocalVar('killed_wsnm', 1)
end
end,
},
},
Expand Down

0 comments on commit 57ebae0

Please sign in to comment.