Mercurial > mm7
changeset 375:c606cabd7cbf
Merge
author | Gloval |
---|---|
date | Fri, 22 Feb 2013 08:23:15 +0400 |
parents | f0f66f690777 (diff) 85edec9da96b (current diff) |
children | 615e6b6f55c2 |
files | Items.cpp |
diffstat | 4 files changed, 114 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/Items.cpp Fri Feb 22 01:36:54 2013 +0200 +++ b/Items.cpp Fri Feb 22 08:23:15 2013 +0400 @@ -214,26 +214,22 @@ } //----- (0045814E) -------------------------------------------------------- -char *ItemsTable::Release() +void ItemsTable::Release() { - ItemsTable *v1; // edi@1 - char *result; // eax@23 - - v1 = this; if ( pMonstersTXT_Raw ) pAllocator->FreeChunk(pMonstersTXT_Raw); if ( pMonsterPlacementTXT_Raw ) pAllocator->FreeChunk(pMonsterPlacementTXT_Raw); if ( pSkillDescTXT_Raw ) pAllocator->FreeChunk(pSkillDescTXT_Raw); - if ( v1->pSpcItemsTXT_Raw ) - pAllocator->FreeChunk(v1->pSpcItemsTXT_Raw); - if ( v1->pStdItemsTXT_Raw ) - pAllocator->FreeChunk(v1->pStdItemsTXT_Raw); - if ( v1->pRndItemsTXT_Raw ) - pAllocator->FreeChunk(v1->pRndItemsTXT_Raw); - if ( v1->pItemsTXT_Raw ) - pAllocator->FreeChunk(v1->pItemsTXT_Raw); + if (pSpcItemsTXT_Raw ) + pAllocator->FreeChunk(pSpcItemsTXT_Raw); + if ( pStdItemsTXT_Raw ) + pAllocator->FreeChunk(pStdItemsTXT_Raw); + if ( pRndItemsTXT_Raw ) + pAllocator->FreeChunk(pRndItemsTXT_Raw); + if ( pItemsTXT_Raw ) + pAllocator->FreeChunk(pItemsTXT_Raw); if ( pHostileTXT_Raw ) pAllocator->FreeChunk(pHostileTXT_Raw); if ( pHistoryTXT_Raw ) @@ -242,13 +238,12 @@ pAllocator->FreeChunk(pPotionsTXT_Raw); if ( pPotionNotesTXT_Raw ) pAllocator->FreeChunk(pPotionNotesTXT_Raw); - v1->pSpcItemsTXT_Raw = 0; - pSkillDescTXT_Raw = 0; - v1->pStdItemsTXT_Raw = 0; - v1->pRndItemsTXT_Raw = pSkillDescTXT_Raw; - result = pSkillDescTXT_Raw; - v1->pItemsTXT_Raw = pSkillDescTXT_Raw; - return result; + pSpcItemsTXT_Raw = NULL; + pSkillDescTXT_Raw = NULL; + pStdItemsTXT_Raw = NULL; + pRndItemsTXT_Raw = NULL; + pItemsTXT_Raw = NULL; + } @@ -444,8 +439,6 @@ pSpecialEnchantmentsSumm[i]+=pSpecialEnchantments[j].to_item_apply[i]; } - - Initialize2DA(); pItemsTXT_Raw = NULL; @@ -573,7 +566,7 @@ } if ( !_strcmpi(test_string, "sscroll") ) { - pItems[item_counter].uEquipType = 15; + pItems[item_counter].uEquipType = EQUIP_SPELL_SCROLL; break; } if ( !_strcmpi(test_string, "book") ) @@ -583,7 +576,7 @@ } if ( !_strcmpi(test_string, "mscroll") ) { - pItems[item_counter].uEquipType = 17; + pItems[item_counter].uEquipType = EQUIP_MESSAGE_SCROLL; break; } if ( !_strcmpi(test_string, "gold") ) @@ -603,70 +596,70 @@ { if ( !_strcmpi(test_string, "staff") ) { - pItems[item_counter].uSkillType = 0; + pItems[item_counter].uSkillType = PLAYER_SKILL_STAFF; break; } if ( !_strcmpi(test_string, "sword") ) { - pItems[item_counter].uSkillType = 1; + pItems[item_counter].uSkillType = PLAYER_SKILL_SWORD; break; } if ( !_strcmpi(test_string, "dagger") ) { - pItems[item_counter].uSkillType = 2; + pItems[item_counter].uSkillType = PLAYER_SKILL_DAGGER; break; } if ( !_strcmpi(test_string, "axe") ) { - pItems[item_counter].uSkillType = 3; + pItems[item_counter].uSkillType = PLAYER_SKILL_AXE; break; } if ( !_strcmpi(test_string, "spear") ) { - pItems[item_counter].uSkillType = 4; + pItems[item_counter].uSkillType = PLAYER_SKILL_SPEAR; break; } if ( !_strcmpi(test_string, "bow") ) { - pItems[item_counter].uSkillType = 5; + pItems[item_counter].uSkillType = PLAYER_SKILL_BOW; break; } if ( !_strcmpi(test_string, "mace") ) { - pItems[item_counter].uSkillType = 6; + pItems[item_counter].uSkillType = PLAYER_SKILL_MACE; break; } if ( !_strcmpi(test_string, "blaster") ) { - pItems[item_counter].uSkillType = 7; + pItems[item_counter].uSkillType = PLAYER_SKILL_BLASTER; break; } if ( !_strcmpi(test_string, "shield") ) { - pItems[item_counter].uSkillType = 8; + pItems[item_counter].uSkillType = PLAYER_SKILL_SHIELD; break; } if ( !_strcmpi(test_string, "leather") ) { - pItems[item_counter].uSkillType = 9; + pItems[item_counter].uSkillType = PLAYER_SKILL_LEATHER; break; } if ( !_strcmpi(test_string, "chain") ) { - pItems[item_counter].uSkillType = 10; + pItems[item_counter].uSkillType = PLAYER_SKILL_CHAIN; break; } if ( !_strcmpi(test_string, "plate") ) { - pItems[item_counter].uSkillType = 11; + pItems[item_counter].uSkillType = PLAYER_SKILL_PLATE; break; } if ( !_strcmpi(test_string, "club") ) { - pItems[item_counter].uSkillType = 37; + pItems[item_counter].uSkillType = PLAYER_SKILL_CLUB; break; } - pItems[item_counter].uSkillType = 38; + pItems[item_counter].uSkillType = PLAYER_SKILL_ANY; break; } case 6: //Mod1 @@ -1614,7 +1607,7 @@ case 40: requested_equip = EQUIP_RING; break; case 41: requested_equip = EQUIP_AMULET; break; case 42: requested_equip = EQUIP_WAND; break; - case 43: requested_equip = EQUIP_F; break; + case 43: requested_equip = EQUIP_SPELL_SCROLL; break; case 44: requested_equip = EQUIP_POTION; break; case 45: requested_equip = EQUIP_REAGENT; break; case 46: requested_equip = EQUIP_GEM; break;
--- a/Items.h Fri Feb 22 01:36:54 2013 +0200 +++ b/Items.h Fri Feb 22 08:23:15 2013 +0400 @@ -71,19 +71,19 @@ EQUIP_HELMET = 5, EQUIP_BELT = 6, EQUIP_CLOAK = 7, - EQUIP_GAUNTLETS = 0x8, - EQUIP_BOOTS = 0x9, - EQUIP_RING = 10, - EQUIP_AMULET = 11, - EQUIP_WAND = 12, - EQUIP_REAGENT = 13, - EQUIP_POTION = 14, - EQUIP_F = 0xF, - EQUIP_BOOK = 16, - EQUIP_11 = 17, - EQUIP_GOLD = 18, - EQUIP_GEM = 19, - EQUIP_NONE = 20 + EQUIP_GAUNTLETS = 8, + EQUIP_BOOTS = 9, + EQUIP_RING = 10, + EQUIP_AMULET = 11, + EQUIP_WAND = 12, + EQUIP_REAGENT = 13, + EQUIP_POTION = 14, + EQUIP_SPELL_SCROLL = 15, + EQUIP_BOOK = 16, + EQUIP_MESSAGE_SCROLL = 17, + EQUIP_GOLD = 18, + EQUIP_GEM = 19, + EQUIP_NONE = 20 }; @@ -229,7 +229,7 @@ void SetSpecialBonus(ItemGen *pItem); bool _456D43_is_material_equals_3(ItemGen *pItem); bool _456D5E_is_some_material(ItemGen *pItem); - char *Release(); + void Release(); int uAllItemsCount; ItemDesc pItems[800]; //4-9604h
--- a/NPC.h Fri Feb 22 01:36:54 2013 +0200 +++ b/NPC.h Fri Feb 22 08:23:15 2013 +0400 @@ -1,5 +1,71 @@ #pragma once +/* +enum NPCProffession + { + Smith 1 + Armorer 2 + Alchemist 3 + Scholar 4 + Guide 5 + Tracker 6 + Pathfinder 7 + Sailor 8 + Navigator 9 + Healer 10 + Expert Healer 11 + Master Healer 12 + Teacher 13 + Instructor 14 + Arms Master 15 + Weapons Master 16 + Apprentice 17 + Mystic 18 + Spell Master 19 + Trader 20 + Merchant 21 + Scout 22 + Herbalist 23 + Apothecary 24 + Tinker 25 + Locksmith 26 + Fool 27 + Chimney Sweep 28 + Porter 29 + Quarter Master 30 + Factor 31 + Banker 32 + Cook 33 + Chef 34 + Horseman 35 + Bard 36 + Enchanter 37 + Cartographer 38 + Wind Master 39 + Water Master 40 + Gate Master 41 + Acolyte 42 + Piper 43 + Explorer 44 + Pirate 45 + Squire 46 + Psychic 47 + Gypsy 48 + Diplomat 49 + Duper 50 + Burglar 51 + Fallen Wizard 52 + Acolyte 53 + Initiate 54 + Prelate 55 + Monk 56 + Sage 57 + Hunter 58 + + + }; + */ + struct NPCTopic {