diff options
author | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-14 06:33:38 +0000 |
---|---|---|
committer | Lupus <Lupus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-14 06:33:38 +0000 |
commit | edf1e8535b76c263fdf9fb8f21b94c8bc06b0ef7 (patch) | |
tree | 3f2e10f9fad1aeab240aba7a2efd9e82ebc7407b /npc | |
parent | f9aca471849dfd69a9e8a752e949cc47e2a72d24 (diff) | |
download | hercules-edf1e8535b76c263fdf9fb8f21b94c8bc06b0ef7.tar.gz hercules-edf1e8535b76c263fdf9fb8f21b94c8bc06b0ef7.tar.bz2 hercules-edf1e8535b76c263fdf9fb8f21b94c8bc06b0ef7.tar.xz hercules-edf1e8535b76c263fdf9fb8f21b94c8bc06b0ef7.zip |
fixed WoE defence/eco underflow
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8741 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc')
-rw-r--r-- | npc/Changelog.txt | 1 | ||||
-rw-r--r-- | npc/guild/gldfunc_ev_agit.txt | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/npc/Changelog.txt b/npc/Changelog.txt index 8aae4acab..696c527b5 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -35,6 +35,7 @@ Date Added 09/14
* Fixed typos in Gunslinger & Thief Job Quest & various NPCs [Lupus]
thanks to cbmaster & $ephiroth
+ - Fixed Guild Defence / Economy underflow, thx2 kyoki
09/11
* Moved custom Umbalian quests to custom folder [Lupus]
* Added back Guild Storage. Confirmed kRO feature. [Lupus]
diff --git a/npc/guild/gldfunc_ev_agit.txt b/npc/guild/gldfunc_ev_agit.txt index d323eb420..d6038fedb 100644 --- a/npc/guild/gldfunc_ev_agit.txt +++ b/npc/guild/gldfunc_ev_agit.txt @@ -4,7 +4,7 @@ //= jAthena - kalen (1.0)
//= 1.1 by Akaru, ho|yAnge|X, and Valaris
//===== Current Version: =====================================
-//= 1.3
+//= 1.3a
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -25,6 +25,7 @@ //= v1.2: All OnAgitStart and OnAgitBreak calls will use these functions.[kobra_k88]
//= v1.2a: Added OnAgitEnd function.[kobra_k88]
//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//= 1.3a fixed Defence / Economy underflow [Lupus] thanks2 kyoki
//============================================================
@@ -127,12 +128,15 @@ function script F_AgitBreak { //killmonsterall getarg(0)+".gat";
set @GID,getcharid(2);
if (@GID <= 0) return;
- set @Economy,GetCastleData(getarg(0)+".gat",2);
- SetCastleData getarg(0)+".gat",2, @Economy-5;
- if (GetCastleData(getarg(0)+".gat",2) < 0) SetCastleData getarg(0)+".gat",2,0;
- set @Defence,GetCastleData(getarg(0)+".gat",3);
- SetCastleData getarg(0)+".gat",3, @Defence-5;
- if (GetCastleData(getarg(0)+".gat",3) < 0) SetCastleData getarg(0)+".gat",3,0;
+
+ set @Economy,GetCastleData(getarg(0)+".gat",2) - 5;
+ if (@Economy < 0) set @Economy, 0;
+ SetCastleData getarg(0)+".gat",2, @Economy;
+
+ set @Defence,GetCastleData(getarg(0)+".gat",3) - 5;
+ if (@Defence < 0) set @Defence, 0;
+ SetCastleData getarg(0)+".gat",3, @Defence;
+
SetCastleData getarg(0)+".gat",1, @GID;
MapAnnounce getarg(0)+".gat","The emperium has been destroyed.",17;
Announce "Guild Base [" + GetCastleName(getarg(0)+".gat") + "] has been taken by the [" + GetGuildName(@GID) + "] guild.",0;
|