summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-SVN.txt1
-rw-r--r--src/map/pc.c30
-rw-r--r--src/map/skill.c19
-rw-r--r--src/map/skill.h1
4 files changed, 13 insertions, 38 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 79a4992f2..284f54170 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,6 +1,7 @@
Date Added
02/24
+ * Re-added missing cart dupe-proof code. From Freya [Lupus]
* Some rewrites on Basilica [celest]
* Fixed another bad typo in skill list_num reading, thanks to orn [celest]
* Fixed Steal Item Rate. It has been multiplied twice on common_item_drop value for any kinds of items. [Lupus]
diff --git a/src/map/pc.c b/src/map/pc.c
index b7b80b525..484a25b18 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2235,9 +2235,11 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
i = MAX_INVENTORY;
if(!itemdb_isequip2(data)){
- // ? ���i�ł͂Ȃ��̂ŁA?���L�i�Ȃ��?�̂�?��������
+ // �� ���i�ł͂Ȃ��̂ŁA�����L�i�Ȃ���̂ݕω�������
for(i=0;i<MAX_INVENTORY;i++)
- if(compare_item(&sd->status.inventory[i], item_data)) {
+ if(sd->status.inventory[i].nameid == item_data->nameid &&
+ sd->status.inventory[i].card[0] == item_data->card[0] && sd->status.inventory[i].card[1] == item_data->card[1] &&
+ sd->status.inventory[i].card[2] == item_data->card[2] && sd->status.inventory[i].card[3] == item_data->card[3]) {
if(sd->status.inventory[i].amount+amount > MAX_AMOUNT)
return 5;
sd->status.inventory[i].amount+=amount;
@@ -2246,16 +2248,11 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount)
}
}
if(i >= MAX_INVENTORY){
- // ? ���i�������L�i�������̂ŋ󂫗��֒lj�
+ // �� ���i�������L�i�������̂ŋ󂫗��֒lj�
i = pc_search_inventory(sd,0);
if(i >= 0) {
memcpy(&sd->status.inventory[i],item_data,sizeof(sd->status.inventory[0]));
- if(itemdb_isequip2(data)){
- sd->status.inventory[i].amount=1;
- amount=1;
- } else {
- sd->status.inventory[i].amount=amount;
- }
+ sd->status.inventory[i].amount=amount;
sd->inventory_data[i]=data;
clif_additem(sd,i,amount,0);
}
@@ -2477,9 +2474,11 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
i=MAX_CART;
if(!itemdb_isequip2(data)){
- // ? ���i�ł͂Ȃ��̂ŁA?���L�i�Ȃ��?�̂�?��������
+ // �� ���i�ł͂Ȃ��̂ŁA�����L�i�Ȃ���̂ݕω�������
for(i=0;i<MAX_CART;i++){
- if(compare_item(&sd->status.cart[i], item_data)) {
+ if(sd->status.cart[i].nameid==item_data->nameid &&
+ sd->status.cart[i].card[0] == item_data->card[0] && sd->status.cart[i].card[1] == item_data->card[1] &&
+ sd->status.cart[i].card[2] == item_data->card[2] && sd->status.cart[i].card[3] == item_data->card[3]){
if(sd->status.cart[i].amount+amount > MAX_AMOUNT)
return 1;
sd->status.cart[i].amount+=amount;
@@ -2489,16 +2488,11 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
}
}
if(i >= MAX_CART){
- // ? ���i�������L�i�������̂ŋ󂫗��֒lj�
+ // �� ���i�������L�i�������̂ŋ󂫗��֒lj�
for(i=0;i<MAX_CART;i++){
if(sd->status.cart[i].nameid==0){
memcpy(&sd->status.cart[i],item_data,sizeof(sd->status.cart[0]));
- if(itemdb_isequip2(data)){
- sd->status.inventory[i].amount=1;
- amount=1;
- } else {
- sd->status.inventory[i].amount=amount;
- }
+ sd->status.cart[i].amount=amount;
sd->cart_num++;
clif_cart_additem(sd,i,amount,0);
break;
diff --git a/src/map/skill.c b/src/map/skill.c
index 0b118eb96..ee05cc2c4 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8036,25 +8036,6 @@ int skill_check_cloaking(struct block_list *bl)
return end;
}
-int skill_type_cloaking(struct block_list *bl)
-{
- static int dx[]={ 0, 1, 0, -1, -1, 1, 1, -1}; //optimized by Lupus
- static int dy[]={-1, 0, 1, 0, -1, -1, 1, 1};
- int i;
-
- nullpo_retr(0, bl);
- if(bl->type == BL_PC && battle_config.pc_cloak_check_type&1)
- return 0;
- else if(bl->type == BL_MOB && battle_config.monster_cloak_check_type&1)
- return 0;
- for(i=0; i<sizeof(dx)/sizeof(dx[0]); i++)
- {
- if(map_getcell(bl->m,bl->x+dx[i],bl->y+dy[i],CELL_CHKNOPASS))
- return 0;
- }
- return 1;
-}
-
/*
*----------------------------------------------------------------------------
* �X�L�����j�b�g
diff --git a/src/map/skill.h b/src/map/skill.h
index 2fb7b765a..c4b2f69cd 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -170,7 +170,6 @@ void skill_devotion_end(struct map_session_data *md,struct map_session_data *sd,
// ���̑�
int skill_check_cloaking(struct block_list *bl);
-int skill_type_cloaking(struct block_list *bl);
// �X�e?�^�X�ُ�
int skill_encchant_eremental_end(struct block_list *bl, int type);