Updated Weapon Repair (~100%)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@359 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9fab2c2fcb
commit
10cfb2589b
@ -8,6 +8,8 @@ Date Added
|
|||||||
* Skill Updates: [celest]
|
* Skill Updates: [celest]
|
||||||
- Updated guild skills (60%)
|
- Updated guild skills (60%)
|
||||||
- updated Weapon Repair and Aura Blade by DracoRPG
|
- updated Weapon Repair and Aura Blade by DracoRPG
|
||||||
|
- modified Weapon Repair to use Identify's packet, should show a list of
|
||||||
|
repairable items now
|
||||||
|
|
||||||
11/23
|
11/23
|
||||||
* Fixed script loading small/large monsters. [Valaris]
|
* Fixed script loading small/large monsters. [Valaris]
|
||||||
|
@ -5016,7 +5016,7 @@ int clif_item_repair_list(struct map_session_data *sd)
|
|||||||
|
|
||||||
fd=sd->fd;
|
fd=sd->fd;
|
||||||
|
|
||||||
WFIFOW(fd,0)=0x0;
|
WFIFOW(fd,0)=0x177; // temporarily use same packet as clif_item_identify
|
||||||
for(i=c=0;i<MAX_INVENTORY;i++){
|
for(i=c=0;i<MAX_INVENTORY;i++){
|
||||||
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].attribute==1){
|
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].attribute==1){
|
||||||
WFIFOW(fd,c*2+4)=i+2;
|
WFIFOW(fd,c*2+4)=i+2;
|
||||||
|
33
src/map/pc.c
33
src/map/pc.c
@ -1,4 +1,4 @@
|
|||||||
// $Id: pc.c 101 2004-11-24 10:52:07 Celestia $
|
// $Id: pc.c 101 2004-11-25 4:02:51 PM Celestia $
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -3442,6 +3442,11 @@ int pc_item_identify(struct map_session_data *sd,int idx)
|
|||||||
|
|
||||||
nullpo_retr(0, sd);
|
nullpo_retr(0, sd);
|
||||||
|
|
||||||
|
// Celest
|
||||||
|
if (sd->skillid == BS_REPAIRWEAPON) {
|
||||||
|
return pc_item_repair (sd, idx);
|
||||||
|
}
|
||||||
|
|
||||||
if(idx >= 0 && idx < MAX_INVENTORY) {
|
if(idx >= 0 && idx < MAX_INVENTORY) {
|
||||||
if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].identify == 0 ){
|
if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].identify == 0 ){
|
||||||
flag=0;
|
flag=0;
|
||||||
@ -3455,6 +3460,32 @@ int pc_item_identify(struct map_session_data *sd,int idx)
|
|||||||
return !flag;
|
return !flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*==========================================
|
||||||
|
* Weapon Repair [Celest]
|
||||||
|
*------------------------------------------
|
||||||
|
*/
|
||||||
|
int pc_item_repair(struct map_session_data *sd,int idx)
|
||||||
|
{
|
||||||
|
int flag=1;
|
||||||
|
|
||||||
|
nullpo_retr(0, sd);
|
||||||
|
|
||||||
|
if(idx >= 0 && idx < MAX_INVENTORY) {
|
||||||
|
if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].attribute == 1 ) {
|
||||||
|
flag=0;
|
||||||
|
sd->status.inventory[idx].attribute=0;
|
||||||
|
//Temporary Weapon Repair code [DracoRPG]
|
||||||
|
pc_delitem(sd, pc_search_inventory(sd, 999), 1, 0);
|
||||||
|
clif_equiplist(sd);
|
||||||
|
clif_produceeffect(sd, 0, sd->status.inventory[idx].nameid);
|
||||||
|
clif_misceffect(&sd->bl, 3);
|
||||||
|
clif_displaymessage(sd->fd,"Item has been repaired.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return !flag;
|
||||||
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
* スティル品公開
|
* スティル品公開
|
||||||
*------------------------------------------
|
*------------------------------------------
|
||||||
|
@ -86,6 +86,7 @@ int pc_skill(struct map_session_data*,int,int,int);
|
|||||||
int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
|
int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
|
||||||
|
|
||||||
int pc_item_identify(struct map_session_data *sd,int idx);
|
int pc_item_identify(struct map_session_data *sd,int idx);
|
||||||
|
int pc_item_repair(struct map_session_data *sd,int idx); // [Celest]
|
||||||
int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
|
int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
|
||||||
int pc_steal_coin(struct map_session_data *sd,struct block_list *bl);
|
int pc_steal_coin(struct map_session_data *sd,struct block_list *bl);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: skill.c,v 1.8 2004/11/24 10:51:28 Celestia Exp $
|
// $Id: skill.c,v 1.8 2004/11/25 4:02:35 PM Celestia Exp $
|
||||||
/* スキル?係 */
|
/* スキル?係 */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -3708,29 +3708,14 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BS_REPAIRWEAPON: /* 武器修理 */
|
case BS_REPAIRWEAPON: /* 武器修理 */
|
||||||
if(sd) { //Temporary Weapon Repair code [DracoRPG]
|
if(sd) {
|
||||||
//動作しないのでとりあえずコメントアウト
|
//動作しないのでとりあえずコメントアウト
|
||||||
// clif_item_repair_list(sd);
|
|
||||||
int i,r=0;
|
|
||||||
if (pc_search_inventory(sd, 999) <= 0 ) {
|
if (pc_search_inventory(sd, 999) <= 0 ) {
|
||||||
clif_skill_fail(sd,sd->skillid,0,0);
|
clif_skill_fail(sd,sd->skillid,0,0);
|
||||||
map_freeblock_unlock();
|
map_freeblock_unlock();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
for(i=0; i<MAX_INVENTORY; i++) {
|
clif_item_repair_list(sd);
|
||||||
if(sd->status.inventory[i].attribute == 1){
|
|
||||||
sd->status.inventory[i].attribute = 0;
|
|
||||||
pc_delitem(sd, pc_search_inventory(sd, 999), 1, 0);
|
|
||||||
clif_equiplist(sd);
|
|
||||||
clif_produceeffect(sd, 0, sd->status.inventory[i].nameid);
|
|
||||||
clif_misceffect(&sd->bl, 3);
|
|
||||||
clif_displaymessage(sd->fd,"Item has been repaired.");
|
|
||||||
r++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!r)
|
|
||||||
clif_skill_fail(sd,sd->skillid,0,0);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user