Index : src/map/skill.c
=============================================
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -10,6 +10,7 @@
#include "../common/utils.h"
#include "../common/ers.h"
+#include "statslof.h"
#include "skill.h"
#include "map.h"
#include "path.h"
@@ -2434,6 +2435,7 @@
struct map_session_data *sd = NULL;
struct status_data *tstatus;
struct status_change *sc;
+ int skilltype=SKILL_OFFENSIVE;
if (skillid > 0 && skilllv <= 0) return 0;
@@ -3084,6 +3086,11 @@
skill_consume_requirement(sd,skillid,skilllv,2);
}
+ if (sd != NULL) {
+ int callstats2 = statslof_skill_cnt(sd,sd->status.char_id,skillid,skilltype);//Stats lof skill cnt offensif
+ //ShowError("Appel stats lof dmg offensif = %d\n",callstats2);
+ }
+
return 0;
}
@@ -3101,6 +3108,7 @@
struct status_change_entry *tsce;
int i;
+ int skilltype=SKILL_DEFENSIVE;
enum sc_type type;
if(skillid > 0 && skilllv <= 0) return 0; // celest
@@ -3207,8 +3215,14 @@
if (heal_get_jobexp <= 0)
heal_get_jobexp = 1;
pc_gainexp (sd, bl, 0, heal_get_jobexp, false);
+ //Statslof [Lux] && [Lighta]
+ ShowInfo("AL heal Heal done : %d",heal);
+ if(sd != NULL) {
+ //ShowInfo("healed by :%d\n",sd->status.char_id);
+ int callstats03=statslof_heal_cnt(sd, sd->status.char_id, heal, HEAL_DONE);
}
}
+ }
break;
case PR_REDEMPTIO:
@@ -3290,6 +3304,7 @@
case AL_DECAGI:
case MER_DECAGI:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage (src, bl, skillid, skilllv,
sc_start(bl, type, (40 + skilllv * 2 + (status_get_lv(src) + sstatus->int_)/5), skilllv, skill_get_time(skillid,skilllv)));
break;
@@ -3306,6 +3321,7 @@
case PR_LEXDIVINA:
case MER_LEXDIVINA:
+ skilltype=SKILL_OFFENSIVE;
if( tsce )
status_change_end(bl,type, INVALID_TIMER);
else
@@ -3365,6 +3381,7 @@
break;
case SA_COMA:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time2(skillid,skilllv)));
break;
@@ -3397,6 +3414,7 @@
if (sd && pc_nextbaseexp(sd)) pc_gainexp(sd, NULL, pc_nextbaseexp(sd) * 10 / 100, 0, false);
break;
case SA_INSTANTDEATH:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
status_set_hp(bl,1,0);
break;
@@ -3428,6 +3446,7 @@
}
break;
case SA_DEATH:
+ skilltype=SKILL_OFFENSIVE;
if ( sd && dstmd && dstmd->status.mode&MD_BOSS )
{
clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
@@ -3597,7 +3616,6 @@
}
case PR_SLOWPOISON:
case PR_IMPOSITIO:
- case PR_LEXAETERNA:
case PR_SUFFRAGIUM:
case PR_BENEDICTIO:
case LK_BERSERK:
@@ -3647,6 +3665,11 @@
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;
+ case PR_LEXAETERNA:
+ skilltype=SKILL_OFFENSIVE;
+ clif_skill_nodamage(src,bl,skillid,skilllv,
+ sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+ break;
case NPC_STOP:
if( clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start2(bl,type,100,skilllv,src->id,skill_get_time(skillid,skilllv)) ) )
@@ -3764,6 +3787,7 @@
case SM_PROVOKE:
case SM_SELFPROVOKE:
case MER_PROVOKE:
+ skilltype=SKILL_OFFENSIVE;
if( (tstatus->mode&MD_BOSS) || battle_check_undead(tstatus->race,tstatus->def_ele) )
{
map_freeblock_unlock();
@@ -3878,6 +3902,7 @@
break;
case MO_ABSORBSPIRITS:
+ skilltype=SKILL_OFFENSIVE;
i = 0;
if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER)
{ // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
@@ -3929,6 +3954,7 @@
case ASC_METEORASSAULT:
case GS_SPREADATTACK:
+ skilltype=SKILL_OFFENSIVE;
skill_area_temp[1] = 0;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src),
@@ -3939,6 +3965,7 @@
case NPC_VAMPIRE_GIFT:
case NPC_HELLJUDGEMENT:
case NPC_PULSESTRIKE:
+ skilltype=SKILL_OFFENSIVE;
skill_castend_damage_id(src, src, skillid, skilllv, tick, flag);
break;
@@ -3948,6 +3975,7 @@
break;
case WZ_SIGHTRASHER:
+ skilltype=SKILL_OFFENSIVE;
//Passive side of the attack.
status_change_end(src, SC_SIGHT, INVALID_TIMER);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -3960,6 +3988,7 @@
case NJ_HYOUSYOURAKU:
case NJ_RAIGEKISAI:
case WZ_FROSTNOVA:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_area_temp[1] = 0;
map_foreachinrange(skill_attack_area, src,
@@ -3969,6 +3998,7 @@
case HVAN_EXPLOSION: //[orn]
case NPC_SELFDESTRUCTION:
+ skilltype=SKILL_OFFENSIVE;
//Self Destruction hits everyone in range (allies+enemies)
//Except for Summoned Marine spheres on non-versus maps, where it's just enemy.
i = ((!md || md->special_state.ai == 2) && !map_flag_vs(src->m))?
@@ -4119,6 +4149,7 @@
case BA_FROSTJOKER:
case DC_SCREAM:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_addtimerskill(src,tick+2000,bl->id,src->x,src->y,skillid,skilllv,0,flag);
@@ -4132,10 +4163,12 @@
break;
case BA_PANGVOICE:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,SC_CONFUSION,50,7,skill_get_time(skillid,skilllv)));
break;
case DC_WINKCHARM:
+ skilltype=SKILL_OFFENSIVE;
if( dstsd )
clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,SC_CONFUSION,30,7,skill_get_time2(skillid,skilllv)));
else
@@ -4178,6 +4211,7 @@
case MG_STONECURSE:
{
+ skilltype=SKILL_OFFENSIVE;
if (tstatus->mode&MD_BOSS) {
if (sd) clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);
break;
@@ -4416,6 +4450,7 @@
unsigned short location = 0;
int d = 0;
+ skilltype=SKILL_OFFENSIVE;
//Rate in percent
if ( skillid == ST_FULLSTRIP ) {
i = 5 + 2*skilllv + (sstatus->dex - tstatus->dex)/5;
@@ -4613,6 +4648,7 @@
}
break;
case SA_DISPELL:
+ skilltype=SKILL_OFFENSIVE;
if (flag&1 || (i = skill_get_splash(skillid, skilllv)) < 1)
{
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -4718,6 +4754,7 @@
case SA_SPELLBREAKER:
{
int sp;
+ skilltype=SKILL_OFFENSIVE;
if(tsc && tsc->data[SC_MAGICROD]) {
sp = skill_get_sp(skillid,skilllv);
sp = sp * tsc->data[SC_MAGICROD]->val2 / 100;
@@ -5086,6 +5123,7 @@
}
break;
case HT_SPRINGTRAP:
+ skilltype=SKILL_OFFENSIVE;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
{
struct skill_unit *su=NULL;
@@ -5133,6 +5171,7 @@
case PF_MINDBREAKER:
{
+ skilltype=SKILL_OFFENSIVE;
if(tstatus->mode&MD_BOSS || battle_check_undead(tstatus->race,tstatus->def_ele))
{
map_freeblock_unlock();
@@ -5216,7 +5255,13 @@
if(sp > 0)
clif_skill_nodamage(NULL,bl,MG_SRECOVERY,sp,1);
status_heal(bl,hp,sp,0);
+ //Statslof [Lux] && [Lighta]
+ ShowInfo("SPP Heal done : %d ",hp);
+ if(sd != NULL){
+ //ShowInfo("healed by :%d\n",sd->status.char_id);
+ int callstats01=statslof_heal_cnt(sd, sd->status.char_id, hp, HEAL_DONE);
}
+ }
break;
// Full Chemical Protection
case CR_FULLPROTECTION:
@@ -5662,6 +5707,20 @@
}
map_freeblock_unlock();
+
+ //Statslof [Lux] && [Lighta]
+ if (sd != NULL) {
+ if(skillid != CR_SLIMPITCHER){
+ int callstats4 = statslof_skill_cnt(sd,sd->status.char_id,skillid,skilltype);//Stats lof skill cnt defensive
+ }
+ if (skillid == GD_BATTLEORDER || skillid == GD_REGENERATION || skillid == GD_RESTORE || skillid == GD_EMERGENCYCALL){
+ int guildid=status_get_guild_id(src);
+ //ShowInfo("Guild is %d ",guildid);
+ int callstats8 = statslof_gskill_cnt(sd,guildid,skillid);//Stats lof skill cnt defensive
+ }
+ //ShowError("Appel stats lof defensive dmg = %d\n",callstats4);
+ }
+
return 0;
}
@@ -6114,6 +6173,7 @@
struct skill_unit_group* sg;
enum sc_type type;
int i;
+ int skilltype=SKILL_DEFENSIVE;
//if(skilllv <= 0) return 0;
if(skillid > 0 && skilllv <= 0) return 0; // celest
@@ -6193,13 +6253,9 @@
skill_unitsetting(src,skillid,skilllv,x,y,0);
break;
}
- case MG_SAFETYWALL:
case MG_FIREWALL:
case MG_THUNDERSTORM:
- case AL_PNEUMA:
- case WZ_ICEWALL:
case WZ_FIREPILLAR:
- case WZ_QUAGMIRE:
case WZ_VERMILION:
case WZ_STORMGUST:
case WZ_HEAVENDRIVE:
@@ -6207,10 +6263,23 @@
case PR_MAGNUS:
case CR_GRANDCROSS:
case NPC_GRANDDARKNESS:
- case HT_SKIDTRAP:
- case MA_SKIDTRAP:
+ case AC_SHOWER: //Ground-placed skill implementation.
+ case MA_SHOWER:
case HT_LANDMINE:
case MA_LANDMINE:
+ case HT_BLASTMINE:
+ case HT_CLAYMORETRAP:
+ case AM_DEMONSTRATION:
+ skilltype=SKILL_OFFENSIVE;
+ flag|=1;
+ skill_unitsetting(src,skillid,skilllv,x,y,0);
+ break;
+ case WZ_QUAGMIRE:
+ case MG_SAFETYWALL:
+ case AL_PNEUMA:
+ case WZ_ICEWALL:
+ case HT_SKIDTRAP:
+ case MA_SKIDTRAP:
case HT_ANKLESNARE:
case HT_SHOCKWAVE:
case HT_SANDMAN:
@@ -6218,18 +6287,13 @@
case HT_FLASHER:
case HT_FREEZINGTRAP:
case MA_FREEZINGTRAP:
- case HT_BLASTMINE:
- case HT_CLAYMORETRAP:
case AS_VENOMDUST:
- case AM_DEMONSTRATION:
case PF_FOGWALL:
case PF_SPIDERWEB:
case HT_TALKIEBOX:
case WE_CALLPARTNER:
case WE_CALLPARENT:
case WE_CALLBABY:
- case AC_SHOWER: //Ground-placed skill implementation.
- case MA_SHOWER:
case SA_LANDPROTECTOR:
case BD_LULLABY:
case BD_RICHMANKIM:
@@ -6316,6 +6380,7 @@
skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,-1,flag&2);
}
+ skilltype=SKILL_OFFENSIVE;
break;
case AL_WARP:
@@ -6437,6 +6502,7 @@
if ((sg = skill_unitsetting(src,skillid,skilllv,x,y,0)))
sc_start4(src,type,100,skilllv,0,BCT_SELF,sg->group_id,skill_get_time(skillid,skilllv));
flag|=1;
+ skilltype=SKILL_OFFENSIVE;
break;
// Plant Cultivation [Celest]
@@ -6521,6 +6587,12 @@
skill_consume_requirement(sd,skillid,skilllv,2);
}
+ //Stats Lof [Lighta] & [Lux]
+ if (sd != NULL && src != NULL ) {
+ int callstats3 = statslof_skill_cnt(sd,sd->status.char_id,skillid,skilltype);//Stats lof skill cnt
+ //ShowError("Appel stats lof aoe dmg = %d type = %d\n",callstats3,skilltype);
+ }
+
return 0;
}
@@ -7404,7 +7476,13 @@
status_heal(bl, heal, 0, 0);
if( diff >= 500 )
sg->val1--;
+ //Statslof [Lux] && [Lighta]
+ //ShowInfo("sanctu Heal done : %d ",heal);
+ if(tsd != NULL) {
+ //ShowInfo("healed by :%d\n",tsd->status.char_id);
+ int callstats02=statslof_heal_cnt(tsd, tsd->status.char_id, heal, HEAL_DONE);
}
+ }
if( sg->val1 <= 0 )
skill_delunitgroup(sg);
break;
@@ -8747,10 +8825,21 @@
if( itemid_isgemstone(req.itemid[i]) && skill != HW_GANBANTEIN && sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_WIZARD )
continue; //Gemstones are checked, but not substracted from inventory.
- if( (n = pc_search_inventory(sd,req.itemid[i])) >= 0 )
+ if( (n = pc_search_inventory(sd,req.itemid[i])) >= 0 ){
pc_delitem(sd,n,req.amount[i],0,1);
+
+ //Statslof [Lux] && [Lighta]
+ if (sd != NULL) {
+ int amountitem = req.amount[i];
+ while (amountitem != 0) {
+ int callstats0=statslof_conso_cnt(sd,sd->status.char_id,req.itemid[i]);
+ //ShowError("Appel stats lof conso = %d, itemid : %d amount :%d\n",callstats0,req.itemid[i],req.amount[i]);
+ amountitem--;
}
}
+ }
+ }
+ }
return 1;
}