* Added a null-pointer check to skill_initunit() to prevent a crash

* Added a while() loop to the client packet processor (for performance)
* Added support for kRO 2007-05-14aSakexe langtype 0 login packet 0x2b0
* Added Job_Baby_Alchemist define to complement the Job_Alchemist update
* Added custom Hollow Poring mob_db2 entry

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10954 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2007-08-06 19:05:37 +00:00
parent 7f6ee484ba
commit f26bc90351
11 changed files with 59 additions and 27 deletions

View File

@ -3,6 +3,10 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/08/06
* Added a null-pointer check to skill_initunit() to prevent a crash
* Added a while() loop to the client packet processor (for performance)
* Added support for kRO 2007-05-14aSakexe langtype 0 login packet 0x2b0
2007/08/04
* Removed weird mvp reward item drop behavior (see topic:160077)
* Fixed Cart Revolution not transferring status effects on attack,

View File

@ -48,8 +48,11 @@
13107 Western_Outlaw Need correct HIT and ASPD Rate
----
========================
08/06
* Added custom Hollow Poring mob_db2 entry
* Added Job_Baby_Alchemist define to complement the Job_Alchemist update
08/04
* Added missing /blackmith packet action to packet_db.txt
* Added missing /blacksmith packet action to packet_db.txt
* Removed "eathena's custom equipped mobs" from mob&skill db [ultramage]
08/01
* Added the remaining arrow craftings [Playtester]

View File

@ -69,6 +69,7 @@ Job_Baby_Monk 4038
Job_Baby_Sage 4039
Job_Baby_Rogue 4040
Job_Baby_Alchem 4041
Job_Baby_Alchemist 4041
Job_Baby_Bard 4042
Job_Baby_Dancer 4043
Job_Baby_Crusader2 4044

View File

@ -21,5 +21,7 @@
1903,POKI,Poki#3,Poki#3,99,1349000,0,4093000,1526000,9,4892,9113,22,35,1,180,39,67,193,130,10,12,1,7,64,1973,120,500,672,480,92100,7000,603,5500,617,3000,1723,1000,1228,100,1236,500,617,2500,1234,75,1237,125,1722,250,1724,100,1720,50,0,0,0,0
1904,SENTRY,Sentry,Sentry,99,668000,0,107250,37895,2,3220,4040,35,45,1,152,96,85,120,95,10,10,2,6,67,1973,100,1068,768,576,13000,5000,608,1000,750,400,923,3800,1466,200,2256,200,2607,800,714,500,617,3000,984,4300,985,5600,0,0,0,0,4147,1
//Custom Hollow Poring (overrrides/collides with META_ANDRE)
//1237,HOLLOW_PORING,Hollow Poring,Hollow Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,0,6,30,10,12,1,3,21,0x83,400,1872,672,480,0,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,512,150,619,20,0,0,0,0,4001,10
//Custom Fire Poring. Warning, Colides with META_DENIRO
//1239,FIRE_PORING,Fire Poring,Fire Poring,1,50,0,2,1,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,0,909,7000,1202,100,938,400,512,1000,713,1500,741,5,619,20,0,0,0,0,4001,20

View File

@ -995,7 +995,7 @@ packet_ver: 22
//2007-05-07aSakexe
0x01fd,15,repairitem,2
//2007-07-11aSakexe (grouped changes between this and 2007-02-27aSakexe)
//2007-07-31aSakexe (grouped changes between this and 2007-02-27aSakexe)
0x0288,10
0x0289,12
0x02a6,22
@ -1006,7 +1006,8 @@ packet_ver: 22
0x02ae,10
0x02af,2
0x02b0,85
0x02b3,7
0x02b1,-1
0x02b3,31
0x02b4,6
0x02b5,12
0x02b6,7

View File

