summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-27 14:58:44 -0200
committershennetsind <ind@henn.et>2013-10-27 15:00:37 -0200
commitbaef78f7954fa4e6fa2449f2c7de92a901c7f5f3 (patch)
tree090c5aac3afd217d5b11752049a2517c4c58219c /src/map/pc.c
parent8629562655cfcbd6aef97307e3e0c078235619ff (diff)
downloadhercules-baef78f7954fa4e6fa2449f2c7de92a901c7f5f3.tar.gz
hercules-baef78f7954fa4e6fa2449f2c7de92a901c7f5f3.tar.bz2
hercules-baef78f7954fa4e6fa2449f2c7de92a901c7f5f3.tar.xz
hercules-baef78f7954fa4e6fa2449f2c7de92a901c7f5f3.zip
Shadows System Base
http://hercules.ws/board/topic/581-implement-the-shadows-system/ Special Thanks to Yommy for all the client data, Haru for making it possible to get it out and rosfus for the details on the feature. Shadows Feature requires packetver 20120925 or newer. ---------- Also: Updated all packets related to the shadows system, improved memory/processing of inventory/cart/storage/viewequip packets Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b39ae1c59..cbc1ed1d4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -611,6 +611,8 @@ int pc_equippoint(struct map_session_data *sd,int n)
if(ep == EQP_HAND_R && (pc->checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
return EQP_ARMS;
+ if( ep == EQP_SHADOW_SHIELD )/* are there conditions for those? */
+ return EQP_SHADOW_WEAPON|EQP_SHADOW_SHIELD;
}
return ep;
}
@@ -8526,13 +8528,13 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
nullpo_ret(sd);
if( n < 0 || n >= MAX_INVENTORY ) {
- clif->equipitemack(sd,0,0,0);
+ clif->equipitemack(sd,0,0,EIA_FAIL);
return 0;
}
if( DIFF_TICK(sd->canequip_tick,timer->gettick()) > 0 )
{
- clif->equipitemack(sd,n,0,0);
+ clif->equipitemack(sd,n,0,EIA_FAIL);
return 0;
}
@@ -8543,13 +8545,13 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
ShowInfo("equip %d(%d) %x:%x\n",sd->status.inventory[n].nameid,n,id?id->equip:0,req_pos);
if(!pc->isequip(sd,n) || !(pos&req_pos) || sd->status.inventory[n].equip != 0 || sd->status.inventory[n].attribute==1 ) { // [Valaris]
// FIXME: pc->isequip: equip level failure uses 2 instead of 0
- clif->equipitemack(sd,n,0,0); // fail
+ clif->equipitemack(sd,n,0,EIA_FAIL); // fail
return 0;
}
if (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAY_NIGHT_FEVER])
{
- clif->equipitemack(sd,n,0,0); // fail
+ clif->equipitemack(sd,n,0,EIA_FAIL); // fail
return 0;
}
@@ -8589,7 +8591,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
clif->arrow_fail(sd,3);
}
else
- clif->equipitemack(sd,n,pos,1);
+ clif->equipitemack(sd,n,pos,EIA_SUCCESS);
sd->status.inventory[n].equip=pos;
@@ -8738,20 +8740,20 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
nullpo_ret(sd);
if( n < 0 || n >= MAX_INVENTORY ) {
- clif->unequipitemack(sd,0,0,0);
+ clif->unequipitemack(sd,0,0,UIA_FAIL);
return 0;
}
// if player is berserk then cannot unequip
if (!(flag & 2) && sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAY_NIGHT_FEVER]))
{
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
if( !(flag&2) && sd->sc.count && sd->sc.data[SC_KYOUGAKU] )
{
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
@@ -8759,7 +8761,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
ShowInfo("unequip %d %x:%x\n",n,pc->equippoint(sd,n),sd->status.inventory[n].equip);
if(!sd->status.inventory[n].equip){ //Nothing to unequip
- clif->unequipitemack(sd,n,0,0);
+ clif->unequipitemack(sd,n,0,UIA_FAIL);
return 0;
}
for(i=0;i<EQI_MAX;i++) {
@@ -8821,7 +8823,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
}
- clif->unequipitemack(sd,n,sd->status.inventory[n].equip,1);
+ clif->unequipitemack(sd,n,sd->status.inventory[n].equip,UIA_SUCCESS);
if((sd->status.inventory[n].equip & EQP_ARMS) &&
sd->weapontype1 == 0 && sd->weapontype2 == 0 && (!sd->sc.data[SC_TK_SEVENWIND] || sd->sc.data[SC_ASPERSIO])) //Check for seven wind (but not level seven!)