summaryrefslogtreecommitdiff
path: root/npc/guild
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-24 07:59:43 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-24 07:59:43 +0000
commit285c3820a753982afc30e20286565e74be9b3008 (patch)
treed6f3596841d58171bcacee3eb9e20c820cc1d589 /npc/guild
parentdfe674f0482005f4d8e915e58daad8b414084a7f (diff)
downloadhercules-285c3820a753982afc30e20286565e74be9b3008.tar.gz
hercules-285c3820a753982afc30e20286565e74be9b3008.tar.bz2
hercules-285c3820a753982afc30e20286565e74be9b3008.tar.xz
hercules-285c3820a753982afc30e20286565e74be9b3008.zip
- Fixed a possible exploit in guild castle investment. (bugreport:4929, topic:272783)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14833 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/guild')
-rw-r--r--npc/guild/agit_template.txt17
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.";