Changed: Increse MAX_INVENTORY_ANIMAL to 7 to add 3 pets companions (ingame named ZIGs)

--HG--
branch : patches-from-atys
ulukyn 6 years ago
parent 3652b23bbb
commit c56d2e136d

@ -902,7 +902,7 @@ uint CDBCtrlSheet::getInventorySlot( const string &dbBranchId )
return INVENTORIES::bag; return INVENTORIES::bag;
break; break;
case 'P': case 'P':
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
if( strncmp( "PACK_ANIMAL", szName2, 11 ) ) if( strncmp( "PACK_ANIMAL", szName2, 11 ) )
break; break;
switch( szName2[11] ) switch( szName2[11] )
@ -915,6 +915,12 @@ uint CDBCtrlSheet::getInventorySlot( const string &dbBranchId )
return INVENTORIES::pet_animal3; return INVENTORIES::pet_animal3;
case '3': case '3':
return INVENTORIES::pet_animal4; return INVENTORIES::pet_animal4;
case '4':
return INVENTORIES::pet_animal5;
case '5':
return INVENTORIES::pet_animal6;
case '6':
return INVENTORIES::pet_animal7;
default: default:
break; break;
} }

@ -80,6 +80,9 @@ const std::string CInventoryManager::InventoryDBs[]=
"INVENTORY:PACK_ANIMAL1", "INVENTORY:PACK_ANIMAL1",
"INVENTORY:PACK_ANIMAL2", "INVENTORY:PACK_ANIMAL2",
"INVENTORY:PACK_ANIMAL3", "INVENTORY:PACK_ANIMAL3",
"INVENTORY:PACK_ANIMAL4",
"INVENTORY:PACK_ANIMAL5",
"INVENTORY:PACK_ANIMAL6",
"INVENTORY:TEMP", "INVENTORY:TEMP",
"EXCHANGE:GIVE", "EXCHANGE:GIVE",
"EXCHANGE:RECEIVE", "EXCHANGE:RECEIVE",
@ -92,7 +95,7 @@ const std::string CInventoryManager::InventoryDBs[]=
static void dummyCheck() static void dummyCheck()
{ {
// if this raise, correct the 2 tables above and below // if this raise, correct the 2 tables above and below
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
} }
const uint CInventoryManager::InventoryIndexes[]= const uint CInventoryManager::InventoryIndexes[]=
@ -103,6 +106,9 @@ const uint CInventoryManager::InventoryIndexes[]=
INVENTORIES::pet_animal2, INVENTORIES::pet_animal2,
INVENTORIES::pet_animal3, INVENTORIES::pet_animal3,
INVENTORIES::pet_animal4, INVENTORIES::pet_animal4,
INVENTORIES::pet_animal5,
INVENTORIES::pet_animal6,
INVENTORIES::pet_animal7,
INVENTORIES::temporary, INVENTORIES::temporary,
INVENTORIES::exchange, INVENTORIES::exchange,
INVENTORIES::exchange_proposition, INVENTORIES::exchange_proposition,
@ -1511,7 +1517,7 @@ void CInventoryManager::getBranchSlotCounts(const std::string &basePath, uint& n
// *************************************************************************** // ***************************************************************************
double CInventoryManager::getBagBulk(uint32 inventoryIndex) double CInventoryManager::getBagBulk(uint32 inventoryIndex)
{ {
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
if (inventoryIndex == 0) if (inventoryIndex == 0)
return getBranchBulk(LOCAL_INVENTORY ":BAG", 0, MAX_BAGINV_ENTRIES); return getBranchBulk(LOCAL_INVENTORY ":BAG", 0, MAX_BAGINV_ENTRIES);
else if (inventoryIndex == 1) else if (inventoryIndex == 1)
@ -1523,10 +1529,16 @@ double CInventoryManager::getBagBulk(uint32 inventoryIndex)
else if (inventoryIndex == 4) else if (inventoryIndex == 4)
return getBranchBulk(LOCAL_INVENTORY ":PACK_ANIMAL3", 0, MAX_ANIMALINV_ENTRIES); return getBranchBulk(LOCAL_INVENTORY ":PACK_ANIMAL3", 0, MAX_ANIMALINV_ENTRIES);
else if (inventoryIndex == 5) else if (inventoryIndex == 5)
return 0; return getBranchBulk(LOCAL_INVENTORY ":PACK_ANIMAL4", 0, MAX_ANIMALINV_ENTRIES);
else if (inventoryIndex == 6) else if (inventoryIndex == 6)
return 0; return getBranchBulk(LOCAL_INVENTORY ":PACK_ANIMAL5", 0, MAX_ANIMALINV_ENTRIES);
else if (inventoryIndex == 7) else if (inventoryIndex == 7)
return getBranchBulk(LOCAL_INVENTORY ":PACK_ANIMAL6", 0, MAX_ANIMALINV_ENTRIES);
else if (inventoryIndex == 8)
return 0;
else if (inventoryIndex == 9)
return 0;
else if (inventoryIndex == 10)
return getBranchBulk(LOCAL_INVENTORY ":TEMP", 0, MAX_TEMPINV_ENTRIES); return getBranchBulk(LOCAL_INVENTORY ":TEMP", 0, MAX_TEMPINV_ENTRIES);
return 0; return 0;
} }
@ -1543,7 +1555,7 @@ double CInventoryManager::getItemBulk(uint32 sheetID)
// *************************************************************************** // ***************************************************************************
double CInventoryManager::getMaxBagBulk(uint32 inventoryIndex) double CInventoryManager::getMaxBagBulk(uint32 inventoryIndex)
{ {
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
CInterfaceManager *pIM = CInterfaceManager::getInstance(); CInterfaceManager *pIM = CInterfaceManager::getInstance();
CCDBNodeLeaf *pNL=NULL; CCDBNodeLeaf *pNL=NULL;
if (inventoryIndex == 0) if (inventoryIndex == 0)
@ -1556,6 +1568,12 @@ double CInventoryManager::getMaxBagBulk(uint32 inventoryIndex)
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST2:BULK_MAX"); pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST2:BULK_MAX");
else if (inventoryIndex == 4) else if (inventoryIndex == 4)
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST3:BULK_MAX"); pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST3:BULK_MAX");
else if (inventoryIndex == 5)
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST4:BULK_MAX");
else if (inventoryIndex == 6)
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST5:BULK_MAX");
else if (inventoryIndex == 7)
pNL = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:PACK_ANIMAL:BEAST6:BULK_MAX");
if (pNL != NULL) if (pNL != NULL)
return pNL->getValue32(); return pNL->getValue32();
return 0; return 0;
@ -2756,7 +2774,10 @@ class CHandlerInvCanDropTo : public IActionHandler
if ((pListDstIcon->getInvType() == CInventoryManager::InvPA0) || if ((pListDstIcon->getInvType() == CInventoryManager::InvPA0) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA1) || (pListDstIcon->getInvType() == CInventoryManager::InvPA1) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA2) || (pListDstIcon->getInvType() == CInventoryManager::InvPA2) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA3)) (pListDstIcon->getInvType() == CInventoryManager::InvPA3) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA4) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA5) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA6))
{ {
INVENTORIES::TInventory e = (INVENTORIES::TInventory)(INVENTORIES::pet_animal1 + (pListDstIcon->getInvType()-CInventoryManager::InvPA0)); INVENTORIES::TInventory e = (INVENTORIES::TInventory)(INVENTORIES::pet_animal1 + (pListDstIcon->getInvType()-CInventoryManager::InvPA0));
if (!pInv->isInventoryAvailable(e)) if (!pInv->isInventoryAvailable(e))
@ -2768,7 +2789,10 @@ class CHandlerInvCanDropTo : public IActionHandler
if ((pListDstText->getInvType() == CInventoryManager::InvPA0) || if ((pListDstText->getInvType() == CInventoryManager::InvPA0) ||
(pListDstText->getInvType() == CInventoryManager::InvPA1) || (pListDstText->getInvType() == CInventoryManager::InvPA1) ||
(pListDstText->getInvType() == CInventoryManager::InvPA2) || (pListDstText->getInvType() == CInventoryManager::InvPA2) ||
(pListDstText->getInvType() == CInventoryManager::InvPA3)) (pListDstText->getInvType() == CInventoryManager::InvPA3) ||
(pListDstText->getInvType() == CInventoryManager::InvPA4) ||
(pListDstText->getInvType() == CInventoryManager::InvPA5) ||
(pListDstText->getInvType() == CInventoryManager::InvPA6))
{ {
INVENTORIES::TInventory e = (INVENTORIES::TInventory)(INVENTORIES::pet_animal1 + (pListDstText->getInvType()-CInventoryManager::InvPA0)); INVENTORIES::TInventory e = (INVENTORIES::TInventory)(INVENTORIES::pet_animal1 + (pListDstText->getInvType()-CInventoryManager::InvPA0));
if (!pInv->isInventoryAvailable(e)) if (!pInv->isInventoryAvailable(e))
@ -2891,17 +2915,24 @@ class CHandlerInvDropTo : public IActionHandler
else if (((pListDstText != NULL) && ((pListDstText->getInvType() == CInventoryManager::InvPA0) || else if (((pListDstText != NULL) && ((pListDstText->getInvType() == CInventoryManager::InvPA0) ||
(pListDstText->getInvType() == CInventoryManager::InvPA1) || (pListDstText->getInvType() == CInventoryManager::InvPA1) ||
(pListDstText->getInvType() == CInventoryManager::InvPA2) || (pListDstText->getInvType() == CInventoryManager::InvPA2) ||
(pListDstText->getInvType() == CInventoryManager::InvPA3) (pListDstText->getInvType() == CInventoryManager::InvPA3) ||
(pListDstText->getInvType() == CInventoryManager::InvPA4) ||
(pListDstText->getInvType() == CInventoryManager::InvPA5) ||
(pListDstText->getInvType() == CInventoryManager::InvPA6)
)) || )) ||
((pListDstIcon != NULL) && ((pListDstIcon->getInvType() == CInventoryManager::InvPA0) || ((pListDstIcon != NULL) && ((pListDstIcon->getInvType() == CInventoryManager::InvPA0) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA1) || (pListDstIcon->getInvType() == CInventoryManager::InvPA1) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA2) || (pListDstIcon->getInvType() == CInventoryManager::InvPA2) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA3) (pListDstIcon->getInvType() == CInventoryManager::InvPA3) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA4) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA5) ||
(pListDstIcon->getInvType() == CInventoryManager::InvPA6)
))) )))
{ {
string sTmp; string sTmp;
if (pListDstText != NULL) sTmp = toString("%d",pListDstText->getInvType()-CInventoryManager::InvPA0); if (pListDstText != NULL) sTmp = toString("%d",pListDstText->getInvType()-CInventoryManager::InvPA0);
if (pListDstIcon != NULL) sTmp = toString("%d",pListDstIcon->getInvType()-CInventoryManager::InvPA0); if (pListDstIcon != NULL) sTmp = toString("%d",pListDstIcon->getInvType()-CInventoryManager::InvPA0);
nlinfo("ici :%s", sTmp.c_str());
CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_pa|"+sTmp); CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_pa|"+sTmp);
} }
else if (((pListDstText != NULL) && (pListDstText->getInvType() == CInventoryManager::InvGuild)) || else if (((pListDstText != NULL) && (pListDstText->getInvType() == CInventoryManager::InvGuild)) ||
@ -3084,7 +3115,7 @@ class CHandlerInvTempAll : public IActionHandler
vector <pair <double, double> > BagsBulk; vector <pair <double, double> > BagsBulk;
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(0), pInv->getMaxBagBulk(0))); BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(0), pInv->getMaxBagBulk(0)));
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal1)) if (pInv->isInventoryAvailable(INVENTORIES::pet_animal1))
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(1), pInv->getMaxBagBulk(1))); BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(1), pInv->getMaxBagBulk(1)));
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal2)) if (pInv->isInventoryAvailable(INVENTORIES::pet_animal2))
@ -3093,6 +3124,12 @@ class CHandlerInvTempAll : public IActionHandler
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(3), pInv->getMaxBagBulk(3))); BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(3), pInv->getMaxBagBulk(3)));
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal4)) if (pInv->isInventoryAvailable(INVENTORIES::pet_animal4))
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(4), pInv->getMaxBagBulk(4))); BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(4), pInv->getMaxBagBulk(4)));
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal5))
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(5), pInv->getMaxBagBulk(4)));
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal6))
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(6), pInv->getMaxBagBulk(4)));
if (pInv->isInventoryAvailable(INVENTORIES::pet_animal7))
BagsBulk.push_back(pair <double, double>(pInv->getBagBulk(7), pInv->getMaxBagBulk(4)));
bool bPlaceFound = true; bool bPlaceFound = true;
@ -3675,6 +3712,9 @@ CInventoryManager::TInvType CInventoryManager::invTypeFromString(const string &s
if (sTmp == "inv_pa1") return InvPA1; if (sTmp == "inv_pa1") return InvPA1;
if (sTmp == "inv_pa2") return InvPA2; if (sTmp == "inv_pa2") return InvPA2;
if (sTmp == "inv_pa3") return InvPA3; if (sTmp == "inv_pa3") return InvPA3;
if (sTmp == "inv_pa4") return InvPA4;
if (sTmp == "inv_pa5") return InvPA5;
if (sTmp == "inv_pa6") return InvPA6;
if (sTmp == "inv_guild") return InvGuild; if (sTmp == "inv_guild") return InvGuild;
if (sTmp == "inv_room") return InvRoom; if (sTmp == "inv_room") return InvRoom;
return InvUnknown; return InvUnknown;

@ -291,7 +291,7 @@ public:
bool isInventoryEmpty (INVENTORIES::TInventory invId); bool isInventoryEmpty (INVENTORIES::TInventory invId);
enum TInvType { InvBag, InvPA0, InvPA1, InvPA2, InvPA3, InvGuild, InvRoom, InvUnknown }; enum TInvType { InvBag, InvPA0, InvPA1, InvPA2, InvPA3, InvPA4, InvPA5, InvPA6, InvGuild, InvRoom, InvUnknown };
static TInvType invTypeFromString(const std::string &str); static TInvType invTypeFromString(const std::string &str);

@ -90,7 +90,7 @@
type="I32" /> type="I32" />
</branch> </branch>
<branch name="FACTION_POINTS_" <branch name="FACTION_POINTS_"
count="6"> count="7">
<!-- game_share/pvp_clan.h (0 is BeginClans and size is EndClans-BeginClans+1 --> <!-- game_share/pvp_clan.h (0 is BeginClans and size is EndClans-BeginClans+1 -->
<leaf name="VALUE" <leaf name="VALUE"
type="I32" /> type="I32" />
@ -504,7 +504,7 @@
</branch> </branch>
<!-- MAX_INVENTORY_ANIMAL --> <!-- MAX_INVENTORY_ANIMAL -->
<branch name="PACK_ANIMAL" <branch name="PACK_ANIMAL"
count="4" count="7"
clientonly="1"> clientonly="1">
<branch name="" <branch name=""
count="500"> count="500">
@ -602,7 +602,7 @@
type="I1" /> type="I1" />
<!-- Used only in forage --> <!-- Used only in forage -->
</branch> </branch>
<!-- used to share items between team members (up to 8 players) <!-- used to share items between team members (up to 8 players)
DO NOT FORGET if you modify this to do the the same modification in local database file --> DO NOT FORGET if you modify this to do the the same modification in local database file -->
<branch name="SHARE"> <branch name="SHARE">
<leaf name="SESSION" <leaf name="SESSION"
@ -810,8 +810,8 @@
<!-- are there pages left ? --> <!-- are there pages left ? -->
<branch name="" <branch name=""
count="8"> count="8">
<!-- <!--
if high order bit == 0 : guild icon : 58 low order bits - back:3 bits, symbol:6 bits, Invert:1 bit, color1&2:24 bits each if high order bit == 0 : guild icon : 58 low order bits - back:3 bits, symbol:6 bits, Invert:1 bit, color1&2:24 bits each
if high order bit == 1 : low order bits = entry in the LIFT_ICONS::TLiftIcon enum if high order bit == 1 : low order bits = entry in the LIFT_ICONS::TLiftIcon enum
--> -->
<leaf name="ICON" <leaf name="ICON"
@ -1117,7 +1117,7 @@
type="I3" /> type="I3" />
<!-- Guild civilization allegiance (CF TPVPClan enum (pvp_clan.h) --> <!-- Guild civilization allegiance (CF TPVPClan enum (pvp_clan.h) -->
<branch name="" <branch name=""
count="6"> count="7">
<!-- from fame.h & cpp --> <!-- from fame.h & cpp -->
<leaf name="VALUE" <leaf name="VALUE"
type="S8" /> type="S8" />
@ -1292,7 +1292,7 @@
</branch> </branch>
<branch name="SQUADS"> <branch name="SQUADS">
<!-- Squad --> <!-- Squad -->
<!-- 24 max squads: The First 12th are the squads that spawn at start <!-- 24 max squads: The First 12th are the squads that spawn at start
The second 12th are the one that spawn after The second 12th are the one that spawn after
--> -->
<branch name="SP" <branch name="SP"
@ -1527,7 +1527,7 @@
<!-- beasts --> <!-- beasts -->
<!-- MAX_INVENTORY_ANIMAL --> <!-- MAX_INVENTORY_ANIMAL -->
<branch name="BEAST" <branch name="BEAST"
count="4" count="7"
atomic="1"> atomic="1">
<!-- Atomic, for correct Bar Management on client --> <!-- Atomic, for correct Bar Management on client -->
<leaf name="UID" <leaf name="UID"
@ -1625,7 +1625,7 @@
type="S8" /> type="S8" />
<!-- value where the guards kill you on sight --> <!-- value where the guards kill you on sight -->
<branch name="PLAYER" <branch name="PLAYER"
count="6"> count="7">
<!-- from fame.h & cpp --> <!-- from fame.h & cpp -->
<leaf name="VALUE" <leaf name="VALUE"
type="S8" /> type="S8" />

@ -38,6 +38,9 @@ namespace INVENTORIES
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal2) NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal2)
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal3) NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal3)
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal4) NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal4)
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal5)
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal6)
NL_STRING_CONVERSION_TABLE_ENTRY(pet_animal7)
// NL_STRING_CONVERSION_TABLE_ENTRY(bot_gift) // NL_STRING_CONVERSION_TABLE_ENTRY(bot_gift)
NL_STRING_CONVERSION_TABLE_ENTRY(UNDEFINED) NL_STRING_CONVERSION_TABLE_ENTRY(UNDEFINED)
NL_STRING_CONVERSION_TABLE_ENTRY(exchange) NL_STRING_CONVERSION_TABLE_ENTRY(exchange)
@ -52,7 +55,7 @@ namespace INVENTORIES
const std::string& toString( TInventory inv ) const std::string& toString( TInventory inv )
{ {
// if this raise, correct the table above // if this raise, correct the table above
nlctassert(MAX_INVENTORY_ANIMAL==4); nlctassert(MAX_INVENTORY_ANIMAL==7);
return InventoryToString.toString(inv); return InventoryToString.toString(inv);
} }
@ -72,6 +75,12 @@ namespace INVENTORIES
inv = pet_animal3; inv = pet_animal3;
else if (str == "pack_animal4") else if (str == "pack_animal4")
inv = pet_animal4; inv = pet_animal4;
else if (str == "pack_animal5")
inv = pet_animal5;
else if (str == "pack_animal6")
inv = pet_animal6;
else if (str == "pack_animal7")
inv = pet_animal7;
} }
return inv; return inv;
@ -90,6 +99,9 @@ namespace INVENTORIES
"", // pack_animal2 "", // pack_animal2
"", // pack_animal3 "", // pack_animal3
"", // pack_animal4 "", // pack_animal4
"", // pack_animal5
"", // pack_animal6
"", // pack_animal7
"", // harvest "", // harvest
// "", // bot_gift // "", // bot_gift
"", // exchange "", // exchange
@ -102,9 +114,9 @@ namespace INVENTORIES
// //
const char *CInventoryCategoryForCharacter::InventoryStr [CInventoryCategoryForCharacter::NbInventoryIds] = const char *CInventoryCategoryForCharacter::InventoryStr [CInventoryCategoryForCharacter::NbInventoryIds] =
{ "BAG", "PACK_ANIMAL0", "PACK_ANIMAL1", "PACK_ANIMAL2", "PACK_ANIMAL3", "ROOM" }; { "BAG", "PACK_ANIMAL0", "PACK_ANIMAL1", "PACK_ANIMAL2", "PACK_ANIMAL3", "PACK_ANIMAL4", "PACK_ANIMAL5", "PACK_ANIMAL6", "ROOM" };
const uint CInventoryCategoryForCharacter::InventoryNbSlots [CInventoryCategoryForCharacter::NbInventoryIds] = const uint CInventoryCategoryForCharacter::InventoryNbSlots [CInventoryCategoryForCharacter::NbInventoryIds] =
{ NbBagSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbRoomSlots }; { NbBagSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbPackerSlots, NbRoomSlots };
// Other values to change according to these InventoryNbSlots: // Other values to change according to these InventoryNbSlots:
// - game_share.h/inventories.h: CInventoryCategoryForCharacter::SlotBitSize // - game_share.h/inventories.h: CInventoryCategoryForCharacter::SlotBitSize
// - data_common/database.xml: INVENTORY:BAG count // - data_common/database.xml: INVENTORY:BAG count

