summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c4
-rw-r--r--src/common/cbasetypes.h18
-rw-r--r--src/common/des.c10
-rw-r--r--src/common/grfio.c14
-rw-r--r--src/common/malloc.c6
-rw-r--r--src/common/mapindex.h2
-rw-r--r--src/common/mmo.h63
-rw-r--r--src/login/account_sql.c4
-rw-r--r--src/login/login.c4
-rw-r--r--src/map/packets.h70
-rw-r--r--src/map/script.c9
-rw-r--r--src/map/skill.h30
12 files changed, 163 insertions, 71 deletions
diff --git a/src/char/char.c b/src/char/char.c
index dc5352137..97ad493b1 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1172,13 +1172,13 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
p->save_point.map = mapindex_name2id(save_map);
if( p->last_point.map == 0 ) {
- p->last_point.map = strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->last_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
p->last_point.x = MAP_DEFAULT_X;
p->last_point.y = MAP_DEFAULT_Y;
}
if( p->save_point.map == 0 ) {
- p->save_point.map = strdb_iget(mapindex_db, MAP_DEFAULT);
+ p->save_point.map = (unsigned short)strdb_iget(mapindex_db, MAP_DEFAULT);
p->save_point.x = MAP_DEFAULT_X;
p->save_point.y = MAP_DEFAULT_Y;
}
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 731a8b578..bfe8bf8f8 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -281,6 +281,24 @@ typedef char bool;
//#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
// Avoid "value computed is not used" warning and generates the same assembly code
#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b))
+#if 0 //to be activated soon, more tests needed on how VS works with the macro above
+#ifdef WIN32
+#undef swap
+#define swap(a,b)__asm \
+{ \
+ __asm mov eax, dword ptr [a] \
+ __asm cmp eax, dword ptr [b] \
+ __asm je _ret \
+ __asm xor eax, dword ptr [b] \
+ __asm mov dword ptr [a], eax \
+ __asm xor eax, dword ptr [b] \
+ __asm mov dword ptr [b], eax \
+ __asm xor eax, dword ptr [a] \
+ __asm mov dword ptr [a], eax \
+ __asm _ret: \
+}
+#endif
+#endif
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
diff --git a/src/common/des.c b/src/common/des.c
index 917fc33e0..ed6d098dc 100644
--- a/src/common/des.c
+++ b/src/common/des.c
@@ -78,8 +78,8 @@ static void E(BIT64* src)
{
BIT64 tmp = {{0}};
-if( false )
-{// original
+#if 0
+ // original
static const uint8_t expand_table[48] = {
32, 1, 2, 3, 4, 5,
4, 5, 6, 7, 8, 9,
@@ -98,9 +98,8 @@ if( false )
if( src->b[j / 8 + 4] & mask[j % 8] )
tmp .b[i / 6 + 0] |= mask[i % 6];
}
-}
-else
-{// optimized
+#endif
+ // optimized
tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr
tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n
tmp.b[2] = ((src->b[4]<<5) | (src->b[5]>>3)) & 0x3f; // ..o nmlkj
@@ -109,7 +108,6 @@ else
tmp.b[5] = ((src->b[6]<<1) | (src->b[7]>>7)) & 0x3f; // ..cba98 7
tmp.b[6] = ((src->b[6]<<5) | (src->b[7]>>3)) & 0x3f; // ..8 76543
tmp.b[7] = ((src->b[7]<<1) | (src->b[4]>>7)) & 0x3f; // ..43210 v
-}
*src = tmp;
}
diff --git a/src/common/grfio.c b/src/common/grfio.c
index bf66dba52..77b976926 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -171,7 +171,7 @@ static void grf_decode_full(unsigned char* buf, size_t len, int cycle)
scycle = 7;
// so decrypt/de-shuffle periodically
- j = -1; // 0, adjusted to fit the ++j step
+ j = (size_t)-1; // 0, adjusted to fit the ++j step
for( i = 20; i < nblocks; ++i )
{
if( i % dcycle == 0 )
@@ -408,7 +408,7 @@ void* grfio_reads(const char* fname, int* size)
declen = ftell(in);
fseek(in,0,SEEK_SET);
buf2 = (unsigned char *)aMalloc(declen+1); // +1 for resnametable zero-termination
- if(fread(buf2, 1, declen, in) != declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
+ if(fread(buf2, 1, declen, in) != (size_t)declen) ShowError("An error occured in fread grfio_reads, fname=%s \n",fname);
fclose(in);
if( size )
@@ -430,7 +430,7 @@ void* grfio_reads(const char* fname, int* size)
int fsize = entry->srclen_aligned;
unsigned char *buf = (unsigned char *)aMalloc(fsize);
fseek(in, entry->srcpos, 0);
- if(fread(buf, 1, fsize, in) != fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname);
+ if(fread(buf, 1, fsize, in) != (size_t)fsize) ShowError("An error occured in fread in grfio_reads, grfname=%s\n",grfname);
fclose(in);
buf2 = (unsigned char *)aMalloc(entry->declen+1); // +1 for resnametable zero-termination
@@ -526,7 +526,7 @@ static int grfio_entryread(const char* grfname, int gentry)
long list_size;
list_size = grf_size - ftell(fp);
grf_filelist = (unsigned char *) aMalloc(list_size);
- if(fread(grf_filelist,1,list_size,fp) != list_size) { ShowError("Couldn't read all grf_filelist element of %s \n", grfname); }
+ if(fread(grf_filelist,1,list_size,fp) != (size_t)list_size) { ShowError("Couldn't read all grf_filelist element of %s \n", grfname); }
fclose(fp);
entrys = getlong(grf_header+0x26) - getlong(grf_header+0x22) - 7;
@@ -559,7 +559,7 @@ static int grfio_entryread(const char* grfname, int gentry)
#ifdef GRFIO_LOCAL
aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
#else
- aentry.gentry = gentry+1; // With no first time LocalFileCheck
+ aentry.gentry = (char)(gentry+1); // With no first time LocalFileCheck
#endif
filelist_modify(&aentry);
}
@@ -611,13 +611,13 @@ static int grfio_entryread(const char* grfname, int gentry)
aentry.srclen_aligned = getlong(grf_filelist+ofs2+4);
aentry.declen = getlong(grf_filelist+ofs2+8);
aentry.srcpos = getlong(grf_filelist+ofs2+13)+0x2e;
- aentry.type = type;
+ aentry.type = (char)type;
safestrncpy(aentry.fn, fname, sizeof(aentry.fn));
aentry.fnd = NULL;
#ifdef GRFIO_LOCAL
aentry.gentry = -(gentry+1); // As Flag for making it a negative number carrying out the first time LocalFileCheck
#else
- aentry.gentry = gentry+1; // With no first time LocalFileCheck
+ aentry.gentry = (char)(gentry+1); // With no first time LocalFileCheck
#endif
filelist_modify(&aentry);
}
diff --git a/src/common/malloc.c b/src/common/malloc.c
index e98ec770a..372991fbe 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -253,7 +253,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
p->unit_head.block = NULL;
p->unit_head.size = 0;
p->unit_head.file = file;
- p->unit_head.line = line;
+ p->unit_head.line = (unsigned short)line;
p->prev = NULL;
if (unit_head_large_first == NULL)
p->next = NULL;
@@ -327,7 +327,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
head->block = block;
head->file = file;
- head->line = line;
+ head->line = (unsigned short)line;
head->size = (unsigned short)size;
*(long*)((char*)head + sizeof(struct unit_head) - sizeof(long) + size) = 0xdeadbeaf;
return (char *)head + sizeof(struct unit_head) - sizeof(long);
@@ -426,7 +426,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func )
#ifdef DEBUG_MEMMGR
memset(ptr, 0xfd, block->unit_size - sizeof(struct unit_head) + sizeof(long) );
head->file = file;
- head->line = line;
+ head->line = (unsigned short)line;
#endif
memmgr_assert( block->unit_used > 0 );
if(--block->unit_used == 0) {
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index d35d9899c..43953a8e0 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -7,7 +7,7 @@
#include "../common/db.h"
-/* when a map index search fails, return results from what map? default:prontera */
+// When a map index search fails, return results from what map? default:prontera
#define MAP_DEFAULT "prontera"
#define MAP_DEFAULT_X 150
#define MAP_DEFAULT_Y 150
diff --git a/src/common/mmo.h b/src/common/mmo.h
index a86aba723..fd157377b 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -51,13 +51,14 @@
#define PACKETVER 20120418
#endif
-/// comment following line if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE)
+// Comment the following line if your client is NOT ragexeRE (required because of conflicting packets in ragexe vs ragexeRE).
#define PACKETVER_RE
-//Remove/Comment this line to disable sc_data saving. [Skotlex]
+// Comment the following line to disable sc_data saving. [Skotlex]
#define ENABLE_SC_SAVING
-//Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
-//Note that newer clients no longer save hotkeys in the registry!
+
+// Comment the following like to disable server-side hot-key saving support. [Skotlex]
+// Note that newer clients no longer save hotkeys in the registry!
#define HOTKEY_SAVING
#if PACKETVER < 20090603
@@ -83,10 +84,10 @@
#define MAX_FAME 1000000000
#define MAX_CART 100
#define MAX_SKILL 1477
-#define MAX_SKILL_ID 10015 //[Ind/Hercules] max used skill id
-#define GLOBAL_REG_NUM 256 // max permanent character variables per char
-#define ACCOUNT_REG_NUM 64 // max permanent local account variables per account
-#define ACCOUNT_REG2_NUM 16 // max permanent global account variables per account
+#define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID
+#define GLOBAL_REG_NUM 256 // Max permanent character variables per char
+#define ACCOUNT_REG_NUM 64 // Max permanent local account variables per account
+#define ACCOUNT_REG2_NUM 16 // Max permanent global account variables per account
//Should hold the max of GLOBAL/ACCOUNT/ACCOUNT2 (needed for some arrays that hold all three)
#define MAX_REG_NUM 256
#define DEFAULT_WALK_SPEED 150
@@ -95,16 +96,16 @@
#define MAX_STORAGE 600
#define MAX_GUILD_STORAGE 600
#define MAX_PARTY 12
-#define MAX_GUILD 16+10*6 // increased max guild members +6 per 1 extension levels [Lupus]
-#define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
+#define MAX_GUILD 16+10*6 // Increased max guild members +6 per 1 extension levels [Lupus]
+#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan]
+#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
-#define MAX_GUARDIANS 8 //Local max per castle. [Skotlex]
-#define MAX_QUEST_DB 2400 //Max quests that the server will load
-#define MAX_QUEST_OBJECTIVES 3 //Max quest objectives for a quest
-#define MAX_START_ITEMS 32 //Max number of items allowed to be given to a char whenever it's created. [mkbu95]
+#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
+#define MAX_QUEST_DB 2400 // Max quests that the server will load
+#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
+#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
// for produce
#define MIN_ATTRIBUTE 0
@@ -123,43 +124,43 @@
#define NAME_LENGTH (23 + 1)
//For item names, which tend to have much longer names.
#define ITEM_NAME_LENGTH 50
-//For Map Names, which the client considers to be 16 in length including the .gat extension
+//For Map Names, which the client considers to be 16 in length including the .gat extension.
#define MAP_NAME_LENGTH (11 + 1)
#define MAP_NAME_LENGTH_EXT (MAP_NAME_LENGTH + 4)
#define MAX_FRIENDS 40
#define MAX_MEMOPOINTS 3
-//Size of the fame list arrays.
+// Size of the fame list arrays.
#define MAX_FAME_LIST 10
-//Limits to avoid ID collision with other game objects
+// Limits to avoid ID collision with other game objects
#define START_ACCOUNT_NUM 2000000
#define END_ACCOUNT_NUM 100000000
#define START_CHAR_NUM 150000
-//Guilds
+// Guilds
#define MAX_GUILDMES1 60
#define MAX_GUILDMES2 120
-//Base Homun skill.
+// Base Homun skill.
#define HM_SKILLBASE 8001
#define MAX_HOMUNSKILL 43
-#define MAX_HOMUNCULUS_CLASS 52 //[orn], Increased to 60 from 16 to allow new Homun-S.
+#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
#define HM_CLASS_BASE 6001
#define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
-//Mail System
+// Mail System
#define MAIL_MAX_INBOX 30
#define MAIL_TITLE_LENGTH 40
#define MAIL_BODY_LENGTH 200
-//Mercenary System
+// Mercenary System
#define MC_SKILLBASE 8201
#define MAX_MERCSKILL 40
#define MAX_MERCENARY_CLASS 61
-//Elemental System
+// Elemental System
#define MAX_ELEMENTALSKILL 42
#define EL_SKILLBASE 8401
#define MAX_ELESKILLTREE 3
@@ -185,7 +186,7 @@ enum item_types {
};
-//Questlog system [Kevin] [Inkfish]
+// Questlog system [Kevin] [Inkfish]
typedef enum quest_state { Q_INACTIVE, Q_ACTIVE, Q_COMPLETE } quest_state;
struct quest {
@@ -199,7 +200,7 @@ struct item {
int id;
short nameid;
short amount;
- unsigned short equip; // location(s) where item is equipped (using enum equip_pos for bitmasking)
+ unsigned short equip; // Location(s) where item is equipped (using enum equip_pos for bitmasking).
char identify;
char refine;
char attribute;
@@ -219,8 +220,8 @@ enum e_skill_flag
SKILL_FLAG_PERMANENT,
SKILL_FLAG_TEMPORARY,
SKILL_FLAG_PLAGIARIZED,
- SKILL_FLAG_REPLACED_LV_0, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
- SKILL_FLAG_PERM_GRANTED, // permanent, granted through someway e.g. script
+ SKILL_FLAG_REPLACED_LV_0, // Temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
+ SKILL_FLAG_PERM_GRANTED, // Permanent, granted through someway (e.g. script).
//...
};
@@ -233,7 +234,7 @@ enum e_mmo_charstatus_opt {
struct s_skill {
unsigned short id;
unsigned char lv;
- unsigned char flag; // see enum e_skill_flag
+ unsigned char flag; // See enum e_skill_flag
};
struct global_reg {
@@ -241,14 +242,14 @@ struct global_reg {
char value[256];
};
-//Holds array of global registries, used by the char server and converter.
+// Holds array of global registries, used by the char server and converter.
struct accreg {
int account_id, char_id;
int reg_num;
struct global_reg reg[MAX_REG_NUM];
};
-//For saving status changes across sessions. [Skotlex]
+// For saving status changes across sessions. [Skotlex]
struct status_change_data {
unsigned short type; //SC_type
long val1, val2, val3, val4, tick; //Remaining duration.
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 565dd0460..d3a7aafff 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -315,7 +315,7 @@ static bool account_db_sql_set_property(AccountDB* self, const char* key, const
safestrncpy(db->codepage, value, sizeof(db->codepage));
else
if( strcmpi(key, "case_sensitive") == 0 )
- db->case_sensitive = config_switch(value);
+ db->case_sensitive = (bool)config_switch(value);
else
if( strcmpi(key, "account_db") == 0 )
safestrncpy(db->account_db, value, sizeof(db->account_db));
@@ -549,7 +549,7 @@ static bool mmo_auth_fromsql(AccountDB_SQL* db, struct mmo_account* acc, int acc
SQL->GetData(sql_handle, 10, &data, NULL); safestrncpy(acc->lastlogin, data, sizeof(acc->lastlogin));
SQL->GetData(sql_handle, 11, &data, NULL); safestrncpy(acc->last_ip, data, sizeof(acc->last_ip));
SQL->GetData(sql_handle, 12, &data, NULL); safestrncpy(acc->birthdate, data, sizeof(acc->birthdate));
- SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = atoi(data);
+ SQL->GetData(sql_handle, 13, &data, NULL); acc->char_slots = (uint8)atoi(data);
SQL->GetData(sql_handle, 14, &data, NULL); safestrncpy(acc->pincode, data, sizeof(acc->pincode));
SQL->GetData(sql_handle, 15, &data, NULL); acc->pincode_change = atol(data);
diff --git a/src/login/login.c b/src/login/login.c
index 8dd5ce20a..2bfb9c730 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -467,7 +467,7 @@ int parse_fromchar(int fd)
{
ShowStatus("set users %s : %d\n", server[id].name, users);
- server[id].users = users;
+ server[id].users = (uint16)users;
}
}
break;
@@ -1083,7 +1083,7 @@ int mmo_auth(struct login_session_data* sd, bool isServer) {
sd->login_id2 = rnd() + 1;
safestrncpy(sd->lastlogin, acc.lastlogin, sizeof(sd->lastlogin));
sd->sex = acc.sex;
- sd->group_id = acc.group_id;
+ sd->group_id = (uint8)acc.group_id;
// update account data
timestamp2string(acc.lastlogin, sizeof(acc.lastlogin), time(NULL), "%Y-%m-%d %H:%M:%S");
diff --git a/src/map/packets.h b/src/map/packets.h
index 92df54367..5d07f7f9e 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2089,4 +2089,74 @@ packet(0x020d,-1);
// New Packets End
#endif
+//2013-05-15aRagexe (Shakto)
+#if PACKETVER >= 20130515
+ // Shuffle Start
+ packet(0x0369,7,clif->pActionRequest,2,6);
+ packet(0x083C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0437,5,clif->pWalkToXY,2);
+ packet(0x035F,6,clif->pTickSend,2);
+ packet(0x0362,5,clif->pChangeDir,2,4);
+ packet(0x08A1,6,clif->pTakeItem,2);
+ packet(0x0944,6,clif->pDropItem,2,4);
+ packet(0x0887,8,clif->pMoveToKafra,2,4);
+ packet(0x08AC,8,clif->pMoveFromKafra,2,4);
+ packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x096A,6,clif->pGetCharNameRequest,2);
+ packet(0x0368,6,clif->pSolveCharName,2);
+ packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0360,6,clif->pReqClickBuyingStore,2);
+ packet(0x0817,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x092D,41,clif->pPartyBookingRegisterReq,2,4);
+ //packet(0x08AA,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x0963,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x0943,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0947,26,clif->pPartyInvite2,2);
+ //packet(0x0862,4); // CZ_GANGSI_RANK
+ packet(0x0962,26,clif->pFriendsListAdd,2);
+ packet(0x0931,5,clif->pHomMenu,2,4);
+ packet(0x093E,36,clif->pStoragePassword,0);
+ // Shuffle End
+#endif
+
+//2013-05-22Ragexe (Shakto)
+#if PACKETVER >= 20130522
+ // Shuffle Start
+ packet(0x08A2,7,clif->pActionRequest,2,6);
+ packet(0x095C,10,clif->pUseSkillToId,2,4,6);
+ packet(0x0360,5,clif->pWalkToXY,2);
+ packet(0x07EC,6,clif->pTickSend,2);
+ packet(0x0925,5,clif->pChangeDir,2,4);
+ packet(0x095E,6,clif->pTakeItem,2);
+ packet(0x089C,6,clif->pDropItem,2,4);
+ packet(0x08A3,8,clif->pMoveToKafra,2,4);
+ packet(0x087E,8,clif->pMoveFromKafra,2,4);
+ packet(0x0811,10,clif->pUseSkillToPos,2,4,6,8);
+ packet(0x0964,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);
+ packet(0x08A6,6,clif->pGetCharNameRequest,2);
+ packet(0x0369,6,clif->pSolveCharName,2);
+ packet(0x093E,12,clif->pSearchStoreInfoListItemClick,2,6,10);
+ packet(0x08AA,2,clif->pSearchStoreInfoNextPage,0);
+ packet(0x095B,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);
+ packet(0x0952,-1,clif->pReqTradeBuyingStore,2,4,8,12);
+ packet(0x0368,6,clif->pReqClickBuyingStore,2);
+ packet(0x086E,2,clif->pReqCloseBuyingStore,0);
+ packet(0x0874,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);
+ packet(0x089B,41,clif->pPartyBookingRegisterReq,2,4);
+ //packet(0x0965,8); // CZ_JOIN_BATTLE_FIELD
+ packet(0x086A,-1,clif->pItemListWindowSelected,2,4,8);
+ packet(0x08A9,19,clif->pWantToConnection,2,6,10,14,18);
+ packet(0x0950,26,clif->pPartyInvite2,2);
+ //packet(0x08AC,4); // CZ_GANGSI_RANK
+ packet(0x0362,26,clif->pFriendsListAdd,2);
+ packet(0x0926,5,clif->pHomMenu,2,4);
+ packet(0x088E,36,clif->pStoragePassword,0);
+ // Shuffle End
+#endif
+
#endif /* _PACKETS_H_ */
diff --git a/src/map/script.c b/src/map/script.c
index d42d3d3e3..07497d892 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8435,6 +8435,7 @@ BUILDIN(monster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8485,7 +8486,8 @@ BUILDIN(monster)
}
}
- mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
return true;
}
/*==========================================
@@ -8539,6 +8541,7 @@ BUILDIN(areamonster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8578,7 +8581,9 @@ BUILDIN(areamonster)
}
}
- mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
+
return true;
}
/*==========================================
diff --git a/src/map/skill.h b/src/map/skill.h
index 553dabd6d..c585bbb3a 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -81,14 +81,14 @@ enum e_skill_nk {
//Constants to identify a skill's inf2 value.
enum e_skill_inf2 {
INF2_QUEST_SKILL = 0x0001,
- INF2_NPC_SKILL = 0x0002, //NPC skills are those that players can't have in their skill tree.
+ INF2_NPC_SKILL = 0x0002, // NPC skills are those that players can't have in their skill tree.
INF2_WEDDING_SKILL = 0x0004,
INF2_SPIRIT_SKILL = 0x0008,
INF2_GUILD_SKILL = 0x0010,
INF2_SONG_DANCE = 0x0020,
INF2_ENSEMBLE_SKILL = 0x0040,
INF2_TRAP = 0x0080,
- INF2_TARGET_SELF = 0x0100, //Refers to ground placed skills that will target the caster as well (like Grandcross)
+ INF2_TARGET_SELF = 0x0100, // Refers to ground placed skills that will target the caster as well (like Grandcross)
INF2_NO_TARGET_SELF = 0x0200,
INF2_PARTY_ONLY = 0x0400,
INF2_GUILD_ONLY = 0x0800,
@@ -107,19 +107,19 @@ enum e_skill_display {
};
enum {
- UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
- UF_NOREITERATION = 0x0002, // Spell cannot be stacked
- UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
- UF_NOOVERLAP = 0x0008, // Spell effects do not overlap
- UF_PATHCHECK = 0x0010, // Only cells with a shootable path will be placed
- UF_NOPC = 0x0020, // May not target players
- UF_NOMOB = 0x0040, // May not target mobs
- UF_SKILL = 0x0080, // May target skills
- UF_DANCE = 0x0100, // Dance
- UF_ENSEMBLE = 0x0200, // Duet
- UF_SONG = 0x0400, // Song
- UF_DUALMODE = 0x0800, // Spells should trigger both ontimer and onplace/onout/onleft effects.
- UF_RANGEDSINGLEUNIT = 0x2000 // hack for ranged layout, only display center
+ UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
+ UF_NOREITERATION = 0x0002, // Spell cannot be stacked
+ UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
+ UF_NOOVERLAP = 0x0008, // Spell effects do not overlap
+ UF_PATHCHECK = 0x0010, // Only cells with a shootable path will be placed
+ UF_NOPC = 0x0020, // May not target players
+ UF_NOMOB = 0x0040, // May not target mobs
+ UF_SKILL = 0x0080, // May target skills
+ UF_DANCE = 0x0100, // Dance
+ UF_ENSEMBLE = 0x0200, // Duet
+ UF_SONG = 0x0400, // Song
+ UF_DUALMODE = 0x0800, // Spells should trigger both ontimer and onplace/onout/onleft effects.
+ UF_RANGEDSINGLEUNIT = 0x2000 // Hack for ranged layout, only display center
};
//Returns the cast type of the skill: ground cast, castend damage, castend no damage