diff options
author | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-03-09 12:50:24 +0000 |
---|---|---|
committer | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-03-09 12:50:24 +0000 |
commit | 5cca96bf950bcd9586ab04f0e0f2b5d9a556c5e0 (patch) | |
tree | 1f546bf12a99017b41ae2fd90e0ac452f97b0282 /src/map/skill.c | |
parent | b4208257ea0906e375024f811d8e51208d539d35 (diff) | |
download | hercules-5cca96bf950bcd9586ab04f0e0f2b5d9a556c5e0.tar.gz hercules-5cca96bf950bcd9586ab04f0e0f2b5d9a556c5e0.tar.bz2 hercules-5cca96bf950bcd9586ab04f0e0f2b5d9a556c5e0.tar.xz hercules-5cca96bf950bcd9586ab04f0e0f2b5d9a556c5e0.zip |
* Merged changes from trunk [14688:14739/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14740 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index cd9115df4..160beeaef 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5692,6 +5692,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case ALL_WEWISH: clif_skill_nodamage(src,bl,skillid,skilllv,1); break; + case ALL_BUYING_STORE: + if( sd ) + {// players only, skill allows 5 buying slots + clif_skill_nodamage(src, bl, skillid, skilllv, buyingstore_setup(sd, MAX_BUYINGSTORE_SLOTS)); + } + break; default: ShowWarning("skill_castend_nodamage_id: Unknown skill used:%d\n",skillid); clif_skill_nodamage(src,bl,skillid,skilllv,1); @@ -6754,15 +6760,23 @@ int skill_dance_overlap(struct skill_unit* unit, int flag) *------------------------------------------*/ static bool skill_dance_switch(struct skill_unit* unit, int flag) { + static int prevflag = 1; // by default the backup is empty static struct skill_unit_group backup; struct skill_unit_group* group = unit->group; - //TODO: add protection against attempts to read an empty backup / write to a full backup - // val2&UF_ENSEMBLE is a hack to indicate dissonance if ( !(group->state.song_dance&0x1 && unit->val2&UF_ENSEMBLE) ) return false; + if( flag == prevflag ) + {// protection against attempts to read an empty backup / write to a full backup + ShowError("skill_dance_switch: Attempted to %s (skill_id=%d, skill_lv=%d, src_id=%d).\n", + flag ? "read an empty backup" : "write to a full backup", + group->skill_id, group->skill_lv, group->src_id); + return false; + } + prevflag = flag; + if( !flag ) { //Transform int skillid = unit->val2&UF_SONG ? BA_DISSONANCE : DC_UGLYDANCE; |