[6853] [2008_11_27_01_mangos_playercreateinfo_item.sql] Use DBC data for creating initial character items.

Thanks to WCell team for DBC structure research.
`playercreateinfo_item` content removed from mangos.sql and table can be used now only for custom additional initial items.
This commit is contained in:
VladimirMangos 2008-11-28 02:14:36 +03:00
parent a0f45f295e
commit 9fc7dd9ead
11 changed files with 114 additions and 461 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`; DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` ( CREATE TABLE `db_version` (
`version` varchar(120) default NULL, `version` varchar(120) default NULL,
`required_2008_11_18_02_mangos_mangos_string` bit(1) default NULL `required_2008_11_27_01_mangos_playercreateinfo_item` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
-- --
@ -8073,435 +8073,6 @@ CREATE TABLE `playercreateinfo_item` (
LOCK TABLES `playercreateinfo_item` WRITE; LOCK TABLES `playercreateinfo_item` WRITE;
/*!40000 ALTER TABLE `playercreateinfo_item` DISABLE KEYS */; /*!40000 ALTER TABLE `playercreateinfo_item` DISABLE KEYS */;
INSERT INTO `playercreateinfo_item` VALUES
(1,1,38,1),
(1,1,39,1),
(1,1,40,1),
(1,1,25,1),
(1,1,2362,1),
(1,1,117,4),
(1,1,6948,1),
(1,1,14646,1),
(1,2,45,1),
(1,2,44,1),
(1,2,43,1),
(1,2,2361,1),
(1,2,6948,1),
(1,2,159,2),
(1,2,2070,4),
(1,2,14646,1),
(1,4,49,1),
(1,4,48,1),
(1,4,47,1),
(1,4,2092,1),
(1,4,2947,100),
(1,4,2070,4),
(1,4,6948,1),
(1,4,14646,1),
(1,5,53,1),
(1,5,6098,1),
(1,5,52,1),
(1,5,51,1),
(1,5,36,1),
(1,5,159,2),
(1,5,2070,4),
(1,5,6948,1),
(1,5,14646,1),
(1,8,6096,1),
(1,8,56,1),
(1,8,1395,1),
(1,8,55,1),
(1,8,35,1),
(1,8,2070,4),
(1,8,159,2),
(1,8,6948,1),
(1,8,14646,1),
(1,9,6097,1),
(1,9,57,1),
(1,9,1396,1),
(1,9,59,1),
(1,9,2092,1),
(1,9,4604,4),
(1,9,159,2),
(1,9,6948,1),
(1,9,14646,1),
(2,1,6125,1),
(2,1,139,1),
(2,1,140,1),
(2,1,12282,1),
(2,1,6948,1),
(2,1,117,4),
(2,1,14649,1),
(2,3,127,1),
(2,3,6126,1),
(2,3,6127,1),
(2,3,37,1),
(2,3,2504,1),
(2,3,159,2),
(2,3,117,4),
(2,3,6948,1),
(2,3,14649,1),
(2,3,2512,200),
(2,3,2101,1),
(2,4,2105,1),
(2,4,120,1),
(2,4,121,1),
(2,4,2092,1),
(2,4,25861,100),
(2,4,117,4),
(2,4,6948,1),
(2,4,14649,1),
(2,7,154,1),
(2,7,153,1),
(2,7,36,1),
(2,7,6948,1),
(2,7,117,4),
(2,7,159,2),
(2,7,14649,1),
(2,9,6129,1),
(2,9,1396,1),
(2,9,59,1),
(2,9,2092,1),
(2,9,6948,1),
(2,9,117,4),
(2,9,159,2),
(2,9,14649,1),
(3,1,38,1),
(3,1,39,1),
(3,1,40,1),
(3,1,12282,1),
(3,1,6948,1),
(3,1,117,4),
(3,1,14647,1),
(3,2,45,1),
(3,2,44,1),
(3,2,43,1),
(3,2,2361,1),
(3,2,4540,4),
(3,2,159,2),
(3,2,6948,1),
(3,2,14647,1),
(3,3,148,1),
(3,3,147,1),
(3,3,129,1),
(3,3,37,1),
(3,3,2508,1),
(3,3,159,2),
(3,3,117,4),
(3,3,6948,1),
(3,3,14647,1),
(3,3,2516,200),
(3,3,2102,1),
(3,4,49,1),
(3,4,48,1),
(3,4,47,1),
(3,4,2092,1),
(3,4,25861,100),
(3,4,4540,4),
(3,4,6948,1),
(3,4,14647,1),
(3,5,53,1),
(3,5,6098,1),
(3,5,52,1),
(3,5,51,1),
(3,5,36,1),
(3,5,159,2),
(3,5,4540,4),
(3,5,6948,1),
(3,5,14647,1),
(4,1,38,1),
(4,1,39,1),
(4,1,40,1),
(4,1,25,1),
(4,1,2362,1),
(4,1,117,4),
(4,1,6948,1),
(4,1,14648,1),
(4,3,148,1),
(4,3,147,1),
(4,3,129,1),
(4,3,2092,1),
(4,3,2504,1),
(4,3,159,2),
(4,3,117,4),
(4,3,6948,1),
(4,3,14648,1),
(4,3,2512,200),
(4,3,2101,1),
(4,4,49,1),
(4,4,48,1),
(4,4,47,1),
(4,4,2092,1),
(4,4,2947,100),
(4,4,4540,4),
(4,4,6948,1),
(4,4,14648,1),
(4,5,53,1),
(4,5,6119,1),
(4,5,52,1),
(4,5,51,1),
(4,5,36,1),
(4,5,2070,4),
(4,5,159,2),
(4,5,6948,1),
(4,5,14648,1),
(4,11,6123,1),
(4,11,44,1),
(4,11,3661,1),
(4,11,159,2),
(4,11,4536,4),
(4,11,6948,1),
(4,11,14648,1),
(5,1,6125,1),
(5,1,139,1),
(5,1,140,1),
(5,1,25,1),
(5,1,2362,1),
(5,1,4604,4),
(5,1,6948,1),
(5,1,14651,1),
(5,4,2105,1),
(5,4,120,1),
(5,4,121,1),
(5,4,2092,1),
(5,4,2947,100),
(5,4,4604,4),
(5,4,6948,1),
(5,4,14651,1),
(5,5,53,1),
(5,5,6144,1),
(5,5,52,1),
(5,5,51,1),
(5,5,36,1),
(5,5,4604,4),
(5,5,159,2),
(5,5,6948,1),
(5,5,14651,1),
(5,8,6096,1),
(5,8,6140,1),
(5,8,1395,1),
(5,8,55,1),
(5,8,35,1),
(5,8,4604,4),
(5,8,159,2),
(5,8,6948,1),
(5,8,14651,1),
(5,9,6129,1),
(5,9,1396,1),
(5,9,59,1),
(5,9,2092,1),
(5,9,4604,4),
(5,9,159,2),
(5,9,6948,1),
(5,9,14651,1),
(6,1,6125,1),
(6,1,139,1),
(6,1,2361,1),
(6,1,6948,1),
(6,1,4540,4),
(6,1,14650,1),
(6,3,127,1),
(6,3,6126,1),
(6,3,37,1),
(6,3,2508,1),
(6,3,159,2),
(6,3,117,4),
(6,3,6948,1),
(6,3,14650,1),
(6,3,2516,200),
(6,3,2102,1),
(6,7,154,1),
(6,7,153,1),
(6,7,36,1),
(6,7,6948,1),
(6,7,4604,4),
(6,7,159,2),
(6,7,14650,1),
(6,11,6139,1),
(6,11,6124,1),
(6,11,35,1),
(6,11,159,2),
(6,11,4536,4),
(6,11,6948,1),
(6,11,14650,1),
(7,1,38,1),
(7,1,39,1),
(7,1,40,1),
(7,1,25,1),
(7,1,2362,1),
(7,1,117,4),
(7,1,6948,1),
(7,1,14647,1),
(7,4,49,1),
(7,4,48,1),
(7,4,47,1),
(7,4,2092,1),
(7,4,2947,100),
(7,4,117,4),
(7,4,6948,1),
(7,4,14647,1),
(7,8,6096,1),
(7,8,56,1),
(7,8,1395,1),
(7,8,55,1),
(7,8,35,1),
(7,8,4536,4),
(7,8,159,2),
(7,8,6948,1),
(7,8,14647,1),
(7,9,6097,1),
(7,9,57,1),
(7,9,1396,1),
(7,9,59,1),
(7,9,2092,1),
(7,9,159,2),
(7,9,4604,4),
(7,9,6948,1),
(7,9,14647,1),
(8,1,6125,1),
(8,1,139,1),
(8,1,140,1),
(8,1,37,1),
(8,1,2362,1),
(8,1,25861,100),
(8,1,117,4),
(8,1,6948,1),
(8,1,14649,1),
(8,3,127,1),
(8,3,6126,1),
(8,3,6127,1),
(8,3,37,1),
(8,3,2504,1),
(8,3,4604,4),
(8,3,159,2),
(8,3,2512,200),
(8,3,2101,1),
(8,3,14649,1),
(8,3,6948,1),
(8,4,2105,1),
(8,4,120,1),
(8,4,121,1),
(8,4,2092,1),
(8,4,25861,100),
(8,4,117,4),
(8,4,6948,1),
(8,4,14649,1),
(8,5,53,1),
(8,5,6144,1),
(8,5,52,1),
(8,5,36,1),
(8,5,4540,4),
(8,5,159,2),
(8,5,6948,1),
(8,5,14649,1),
(8,7,6134,1),
(8,7,6135,1),
(8,7,36,1),
(8,7,117,4),
(8,7,159,2),
(8,7,6948,1),
(8,7,14649,1),
(8,8,6096,1),
(8,8,6140,1),
(8,8,1395,1),
(8,8,55,1),
(8,8,35,1),
(8,8,117,4),
(8,8,159,2),
(8,8,6948,1),
(8,8,14649,1),
(10,2,159,5),
(10,2,2070,5),
(10,2,6948,1),
(10,2,23346,1),
(10,2,24143,1),
(10,2,24145,1),
(10,2,24146,1),
(10,3,159,5),
(10,3,2101,1),
(10,3,2512,200),
(10,3,6948,1),
(10,3,20857,5),
(10,3,20899,1),
(10,3,20900,1),
(10,3,20901,1),
(10,3,20980,1),
(10,3,20982,1),
(10,4,3111,100),
(10,4,6948,1),
(10,4,20857,10),
(10,4,20896,1),
(10,4,20897,1),
(10,4,20898,1),
(10,4,20982,1),
(10,5,51,1),
(10,5,52,1),
(10,5,53,1),
(10,5,159,5),
(10,5,6948,1),
(10,5,20891,1),
(10,5,20981,5),
(10,8,35,1),
(10,8,159,5),
(10,8,6096,1),
(10,8,6948,1),
(10,8,20857,5),
(10,8,20893,1),
(10,8,20894,1),
(10,8,20895,1),
(10,9,59,1),
(10,9,159,5),
(10,9,1396,1),
(10,9,6948,1),
(10,9,20857,5),
(10,9,20892,1),
(10,9,20983,1),
(11,1,4540,5),
(11,1,6948,1),
(11,1,23346,1),
(11,1,23473,1),
(11,1,23474,1),
(11,1,23475,1),
(11,2,159,5),
(11,2,2361,1),
(11,2,4540,5),
(11,2,6948,1),
(11,2,23476,1),
(11,2,23476,1),
(11,2,23477,1),
(11,3,25,1),
(11,3,159,5),
(11,3,2101,1),
(11,3,2504,1),
(11,3,2512,200),
(11,3,4540,5),
(11,3,6948,1),
(11,3,23344,1),
(11,3,23345,1),
(11,3,23348,1),
(11,5,36,1),
(11,5,59,1),
(11,5,159,5),
(11,5,1396,1),
(11,5,4540,5),
(11,5,6097,1),
(11,5,6948,1),
(11,5,23322,1),
(11,7,36,1),
(11,7,159,5),
(11,7,4540,5),
(11,7,6948,1),
(11,7,23344,1),
(11,7,23345,1),
(11,7,23348,1),
(11,8,35,1),
(11,8,159,5),
(11,8,4540,5),
(11,8,6948,1),
(11,8,23473,1),
(11,8,23475,1),
(11,8,23478,1),
(11,8,23479,1);
/*!40000 ALTER TABLE `playercreateinfo_item` ENABLE KEYS */; /*!40000 ALTER TABLE `playercreateinfo_item` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;

View file

@ -0,0 +1,3 @@
ALTER TABLE db_version CHANGE COLUMN required_2008_11_18_02_mangos_mangos_string required_2008_11_27_01_mangos_playercreateinfo_item bit;
TRUNCATE TABLE playercreateinfo_item;

View file

@ -137,6 +137,7 @@ pkgdata_DATA = \
2008_11_16_01_mangos_command.sql \ 2008_11_16_01_mangos_command.sql \
2008_11_18_01_mangos_creature_movement.sql \ 2008_11_18_01_mangos_creature_movement.sql \
2008_11_18_02_mangos_mangos_string.sql \ 2008_11_18_02_mangos_mangos_string.sql \
2008_11_27_01_mangos_playercreateinfo_item.sql \
README README
## Additional files to include when running 'make dist' ## Additional files to include when running 'make dist'
@ -255,4 +256,5 @@ EXTRA_DIST = \
2008_11_16_01_mangos_command.sql \ 2008_11_16_01_mangos_command.sql \
2008_11_18_01_mangos_creature_movement.sql \ 2008_11_18_01_mangos_creature_movement.sql \
2008_11_18_02_mangos_mangos_string.sql \ 2008_11_18_02_mangos_mangos_string.sql \
2008_11_27_01_mangos_playercreateinfo_item.sql \
README README

View file

@ -2090,8 +2090,7 @@ void ObjectMgr::LoadPlayerInfo()
barGoLink bar( 1 ); barGoLink bar( 1 );
sLog.outString(); sLog.outString();
sLog.outString( ">> Loaded %u player create items", count ); sLog.outString( ">> Loaded %u custom player create items", count );
sLog.outErrorDb( "Error loading `playercreateinfo_item` table or empty table.");
} }
else else
{ {
@ -2143,7 +2142,7 @@ void ObjectMgr::LoadPlayerInfo()
delete result; delete result;
sLog.outString(); sLog.outString();
sLog.outString( ">> Loaded %u player create items", count ); sLog.outString( ">> Loaded %u custom player create items", count );
} }
} }

View file

@ -553,7 +553,9 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
setFactionForRace(m_race); setFactionForRace(m_race);
SetUInt32Value(UNIT_FIELD_BYTES_0, ( ( race ) | ( class_ << 8 ) | ( gender << 16 ) | ( powertype << 24 ) ) ); uint32 RaceClassGender = ( race ) | ( class_ << 8 ) | ( gender << 16 );
SetUInt32Value(UNIT_FIELD_BYTES_0, ( RaceClassGender | ( powertype << 24 ) ) );
SetUInt32Value(UNIT_FIELD_BYTES_1, unitfield); SetUInt32Value(UNIT_FIELD_BYTES_1, unitfield);
SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_UNK3 | UNIT_BYTE2_FLAG_UNK5 ); SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_UNK3 | UNIT_BYTE2_FLAG_UNK5 );
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE ); SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE );
@ -600,8 +602,10 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
SetPower(POWER_MANA,GetMaxPower(POWER_MANA)); SetPower(POWER_MANA,GetMaxPower(POWER_MANA));
} }
// original spells
learnDefaultSpells(true); learnDefaultSpells(true);
// original action bar
std::list<uint16>::const_iterator action_itr[4]; std::list<uint16>::const_iterator action_itr[4];
for(int i=0; i<4; i++) for(int i=0; i<4; i++)
action_itr[i] = info->action[i].begin(); action_itr[i] = info->action[i].begin();
@ -618,37 +622,59 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
++action_itr[i]; ++action_itr[i];
} }
for (PlayerCreateInfoItems::const_iterator item_id_itr = info->item.begin(); item_id_itr!=info->item.end(); ++item_id_itr++) // original items
CharStartOutfitEntry const* oEntry = NULL;
for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i)
{ {
uint32 titem_id = item_id_itr->item_id; if(CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i))
uint32 titem_amount = item_id_itr->item_amount;
sLog.outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
// attempt equip
uint16 eDest;
uint8 msg = CanEquipNewItem( NULL_SLOT, eDest, titem_id, titem_amount, false );
if( msg == EQUIP_ERR_OK )
{ {
EquipNewItem( eDest, titem_id, titem_amount, true); if(entry->RaceClassGender == RaceClassGender)
AutoUnequipOffhandIfNeed(); {
continue; // equipped, to next oEntry = entry;
break;
}
} }
// attempt store
ItemPosCountVec sDest;
// store in main bag to simplify second pass (special bags can be not equipped yet at this moment)
msg = CanStoreNewItem( INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, titem_id, titem_amount );
if( msg == EQUIP_ERR_OK )
{
StoreNewItem( sDest, titem_id, true, Item::GenerateItemRandomPropertyId(titem_id) );
continue; // stored, to next
}
// item can't be added
sLog.outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u",titem_id,race,class_,msg);
} }
if(oEntry)
{
for(int j = 0; j < MAX_OUTFIT_ITEMS; ++j)
{
if(oEntry->ItemId[j] <= 0)
continue;
uint32 item_id = oEntry->ItemId[j];
ItemPrototype const* iProto = objmgr.GetItemPrototype(item_id);
if(!iProto)
{
sLog.outErrorDb("Initial item id %u (race %u class %u) from CharStartOutfit.dbc not listed in `item_template`, ignoring.",item_id,getRace(),getClass());
continue;
}
uint32 count = iProto->Stackable; // max stack by default (mostly 1)
if(iProto->Class==ITEM_CLASS_CONSUMABLE && iProto->SubClass==ITEM_SUBCLASS_FOOD)
{
switch(iProto->Spells[0].SpellCategory)
{
case 11: // food
if(iProto->Stackable > 4)
count = 4;
break;
case 59: // drink
if(iProto->Stackable > 2)
count = 2;
break;
}
}
StoreNewItemInBestSlot(item_id, count);
}
}
for (PlayerCreateInfoItems::const_iterator item_id_itr = info->item.begin(); item_id_itr!=info->item.end(); ++item_id_itr++)
StoreNewItemInBestSlot(item_id_itr->item_id, item_id_itr->item_amount);
// bags and main-hand weapon must equipped at this moment // bags and main-hand weapon must equipped at this moment
// now second pass for not equipped (offhand weapon/shield if it attempt equipped before main-hand weapon) // now second pass for not equipped (offhand weapon/shield if it attempt equipped before main-hand weapon)
// or ammo not equipped in special bag // or ammo not equipped in special bag
@ -687,6 +713,35 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
return true; return true;
} }
bool Player::StoreNewItemInBestSlot(uint32 titem_id, uint32 titem_amount)
{
sLog.outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
// attempt equip
uint16 eDest;
uint8 msg = CanEquipNewItem( NULL_SLOT, eDest, titem_id, titem_amount, false );
if( msg == EQUIP_ERR_OK )
{
EquipNewItem( eDest, titem_id, titem_amount, true);
AutoUnequipOffhandIfNeed();
return true; // equipped
}
// attempt store
ItemPosCountVec sDest;
// store in main bag to simplify second pass (special bags can be not equipped yet at this moment)
msg = CanStoreNewItem( INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, titem_id, titem_amount );
if( msg == EQUIP_ERR_OK )
{
StoreNewItem( sDest, titem_id, true, Item::GenerateItemRandomPropertyId(titem_id) );
return true; // stored
}
// item can't be added
sLog.outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u",titem_id,getRace(),getClass(),msg);
return false;
}
void Player::StartMirrorTimer(MirrorTimerType Type, uint32 MaxValue) void Player::StartMirrorTimer(MirrorTimerType Type, uint32 MaxValue)
{ {
uint32 BreathRegen = (uint32)-1; uint32 BreathRegen = (uint32)-1;

View file

@ -1067,6 +1067,7 @@ class MANGOS_DLL_SPEC Player : public Unit
Item* EquipNewItem( uint16 pos, uint32 item, uint32 count, bool update ); Item* EquipNewItem( uint16 pos, uint32 item, uint32 count, bool update );
Item* EquipItem( uint16 pos, Item *pItem, bool update ); Item* EquipItem( uint16 pos, Item *pItem, bool update );
void AutoUnequipOffhandIfNeed(); void AutoUnequipOffhandIfNeed();
bool StoreNewItemInBestSlot(uint32 item_id, uint32 item_count);
uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const; uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const; uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const;

View file

@ -36,6 +36,7 @@ static AreaFlagByMapID sAreaFlagByMapID; // for instances wit
DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt); DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt); DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt); DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt);
DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt); DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt); DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt); DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
@ -201,6 +202,8 @@ void LoadDBCStores(std::string dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaTriggerStore, dbcPath,"AreaTrigger.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBankBagSlotPricesStore, dbcPath,"BankBagSlotPrices.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattlemasterList.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharStartOutfitStore, dbcPath,"CharStartOutfit.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCharTitlesStore, dbcPath,"CharTitles.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc"); LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");

View file

@ -134,6 +134,7 @@ extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore; extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore; extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
//extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index //extern DBCStorage <ChatChannelsEntry> sChatChannelsStore; -- accessed using function, no usable index
extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore;
extern DBCStorage <CharTitlesEntry> sCharTitlesStore; extern DBCStorage <CharTitlesEntry> sCharTitlesStore;
extern DBCStorage <ChrClassesEntry> sChrClassesStore; extern DBCStorage <ChrClassesEntry> sChrClassesStore;
extern DBCStorage <ChrRacesEntry> sChrRacesStore; extern DBCStorage <ChrRacesEntry> sChrRacesStore;

View file

@ -84,6 +84,21 @@ struct BattlemasterListEntry
// 32 unused // 32 unused
}; };
#define MAX_OUTFIT_ITEMS 12
// #define MAX_OUTFIT_ITEMS 24 // 12->24 in 3.0.x
struct CharStartOutfitEntry
{
//uint32 Id; // 0
uint32 RaceClassGender; // 1 (UNIT_FIELD_BYTES_0 & 0x00FFFFFF) comparable (0 byte = race, 1 byte = class, 2 byte = gender)
int32 ItemId[MAX_OUTFIT_ITEMS]; // 2-13
//int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 14-25 not required at server side
//int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 26-37 not required at server side
//uint32 Unknown1; // 38, unique values (index-like with gaps ordered in other way as ids)
//uint32 Unknown2; // 39
//uint32 Unknown3; // 40
};
struct CharTitlesEntry struct CharTitlesEntry
{ {
uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId() uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()

View file

@ -20,6 +20,9 @@ const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxx";
const char AreaTriggerEntryfmt[]="niffffffff"; const char AreaTriggerEntryfmt[]="niffffffff";
const char BankBagSlotPricesEntryfmt[]="ni"; const char BankBagSlotPricesEntryfmt[]="ni";
const char BattlemasterListEntryfmt[]="niiixxxxxiiiixxssssssssssssssssxx"; const char BattlemasterListEntryfmt[]="niiixxxxxiiiixxssssssssssssssssxx";
const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxx";
// 3*12 new item fields in 3.0.x
//const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char CharTitlesEntryfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; const char CharTitlesEntryfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
const char ChatChannelsEntryfmt[]="iixssssssssssssssssxxxxxxxxxxxxxxxxxx"; const char ChatChannelsEntryfmt[]="iixssssssssssssssssxxxxxxxxxxxxxxxxxx";
// ChatChannelsEntryfmt, index not used (more compact store) // ChatChannelsEntryfmt, index not used (more compact store)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "6852" #define REVISION_NR "6853"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__