@ -34,8 +34,8 @@ WARNING!!!!! If you change MAX_INVENTORY_ANIMAL value, you'll have to:
* ******/ * ******/
#define MAX_PACK_ANIMAL 3 #define MAX_PACK_ANIMAL 3
#define MAX_MEKTOUB_MOUNT 1 #define MAX_MEKTOUB_MOUNT 1
#define MAX_OTHER_PET 0 #define MAX_OTHER_PET 3
#define MAX_INVENTORY_ANIMAL ( MAX_PACK_ANIMAL + MAX_MEKTOUB_MOUNT ) #define MAX_INVENTORY_ANIMAL ( MAX_PACK_ANIMAL + MAX_MEKTOUB_MOUNT + MAX_OTHER_PET)
// This give by which value the WEIGHT in database must be divided to get the value in Kg // This give by which value the WEIGHT in database must be divided to get the value in Kg
// valueKg= valueDb / DB_WEIGHT_SCALE // valueKg= valueDb / DB_WEIGHT_SCALE
@ -159,22 +159,25 @@ namespace INVENTORIES
temporary, // 1 temporary, // 1
equipment, // 2 equipment, // 2
bag, // 3 bag, // 3
pet_animal, // 4 Character can have 5 pack animal pet_animal, // 4 Character can have 7 pack animal
pet_animal1 = pet_animal, // for toString => TInventory convertion pet_animal1 = pet_animal, // for toString => TInventory convertion
pet_animal2, pet_animal2,
pet_animal3, pet_animal3,
pet_animal4, pet_animal4,
max_pet_animal, // 8 pet_animal5,
NUM_INVENTORY = max_pet_animal, // 8 pet_animal6,
UNDEFINED = NUM_INVENTORY, // 8 pet_animal7,
max_pet_animal, // 10
exchange, // 9 This is not a bug : exchange is a fake inventory NUM_INVENTORY = max_pet_animal, // 10
exchange_proposition, // 10 and should not count in the number of inventory UNDEFINED = NUM_INVENTORY, // 10
exchange, // 11 This is not a bug : exchange is a fake inventory
exchange_proposition, // 12 and should not count in the number of inventory
// same for botChat trading. // same for botChat trading.
trading, // 11 trading, // 13
reward_sharing, // 12 fake inventory, not in database.xml. Used by the item info protocol only reward_sharing, // 14 fake inventory, not in database.xml. Used by the item info protocol only
guild, // 13 (warning: number stored in guild saved file) guild, // 15 (warning: number stored in guild saved file)
player_room, // 14 player_room, // 16
NUM_ALL_INVENTORY // warning: distinct from NUM_INVENTORY NUM_ALL_INVENTORY // warning: distinct from NUM_INVENTORY
}; };

Loading…
Cancel
Save