summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-22 17:10:52 +0000
committereathenabot <eathenabot@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-22 17:10:52 +0000
commitc1f0869d00c03a8f5d4ed111864d123d8784d460 (patch)
tree7426b1db2ebd521b989cbe3116d481da30f945c8
parentd54d1c18235d2283da0d165ca1b7e1065f69d598 (diff)
downloadhercules-c1f0869d00c03a8f5d4ed111864d123d8784d460.tar.gz
hercules-c1f0869d00c03a8f5d4ed111864d123d8784d460.tar.bz2
hercules-c1f0869d00c03a8f5d4ed111864d123d8784d460.tar.xz
hercules-c1f0869d00c03a8f5d4ed111864d123d8784d460.zip
* Merged changes up to eAthena 15086.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15926 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--sql-files/logs.sql2
-rw-r--r--sql-files/upgrade_svn15926_log.sql3
-rw-r--r--src/map/pc.c9
3 files changed, 11 insertions, 3 deletions
diff --git a/sql-files/logs.sql b/sql-files/logs.sql
index bd33fbd1f..c787b60ab 100644
--- a/sql-files/logs.sql
+++ b/sql-files/logs.sql
@@ -31,7 +31,7 @@ CREATE TABLE `zenylog` (
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`char_id` int(11) NOT NULL default '0',
`src_id` int(11) NOT NULL default '0',
- `type` enum('M','T','V','S','N','A','E','B','I') NOT NULL default 'S',
+ `type` enum('M','T','V','S','N','A','E','B','I','D') NOT NULL default 'S',
`amount` int(11) NOT NULL default '0',
`map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
diff --git a/sql-files/upgrade_svn15926_log.sql b/sql-files/upgrade_svn15926_log.sql
new file mode 100644
index 000000000..099ee6faa
--- /dev/null
+++ b/sql-files/upgrade_svn15926_log.sql
@@ -0,0 +1,3 @@
+-- Adds 'D' to `type` in `zenylog`
+
+ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I','D') NOT NULL DEFAULT 'S';
diff --git a/src/map/pc.c b/src/map/pc.c
index 5a28f63b9..e2bf1b725 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4368,10 +4368,15 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
if( (md->class_ >= 1324 && md->class_ < 1364) || (md->class_ >= 1938 && md->class_ < 1946) )
return 0;
+ // FIXME: This formula is either custom or outdated.
skill = pc_checkskill(sd,RG_STEALCOIN)*10;
rate = skill + (sd->status.base_level - md->level)*3 + sd->battle_status.dex*2 + sd->battle_status.luk*2;
- if(rnd()%1000 < rate) {
- pc_getzeny(sd,md->level*10 + rnd()%100);
+ if(rnd()%1000 < rate)
+ {
+ int amount = md->level*10 + rand()%100;
+
+ log_zeny(sd, LOG_TYPE_STEAL, sd, amount);
+ pc_getzeny(sd, amount);
md->state.steal_coin_flag = 1;
return 1;
}