UID178554
帖子
精華
主題
積分16695
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限30
註冊時間2009-7-26
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 慵懶 2013-7-11 12:09 AM |
---|
簽到天數: 118 天 連續簽到: 1 天 [LV.6]常住居民II
|
mmo.h
Find: - enum item_types {
- IT_HEALING = 0, //IT_HEAL = 0x00
- IT_UNKNOWN, //1 //IT_SCHANGE = 0x01
- IT_USABLE, //2 //IT_SPECIAL = 0x02
- IT_ETC, //3 //IT_EVENT = 0x03
- IT_WEAPON, //4 //IT_ARMOR = 0x04
- IT_ARMOR, //5 //IT_WEAPON = 0x05
- IT_CARD, //6 //IT_CARD = 0x06
- IT_PETEGG, //7 //IT_QUEST = 0x07
- IT_PETARMOR,//8 //IT_BOW = 0x08
- IT_UNKNOWN2,//9 //IT_BOTHHAND = 0x09
- IT_AMMO, //10 //IT_ARROW = 0x0a
- IT_DELAYCONSUME,//11 //IT_ARMORTM = 0x0b
- + IT_CHARM,//12 //IT_ARMORTB = 0x0c
- //IT_ARMORMB = 0x0d
- //IT_ARMORTMB = 0x0e
- //IT_GUN = 0x0f
- //IT_AMMO = 0x10
- //IT_THROWWEAPON = 0x11
- IT_CASH = 18, //IT_CASH_POINT_ITEM = 0x12
- //IT_CANNONBALL = 0x13
- IT_MAX
- };
複製代碼Clif.c
Find: - inline int itemtype(int type)
- {
- - return ( type == IT_PETEGG ) ? IT_WEAPON : type;
- + return ( type == IT_PETEGG ) ? IT_WEAPON : (type == IT_CHARM) ? IT_ETC : type;
- }
複製代碼Itemdb.c
Find: - int itemdb_isstackable(int nameid)
- {
- int type=itemdb_type(nameid);
- switch(type) {
- case IT_WEAPON:
- case IT_ARMOR:
- case IT_PETEGG:
- case IT_PETARMOR:
- + case IT_CHARM:
- return 0;
- default:
- return 1;
- }
- }
複製代碼And - int itemdb_isstackable2(struct item_data *data)
- {
- nullpo_ret(data);
- switch(data->type) {
- case IT_WEAPON:
- case IT_ARMOR:
- case IT_PETEGG:
- case IT_PETARMOR:
- + case IT_CHARM:
- return 0;
- default:
- return 1;
- }
- }
複製代碼And - if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_DELAYCONSUME && id->type < IT_CASH ) || id->type >= IT_MAX )
複製代碼替換成 - if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_CHARM && id->type < IT_CASH ) || id->type >= IT_MAX )
複製代碼Pc.c
Find: - if(data->flag.autoequip) pc_equipitem(sd, i, data->equip);
複製代碼下方add: - if(sd->inventory_data[i]->type == IT_CHARM) status_calc_pc(sd,0);
複製代碼Find: - int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reason)
- {
- + int IT_CHARMS;
- nullpo_retr(1, sd);
- if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amount<amount || sd->inventory_data[n] == NULL)
- return 1;
- + IT_CHARMS = sd->inventory_data[n]->type;
- sd->status.inventory[n].amount -= amount;
- sd->weight -= sd->inventory_data[n]->weight*amount ;
- if(sd->status.inventory[n].amount<=0){
- if(sd->status.inventory[n].equip)
- pc_unequipitem(sd,n,3);
- memset(&sd->status.inventory[n],0,sizeof(sd->status.inventory[0]));
- sd->inventory_data[n] = NULL;
- }
- if(!(type&1))
- clif_delitem(sd,n,amount,reason);
- if(!(type&2))
- clif_updatestatus(sd,SP_WEIGHT);
- + if(IT_CHARMS == IT_CHARM) status_calc_pc(sd,0);
- return 0;
- }
複製代碼Status.c
Find: - // Parse equipment.
- +for( i = 0; i < MAX_INVENTORY ; i++ )
- +{
- + if(sd->inventory_data[i] != NULL){
- + if(sd->inventory_data[i]->type == IT_CHARM){
- + if( sd->inventory_data[i]->script ){
- + run_script(sd->inventory_data[i]->script,0,sd->bl.id,0);
- + }
- + if( !calculating )
- + return 1;
- + }
- + }
- +}
-
複製代碼
db:
22000,Test,測試,12,4500,,100,,,,,,,,,,,,,{bonus bStr,11112;},{},{} |
|