# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
Index : src/map/battle.c
==================================
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -25,6 +25,7 @@
#include "party.h"
#include "battle.h"
#include "battleground.h"
+#include "statslof.h"
#include <stdio.h>
#include <stdlib.h>
@@ -681,6 +682,37 @@
}
if(!damage) damage = 1;
}
+
+ //Statslof [Lighta] && [Lux]
+ if(bl->type == BL_MOB && src !=NULL ){ // Check if barricade
+ struct map_session_data * sdsrc=(struct map_session_data *)src;
+ if(md && md->guardian_data){ // Check if barricade
+ switch(class_){
+ case 1288 : //Emp
+ case 1905 : //Barri
+ case 1907 : //Stone1
+ case 1908 : //Stone2
+ case 1899 :
+ case 1285 :
+ case 1286 :
+ case 1287 :
+ //ShowInfo("Mob in castle %d dmg by %d :%d\n",md->class_,sdsrc->status.char_id,damage);
+ statslof_damage_cnt(sdsrc, md->class_, sdsrc->status.char_id, damage);
+ break;
+ default: break;
+ }
+ }
+ }
+ if (bl->type == BL_PC) {
+ struct map_session_data * sd=(struct map_session_data *)bl;
+ if(sd != NULL && src != NULL) { //Only from player
+ struct map_session_data * sdsrc=(struct map_session_data *)src;
+ //ShowInfo("Show src damage dealer: %d\n",sdsrc->status.char_id);
+ if(sdsrc->status.char_id != 0){
+ statslof_damage_cnt(sd, sd->status.char_id, sdsrc->status.char_id, damage);//Stats lof damage cnt
+ }
+ }
+ }
return damage;
}
Index : src/map/guild.c
======================================
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -23,6 +23,7 @@
#include "clif.h"
#include "skill.h"
#include "log.h"
+#include "statslof.h"
#include <stdio.h>
#include <stdlib.h>
@@ -1860,6 +1861,8 @@
{ // Run All NPC_Event[OnAgitStart]
int c = npc_event_doall("OnAgitStart");
ShowStatus("NPC_Event:[OnAgitStart] Run (%d) Events by @AgitStart.\n",c);
+ statslof_enable(TYPEWOE);
+ statslof_reset();
return 0;
}
@@ -1867,6 +1870,12 @@
{ // Run All NPC_Event[OnAgitEnd]
int c = npc_event_doall("OnAgitEnd");
ShowStatus("NPC_Event:[OnAgitEnd] Run (%d) Events by @AgitEnd.\n",c);
+ statslof_disable(TYPEWOE);
+ #ifndef TXT_ONLY
+ statslof_insert_inDB();
+ #else
+ statslof_insert_inCSV();
+ #endif /* TXT_ONLY */
return 0;
}
@@ -1874,6 +1883,8 @@
{ // Run All NPC_Event[OnAgitStart2]
int c = npc_event_doall("OnAgitStart2");
ShowStatus("NPC_Event:[OnAgitStart2] Run (%d) Events by @AgitStart2.\n",c);
+ statslof_enable(TYPEWOE);
+ statslof_reset();
return 0;
}
@@ -1881,6 +1892,12 @@
{ // Run All NPC_Event[OnAgitEnd2]
int c = npc_event_doall("OnAgitEnd2");
ShowStatus("NPC_Event:[OnAgitEnd2] Run (%d) Events by @AgitEnd2.\n",c);
+ statslof_disable(TYPEWOE);
+ #ifndef TXT_ONLY
+ statslof_insert_inDB();
+ #else
+ statslof_insert_inCSV();
+ #endif /* TXT_ONLY */
return 0;
}
Index : src/map/pc.c
=======================================
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -37,6 +37,7 @@
#include "status.h" // struct status_data
#include "pc.h"
#include "quest.h"
+#include "statslof.h"
#include <stdio.h>
#include <stdlib.h>
@@ -3802,6 +3803,12 @@
run_script(script,0,sd->bl.id,fake_nd->bl.id);
potion_flag = 0;
+
+ //Statslof [Lux] && [Lighta]
+ if (sd != NULL) {
+ int callstats=statslof_conso_cnt(sd,sd->status.char_id,nameid);
+ //ShowError("Appel stats lof conso = %d\n",callstats);
+ }
return 1;
}
@@ -5714,6 +5721,26 @@
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
pc_setparam(sd, SP_KILLERRID, src?src->id:0);
+ //Stats Lof [Lighta] & [Lux]
+
+ if (sd != NULL && src != NULL && src->type == BL_PC) {
+ struct map_session_data *srcsd = (struct map_session_data *)src; //Killer
+
+
+ if (srcsd != NULL && srcsd != sd && srcsd->status.char_id != 0){
+
+ //ShowInfo("Killed by :%d\n",srcsd->status.char_id);
+ //ShowInfo("Player killed :%d\n",sd->status.char_id);
+ statslof_kill_cnt(sd, sd->status.char_id, PLDEATH); //compteur de death player
+ statslof_kill_cnt(sd, srcsd->status.char_id, PLKILL); //compteur de kill player
+ statslof_gkill_cnt(sd, sd->status.guild_id, PLDEATH); //compteur de death guilde
+ statslof_gkill_cnt(sd, srcsd->status.guild_id, PLKILL); //compteur de kill guilde
+ //sprintf(info, "[Info] Vous avez ét? tu? par %s [%s]",srcsd->status.name,job_name(srcsd->status.class_));
+ //clif_displaymessage(sd->fd,info);
+ //sprintf(info,"[Info] Vous avez tu? %s", sd->status.name);
+ //clif_displaymessage(srcsd->fd,info);
+ }
+ }
if( sd->bg_id )
{
struct battleground_data *bg;
Index : src/map/status.c
=================================================
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -29,6 +29,7 @@
#include "homunculus.h"
#include "mercenary.h"
#include "vending.h"
+#include "statslof.h"
#include <time.h>
#include <stdio.h>
@@ -866,7 +867,7 @@
{
struct status_data *status;
struct status_change *sc;
-
+ struct map_session_data *sd = (struct map_session_data *)bl;
status = status_get_status_data(bl);
if (status == &dummy_status || !status->hp)
@@ -922,6 +923,11 @@
case BL_MER: mercenary_heal((TBL_MER*)bl,hp,sp); break;
}
+ //ShowInfo("Status effectiveness heal received %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_REC);
+ }
return hp+sp;
}