Browse Source

Fix RODEX mail weight calculation (#6987)

Fixes #6924
Thanks @voyfmyuh
Vincent Stumpf 3 years ago
parent
commit
26ec100fa6
1 changed files with 2 additions and 0 deletions
  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 );
 				}