summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 23:57:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 23:57:07 +0000
commitac82e2b6fc1fc67af80161dee56511d6f6f73e96 (patch)
tree573b60ab6a60aff05baea50ecefaa29ebce7106c /src/map/skill.c
parent77a227decf5603bb499ccf0e8a8a20733d16648f (diff)
downloadhercules-ac82e2b6fc1fc67af80161dee56511d6f6f73e96.tar.gz
hercules-ac82e2b6fc1fc67af80161dee56511d6f6f73e96.tar.bz2
hercules-ac82e2b6fc1fc67af80161dee56511d6f6f73e96.tar.xz
hercules-ac82e2b6fc1fc67af80161dee56511d6f6f73e96.zip
- Fixed the Warm Skills
- Removed the debug message when a player logs out and is removed from memory, it is working fine. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7578 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index fea16d55f..df7519a74 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3673,18 +3673,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
break;
- case SG_SUN_WARM:
- case SG_MOON_WARM:
- case SG_STAR_WARM:
- {
- struct skill_unit_group *sg;
- if (!tsc) break;
- sg = skill_unitsetting(bl,skillid,skilllv,src->x,src->y,0);
- clif_skill_nodamage(src,bl,skillid,skilllv,
- sc_start4(bl,type,100,skilllv,0,0,(int)sg,skill_get_time(skillid,skilllv)));
- break;
- }
-
case CG_MOONLIT: /* 月明りの泉に落ちる花びら */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if (sd && battle_config.player_skill_partner_check &&
@@ -6015,24 +6003,37 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
// Plant Cultivation [Celest]
case CR_CULTIVATION:
- {
- if (sd) {
- int i = skilllv - 1;
- int j = pc_search_inventory(sd,skill_db[skillid].itemid[i]);
- if(j < 0 || skill_db[skillid].itemid[i] <= 0 || sd->inventory_data[j] == NULL ||
- sd->status.inventory[j].amount < skill_db[skillid].amount[i]) {
- clif_skill_fail(sd,skillid,0,0);
- return 1;
- }
- pc_delitem(sd,j,skill_db[skillid].amount[i],0);
- clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
- if (rand()%100 < 50)
- mob_once_spawn(sd, "this", x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, "");
- else
- clif_skill_fail(sd,skillid,0,0);
+ if (sd) {
+ int i = skilllv - 1;
+ int j = pc_search_inventory(sd,skill_db[skillid].itemid[i]);
+ if(j < 0 || skill_db[skillid].itemid[i] <= 0 || sd->inventory_data[j] == NULL ||
+ sd->status.inventory[j].amount < skill_db[skillid].amount[i]) {
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
}
+ pc_delitem(sd,j,skill_db[skillid].amount[i],0);
+ clif_skill_poseffect(src,skillid,skilllv,x,y,tick);
+ if (rand()%100 < 50)
+ mob_once_spawn(sd, "this", x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, "");
+ else
+ clif_skill_fail(sd,skillid,0,0);
}
break;
+ case SG_SUN_WARM:
+ case SG_MOON_WARM:
+ case SG_STAR_WARM:
+ {
+ struct skill_unit_group *sg;
+ sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ clif_skill_nodamage(src,src,skillid,skilllv,
+ sc_start4(src,SkillStatusChangeTable(skillid),
+ 100,skilllv,0,0,(int)sg,skill_get_time(skillid,skilllv)));
+ }
+ break;
+ default:
+ ShowWarning("skill_castend_pos2: Unknown skill used:%d\n",skillid);
+ map_freeblock_unlock();
+ return 1;
}
if (sc && sc->data[SC_MAGICPOWER].timer != -1)