summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-08 12:32:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-08 12:32:45 +0000
commit61f8a2a0670998c502684bb8ecf88e0fb4d256ab (patch)
tree349f27fa3dc5483055d331a5a330f1621b0d0449 /src/map/skill.c
parent951ab9d41f399b436e1221d894d1e7c43ea8267e (diff)
downloadhercules-61f8a2a0670998c502684bb8ecf88e0fb4d256ab.tar.gz
hercules-61f8a2a0670998c502684bb8ecf88e0fb4d256ab.tar.bz2
hercules-61f8a2a0670998c502684bb8ecf88e0fb4d256ab.tar.xz
hercules-61f8a2a0670998c502684bb8ecf88e0fb4d256ab.zip
* Fixed a couple bugs with marionette control
- Reduces caster max hp by 1000. - Job and Equipment bonuses counts toward the 99 limit. - Fixed stat overflow on baby targets with stats over 80 (bugreport:2232). - Fixed clowns being able to cast it on another bard/clown (same for gypsy/dancer) (bugreport:166). - Caster is no longer blocked from using items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13572 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 54f8495f8..78d29cb40 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3267,22 +3267,35 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case CG_MARIONETTE:
{
- struct status_change *sc= status_get_sc(src);
- enum sc_type type2 = SC_MARIONETTE2;
+ struct status_change* sc = status_get_sc(src);
- if(sc && tsc){
- if (!sc->data[type] && !tsc->data[type2]) {
- sc_start(src,type,100,bl->id,skill_get_time(skillid,skilllv));
- sc_start(bl,type2,100,src->id,skill_get_time(skillid,skilllv));
+ if( sd && dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER && dstsd->status.sex == sd->status.sex )
+ {// Cannot cast on another bard/dancer-type class of the same gender as caster
+ clif_skill_fail(sd,skillid,0,0);
+ map_freeblock_unlock();
+ return 1;
+ }
+
+ if( sc && tsc )
+ {
+ if( !sc->data[SC_MARIONETTE] && !tsc->data[SC_MARIONETTE2] )
+ {
+ sc_start(src,SC_MARIONETTE,100,bl->id,skill_get_time(skillid,skilllv));
+ sc_start(bl,SC_MARIONETTE2,100,src->id,skill_get_time(skillid,skilllv));
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
- else if (sc->data[type] && tsc->data[type2] &&
- sc->data[type]->val1 == bl->id && tsc->data[type2]->val1 == src->id) {
- status_change_end(src, type, -1);
- status_change_end(bl, type2, -1);
+ else
+ if( sc->data[SC_MARIONETTE ] && sc->data[SC_MARIONETTE ]->val1 == bl->id &&
+ tsc->data[SC_MARIONETTE2] && tsc->data[SC_MARIONETTE2]->val1 == src->id )
+ {
+ status_change_end(src, SC_MARIONETTE, -1);
+ status_change_end(bl, SC_MARIONETTE2, -1);
}
- else {
- if (sd) clif_skill_fail(sd,skillid,0,0);
+ else
+ {
+ if( sd )
+ clif_skill_fail(sd,skillid,0,0);
+
map_freeblock_unlock();
return 1;
}