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
commit5ffec3d741ee12ffdf55467dee5245cd50b9f702 (patch)
treecd04f375116d2f97dc8a93e66b3d71ee6b4d5159 /src/map/script.c
parent771ec0d02a5660a10f27d8545917104f40e802fa (diff)
downloadhercules-5ffec3d741ee12ffdf55467dee5245cd50b9f702.tar.gz
hercules-5ffec3d741ee12ffdf55467dee5245cd50b9f702.tar.bz2
hercules-5ffec3d741ee12ffdf55467dee5245cd50b9f702.tar.xz
hercules-5ffec3d741ee12ffdf55467dee5245cd50b9f702.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/trunk@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);