summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 16:01:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 16:01:26 +0000
commit2449d2a6e7ddd1648d2e1fe446c97fe94378af28 (patch)
treece6f82d036029d2954764b2fc7119f538e0347fa /src/map/status.c
parentbb0bd9d290f6dd1f3a455da7d4cd4ae58e8e49a2 (diff)
downloadhercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.gz
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.bz2
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.tar.xz
hercules-2449d2a6e7ddd1648d2e1fe446c97fe94378af28.zip
- Removed message 592 from trade.c
- Removed mapflag nopvp - Added support for disabling mapflags on a mapflag line: comodo.gat mapflag nomemo <- turns on nomemo mapflag comodo.gat mapflag nomemo off <- turns off nomemo mapflag - Cleaned up and optimized the restricted/zones mapflag. Restricted cards will just not work in disallowed maps rather than blocking the compounded equipement from being used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6159 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2cfbbaf89..d40830465 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -814,6 +814,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
if(sd->inventory_data[index]) {
int j,c;
+ struct item_data *data;
+
//Card script execution.
if(sd->status.inventory[index].card[0]==0x00ff ||
sd->status.inventory[index].card[0]==0x00fe ||
@@ -821,17 +823,28 @@ int status_calc_pc(struct map_session_data* sd,int first)
continue;
for(j=0;j<sd->inventory_data[index]->slot;j++){ // ƒJ?ƒh
current_equip_card_id= c= sd->status.inventory[index].card[j];
- if(c>0){
- if(i == 8 && sd->status.inventory[index].equip == 0x20)
- { //Left hand status.
- sd->state.lr_flag = 1;
- run_script(itemdb_equipscript(c),0,sd->bl.id,0);
- sd->state.lr_flag = 0;
- } else
- run_script(itemdb_equipscript(c),0,sd->bl.id,0);
- if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
- return 1;
+ if(!c)
+ continue;
+ data = itemdb_exists(c);
+ if (!data || !data->script)
+ continue;
+ if(data->flag.no_equip) { //Card restriction checks.
+ if(map[sd->bl.m].flag.restricted && data->flag.no_equip&map[sd->bl.m].zone)
+ continue;
+ if(map[sd->bl.m].flag.pvp && data->flag.no_equip&1)
+ continue;
+ if(map_flag_gvg(sd->bl.m) && data->flag.no_equip&2)
+ continue;
}
+ if(i == 8 && sd->status.inventory[index].equip == 0x20)
+ { //Left hand status.
+ sd->state.lr_flag = 1;
+ run_script(data->script,0,sd->bl.id,0);
+ sd->state.lr_flag = 0;
+ } else
+ run_script(data->script,0,sd->bl.id,0);
+ if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+ return 1;
}
}
}