* Delayed the check for required items when a skill is cast to when they are consumed. Now skills only fail due to lack of items after being cast.

- Please make a bug report if you know of any skill that doesn't work like this in official.
* Fixed hp of other party members not being sent when you join a party.
* Removed unused global array names_id and renamed some structures that are used with variables of the same name.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11384 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS 2007-10-08 21:39:57 +00:00
parent db31831bb8
commit f808f37ec1
13 changed files with 93 additions and 59 deletions

View File

@ -3,6 +3,14 @@ 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.
2007/10/08
* Delayed the check for required items when a skill is cast to when they
are consumed. Now skills only fail due to lack of items after being cast.
- Please make a bug report if you know of any skill that doesn't work
like this in official.
* Fixed hp of other party members not being sent when you join a party.
* Removed unused global array names_id and renamed some structures that
are used with variables of the same name. [FlavioJS]
2007/10/07 2007/10/07
* Fixed a bug on sql char server not checking the namelength of a new * Fixed a bug on sql char server not checking the namelength of a new
character. Bug ID #184: Char Creation With An Empty Name [Zephyrus] character. Bug ID #184: Char Creation With An Empty Name [Zephyrus]

View File

@ -8397,7 +8397,7 @@ int atcommand_hominfo(const int fd, struct map_session_data* sd, const char* com
int atcommand_homstats(const int fd, struct map_session_data* sd, const char* command, const char* message) int atcommand_homstats(const int fd, struct map_session_data* sd, const char* command, const char* message)
{ {
struct homun_data *hd; struct homun_data *hd;
struct homunculus_db *db; struct s_homunculus_db *db;
struct s_homunculus *hom; struct s_homunculus *hom;
int lv, min, max, evo; int lv, min, max, evo;

View File

@ -99,7 +99,6 @@ static int max_account_id = DEFAULT_MAX_ACCOUNT_ID;
static int max_char_id = DEFAULT_MAX_CHAR_ID; static int max_char_id = DEFAULT_MAX_CHAR_ID;
int clif_parse (int fd); int clif_parse (int fd);
static void clif_hpmeter_single(int fd, struct map_session_data *sd);
/*========================================== /*==========================================
* mapŽIÌip<EFBFBD>Ýè * mapŽIÌip<EFBFBD>Ýè
@ -3632,7 +3631,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
if((sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting. if((sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(battle_config.disp_hpmeter && (len = pc_isGM(sd)) >= battle_config.disp_hpmeter && len >= pc_isGM(dstsd)) (battle_config.disp_hpmeter && (len = pc_isGM(sd)) >= battle_config.disp_hpmeter && len >= pc_isGM(dstsd))
) )
clif_hpmeter_single(sd->fd, dstsd); clif_hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp);
if(dstsd->status.manner < 0) if(dstsd->status.manner < 0)
clif_changestatus(&dstsd->bl,SP_MANNER,dstsd->status.manner); clif_changestatus(&dstsd->bl,SP_MANNER,dstsd->status.manner);
@ -4277,8 +4276,8 @@ int clif_skillcastcancel(struct block_list* bl)
/// type==4 "there is a delay after using a skill" MsgStringTable[219] /// type==4 "there is a delay after using a skill" MsgStringTable[219]
/// type==5 "insufficient zeny" MsgStringTable[233] /// type==5 "insufficient zeny" MsgStringTable[233]
/// type==6 "wrong weapon" MsgStringTable[239] /// type==6 "wrong weapon" MsgStringTable[239]
/// type==7 "red jemstone needed" MsgStringTable[246] /// type==7 "red gemstone needed" MsgStringTable[246]
/// type==8 "blue jemstone needed" MsgStringTable[247] /// type==8 "blue gemstone needed" MsgStringTable[247]
/// type==9 "overweight" MsgStringTable[580] /// type==9 "overweight" MsgStringTable[580]
/// type==10 "skill failed" MsgStringTable[285] /// type==10 "skill failed" MsgStringTable[285]
/// type>=11 ignored /// type>=11 ignored
@ -5766,19 +5765,20 @@ int clif_party_hp(struct map_session_data *sd)
/*========================================== /*==========================================
* Sends HP bar to a single fd. [Skotlex] * Sends HP bar to a single fd. [Skotlex]
*------------------------------------------*/ *------------------------------------------*/
static void clif_hpmeter_single(int fd, struct map_session_data *sd) void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp)
{ {
WFIFOHEAD(fd,packet_len(0x106)); WFIFOHEAD(fd,packet_len(0x106));
WFIFOW(fd,0) = 0x106; WFIFOW(fd,0) = 0x106;
WFIFOL(fd,2) = sd->status.account_id; WFIFOL(fd,2) = id;
if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex] if( maxhp > SHRT_MAX )
WFIFOW(fd,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100); {// To correctly display the %hp bar. [Skotlex]
WFIFOW(fd,6) = hp/(maxhp/100);
WFIFOW(fd,8) = 100; WFIFOW(fd,8) = 100;
} else { } else {
WFIFOW(fd,6) = sd->battle_status.hp; WFIFOW(fd,6) = hp;
WFIFOW(fd,8) = sd->battle_status.max_hp; WFIFOW(fd,8) = maxhp;
} }
WFIFOSET (fd, packet_len(0x106)); WFIFOSET(fd, packet_len(0x106));
} }
/*========================================== /*==========================================

View File

@ -289,6 +289,7 @@ void clif_party_move(struct party* p, struct map_session_data* sd, int online);
int clif_party_xy(struct map_session_data *sd); int clif_party_xy(struct map_session_data *sd);
int clif_party_xy_single(int fd, struct map_session_data *sd); int clif_party_xy_single(int fd, struct map_session_data *sd);
int clif_party_hp(struct map_session_data *sd); int clif_party_hp(struct map_session_data *sd);
void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp);
int clif_hpmeter(struct map_session_data *sd); int clif_hpmeter(struct map_session_data *sd);
// guild // guild

View File

@ -10,6 +10,13 @@
#define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display. #define MAX_SEARCH 5 //Designed for search functions, species max number of matches to display.
#define ITEMID_YELLOW_GEMSTONE 715
#define ITEMID_RED_GEMSTONE 716
#define ITEMID_BLUE_GEMSTONE 717
#define itemid_isgemstone(id) ( (id) >= ITEMID_YELLOW_GEMSTONE && (id) <= ITEMID_BLUE_GEMSTONE )
#define ITEMID_TRAP 1065
enum item_types { enum item_types {
IT_HEALING = 0, IT_HEALING = 0,

View File

@ -958,7 +958,7 @@ struct homun_data {
struct status_data base_status, battle_status; struct status_data base_status, battle_status;
struct status_change sc; struct status_change sc;
struct regen_data regen; struct regen_data regen;
struct homunculus_db *homunculusDB; //[orn] struct s_homunculus_db *homunculusDB; //[orn]
struct s_homunculus homunculus ; //[orn] struct s_homunculus homunculus ; //[orn]
struct map_session_data *master; //pointer back to its master struct map_session_data *master; //pointer back to its master
@ -974,7 +974,7 @@ struct pet_data {
struct s_pet pet; struct s_pet pet;
struct status_data status; struct status_data status;
struct mob_db *db; struct mob_db *db;
struct pet_db *petDB; struct s_pet_db *petDB;
int pet_hungry_timer; int pet_hungry_timer;
int target_id; int target_id;
struct { struct {

View File

@ -40,7 +40,7 @@
//Better equiprobability than rand()% [orn] //Better equiprobability than rand()% [orn]
#define rand(a, b) (a+(int) ((float)(b-a+1)*rand()/(RAND_MAX+1.0))) #define rand(a, b) (a+(int) ((float)(b-a+1)*rand()/(RAND_MAX+1.0)))
struct homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS]; //[orn] struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS]; //[orn]
struct skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE]; struct skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
static int merc_hom_hungry(int tid,unsigned int tick,int id,int data); static int merc_hom_hungry(int tid,unsigned int tick,int id,int data);
@ -812,7 +812,7 @@ void merc_hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp)
void merc_reset_stats(struct homun_data *hd) void merc_reset_stats(struct homun_data *hd)
{ //Resets a homunc stats back to zero (but doesn't touches hunger or intimacy) { //Resets a homunc stats back to zero (but doesn't touches hunger or intimacy)
struct homunculus_db *db; struct s_homunculus_db *db;
struct s_homunculus *hom; struct s_homunculus *hom;
struct h_stats *base; struct h_stats *base;
hom = &hd->homunculus; hom = &hd->homunculus;
@ -892,7 +892,7 @@ int read_homunculusdb(void)
int j = 0; int j = 0;
const char *filename[]={"homunculus_db.txt","homunculus_db2.txt"}; const char *filename[]={"homunculus_db.txt","homunculus_db2.txt"};
char *str[50]; char *str[50];
struct homunculus_db *db; struct s_homunculus_db *db;
memset(homunculus_db,0,sizeof(homunculus_db)); memset(homunculus_db,0,sizeof(homunculus_db));
for(i = 0; i<2; i++) for(i = 0; i<2; i++)

View File

@ -4,7 +4,7 @@
#ifndef _MERCENARY_H_ #ifndef _MERCENARY_H_
#define _MERCENARY_H_ #define _MERCENARY_H_
struct homunculus_db { struct s_homunculus_db {
int base_class, evo_class; int base_class, evo_class;
char name[NAME_LENGTH]; char name[NAME_LENGTH];
struct h_stats { struct h_stats {
@ -16,7 +16,7 @@ struct homunculus_db {
long hungryDelay ; long hungryDelay ;
unsigned char element, race, base_size, evo_size; unsigned char element, race, base_size, evo_size;
}; };
extern struct homunculus_db homuncumlus_db[MAX_HOMUNCULUS_CLASS]; extern struct s_homunculus_db homuncumlus_db[MAX_HOMUNCULUS_CLASS];
enum { HOMUNCULUS_CLASS, HOMUNCULUS_FOOD }; enum { HOMUNCULUS_CLASS, HOMUNCULUS_FOOD };
enum { enum {
SP_ACK = 0x00, SP_ACK = 0x00,

View File

@ -335,10 +335,12 @@ int party_reply_invite(struct map_session_data *sd,int account_id,int flag)
return 1; return 1;
} }
/// Invoked (from char-server) when a member is added to the party.
int party_member_added(int party_id,int account_id,int char_id, int flag) int party_member_added(int party_id,int account_id,int char_id, int flag)
{ {
struct map_session_data *sd = map_id2sd(account_id),*sd2; struct map_session_data *sd = map_id2sd(account_id),*sd2;
struct party_data *p = party_search(party_id); struct party_data *p = party_search(party_id);
int i;
if(sd == NULL || sd->status.char_id != char_id){ if(sd == NULL || sd->status.char_id != char_id){
if (flag == 0) { if (flag == 0) {
if(battle_config.error_log) if(battle_config.error_log)
@ -362,6 +364,12 @@ int party_member_added(int party_id,int account_id,int char_id, int flag)
sd->status.party_id=party_id; sd->status.party_id=party_id;
party_check_conflict(sd); party_check_conflict(sd);
clif_party_member_info(p,sd); clif_party_member_info(p,sd);
for( i = 0; i < ARRAYLENGTH(p->data); ++i )
{// hp of the other party members
sd2 = p->data[i].sd;
if( sd2 && sd2->status.account_id != account_id && sd2->status.char_id != char_id )
clif_hpmeter_single(sd->fd, sd2->bl.id, sd2->battle_status.hp, sd2->battle_status.max_hp);
}
clif_party_hp(sd); clif_party_hp(sd);
clif_party_xy(sd); clif_party_xy(sd);
clif_charnameupdate(sd); //Update char name's display [Skotlex] clif_charnameupdate(sd); //Update char name's display [Skotlex]

View File

@ -32,7 +32,7 @@
#define MIN_PETTHINKTIME 100 #define MIN_PETTHINKTIME 100
struct pet_db pet_db[MAX_PET_DB]; struct s_pet_db pet_db[MAX_PET_DB];
static struct eri *item_drop_ers; //For loot drops delay structures. static struct eri *item_drop_ers; //For loot drops delay structures.
static struct eri *item_drop_list_ers; static struct eri *item_drop_list_ers;

View File

@ -7,7 +7,7 @@
#define MAX_PET_DB 300 #define MAX_PET_DB 300
#define MAX_PETLOOT_SIZE 30 // [Valaris] - Changed to MAX_PETLOOT_SIZE [Skotlex] #define MAX_PETLOOT_SIZE 30 // [Valaris] - Changed to MAX_PETLOOT_SIZE [Skotlex]
struct pet_db { struct s_pet_db {
short class_; short class_;
char name[NAME_LENGTH],jname[NAME_LENGTH]; char name[NAME_LENGTH],jname[NAME_LENGTH];
short itemID; short itemID;
@ -29,7 +29,7 @@ struct pet_db {
int change_target_rate; int change_target_rate;
struct script_code *script; struct script_code *script;
}; };
extern struct pet_db pet_db[MAX_PET_DB]; extern struct s_pet_db pet_db[MAX_PET_DB];
enum { PET_CLASS,PET_CATCH,PET_EGG,PET_EQUIP,PET_FOOD }; enum { PET_CLASS,PET_CATCH,PET_EGG,PET_EQUIP,PET_FOOD };

View File

@ -43,7 +43,6 @@
#define HM_SKILLRANGEMIN 800 #define HM_SKILLRANGEMIN 800
#define HM_SKILLRANGEMAX HM_SKILLRANGEMIN+MAX_HOMUNSKILL #define HM_SKILLRANGEMAX HM_SKILLRANGEMIN+MAX_HOMUNSKILL
int skill_names_id[MAX_SKILL_DB];
const struct skill_name_db skill_names[] = { const struct skill_name_db skill_names[] = {
{ AC_CHARGEARROW, "AC_CHARGEARROW", "Arrow Repel" } , { AC_CHARGEARROW, "AC_CHARGEARROW", "Arrow Repel" } ,
{ AC_CONCENTRATION, "AC_CONCENTRATION", "Improve Concentration" } , { AC_CONCENTRATION, "AC_CONCENTRATION", "Improve Concentration" } ,
@ -2477,8 +2476,8 @@ static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv,
struct status_change *sc; struct status_change *sc;
TBL_PC * sd; TBL_PC * sd;
int i,j,hp,sp,hp_rate,sp_rate,state,mhp ; int i,j,hp,sp,hp_rate,sp_rate,state,mhp ;
int index[10],itemid[10],amount[10]; int itemid[10],amount[10];
int checkitem_flag = 1, delitem_flag = 1; int delitem_flag = 1;
nullpo_retr(0, hd); nullpo_retr(0, hd);
sd = hd->master; sd = hd->master;
@ -2555,11 +2554,19 @@ static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv,
break; break;
} }
if (checkitem_flag) { if(!(type&1))
for(i=0;i<10;i++) { return 1;
if( delitem_flag )
{
int index[ARRAYLENGTH(itemid)];
// Check items and reduce required amounts
for( i = 0; i < ARRAYLENGTH(itemid); ++i )
{
index[i] = -1; index[i] = -1;
if(itemid[i] <= 0) if(itemid[i] <= 0)
continue; continue;// no item
index[i] = pc_search_inventory(sd,itemid[i]); index[i] = pc_search_inventory(sd,itemid[i]);
if(index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i]) if(index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i])
@ -2568,13 +2575,10 @@ static int skill_check_condition_hom (struct homun_data *hd, int skill, int lv,
return 0; return 0;
} }
} }
}
if(!(type&1)) // Consume items
return 1; for( i = 0; i < ARRAYLENGTH(itemid); ++i )
{
if(delitem_flag) {
for(i=0;i<10;i++) {
if(index[i] >= 0) if(index[i] >= 0)
pc_delitem(sd,index[i],amount[i],0); pc_delitem(sd,index[i],amount[i],0);
} }
@ -5206,7 +5210,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
} }
}else{ }else{
memset(&item_tmp,0,sizeof(item_tmp)); memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid = 1065; item_tmp.nameid = ITEMID_TRAP;
item_tmp.identify = 1; item_tmp.identify = 1;
if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,1))){ if(item_tmp.nameid && (flag=pc_additem(sd,&item_tmp,1))){
clif_additem(sd,0,0,flag); clif_additem(sd,0,0,flag);
@ -8054,13 +8058,13 @@ int skill_isammotype (struct map_session_data *sd, int skill)
* &1: finished casting the skill (invoke hp/sp/item consumption) * &1: finished casting the skill (invoke hp/sp/item consumption)
* &2: picked menu entry (Warp Portal, Teleport and other menu based skills) * &2: picked menu entry (Warp Portal, Teleport and other menu based skills)
*------------------------------------------*/ *------------------------------------------*/
int skill_check_condition (struct map_session_data *sd, int skill, int lv, int type) int skill_check_condition(struct map_session_data* sd, int skill, int lv, int type)
{ {
struct status_data *status; struct status_data *status;
struct status_change *sc; struct status_change *sc;
int i,j,hp,sp,hp_rate,sp_rate,zeny,weapon,ammo,ammo_qty,state,spiritball,mhp; int i,j,hp,sp,hp_rate,sp_rate,zeny,weapon,ammo,ammo_qty,state,spiritball,mhp;
int index[10],itemid[10],amount[10]; int itemid[10],amount[10];
int delitem_flag = 1, checkitem_flag = 1; int delitem_flag = 1;
nullpo_retr(0, sd); nullpo_retr(0, sd);
@ -8464,7 +8468,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
sg->skill_id == SA_VIOLENTGALE sg->skill_id == SA_VIOLENTGALE
)) { )) {
if (sg->limit - DIFF_TICK(gettick(), sg->tick) > 0) if (sg->limit - DIFF_TICK(gettick(), sg->tick) > 0)
checkitem_flag = delitem_flag = 0; delitem_flag = 0;
else else
sg->limit = 0; //Disable it. sg->limit = 0; //Disable it.
} }
@ -8597,7 +8601,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
return 0; return 0;
} }
if (sd->status.hom_id) //Don't delete items when hom is already out. if (sd->status.hom_id) //Don't delete items when hom is already out.
checkitem_flag = delitem_flag = 0; delitem_flag = 0;
break; break;
case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80% case AM_REST: //Can't vapo homun if you don't have an active homunc or it's hp is < 80%
if (!merc_is_hom_active(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100)) if (!merc_is_hom_active(sd->hd) || sd->hd->battle_status.hp < (sd->hd->battle_status.max_hp*80/100))
@ -8733,13 +8737,20 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
return 0; return 0;
} }
if (checkitem_flag) { if(!(type&1))
for(i=0;i<10;i++) { return 1;
int x = lv%11 - 1;
if( delitem_flag )
{
int index[ARRAYLENGTH(itemid)];
// Check consumed items and reduce required amounts
for( i = 0; i < ARRAYLENGTH(itemid); ++i )
{
index[i] = -1; index[i] = -1;
if(itemid[i] <= 0) if( itemid[i] <= 0 )
continue; continue;// no item
if(itemid[i] >= 715 && itemid[i] <= 717 && skill != HW_GANBANTEIN) if( itemid_isgemstone(itemid[i]) && skill != HW_GANBANTEIN )
{ {
if (sd->special_state.no_gemstone) if (sd->special_state.no_gemstone)
{ //Make it substract 1 gem rather than skipping the cost. { //Make it substract 1 gem rather than skipping the cost.
@ -8749,33 +8760,32 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
if(sc && sc->data[SC_INTOABYSS].timer != -1) if(sc && sc->data[SC_INTOABYSS].timer != -1)
continue; continue;
} else } else
if(itemid[i] == 1065 && sc && sc->data[SC_INTOABYSS].timer != -1) if(itemid[i] == ITEMID_TRAP && sc && sc->data[SC_INTOABYSS].timer != -1)
continue; continue;
if((skill == AM_POTIONPITCHER || if((skill == AM_POTIONPITCHER ||
skill == CR_SLIMPITCHER || skill == CR_SLIMPITCHER ||
skill == CR_CULTIVATION) && i != x) skill == CR_CULTIVATION) && i != lv%11 - 1)//TODO huh? what is this for? [FlavioJS]
continue; continue;
index[i] = pc_search_inventory(sd,itemid[i]); index[i] = pc_search_inventory(sd,itemid[i]);
if(index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i]) { if(index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i]) {
if(itemid[i] == 716 || itemid[i] == 717) if( itemid[i] == ITEMID_RED_GEMSTONE )
clif_skill_fail(sd,skill,(7+(itemid[i]-716)),0); clif_skill_fail(sd,skill,7,0);// red gemstone required
else if( itemid[i] == ITEMID_BLUE_GEMSTONE )
clif_skill_fail(sd,skill,8,0);// blue gemstone required
else else
clif_skill_fail(sd,skill,0,0); clif_skill_fail(sd,skill,0,0);
return 0; return 0;
} }
if(itemid[i] >= 715 && itemid[i] <= 717 && skill != HW_GANBANTEIN && if( itemid_isgemstone(itemid[i]) && skill != HW_GANBANTEIN &&
sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_WIZARD) sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_WIZARD)
index[i] = -1; //Gemstones are checked, but not substracted from inventory. index[i] = -1; //Gemstones are checked, but not substracted from inventory.
} }
}
if(!(type&1)) // Consume items
return 1; for( i = 0; i < ARRAYLENGTH(itemid); ++i )
{
if(delitem_flag) {
for(i=0;i<10;i++) {
if(index[i] >= 0) if(index[i] >= 0)
pc_delitem(sd,index[i],amount[i],0); pc_delitem(sd,index[i],amount[i],0);
} }
@ -10255,7 +10265,7 @@ int skill_unit_timer_sub (struct block_list* bl, va_list ap)
{ {
struct item item_tmp; struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp)); memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid=1065; item_tmp.nameid=ITEMID_TRAP;
item_tmp.identify=1; item_tmp.identify=1;
map_addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0); map_addflooritem(&item_tmp,1,bl->m,bl->x,bl->y,0,0,0,0);
} }

View File

@ -2387,7 +2387,7 @@ int status_calc_homunculus(struct homun_data *hd, int first)
status->luk = hom->luk / 10; status->luk = hom->luk / 10;
if (first) { //[orn] if (first) { //[orn]
const struct homunculus_db *db = hd->homunculusDB; const struct s_homunculus_db *db = hd->homunculusDB;
status->def_ele = db->element; status->def_ele = db->element;
status->ele_lv = 1; status->ele_lv = 1;
status->race = db->race; status->race = db->race;