@ -152,7 +152,7 @@ function script GF_getJobName {
return "baby sage";
case Job_Baby_BlackSmith:
return "baby blacksmith";
case Job_Baby_Alchem:
case Job_Baby_Alchemist:
return "baby alchemist";
case Job_Baby_Knight:
case Job_Baby_Knight2:

View File

@ -77,7 +77,7 @@ Male_dye:
if(BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 || BaseJob==Job_Lord_Knight || BaseJob==Job_Lord_Knight2 || BaseJob==Job_Paladin || BaseJob==Job_Paladin2 || BaseJob==Job_Stalker || BaseJob==Job_Baby_Knight || BaseJob==Job_Baby_Knight2 || BaseJob==Job_Baby_Crusader || BaseJob==Job_Baby_Crusader2) goto L_Swordman2_M;
if(BaseJob==Job_Priest || BaseJob==Job_Monk || BaseJob==Job_High_Priest || BaseJob==Job_Champion || BaseJob==Job_Baby_Priest || BaseJob==Job_Baby_Monk) goto L_Acolyte2_M;
if(BaseJob==Job_Wizard || BaseJob==Job_High_Wizard || BaseJob==Job_Baby_Wizard) goto L_Mage2_M;
if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchemist || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith || BaseJob==Job_Baby_Alchem) goto L_Merchant2_M;
if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchemist || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith || BaseJob==Job_Baby_Alchemist) goto L_Merchant2_M;
if(BaseJob==Job_Hunter || BaseJob==Job_Bard || BaseJob==Job_Sniper || BaseJob==Job_Clown || BaseJob==Job_Baby_Hunter || BaseJob==Job_Baby_Bard) goto L_Archer2_M;
if(BaseJob==Job_Assassin || BaseJob==Job_Rogue || BaseJob==Job_Assassin_Cross || BaseJob==Job_Baby_Assassin || BaseJob==Job_Baby_Rogue) goto L_Thief2_M;
if(BaseJob==Job_SuperNovice || BaseJob==Job_Super_Baby) goto L_Super_Novice_M;
@ -173,7 +173,7 @@ Female_dye:
if(BaseJob==Job_Knight || BaseJob==Job_Knight2 || BaseJob==Job_Crusader || BaseJob==Job_Crusader2 || BaseJob==Job_Lord_Knight || BaseJob==Job_Lord_Knight2 || BaseJob==Job_Paladin || BaseJob==Job_Paladin2 || BaseJob==Job_Stalker || BaseJob==Job_Baby_Knight || BaseJob==Job_Baby_Knight2 || BaseJob==Job_Baby_Crusader || BaseJob==Job_Baby_Crusader2) goto L_Swordman2_F;
if(BaseJob==Job_Priest || BaseJob==Job_Baby_Priest) goto L_Acolyte2_F;
if(BaseJob==Job_Wizard || BaseJob==Job_Sage || BaseJob==Job_High_Wizard || BaseJob==Job_Professor || BaseJob==Job_Baby_Wizard || BaseJob==Job_Baby_Sage) goto L_Mage2_F;
if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchemist || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith || BaseJob==Job_Baby_Alchem) goto L_Merchant2_F;
if(BaseJob==Job_Blacksmith || BaseJob==Job_Alchemist || BaseJob==Job_Whitesmith || BaseJob==Job_Creator || BaseJob==Job_Baby_Blacksmith || BaseJob==Job_Baby_Alchemist) goto L_Merchant2_F;
if(BaseJob==Job_Hunter || BaseJob==Job_Dancer || BaseJob==Job_Sniper || BaseJob==Job_Gypsy || BaseJob==Job_Baby_Hunter || BaseJob==Job_Baby_Dancer) goto L_Archer2_F;
if(BaseJob==Job_Assassin || BaseJob==Job_Baby_Assassin) goto L_Thief2_F;
if(BaseJob==Job_Rogue || BaseJob==Job_Assassin_Cross || BaseJob==Job_Baby_Rogue) goto L_Thief3_F;

View File

