diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-24 07:59:43 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-24 07:59:43 +0000 |
commit | b1334e2e32b405ed43569f5482ff7b3d9988d1b8 (patch) | |
tree | bb3aeef01d5cd8b83f3ab81258ba8419c2780401 /npc/guild | |
parent | 7e5da9f35dec37d88a490207b54dd41853db93f9 (diff) | |
download | hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.gz hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.bz2 hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.tar.xz hercules-b1334e2e32b405ed43569f5482ff7b3d9988d1b8.zip |
- Fixed a possible exploit in guild castle investment. (bugreport:4929, topic:272783)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14833 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/guild')
-rw-r--r-- | npc/guild/agit_template.txt | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/npc/guild/agit_template.txt b/npc/guild/agit_template.txt index f43536978..68e9e7f3a 100644 --- a/npc/guild/agit_template.txt +++ b/npc/guild/agit_template.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.7 +//= 1.8 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -49,6 +49,7 @@ //= 1.6b Moved where investments are added to eco/def. [L0ne_W0lf] //= 1.7 Updated Agitbreak announcements, added bc_woe [L0ne_W0lf] //= and added extended anouncement format for mapannounce. +//= 1.8 Fixed a possible exploit in guild castle investment. [Brian] //============================================================ // AGIT Manager Template @@ -525,7 +526,7 @@ OnRecvCastle: mes "^ff0000But the commercial growth level of our castle is peaked at 100%. It doesn't need any more investment. As I expected you have a great acumen, Master.^000000"; close; } - if (GetCastleData(strnpcinfo(2),4) == 2) { + if (GetCastleData(strnpcinfo(2),4) >= 2) { mes "^ff0000But you already invested twice today so you cannot invest any more.^000000 I expect our riches to increase in growth level."; close; } @@ -538,6 +539,11 @@ OnRecvCastle: next; switch(select("Invest in commercial growth:Cancel")) { case 1: + if (GetCastleData(strnpcinfo(2),4) >= 2) { + mes "[ Steward " + .@name$ + " ]"; + mes "I'm sorry but you already invested twice today so you cannot invest any more."; + close; + } if (Zeny < .@eco_invest) { mes "[ Steward " + .@name$ + " ]"; mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master."; @@ -588,7 +594,7 @@ OnRecvCastle: mes "^ff0000But the safeguard level of our castle is peaked at 100%. It doesn't need any more investment. As I expected you have a great acumen, Master.^000000"; close; } - if (GetCastleData(strnpcinfo(2),5) == 2) { + if (GetCastleData(strnpcinfo(2),5) >= 2) { mes "^ff0000But you already invested twice today so you cannot invest any more.^000000 I expect our riches to increase in growth level."; close; } @@ -601,6 +607,11 @@ OnRecvCastle: next; switch(select("Invest in safeguard.:Cancel")) { case 1: + if (GetCastleData(strnpcinfo(2),5) >= 2) { + mes "[ Steward " + .@name$ + " ]"; + mes "I'm sorry but you already invested twice today so you cannot invest any more."; + close; + } if (Zeny < .@def_invest) { mes "[ Steward " + .@name$ + " ]"; mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master."; |