changeset 1358:61010a655c94

a few itemID changed to their enum values + added a few new ones
author Grumpy7
date Sat, 13 Jul 2013 16:52:00 +0200
parents 06926081358f
children 60cdc3eac407
files Items.cpp Items.h Player.cpp UI/UICharacter.cpp Viewport.cpp mm7_4.cpp mm7_5.cpp
diffstat 7 files changed, 31 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/Items.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/Items.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -1481,7 +1481,7 @@
     return item__getname_buffer.data();
   }
   sprintf(item__getname_buffer.data(), "%s", pItemsTable->pItems[uItemID].pName);
-  if ( uItemID == ITEM_LICH_JAR )  //Lich Jar
+  if ( uItemID == ITEM_LICH_JAR_FULL )  //Lich Jar
   {
     if ( (uHolderPlayer >0 )&& (uHolderPlayer <= 4) )
       {
--- a/Items.h	Sat Jul 13 16:15:35 2013 +0200
+++ b/Items.h	Sat Jul 13 16:52:00 2013 +0200
@@ -86,25 +86,32 @@
   ITEM_ARTIFACT_GHOULSBANE = 507,//1FA
   ITEM_ARTEFACT_ULLYSES =510, 
   ITEM_ARTIFACT_LEAGUE_BOOTS = 512,//200
+  ITEM_RELIC_ETHRICS_STAFF = 515,//204
   ITEM_RELIC_HARECS_LEATHER = 516,//204
+  ITEM_RELIC_OLD_NICK = 517,//204
   ITEM_RELIC_KELEBRIM = 520,//208
   ITEM_RELIC_TALEDONS_HELM = 521,//209
   ITEM_RELIC_SCHOLARS_CAP = 522,//20A
   ITEM_RELIC_PHYNAXIAN_CROWN = 523,//20B
   ITEM_RILIC_TITANS_BELT = 524,//20C
   ITEM_RELIC_TWILIGHT = 525,//20D
-  ITEM_RELIC_MEKORIGS_HAMMER = 0x210,
+  ITEM_RELIC_JUSTICE = 527,
+  ITEM_RELIC_MEKORIGS_HAMMER = 528,
   ITEM_ARTIFACT_HERMES_SANDALS = 529,
   ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP = 530,//212
+  ITEM_ARTIFACT_ELFBANE = 531,//212
   ITEM_ARTIFACT_MINDS_EYE = 532,//214
   ITEM_ELVEN_CHAINMAIL = 533,//215
+  ITEM_FORGE_GAUNTLETS = 534,
   ITEM_ARTIFACT_HEROS_BELT = 535,//217
   ITEM_ARTIFACT_LADYS_ESCORT = 536,
   ITEM_RARE_SHADOWS_MASK = 544,//220
   ITEM_RARE_SUN_CLOAK = 547,//223
   ITEM_RARE_MOON_CLOAK = 548,//224
   ITEM_RARE_VAMPIRES_CAPE = 550,//226
-  ITEM_LICH_JAR = 601
+  ITEM_LICH_JAR_FULL = 601,
+  ITEM_WETSUIT = 604,
+  ITEM_LICH_JAR_EMPTY = 615,
 };
 
 /*  331 */
--- a/Player.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/Player.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -682,18 +682,18 @@
 {
   switch (uItemID)
   {
-  case 515: 
-  case 517: 
-  case 525: return _449B57_test_bit(pParty->_quest_bits, 100); break;
-  case 521: 
-  case 527: return _449B57_test_bit(pParty->_quest_bits, 99); break;
-  case 531: return IsRaceGoblin(); break;
-  case 532: return IsRaceHuman(); break;
-  case 533: return IsRaceElf(); break;
-  case 534: return IsRaceDwarf(); break;
-  case 535: return IsMale(); break;
-  case 536: return IsFemale(); break;
-  case 604: return NothingOrJustBlastersEquipped(); break;
+  case ITEM_RELIC_ETHRICS_STAFF: 
+  case ITEM_RELIC_OLD_NICK: 
+  case ITEM_RELIC_TWILIGHT: return _449B57_test_bit(pParty->_quest_bits, 100); break;
+  case ITEM_RELIC_TALEDONS_HELM: 
+  case ITEM_RELIC_JUSTICE: return _449B57_test_bit(pParty->_quest_bits, 99); break;
+  case ITEM_ARTIFACT_ELFBANE: return IsRaceGoblin(); break;
+  case ITEM_ARTIFACT_MINDS_EYE: return IsRaceHuman(); break;
+  case ITEM_ELVEN_CHAINMAIL: return IsRaceElf(); break;
+  case ITEM_FORGE_GAUNTLETS: return IsRaceDwarf(); break;
+  case ITEM_ARTIFACT_HEROS_BELT: return IsMale(); break;
+  case ITEM_ARTIFACT_LADYS_ESCORT: return IsFemale(); break;
+  case ITEM_WETSUIT: return NothingOrJustBlastersEquipped(); break;
   default: return 1; break;
   }
 }
@@ -1576,7 +1576,7 @@
   signed int v6; // ebp@7
   char *v7; // esi@7
   signed int uSkillMultiplier; // [sp-4h] [bp-14h]@2
-  
+
   if (CheckHiredNPCSpeciality(Scholar))
     return true;
 
@@ -7496,10 +7496,10 @@
           for (int i = 0; i < 138; i++)
           {
             v9 = &this->pInventoryItems[i];
-            if (v9->uItemID == 615)
+            if (v9->uItemID == ITEM_LICH_JAR_EMPTY)
               break;
           }
-          if (v9 != NULL && v9->uItemID != 615)
+          if (v9 != NULL && v9->uItemID != ITEM_LICH_JAR_EMPTY)
           {
             v10 = (int)((char *)this + 36 * 138);   //originally 36 * v8. the code got to this condition only if v8 was equal to 138
             *(int *)(v10 + 532) = 601;
--- a/UI/UICharacter.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/UI/UICharacter.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -2728,7 +2728,7 @@
         pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
         return;
     }
-    if ( pParty->pPickedItem.uItemID == 604 )
+    if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT )
     {
       pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3);
       WetsuitOn(uActiveCharacter);
