summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-04-09 19:34:29 -0300
committerpanikon <panikon@zoho.com>2014-04-09 19:34:29 -0300
commit4147d9f7966e7ebd94811248527cc45af1e54941 (patch)
treec1269d484db9af4318f84041f655fa6fcb9a0d16 /src/map
parent47680829048288376aec23102b9660f36f4463ee (diff)
downloadhercules-4147d9f7966e7ebd94811248527cc45af1e54941.tar.gz
hercules-4147d9f7966e7ebd94811248527cc45af1e54941.tar.bz2
hercules-4147d9f7966e7ebd94811248527cc45af1e54941.tar.xz
hercules-4147d9f7966e7ebd94811248527cc45af1e54941.zip
Fixed issue: 7725
http://hercules.ws/board/tracker/issue-7725-disguise-hide-skill-bug/ Fixed issue: 8027 http://hercules.ws/board/tracker/issue-8027-when-the-storage-is-open-you-can-use-self-skills/ Fixed issue where @at showed it failed when it succeeded
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c5
-rw-r--r--src/map/clif.c19
-rw-r--r--src/map/pc.c7
3 files changed, 29 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 09159c3f7..9e33f3c68 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9954,6 +9954,11 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa
//Attempt to use the command
if ( (info->func(fd, (*atcmd_msg == atcommand->at_symbol) ? sd : ssd, command, params,info) != true) ) {
+#ifdef AUTOTRADE_PERSISTENCY
+ // Autotrade was successful if standalone is set
+ if( ((*atcmd_msg == atcommand->at_symbol) ? sd->state.standalone : ssd->state.standalone) )
+ return true;
+#endif
sprintf(output,msg_txt(154), command); // %s failed.
clif->message(fd, output);
return true;
diff --git a/src/map/clif.c b/src/map/clif.c
index 2dbe7cb96..6ca117284 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3204,6 +3204,12 @@ void clif_changelook(struct block_list *bl,int type,int val)
break;
case LOOK_BASE:
if( !sd ) break;
+ // We shouldn't update LOOK_BASE if the player is disguised
+ // if we do so the client will think that the player class
+ // is really a mob and issues like 7725 will happen in every
+ // SC_ that alters class_ in any way [Panikon]
+ if( sd->disguise != -1 )
+ return;
if( sd->sc.option&OPTION_COSTUME )
vd->weapon = vd->shield = 0;
@@ -11321,8 +11327,17 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
#endif
return;
}
- if( pc_cant_act(sd) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
- return;
+
+ if( pc_cant_act(sd)
+ && skill_id != RK_REFRESH
+ && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN))
+ ) {
+ // SELF skills can be used with the storage open, issue: 8027
+ if( sd->state.storage_flag && tmp&INF_SELF_SKILL )
+ storage->close(sd);
+ else
+ return;
+ }
if( pc_issit(sd) )
return;
diff --git a/src/map/pc.c b/src/map/pc.c
index 42b79ed92..848238ed2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1758,6 +1758,13 @@ int pc_disguise(struct map_session_data *sd, int class_) {
status->set_viewdata(&sd->bl, class_);
clif->changeoption(&sd->bl);
+ // We need to update the client so it knows that a costume is being used
+ if( sd->sc.option&OPTION_COSTUME ) {
+ clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_);
+ clif->changelook(&sd->bl,LOOK_WEAPON,0);
+ clif->changelook(&sd->bl,LOOK_SHIELD,0);
+ clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
+ }
if (sd->bl.prev != NULL) {
clif->spawn(&sd->bl);