- Some cleanup. Fixed function pc_isCardAllowedOn causing searches for non-existant item id 0.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5709 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
b6ff4970fa
commit
240bc7aa64
@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
|
|||||||
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/03/22
|
2006/03/22
|
||||||
|
* Fixed function pc_isCardAllowedOn causing searches for non-existant item
|
||||||
|
id 0. [Skotlex]
|
||||||
* Fixed Arrow Shower. [Skotlex]
|
* Fixed Arrow Shower. [Skotlex]
|
||||||
* Merged the unit_data structure from jA for handling unit-related data
|
* Merged the unit_data structure from jA for handling unit-related data
|
||||||
(attack times, walking, auto-attack timers, skill related data). This is a
|
(attack times, walking, auto-attack timers, skill related data). This is a
|
||||||
|
19
src/map/pc.c
19
src/map/pc.c
@ -528,15 +528,22 @@ int pc_setequipindex(struct map_session_data *sd)
|
|||||||
|
|
||||||
int pc_isAllowedCardOn(struct map_session_data *sd,int s,int eqindex,int flag) {
|
int pc_isAllowedCardOn(struct map_session_data *sd,int s,int eqindex,int flag) {
|
||||||
int i;
|
int i;
|
||||||
|
struct item *item = &sd->status.inventory[eqindex];
|
||||||
struct item_data *data;
|
struct item_data *data;
|
||||||
if (s>0) {
|
if ( //Crafted/made/hatched items.
|
||||||
|
item->card[0]==0x00ff ||
|
||||||
|
item->card[0]==0x00fe ||
|
||||||
|
item->card[0]==(short)0xff00
|
||||||
|
)
|
||||||
|
return 1;
|
||||||
|
|
||||||
for (i=0;i<s;i++) {
|
for (i=0;i<s;i++) {
|
||||||
if ((data = itemdb_search(sd->status.inventory[eqindex].card[i]))) {
|
if (item->card[i] &&
|
||||||
if (data->flag.no_equip&flag)
|
(data = itemdb_exists(item->card[i])) &&
|
||||||
|
data->flag.no_equip&flag
|
||||||
|
)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2931,7 +2938,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
|
|||||||
if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) {
|
if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) {
|
||||||
struct item_data *i_data;
|
struct item_data *i_data;
|
||||||
char message[128];
|
char message[128];
|
||||||
i_data = itemdb_exists(itemid);
|
i_data = itemdb_search(itemid);
|
||||||
sprintf (message, msg_txt(542), (sd->status.name != NULL)?sd->status.name :"GM", md->db->jname, i_data->jname, (float)md->db->dropitem[i].p/100);
|
sprintf (message, msg_txt(542), (sd->status.name != NULL)?sd->status.name :"GM", md->db->jname, i_data->jname, (float)md->db->dropitem[i].p/100);
|
||||||
//MSG: "'%s' stole %s's %s (chance: %%%0.02f)"
|
//MSG: "'%s' stole %s's %s (chance: %%%0.02f)"
|
||||||
intif_GMmessage(message,strlen(message)+1,0);
|
intif_GMmessage(message,strlen(message)+1,0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user