viewing paste stats-mod Ea calls | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
# 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;
 }
Viewed 1138 times, submitted by lighta.