summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--db/Changelog.txt5
-rw-r--r--db/const.txt1
-rw-r--r--db/mob_db2.txt2
-rw-r--r--db/packet_db.txt5
-rw-r--r--npc/custom/eAAC_Scripts/kafraExpress/global_functionsKE.txt2
-rw-r--r--npc/merchants/clothes_dyer.txt4
-rw-r--r--src/login/login.c13
-rw-r--r--src/login_sql/login.c13
-rw-r--r--src/map/clif.c36
-rw-r--r--src/map/skill.c1
11 files changed, 59 insertions, 27 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index c0b45d917..469804c53 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -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,
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 2dc633e74..0fa023b6c 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -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]
diff --git a/db/const.txt b/db/const.txt
index 4bde60b07..2f6f4957d 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -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
diff --git a/db/mob_db2.txt b/db/mob_db2.txt
index 9a6266f24..2afa2cbf5 100644
--- a/db/mob_db2.txt
+++ b/db/mob_db2.txt
@@ -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
diff --git a/db/packet_db.txt b/db/packet_db.txt
index 7ea2fe913..7bcba9b61 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -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
diff --git a/npc/custom/eAAC_Scripts/kafraExpress/global_functionsKE.txt b/npc/custom/eAAC_Scripts/kafraExpress/global_functionsKE.txt
index f536e8e32..df30b9ae0 100644
--- a/npc/custom/eAAC_Scripts/kafraExpress/global_functionsKE.txt
+++ b/npc/custom/eAAC_Scripts/kafraExpress/global_functionsKE.txt
@@ -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:
diff --git a/npc/merchants/clothes_dyer.txt b/npc/merchants/clothes_dyer.txt
index 915f61069..da7fcf96b 100644
--- a/npc/merchants/clothes_dyer.txt
+++ b/npc/merchants/clothes_dyer.txt
@@ -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;
diff --git a/src/login/login.c b/src/login/login.c
index 5940571b9..e687ff986 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -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);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index c8c9496ec..ecf09ae98 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -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);
diff --git a/src/map/clif.c b/src/map/clif.c
index 54632a3b5..6e96d79a4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -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,
@@ -11716,17 +11722,25 @@ static int packetdb_readdb(void)
30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1,
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
//#0x0200
- 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19)
- 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282,10, 10, -1, -1, 66,
- 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5,
- 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2,
+ 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 0, 0, -1, 32, 10, // 0x20c change to 0 (was 19)
+ 22, 0, 26, 26, 42, 6, 6, 2, 2,282,282, 10, 10, -1, -1, 66,
+ 10, -1, -1, 8, 10, 2,282, 18, 18, 15, 58, 57, 64, 5, 71, 5,
+ 12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1, -1, 4, 2,
//#0x0240
- -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10,
- 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4,-1, 4, 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,
+ -1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8, 12, 4, 10,
+ 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4, -1, 4, 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,
//#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 *);
diff --git a/src/map/skill.c b/src/map/skill.c
index 500df9aec..5e76f581f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -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)