* Added some of Shinomori's fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@751 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
b249fe2444
commit
bea3ec88e9
@ -1,9 +1,11 @@
|
|||||||
Date Added
|
Date Added
|
||||||
12/23
|
12/23
|
||||||
* Updated mapflags (added missing payon_in03,ayo_in01,ayo_in02, que_god01, que_god02) [Lupus]
|
* Updated mapflags (added missing payon_in03,ayo_in01,ayo_in02, que_god01, que_god02) [Lupus]
|
||||||
* Updated Sacrifice [celest]
|
* Updated Sacrifice : it's now self-activating, and lasts for 5 attacks [celest]
|
||||||
* Fixed compile errors in party.c [celest]
|
* Fixed compile errors in party.c [celest]
|
||||||
* Moved SC_EDP back to 114 [celest]
|
* Moved SC_EDP back to 114 [celest]
|
||||||
|
* Added some of Shinomori's fixes [celest]
|
||||||
|
* Added optimisation in intif_parse_WisMessage from Freya [celest]
|
||||||
|
|
||||||
12/22
|
12/22
|
||||||
* Eliminated skill tree mapping since we have entries
|
* Eliminated skill tree mapping since we have entries
|
||||||
|
@ -140,7 +140,11 @@ static unsigned char NibbleData[4][64]={
|
|||||||
*/
|
*/
|
||||||
static unsigned int getlong(unsigned char *p)
|
static unsigned int getlong(unsigned char *p)
|
||||||
{
|
{
|
||||||
return *p+p[1]*256+(p[2]+p[3]*256)*65536;
|
// return *p+p[1]*256+(p[2]+p[3]*256)*65536;
|
||||||
|
return p[0]
|
||||||
|
| p[1] << 0x08
|
||||||
|
| p[2] << 0x10
|
||||||
|
| p[3] << 0x18; // Shinomori
|
||||||
}
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
@ -158,15 +162,17 @@ static void BitConvert(BYTE *Src,char *BitSwapTable)
|
|||||||
{
|
{
|
||||||
int lop,prm;
|
int lop,prm;
|
||||||
BYTE tmp[8];
|
BYTE tmp[8];
|
||||||
*(DWORD*)tmp=*(DWORD*)(tmp+4)=0;
|
// *(DWORD*)tmp=*(DWORD*)(tmp+4)=0;
|
||||||
|
memset(tmp,0,8);
|
||||||
for(lop=0;lop!=64;lop++) {
|
for(lop=0;lop!=64;lop++) {
|
||||||
prm = BitSwapTable[lop]-1;
|
prm = BitSwapTable[lop]-1;
|
||||||
if (Src[(prm >> 3) & 7] & BitMaskTable[prm & 7]) {
|
if (Src[(prm >> 3) & 7] & BitMaskTable[prm & 7]) {
|
||||||
tmp[(lop >> 3) & 7] |= BitMaskTable[lop & 7];
|
tmp[(lop >> 3) & 7] |= BitMaskTable[lop & 7];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*(DWORD*)Src = *(DWORD*)tmp;
|
// *(DWORD*)Src = *(DWORD*)tmp;
|
||||||
*(DWORD*)(Src+4) = *(DWORD*)(tmp+4);
|
// *(DWORD*)(Src+4) = *(DWORD*)(tmp+4);
|
||||||
|
memcpy(Src,tmp,8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BitConvert4(BYTE *Src)
|
static void BitConvert4(BYTE *Src)
|
||||||
@ -194,7 +200,11 @@ static void BitConvert4(BYTE *Src)
|
|||||||
tmp[(lop >> 3) + 4] |= BitMaskTable[lop & 7];
|
tmp[(lop >> 3) + 4] |= BitMaskTable[lop & 7];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*(DWORD*)Src ^= *(DWORD*)(tmp+4);
|
// *(DWORD*)Src ^= *(DWORD*)(tmp+4);
|
||||||
|
Src[0] ^= tmp[4];
|
||||||
|
Src[1] ^= tmp[5];
|
||||||
|
Src[2] ^= tmp[6];
|
||||||
|
Src[3] ^= tmp[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void decode_des_etc(BYTE *buf,int len,int type,int cycle)
|
static void decode_des_etc(BYTE *buf,int len,int type,int cycle)
|
||||||
|
@ -325,10 +325,6 @@ enum {
|
|||||||
#ifndef strnicmp
|
#ifndef strnicmp
|
||||||
#define strnicmp strncasecmp
|
#define strnicmp strncasecmp
|
||||||
#endif
|
#endif
|
||||||
#ifndef strrchr
|
|
||||||
#define strrchr rindex
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _MMO_H_
|
#endif // _MMO_H_
|
||||||
|
@ -17,6 +17,11 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifndef SIOCGIFCONF
|
||||||
|
#include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define START_ACCOUNT_NUM 2000000
|
#define START_ACCOUNT_NUM 2000000
|
||||||
#define END_ACCOUNT_NUM 100000000
|
#define END_ACCOUNT_NUM 100000000
|
||||||
|
|
||||||
int login_port;
|
extern int login_port;
|
||||||
struct mmo_account {
|
struct mmo_account {
|
||||||
char* userid;
|
char* userid;
|
||||||
char passwd[33];
|
char passwd[33];
|
||||||
@ -36,6 +36,6 @@ struct mmo_char_server {
|
|||||||
int new;
|
int new;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mmo_char_server server[MAX_SERVERS];
|
extern struct mmo_char_server server[MAX_SERVERS];
|
||||||
int server_fd[MAX_SERVERS];
|
extern int server_fd[MAX_SERVERS];
|
||||||
#endif
|
#endif
|
||||||
|
@ -627,6 +627,7 @@ int intif_guild_castle_datasave(int castle_id,int index, int value)
|
|||||||
// Wisp/Page reception
|
// Wisp/Page reception
|
||||||
int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
|
int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
|
||||||
struct map_session_data* sd;
|
struct map_session_data* sd;
|
||||||
|
char *wisp_source;
|
||||||
int id=RFIFOL(fd,4);
|
int id=RFIFOL(fd,4);
|
||||||
int i=0; //,j=0;
|
int i=0; //,j=0;
|
||||||
|
|
||||||
@ -651,9 +652,20 @@ int intif_parse_WisMessage(int fd) { // rewritten by [Yor]
|
|||||||
|
|
||||||
else{
|
else{
|
||||||
*/
|
*/
|
||||||
if(i == MAX_IGNORE_LIST) {
|
else {
|
||||||
clif_wis_message(sd->fd,RFIFOP(fd,8),RFIFOP(fd,56),RFIFOW(fd,2)-56);
|
wisp_source = RFIFOP(fd,8); // speed up [Yor]
|
||||||
intif_wis_replay(RFIFOL(fd,4),0); // ‘—<E28098>M<EFBFBD>¬Œ÷
|
for(i=0;i<MAX_IGNORE_LIST;i++){ //拒否リストに名前があるかどうか判定してあれば拒否
|
||||||
|
if(strcmp(sd->ignore[i].name, wisp_source)==0){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(i==MAX_IGNORE_LIST) // run out of list, so we are not ignored
|
||||||
|
{
|
||||||
|
clif_wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
|
||||||
|
intif_wis_replay(id,0); // 送信成功
|
||||||
|
}
|
||||||
|
else
|
||||||
|
intif_wis_replay(id, 2); // 受信拒否
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
intif_wis_replay(id,1); // そんな人いません
|
intif_wis_replay(id,1); // そんな人いません
|
||||||
|
@ -32,13 +32,17 @@
|
|||||||
|
|
||||||
struct npc_src_list {
|
struct npc_src_list {
|
||||||
struct npc_src_list * next;
|
struct npc_src_list * next;
|
||||||
struct npc_src_list * prev;
|
// struct npc_src_list * prev; //[Shinomori]
|
||||||
char name[4];
|
char name[4];
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static struct npc_src_list *npc_src_first,*npc_src_last;
|
static struct npc_src_list *npc_src_first=NULL;
|
||||||
|
static struct npc_src_list *npc_src_last=NULL;
|
||||||
static int npc_id=START_NPC_NUM;
|
static int npc_id=START_NPC_NUM;
|
||||||
static int npc_warp,npc_shop,npc_script,npc_mob;
|
static int npc_warp=0;
|
||||||
|
static int npc_shop=0;
|
||||||
|
static int npc_script=0;
|
||||||
|
static int npc_mob=0;
|
||||||
|
|
||||||
int npc_get_new_npc_id(void){ return npc_id++; }
|
int npc_get_new_npc_id(void){ return npc_id++; }
|
||||||
|
|
||||||
@ -1366,6 +1370,17 @@ void npc_addsrcfile(char *name)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// prevent multiple insert of source files
|
||||||
|
struct npc_src_list *p=npc_src_first;
|
||||||
|
while( p )
|
||||||
|
{ // found the file, no need to insert it again
|
||||||
|
if( 0==strcmp(name,p->name) )
|
||||||
|
return;
|
||||||
|
p=p->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
len = sizeof(*new) + strlen(name);
|
len = sizeof(*new) + strlen(name);
|
||||||
new=(struct npc_src_list *)aCalloc(1,len);
|
new=(struct npc_src_list *)aCalloc(1,len);
|
||||||
new->next = NULL;
|
new->next = NULL;
|
||||||
@ -2273,10 +2288,10 @@ int do_init_npc(void)
|
|||||||
memset(&ev_tm_b,-1,sizeof(ev_tm_b));
|
memset(&ev_tm_b,-1,sizeof(ev_tm_b));
|
||||||
|
|
||||||
for(nsl=npc_src_first;nsl;nsl=nsl->next) {
|
for(nsl=npc_src_first;nsl;nsl=nsl->next) {
|
||||||
if(nsl->prev){
|
/*if(nsl->prev){ // [Shinomori]
|
||||||
free(nsl->prev);
|
free(nsl->prev);
|
||||||
nsl->prev = NULL;
|
nsl->prev = NULL;
|
||||||
}
|
}*/
|
||||||
fp=fopen(nsl->name,"r");
|
fp=fopen(nsl->name,"r");
|
||||||
if (fp==NULL) {
|
if (fp==NULL) {
|
||||||
printf("file not found : %s\n",nsl->name);
|
printf("file not found : %s\n",nsl->name);
|
||||||
|
12
src/map/pc.c
12
src/map/pc.c
@ -55,13 +55,11 @@ static char job_bonus[3][MAX_PC_CLASS][MAX_LEVEL];
|
|||||||
static int exp_table[14][MAX_LEVEL];
|
static int exp_table[14][MAX_LEVEL];
|
||||||
static char statp[255][7];
|
static char statp[255][7];
|
||||||
|
|
||||||
/*static struct {
|
// h-files are for declarations, not for implementations... [Shinomori]
|
||||||
int id;
|
struct skill_tree_entry skill_tree[3][MAX_PC_CLASS][100];
|
||||||
int max;
|
// timer for night.day implementation
|
||||||
struct {
|
int day_timer_tid;
|
||||||
short id,lv;
|
int night_timer_tid;
|
||||||
} need[6];
|
|
||||||
} skill_tree[3][MAX_PC_CLASS][100];*/ // moved to pc.h - celest
|
|
||||||
|
|
||||||
static int atkmods[3][20]; // 武器ATKサイズ修正(size_fix.txt)
|
static int atkmods[3][20]; // 武器ATKサイズ修正(size_fix.txt)
|
||||||
static int refinebonus[5][3]; // 精?ボ?ナステ?ブル(refine_db.txt)
|
static int refinebonus[5][3]; // 精?ボ?ナステ?ブル(refine_db.txt)
|
||||||
|
@ -181,7 +181,8 @@ struct skill_tree_entry {
|
|||||||
struct {
|
struct {
|
||||||
short id,lv;
|
short id,lv;
|
||||||
} need[6];
|
} need[6];
|
||||||
} skill_tree[3][MAX_PC_CLASS][100]; // Celest
|
}; // Celest
|
||||||
|
extern struct skill_tree_entry skill_tree[3][MAX_PC_CLASS][100];
|
||||||
|
|
||||||
int pc_read_gm_account(int fd);
|
int pc_read_gm_account(int fd);
|
||||||
int pc_setinvincibletimer(struct map_session_data *sd,int);
|
int pc_setinvincibletimer(struct map_session_data *sd,int);
|
||||||
@ -194,8 +195,8 @@ int do_init_pc(void);
|
|||||||
enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
|
enum {ADDITEM_EXIST,ADDITEM_NEW,ADDITEM_OVERAMOUNT};
|
||||||
|
|
||||||
// timer for night.day
|
// timer for night.day
|
||||||
int day_timer_tid;
|
extern int day_timer_tid;
|
||||||
int night_timer_tid;
|
extern int night_timer_tid;
|
||||||
int map_day_timer(int,unsigned int,int,int); // by [yor]
|
int map_day_timer(int,unsigned int,int,int); // by [yor]
|
||||||
int map_night_timer(int,unsigned int,int,int); // by [yor]
|
int map_night_timer(int,unsigned int,int,int); // by [yor]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user