浏览代码

Added some missing shield view ids (#6498)

Fixes #6497

Thanks to @Relliksuriv and @laziem

Co-authored-by: Atemo <capucrath@gmail.com>
Lemongrass3110 3 年之前
父节点
当前提交
4e26c1bc55
共有 3 个文件被更改,包括 13 次插入0 次删除
  1. 1 0
      db/pre-re/item_db_equip.yml
  2. 6 0
      db/re/item_db_equip.yml
  3. 6 0
      src/map/itemdb.cpp

+ 1 - 0
db/pre-re/item_db_equip.yml

@@ -15334,6 +15334,7 @@ Body:
     ArmorLevel: 1
     EquipLevelMin: 1
     Refineable: true
+    View: 1
     Script: |
       bonus bAllStats,50;
       bonus bMdef,99;

+ 6 - 0
db/re/item_db_equip.yml

@@ -142882,6 +142882,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 230
     Refineable: true
+    View: 1
     Script: |
       .@r = getrefine();
       bonus2 bMagicAtkEle,Ele_All,3;
@@ -142907,6 +142908,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 230
     Refineable: true
+    View: 1
     Script: |
       .@r = getrefine();
       bonus2 bAddClass,Class_All,3;
@@ -142949,6 +142951,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 230
     Refineable: true
+    View: 2
     Script: |
       .@g = getenchantgrade();
       .@r = getrefine();
@@ -143009,6 +143012,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 160
     Refineable: true
+    View: 1
     Script: |
       .@g = getenchantgrade();
       .@r = getrefine();
@@ -143053,6 +143057,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 210
     Refineable: true
+    View: 4
     Script: |
       .@r = getrefine();
       bonus bMres,2;
@@ -143076,6 +143081,7 @@ Body:
     ArmorLevel: 2
     EquipLevelMin: 210
     Refineable: true
+    View: 2
     Script: |
       .@r = getrefine();
       bonus bMres,3;

+ 6 - 0
src/map/itemdb.cpp

@@ -1130,6 +1130,12 @@ void ItemDatabase::loadingFinished(){
 			ShowWarning("Buying/Selling [%d/%d] price of %s (%u) allows Zeny making exploit through buying/selling at discounted/overcharged prices! Defaulting Sell to 1 Zeny.\n", item->value_buy, item->value_sell, item->name.c_str(), item->nameid);
 			item->value_sell = 1;
 		}
+
+		// Shields need to have a view ID to be able to be recognized by ST_SHIELD check in skill.cpp
+		if( item->type == IT_ARMOR && ( item->equip & EQP_SHIELD ) != 0 && item->look == 0 ){
+			ShowWarning( "Item %s (%u) is a shield and should have a view id. Defaulting to Guard...\n", item->name.c_str(), item->nameid );
+			item->look = 1;
+		}
 	}
 
 	if( !this->exists( ITEMID_DUMMY ) ){