summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mmo.h55
-rw-r--r--src/common/showmsg.c27
-rw-r--r--src/common/showmsg.h1
3 files changed, 81 insertions, 2 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 239e1dddd..f8ef63390 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -44,8 +44,8 @@
// 20110928 - 2011-09-28aRagexeRE+ - 0x6b, 0x6d
#ifndef PACKETVER
- #define PACKETVER 20081126
- //#define PACKETVER 20100707
+ #define PACKETVER 20110609
+ //#define PACKETVER 20100730
#endif
// backward compatible PACKETVER 8 and 9
#if PACKETVER == 8
@@ -176,6 +176,7 @@ enum item_types {
IT_UNKNOWN2,//9
IT_AMMO, //10
IT_DELAYCONSUME,//11
+ IT_THROWWEAPON= 17,//17
IT_CASH = 18,
IT_MAX
};
@@ -646,6 +647,56 @@ enum {
JOB_STAR_GLADIATOR,
JOB_STAR_GLADIATOR2,
JOB_SOUL_LINKER,
+ /**
+ * 3.1 (2.1)
+ **/
+ JOB_RUNE_KNIGHT = 4054,
+ JOB_WARLOCK,
+ JOB_RANGER,
+ JOB_ARCH_BISHOP,
+ JOB_MECHANIC,
+ JOB_GUILLOTINE_CROSS,
+ /**
+ * 3.1 (2.1 Trans)
+ **/
+ JOB_RUNE_KNIGHT_T,
+ JOB_WARLOCK_T,
+ JOB_RANGER_T,
+ JOB_ARCH_BISHOP_T,
+ JOB_MECHANIC_T,
+ JOB_GUILLOTINE_CROSS_T,
+ /**
+ * 3.2 (2.2)
+ **/
+ JOB_ROYAL_GUARD,
+ JOB_SORCERER,
+ JOB_MINSTREL,
+ JOB_WANDERER,
+ JOB_SURA,
+ JOB_GENETIC,
+ JOB_SHADOW_CHASER,
+ /**
+ * 3.2 (2.2 Trans)
+ **/
+ JOB_ROYAL_GUARD_T,
+ JOB_SORCERER_T,
+ JOB_MINSTREL_T,
+ JOB_WANDERER_T,
+ JOB_SURA_T,
+ JOB_GENETIC_T,
+ JOB_SHADOW_CHASER_T,
+ /**
+ * 3.x Mounts / Vehicles
+ **/
+ JOB_RUNE_KNIGHT2,
+ JOB_RUNE_KNIGHT_T2,
+ JOB_ROYAL_GUARD2,
+ JOB_ROYAL_GUARD_T2,
+ JOB_RANGER2,
+ JOB_RANGER_T2,
+ JOB_MECHANIC2,
+ JOB_MECHANIC_T2,
+
JOB_MAX,
};
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index fc1badd26..a69c73ba2 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -4,6 +4,8 @@
#include "../common/cbasetypes.h"
#include "../common/strlib.h" // StringBuf
#include "showmsg.h"
+#include "core.h" //[Ind] - For SERVER_TYPE
+#include "version.h" //[Ind] - For SERVER_TYPE values
#include <stdio.h>
#include <string.h>
@@ -51,6 +53,8 @@ int stdout_with_ansisequence = 0;
int msg_silent = 0; //Specifies how silent the console is.
+int console_msg_log = 0;//[Ind] msg error logging
+
///////////////////////////////////////////////////////////////////////////////
/// static/dynamic buffer for the messages
@@ -684,6 +688,29 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
return 1;
}
if(
+ ( flag == MSG_WARNING && console_msg_log&1 ) ||
+ ( ( flag == MSG_ERROR || flag == MSG_SQL ) && console_msg_log&2 ) ||
+ ( flag == MSG_DEBUG && console_msg_log&4 ) ) {//[Ind]
+ FILE *log = NULL;
+ if( (log = fopen(SERVER_TYPE == ATHENA_SERVER_MAP ? "./log/map-msg_log.log" : "./log/unknown.log","a+")) ) {
+ char timestring[255];
+ time_t curtime;
+ time(&curtime);
+ strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
+ fprintf(log,"(%s) [ %s ] : ",
+ timestring,
+ flag == MSG_WARNING ? "Warning" :
+ flag == MSG_ERROR ? "Error" :
+ flag == MSG_SQL ? "SQL Error" :
+ flag == MSG_DEBUG ? "Debug" :
+ "Unknown");
+ va_copy(apcopy, ap);
+ vfprintf(log,string,apcopy);
+ va_end(apcopy);
+ fclose(log);
+ }
+ }
+ if(
(flag == MSG_INFORMATION && msg_silent&1) ||
(flag == MSG_STATUS && msg_silent&2) ||
(flag == MSG_NOTICE && msg_silent&4) ||
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 998296b66..5f80a4312 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -67,6 +67,7 @@
extern int stdout_with_ansisequence; //If the color ansi sequences are to be used. [flaviojs]
extern int msg_silent; //Specifies how silent the console is. [Skotlex]
+extern int console_msg_log; //Specifies what error messages to log. [Ind]
extern char timestamp_format[20]; //For displaying Timestamps [Skotlex]
enum msg_type {