瀏覽代碼

Fix RODEX mail weight calculation (#6987)

Fixes #6924
Thanks @voyfmyuh
Vincent Stumpf 3 年之前
父節點
當前提交
26ec100fa6
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/map/mail.cpp

+ 2 - 0
src/map/mail.cpp

@@ -186,6 +186,8 @@ enum mail_attach_result mail_setitem(struct map_session_data *sd, short idx, uin
 			if( battle_config.mail_attachment_weight ){
 				// Sum up all items to get the current total weight
 				for( j = 0; j < MAIL_MAX_ITEM; j++ ){
+					if (sd->mail.item[j].nameid == 0)
+						continue;
 					total += sd->mail.item[j].amount * ( sd->inventory_data[sd->mail.item[j].index]->weight / 10 );
 				}