View Single Post
  #6  
Old 11-27-2012, 03:14 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

this would resolve the -1 from max charges getting stuck in as the charge amount. whie preserving the ability to actually pass negative charges that the system currently accepts.
Code:
Index: common/shareddb.cpp
===================================================================
--- common/shareddb.cpp	(revision 2266)
+++ common/shareddb.cpp	(working copy)
@@ -1402,8 +1402,11 @@
 ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, sint16 charges) {
 	ItemInst* inst = NULL;
 	if (item) {
-		if (charges == 0)
+		if (charges == 0) {
 			charges = item->MaxCharges;
+			if (charges == -1)
+				charges = 1;
+		}
 
 		if(item->CharmFileID != 0 || (item->LoreGroup >= 1000 && item->LoreGroup != -1)) {
 			inst = new EvoItemInst(item, charges);
Reply With Quote