@@ -2756,7 +2756,7 @@
 			return;
 		}
         pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)v6);
-        if ( pParty->pPickedItem.uItemID == 604 )
+        if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT )
           WetsuitOff(uActiveCharacter);
         return;
       case 0xAu:
@@ -3043,7 +3043,7 @@
     v37 = (int)((char *)pPlayers[uActiveCharacter] + 36 * v36);
     v50 = v37;
     v38 = (ItemGen *)(v37 + 532);
-    v14 = v38->uItemID == 604;
+    v14 = v38->uItemID == ITEM_WETSUIT;
     v52 = pItemsTable->pItems[v38->uItemID].uEquipType;
     if ( v14 )
     {
--- a/Viewport.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/Viewport.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -291,7 +291,7 @@
       {
         sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[471], pItemsTable->pItems[pSpriteObjects[v21].stru_24.uItemID].pUnidentifiedName);
         ShowStatusBarString(pTmpBuf2.data(), 2u);
-        if ( pSpriteObjects[v21].stru_24.uItemID == 506 )
+        if ( pSpriteObjects[v21].stru_24.uItemID == ITEM_ARTIFACT_SPLITTER )
           _449B7E_toggle_bit(pParty->_quest_bits, 184, 1);
         if ( pSpriteObjects[v21].stru_24.uItemID == 455 )
           _449B7E_toggle_bit(pParty->_quest_bits, 185, 1);
--- a/mm7_4.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/mm7_4.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -5238,7 +5238,7 @@
           v8 = 138;
           do
           {
-			if ( v7->uItemID == 601 )
+			if ( v7->uItemID == ITEM_LICH_JAR_FULL )
             {
 			  if ( !v7->uHolderPlayer )
 				  v9 = v7;
--- a/mm7_5.cpp	Sat Jul 13 16:15:35 2013 +0200
+++ b/mm7_5.cpp	Sat Jul 13 16:52:00 2013 +0200
@@ -5614,7 +5614,7 @@
   v45 = v8 & 0x3F;
   pOut.y = SkillToMastery(v8);
   v10 = pOut.z;
-  if ( pParty->pPickedItem.uItemID == 220 )
+  if ( pParty->pPickedItem.uItemID == ITEM_POTION_BOTTLE )
   {
 LABEL_116:
     GameUI_DrawItemInfo(&v0->pInventoryItems[v10]);