@ -3015,8 +3015,9 @@ int parse_login(int fd)
break;
case 0x0064: // request client login
case 0x0277: // New login packet (layout is same as 0x64 but different length)
case 0x01dd: // request client login (encryption mode)
case 0x0277: // New login packet (layout is same as 0x64 but different length)
case 0x02b0: // New login packet (kRO 2007-05-14aSakexe langtype 0)
{
int packet_len = RFIFOREST(fd); // assume no other packet was sent
@ -3033,14 +3034,16 @@ int parse_login(int fd)
break;
}
if ((command == 0x0064 && packet_len < 55) ||
(command == 0x0277 && packet_len < 84) ||
(command == 0x01dd && packet_len < 47))
if( (command == 0x0064 && packet_len < 55)
|| (command == 0x01dd && packet_len < 47)
|| (command == 0x0277 && packet_len < 84)
|| (command == 0x02b0 && packet_len < 85) )
return 0;
// S 0064 <version>.l <account name>.24B <password>.24B <version2>.B
// S 0277 ??
// S 01dd <version>.l <account name>.24B <md5 binary>.16B <version2>.B
// S 0277 ??
// S 02b0 <version>.l <account name>.24B <password>.24B <?>.B <ip address>.16B <?>.13 <version2>.B
memset(&account, 0, sizeof(account));
account.version = RFIFOL(fd,2);

View File

@ -1345,8 +1345,9 @@ int parse_login(int fd)
break;
case 0x0064: // request client login
case 0x0277: // New login packet (layout is same as 0x64 but different length)
case 0x01dd: // request client login (encryption mode)
case 0x0277: // New login packet (layout is same as 0x64 but different length)
case 0x02b0: // New login packet (kRO 2007-05-14aSakexe langtype 0)
{
int packet_len = RFIFOREST(fd);
@ -1362,14 +1363,16 @@ int parse_login(int fd)
break;
}
if ((command == 0x0064 && packet_len < 55) ||
(command == 0x0277 && packet_len < 84) ||
(command == 0x01dd && packet_len < 47))
if( (command == 0x0064 && packet_len < 55)
|| (command == 0x01dd && packet_len < 47)
|| (command == 0x0277 && packet_len < 84)
|| (command == 0x02b0 && packet_len < 85) )
return 0;
// S 0064 <version>.l <account name>.24B <password>.24B <version2>.B
// S 0277 ??
// S 01dd <version>.l <account name>.24B <md5 binary>.16B <version2>.B
// S 0277 ??
// S 02b0 <version>.l <account name>.24B <password>.24B <?>.B <ip address>.16B <?>.13 <version2>.B
memset(&account, 0, sizeof(account));
account.version = RFIFOL(fd,2);

View File

@ -7853,6 +7853,7 @@ void clif_feel_hate_reset(struct map_session_data *sd)
WFIFOSET(fd, packet_len(0x20e));
}
// ---------------------
// clif_guess_PacketVer
// ---------------------
@ -11499,9 +11500,12 @@ void clif_parse_debug(int fd,struct map_session_data *sd)
*------------------------------------------*/
int clif_parse(int fd)
{
int packet_len = 0, cmd, packet_ver, err;
int cmd, packet_ver, packet_len, err;
TBL_PC* sd;
while(1)
{ // begin main client packet processing loop
sd = (TBL_PC *)session[fd]->session_data;
if (session[fd]->eof) {
if (sd) {
@ -11651,6 +11655,8 @@ int clif_parse(int fd)
RFIFOSKIP(fd, packet_len);
}; // main loop end
return 0;
}
@ -11667,7 +11673,7 @@ static int packetdb_readdb(void)
int skip_ver = 0;
int warned = 0;
char *str[64],*p,*str2[64],*p2,w1[64],w2[64];
int packet_len_table[0x290] = {
int packet_len_table[MAX_PACKET_DB] = {
10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -11726,7 +11732,15 @@ static int packetdb_readdb(void)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x0280
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x02C0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
struct {
void (*func)(int, struct map_session_data *);

View File

@ -9684,6 +9684,7 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
struct skill_unit *unit;
nullpo_retr(NULL, group);
nullpo_retr(NULL, group->unit); // crash-protection against poor coding
nullpo_retr(NULL, unit=&group->unit[idx]);
if(!unit->alive)