* Fixed compilation errors.

* Tidy up jobmaster for easy debugging. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6686 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lance 2006-05-22 08:52:56 +00:00
parent 64a604f58e
commit 6ae92d0a86
3 changed files with 95 additions and 91 deletions

View File

@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. 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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/22
* Fixed compilation errors.
Tidy up jobmaster for easy debugging. [Lance]
2006/05/21 2006/05/21
* Part A of the Homunculus code. * Part A of the Homunculus code.
This only features the structures, status_* and clif_* (packets) and is This only features the structures, status_* and clif_* (packets) and is

View File

@ -34,54 +34,54 @@ prontera.gat,153,193,6 script Job Master 123,{
mes "Welcome, please select the job you wish to change into"; mes "Welcome, please select the job you wish to change into";
if(lastJob != 0 && Class == Job_Novice_High){ if(lastJob != 0 && Class == Job_Novice_High){
switch(lastJob){ switch(lastJob){
case Job_Knight: case Job_Knight:
case Job_Crusader: case Job_Crusader:
set @target_job, Job_Swordman_High; set @target_job, Job_Swordman_High;
break; break;
case Job_Monk: case Job_Monk:
case Job_Priest: case Job_Priest:
set @target_job, Job_Acolyte_High; set @target_job, Job_Acolyte_High;
break; break;
case Job_Alchem: case Job_Alchem:
case Job_Blacksmith: case Job_Blacksmith:
set @target_job, Job_Merchant_High; set @target_job, Job_Merchant_High;
break; break;
case Job_Rogue: case Job_Rogue:
case Job_Assassin: case Job_Assassin:
set @target_job, Job_Thief_High; set @target_job, Job_Thief_High;
break; break;
case Job_Wizard: case Job_Wizard:
case Job_Sage: case Job_Sage:
set @target_job, Job_Mage_High; set @target_job, Job_Mage_High;
break; break;
case Job_Hunter: case Job_Hunter:
case Job_Bard: case Job_Bard:
case Job_Dancer: case Job_Dancer:
set @target_job, Job_Archer_High; set @target_job, Job_Archer_High;
break; break;
} }
} else { } else {
switch(select("Swordsman","Mage","Archer","Acolyte","Merchant","Thief", switch(select("Swordsman","Mage","Archer","Acolyte","Merchant","Thief",
"Super Novice","Taekwon","Gunslinger","Ninja")){ "Super Novice","Taekwon","Gunslinger","Ninja")){
case 7: case 7:
if(Class == Job_Novice_High) goto L_noReq; if(Class == Job_Novice_High) goto L_noReq;
if($@JC_SupNovM > BaseLevel) goto L_BvError; if($@JC_SupNovM > BaseLevel) goto L_BvError;
set @target_job, Job_SuperNovice; set @target_job, Job_SuperNovice;
break; break;
case 8: case 8:
if(Class == Job_Novice_High) goto L_noReq; if(Class == Job_Novice_High) goto L_noReq;
if(Upper == 2) goto L_noReq; if(Upper == 2) goto L_noReq;
set @target_job, Job_Taekwon; set @target_job, Job_Taekwon;
break; break;
case 9: case 9:
case 10: case 10:
if(Class == Job_Novice_High) goto L_noReq; if(Class == Job_Novice_High) goto L_noReq;
set @target_job, @menu + 15; set @target_job, @menu + 15;
break; break;
default: default:
set @target_job, @menu; set @target_job, @menu;
if(Class == Job_Novice_High) set @target_job, @target_job + 4001; if(Class == Job_Novice_High) set @target_job, @target_job + 4001;
break; break;
} }
} }
mes "Are you sure?"; mes "Are you sure?";
@ -103,49 +103,49 @@ prontera.gat,153,193,6 script Job Master 123,{
set @target_job, lastJob + 4001; set @target_job, lastJob + 4001;
} else { } else {
switch(Class){ switch(Class){
case Job_Swordman_High: case Job_Swordman_High:
case Job_Baby_Swordman: case Job_Baby_Swordman:
case Job_Swordman: case Job_Swordman:
set @job_opt[0], Job_Knight; set @job_opt[0], Job_Knight;
set @job_opt[1], Job_Crusader; set @job_opt[1], Job_Crusader;
break; break;
case Job_Mage_High: case Job_Mage_High:
case Job_Baby_Mage: case Job_Baby_Mage:
case Job_Mage: case Job_Mage:
set @job_opt[0], Job_Wizard; set @job_opt[0], Job_Wizard;
set @job_opt[1], Job_Sage; set @job_opt[1], Job_Sage;
break; break;
case Job_Archer_High: case Job_Archer_High:
case Job_Baby_Archer: case Job_Baby_Archer:
case Job_Archer: case Job_Archer:
set @job_opt[0], Job_Hunter; set @job_opt[0], Job_Hunter;
if(Sex == 0) if(Sex == 0)
set @job_opt[1], Job_Dancer; set @job_opt[1], Job_Dancer;
else else
set @job_opt[1], Job_Bard; set @job_opt[1], Job_Bard;
break; break;
case Job_Acolyte_High: case Job_Acolyte_High:
case Job_Baby_Acolyte: case Job_Baby_Acolyte:
case Job_Acolyte: case Job_Acolyte:
set @job_opt[0], Job_Priest; set @job_opt[0], Job_Priest;
set @job_opt[1], Job_Monk; set @job_opt[1], Job_Monk;
break; break;
case Job_Merchant_High: case Job_Merchant_High:
case Job_Baby_Merchant: case Job_Baby_Merchant:
case Job_Merchant: case Job_Merchant:
set @job_opt[0], Job_Blacksmith; set @job_opt[0], Job_Blacksmith;
set @job_opt[1], Job_Alchem; set @job_opt[1], Job_Alchem;
break; break;
case Job_Thief_High: case Job_Thief_High:
case Job_Baby_Theif: case Job_Baby_Theif:
case Job_Theif: case Job_Theif:
set @job_opt[0], Job_Assassin; set @job_opt[0], Job_Assassin;
set @job_opt[1], Job_Rogue; set @job_opt[1], Job_Rogue;
break; break;
default: default:
set @job_opt[0], Job_Star_Gladiator; set @job_opt[0], Job_Star_Gladiator;
set @job_opt[1], Job_Soul_Linker; set @job_opt[1], Job_Soul_Linker;
break; break;
} }
mes "Welcome, please select the job you wish to change into"; mes "Welcome, please select the job you wish to change into";
set @target_job, @job_opt[select(callfunc("getJobName",@job_opt[0]), callfunc("getJobName",@job_opt[1]))-1]; set @target_job, @job_opt[select(callfunc("getJobName",@job_opt[0]), callfunc("getJobName",@job_opt[1]))-1];

View File

@ -1371,11 +1371,11 @@ int clif_spawn(struct block_list *bl)
int clif_homunack(struct map_session_data *sd) int clif_homunack(struct map_session_data *sd)
{ {
struct homun_data *hd = sd->hd; struct homun_data *hd = sd->hd;
unsigned char buf[64];
nullpo_retr(0, sd); nullpo_retr(0, sd);
nullpo_retr(0, sd->hd); nullpo_retr(0, sd->hd);
unsigned char buf[64];
//memset(buf,0,packet_len_table[0x230]); //memset(buf,0,packet_len_table[0x230]);
memset(buf,0,12); //not yet set that stuff memset(buf,0,12); //not yet set that stuff
WBUFW(buf,0)=0x230; WBUFW(buf,0)=0x230;
@ -1390,11 +1390,11 @@ int clif_homunack(struct map_session_data *sd)
int clif_homuninfo(struct map_session_data *sd) int clif_homuninfo(struct map_session_data *sd)
{ {
struct homun_data *hd = sd->hd; struct homun_data *hd = sd->hd;
unsigned char buf[128];
nullpo_retr(0, sd); nullpo_retr(0, sd);
nullpo_retr(0, sd->hd); nullpo_retr(0, sd->hd);
unsigned char buf[128];
memset(buf,0,71); //packet_len_table[0x22e]); memset(buf,0,71); //packet_len_table[0x22e]);
WBUFW(buf,0)=0x22e; WBUFW(buf,0)=0x22e;
memcpy(WBUFP(buf,2),hd->name,NAME_LENGTH); memcpy(WBUFP(buf,2),hd->name,NAME_LENGTH);
@ -1418,13 +1418,14 @@ int clif_homuninfo(struct map_session_data *sd)
WBUFW(buf,67)=hd->skillpts; WBUFW(buf,67)=hd->skillpts;
WBUFW(buf,69)=0x21; WBUFW(buf,69)=0x21;
clif_send(buf,/*packet_len_table[0x22e]*/71,&sd->bl,SELF); clif_send(buf,/*packet_len_table[0x22e]*/71,&sd->bl,SELF);
return 0;
} }
// like skillinfoblock, just for homunculi. // like skillinfoblock, just for homunculi.
int clif_homunskillinfoblock(struct map_session_data *sd) int clif_homunskillinfoblock(struct map_session_data *sd)
{ {
int fd; int fd;
int i,c,len=4,id, inf2; int i,c,len=4,id/*, inf2*/;
nullpo_retr(0, sd); nullpo_retr(0, sd);
nullpo_retr(0, sd->hd); nullpo_retr(0, sd->hd);