summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-02 04:24:46 +0000
committerParadox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-02 04:24:46 +0000
commit0155c9666c00e75a341b9d7bffc16745b5ed897f (patch)
treef876cbe58fcb5a52d642b5ea215236dc1c14bbab /src/map/script.c
parent1e87d8276dd8a5535b311299d5666430b61898c4 (diff)
downloadhercules-0155c9666c00e75a341b9d7bffc16745b5ed897f.tar.gz
hercules-0155c9666c00e75a341b9d7bffc16745b5ed897f.tar.bz2
hercules-0155c9666c00e75a341b9d7bffc16745b5ed897f.tar.xz
hercules-0155c9666c00e75a341b9d7bffc16745b5ed897f.zip
Applied patch by xazax to clean up various bits of code across mapserver code. (bugreport:4512)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14438 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/map/script.c b/src/map/script.c
index ac7ac9163..68f291f2c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7517,7 +7517,6 @@ BUILDIN_FUNC(getmobdrops)
{
int class_ = script_getnum(st,2);
int i, j = 0;
- struct item_data *i_data;
struct mob_db *mob;
if( !mobdb_checkid(class_) )
@@ -7532,7 +7531,7 @@ BUILDIN_FUNC(getmobdrops)
{
if( mob->dropitem[i].nameid < 1 )
continue;
- if( (i_data = itemdb_exists(mob->dropitem[i].nameid)) == NULL )
+ if( itemdb_exists(mob->dropitem[i].nameid) == NULL )
continue;
mapreg_setreg(add_str("$@MobDrop_item") + (j<<24), mob->dropitem[i].nameid);
@@ -10039,10 +10038,9 @@ BUILDIN_FUNC(divorce)
BUILDIN_FUNC(ispartneron)
{
TBL_PC *sd=script_rid2sd(st);
- TBL_PC *p_sd=NULL;
if(sd==NULL || !pc_ismarried(sd) ||
- (p_sd=map_charid2sd(sd->status.partner_id)) == NULL) {
+ map_charid2sd(sd->status.partner_id) == NULL) {
script_pushint(st,0);
return 0;
}
@@ -11352,12 +11350,9 @@ BUILDIN_FUNC(movenpc)
*------------------------------------------*/
BUILDIN_FUNC(message)
{
- TBL_PC *sd;
const char *msg,*player;
TBL_PC *pl_sd = NULL;
- sd = script_rid2sd(st);
-
player = script_getstr(st,2);
msg = script_getstr(st,3);