summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-03-17 19:32:04 -0300
committerJesusaves <cpntb1@ymail.com>2018-03-17 19:32:04 -0300
commit68528b7e639693a8f2c1442bd960252be136ec33 (patch)
treef7cf12babdc08a4bed2aa51c27f9841445cdfbdf /npc/functions
parentc7deba34f182f9dfa5849a10013f2631a7893017 (diff)
downloadserverdata-68528b7e639693a8f2c1442bd960252be136ec33.tar.gz
serverdata-68528b7e639693a8f2c1442bd960252be136ec33.tar.bz2
serverdata-68528b7e639693a8f2c1442bd960252be136ec33.tar.xz
serverdata-68528b7e639693a8f2c1442bd960252be136ec33.zip
Fish arrays weren't using getvariableofnpc(), so fix them to use it (untested)
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/fishing.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index b00b499ac..be11579d9 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -105,17 +105,17 @@ function script fishing {
.@fish_id = CommonCarp; // failsafe
- if (getarraysize(.common_fish) < 1)
+ if (getarraysize(getvariableofnpc(.common_fish, .@npc$)) < 1)
{
// default fishes
- setarray .common_fish,
+ setarray .@common_fish,
CommonCarp;
}
- if (getarraysize(.rare_fish) < 1)
+ if (getarraysize(getvariableofnpc(.rare_fish, .@npc$)) < 1)
{
// default fishes
- setarray .rare_fish,
+ setarray .@rare_fish,
GrassCarp;
}
@@ -196,9 +196,9 @@ function script fishing {
// RNG to obtain a rare fish or common fish
if (rand(.@rare_fish_chance) <= getvariableofnpc(.bait_ids[@bait_d+1], .@npc$))
{
- .@fish_id = .rare_fish[rand(getarraysize(.rare_fish))];
+ .@fish_id = .@rare_fish[rand(getarraysize(.@rare_fish))];
} else {
- .@fish_id = .common_fish[rand(getarraysize(.common_fish))];
+ .@fish_id = .@common_fish[rand(getarraysize(.@common_fish))];
}
// RNG to obtain a fish