Merge branch 'master' into 303

Conflicts:
	src/shared/Database/DBCStores.cpp
	src/shared/Database/DBCfmt.cpp
This commit is contained in:
tomrus88 2008-11-28 07:20:02 +03:00
commit 93cf13acec
14 changed files with 168 additions and 467 deletions

View file

@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`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';
--
@ -8073,435 +8073,6 @@ CREATE TABLE `playercreateinfo_item` (
LOCK TABLES `playercreateinfo_item` WRITE;
/*!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 */;
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_18_01_mangos_creature_movement.sql \
2008_11_18_02_mangos_mangos_string.sql \
2008_11_27_01_mangos_playercreateinfo_item.sql \
README
## Additional files to include when running 'make dist'
@ -255,4 +256,5 @@ EXTRA_DIST = \
2008_11_16_01_mangos_command.sql \
2008_11_18_01_mangos_creature_movement.sql \
2008_11_18_02_mangos_mangos_string.sql \
2008_11_27_01_mangos_playercreateinfo_item.sql \
README

View file

@ -55,7 +55,7 @@ AccountOpResult AccountMgr::CreateAccount(std::string username, std::string pass
return AOR_NAME_ALREDY_EXIST; // username does already exist
}
if(!loginDatabase.PExecute("INSERT INTO account(username,sha_pass_hash,joindate) VALUES('%s',SHA1(CONCAT('%s',':','%s')),NOW())", username.c_str(), username.c_str(), password.c_str()))
if(!loginDatabase.PExecute("INSERT INTO account(username,sha_pass_hash,joindate) VALUES('%s',SHA1("_CONCAT3_("'%s'","':'","'%s'")"),NOW())", username.c_str(), username.c_str(), password.c_str()))
return AOR_DB_INTERNAL_ERROR; // unexpected error
loginDatabase.Execute("INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM realmlist,account LEFT JOIN realmcharacters ON acctid=account.id WHERE acctid IS NULL");
@ -127,7 +127,7 @@ AccountOpResult AccountMgr::ChangeUsername(uint32 accid, std::string new_uname,
loginDatabase.escape_string(new_uname);
loginDatabase.escape_string(new_passwd);
if(!loginDatabase.PExecute("UPDATE account SET username='%s',sha_pass_hash=SHA1(CONCAT('%s',':','%s')) WHERE id='%d'", new_uname.c_str(), new_uname.c_str(), new_passwd.c_str(), accid))
if(!loginDatabase.PExecute("UPDATE account SET username='%s',sha_pass_hash=SHA1("_CONCAT3_("'%s'","':'","'%s'")") WHERE id='%d'", new_uname.c_str(), new_uname.c_str(), new_passwd.c_str(), accid))
return AOR_DB_INTERNAL_ERROR; // unexpected error
return AOR_OK;
@ -146,7 +146,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accid, std::string new_passwd)
normilizeString(new_passwd);
loginDatabase.escape_string(new_passwd);
if(!loginDatabase.PExecute("UPDATE account SET sha_pass_hash=SHA1(CONCAT(username,':','%s')) WHERE id='%d'", new_passwd.c_str(), accid))
if(!loginDatabase.PExecute("UPDATE account SET sha_pass_hash=SHA1("_CONCAT3_("username","':'","'%s'")") WHERE id='%d'", new_passwd.c_str(), accid))
return AOR_DB_INTERNAL_ERROR; // unexpected error
return AOR_OK;
@ -197,7 +197,7 @@ bool AccountMgr::CheckPassword(uint32 accid, std::string passwd)
normilizeString(passwd);
loginDatabase.escape_string(passwd);
QueryResult *result = loginDatabase.PQuery("SELECT 1 FROM account WHERE id='%d' AND sha_pass_hash=SHA1(CONCAT(username,':','%s'))", accid, passwd.c_str());
QueryResult *result = loginDatabase.PQuery("SELECT 1 FROM account WHERE id='%d' AND sha_pass_hash=SHA1("_CONCAT3_("username","':'","'%s'")")", accid, passwd.c_str());
if (result)
{
delete result;

View file

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

View file

@ -101,6 +101,9 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
// not let attack friendly units.
if(GetPlayer()->IsFriendlyTo(TargetUnit))
return;
// Not let attack through obstructions
if(!pet->IsWithinLOSInMap(TargetUnit))
return;
if(pet->getVictim())
pet->AttackStop();

View file

@ -566,7 +566,9 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
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);
SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP );
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE );
@ -624,8 +626,10 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
SetPower(POWER_MANA,GetMaxPower(POWER_MANA));
}
// original spells
learnDefaultSpells(true);
// original action bar
std::list<uint16>::const_iterator action_itr[4];
for(int i=0; i<4; i++)
action_itr[i] = info->action[i].begin();
@ -642,36 +646,58 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
++action_itr[i];
}
// original items
CharStartOutfitEntry const* oEntry = NULL;
for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i)
{
if(CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i))
{
if(entry->RaceClassGender == RaceClassGender)
{
oEntry = entry;
break;
}
}
}
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++)
{
uint32 titem_id = item_id_itr->item_id;
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);
AutoUnequipOffhandIfNeed();
continue; // equipped, to next
}
// 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);
}
StoreNewItemInBestSlot(item_id_itr->item_id, item_id_itr->item_amount);
// 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)
@ -711,6 +737,35 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
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)
{
uint32 BreathRegen = (uint32)-1;

View file

@ -1094,6 +1094,7 @@ class MANGOS_DLL_SPEC Player : public Unit
Item* EquipNewItem( uint16 pos, uint32 item, uint32 count, bool update );
Item* EquipItem( uint16 pos, Item *pItem, bool update );
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 _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

@ -614,7 +614,7 @@ void Spell::EffectDummy(uint32 i)
switch(m_spellInfo->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
// Gnomish Poultryizer trinket
{
switch(m_spellInfo->Id )
{
case 8063: // Deviate Fish
@ -998,6 +998,50 @@ void Spell::EffectDummy(uint32 i)
if(unitTarget)
m_caster->CastSpell(unitTarget,37675,true);
return;
case 40802: // Mingo's Fortune Generator (Mingo's Fortune Giblets)
{
// selecting one from Bloodstained Fortune item
uint32 newitemid;
switch(urand(1,20))
{
case 1: newitemid = 32688; break;
case 2: newitemid = 32689; break;
case 3: newitemid = 32690; break;
case 4: newitemid = 32691; break;
case 5: newitemid = 32692; break;
case 6: newitemid = 32693; break;
case 7: newitemid = 32700; break;
case 8: newitemid = 32701; break;
case 9: newitemid = 32702; break;
case 10: newitemid = 32703; break;
case 11: newitemid = 32704; break;
case 12: newitemid = 32705; break;
case 13: newitemid = 32706; break;
case 14: newitemid = 32707; break;
case 15: newitemid = 32708; break;
case 16: newitemid = 32709; break;
case 17: newitemid = 32710; break;
case 18: newitemid = 32711; break;
case 19: newitemid = 32712; break;
case 20: newitemid = 32713; break;
default:
return;
}
DoCreateItem(i,newitemid);
return;
}
// Demon Broiled Surprise
/* FIX ME: Required for correct work implementing implicit target 7 (in pair (22,7))
case 43723:
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
((Player*)m_caster)->CastSpell(unitTarget, 43753, true);
return;
}
*/
case 44875: // Complete Raptor Capture
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
@ -1145,6 +1189,7 @@ void Spell::EffectDummy(uint32 i)
}
}
break;
}
case SPELLFAMILY_MAGE:
switch(m_spellInfo->Id )
{

View file

@ -39,6 +39,7 @@ DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
DBCStorage <BarberShopStyleEntry> sBarberShopStyleStore(BarberShopStyleEntryfmt);
DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore(CharStartOutfitEntryfmt);
DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
@ -216,6 +217,8 @@ void LoadDBCStores(std::string dataPath)
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,sBarberShopStyleStore, dbcPath,"BarberShopStyle.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,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");

View file

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

View file

@ -526,6 +526,21 @@ struct BattlemasterListEntry
// 33 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
{
uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId()

View file

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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6851"
#define REVISION_NR "6854"
#endif // __REVISION_NR_H__