summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/script.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 843c25a8f..9b105bee7 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
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.
+2010/04/12
+ * Fixed SuccessRemoveCards removing Armor Enchant. (bugreport:4014) [Inkfish]
2010/03/31
* Rev. 14277 Moved /npc/sample/ to /doc/sample. These are examples, not actual npcs. [L0ne_W0lf]
2010/03/23
diff --git a/src/map/script.c b/src/map/script.c
index a8f024deb..d18085a39 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9768,8 +9768,10 @@ BUILDIN_FUNC(successremovecards)
item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].nameid;
item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=sd->status.inventory[i].refine;
item_tmp.attribute=sd->status.inventory[i].attribute,item_tmp.expire_time=sd->status.inventory[i].expire_time;
- for (j = 0; j < MAX_SLOTS; j++)
+ for (j = 0; j < sd->inventory_data[i]->slot; j++)
item_tmp.card[j]=0;
+ for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=sd->status.inventory[i].card[j];
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)
@@ -9827,8 +9829,10 @@ BUILDIN_FUNC(failedremovecards)
item_tmp.id=0,item_tmp.nameid=sd->status.inventory[i].card[c];
item_tmp.equip=0,item_tmp.identify=1,item_tmp.refine=0;
item_tmp.attribute=0,item_tmp.expire_time=0;
- for (j = 0; j < MAX_SLOTS; j++)
+ for (j = 0; j < sd->inventory_data[i]->slot; j++)
item_tmp.card[j]=0;
+ for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
+ item_tmp.card[j]=sd->status.inventory[i].card[j];
//Logs items, got from (N)PC scripts [Lupus]
if(log_config.enable_logs&0x40)