瀏覽代碼

- Some "expire_time" = 0 considerations. Please update. (Bugreport 2451)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13373 54d463be-8e91-2dee-dedb-b68131a5f0ec
zephyrus 16 年之前
父節點
當前提交
bd429b5a92
共有 3 個文件被更改,包括 8 次插入4 次删除
  1. 1 0
      src/char_sql/int_auction.c
  2. 3 0
      src/char_sql/int_mail.c
  3. 4 4
      src/map/script.c

+ 1 - 0
src/char_sql/int_auction.c

@@ -216,6 +216,7 @@ void inter_auctions_fromsql(void)
 
 		item->identify = 1;
 		item->amount = 1;
+		item->expire_time = 0;
 
 		for( i = 0; i < MAX_SLOTS; i++ )
 		{

+ 3 - 0
src/char_sql/int_mail.c

@@ -61,6 +61,7 @@ static int mail_fromsql(int char_id, struct mail_data* md)
 		Sql_GetData(sql_handle,12, &data, NULL); item->refine = atoi(data);
 		Sql_GetData(sql_handle,13, &data, NULL); item->attribute = atoi(data);
 		Sql_GetData(sql_handle,14, &data, NULL); item->identify = atoi(data);
+		item->expire_time = 0;
 
 		for (j = 0; j < MAX_SLOTS; j++)
 		{
@@ -176,6 +177,8 @@ static bool mail_loadmessage(int mail_id, struct mail_message* msg)
 		Sql_GetData(sql_handle,12, &data, NULL); msg->item.refine = atoi(data);
 		Sql_GetData(sql_handle,13, &data, NULL); msg->item.attribute = atoi(data);
 		Sql_GetData(sql_handle,14, &data, NULL); msg->item.identify = atoi(data);
+		msg->item.expire_time = 0;
+
 		for( j = 0; j < MAX_SLOTS; j++ )
 		{
 			Sql_GetData(sql_handle,15 + j, &data, NULL);

+ 4 - 4
src/map/script.c

@@ -9455,7 +9455,7 @@ BUILDIN_FUNC(successremovecards)
 			cardflag = 1;
 			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.attribute=0,item_tmp.expire_time=0;
 			for (j = 0; j < MAX_SLOTS; j++)
 				item_tmp.card[j]=0;
 
@@ -9476,7 +9476,7 @@ BUILDIN_FUNC(successremovecards)
 		struct item item_tmp;
 		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.attribute=sd->status.inventory[i].attribute,item_tmp.expire_time=0;
 		for (j = 0; j < MAX_SLOTS; j++)
 			item_tmp.card[j]=0;
 
@@ -9535,7 +9535,7 @@ BUILDIN_FUNC(failedremovecards)
 				struct item item_tmp;
 				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.attribute=0,item_tmp.expire_time=0;
 				for (j = 0; j < MAX_SLOTS; j++)
 					item_tmp.card[j]=0;
 
@@ -9565,7 +9565,7 @@ BUILDIN_FUNC(failedremovecards)
 			struct item item_tmp;
 			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.attribute=sd->status.inventory[i].attribute,item_tmp.expire_time=0;
 
 			//Logs items, got from (N)PC scripts [Lupus]
 			if(log_config.enable_logs&0x40)