Core/Datastores: updated DBC structure names to generated member format
This commit is contained in:
1 parent
06ffa70afc
commit
fcb79fee07
105 files changed
+2301
-2328
No files matched your search
@@ -367,17 +367,17 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
// prevent character creating Expansion race without Expansion account
|
||||
if (raceEntry->expansion > Expansion())
|
||||
if (raceEntry->Race_related > Expansion())
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, createInfo->Race);
|
||||
TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->Race_related, createInfo->Race);
|
||||
SendCharCreate(CHAR_CREATE_EXPANSION);
|
||||
return;
|
||||
}
|
||||
|
||||
// prevent character creating Expansion class without Expansion account
|
||||
if (classEntry->expansion > Expansion())
|
||||
if (classEntry->Required_expansion > Expansion())
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, createInfo->Class);
|
||||
TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->Required_expansion, createInfo->Class);
|
||||
SendCharCreate(CHAR_CREATE_EXPANSION_CLASS);
|
||||
return;
|
||||
}
|
||||
@@ -942,10 +942,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
|
||||
if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
|
||||
{
|
||||
if (cEntry->CinematicSequence)
|
||||
pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
|
||||
if (cEntry->CinematicSequenceID)
|
||||
pCurrChar->SendCinematicStart(cEntry->CinematicSequenceID);
|
||||
else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
|
||||
pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
|
||||
pCurrChar->SendCinematicStart(rEntry->CinematicSequenceID);
|
||||
|
||||
// send new char string if not empty
|
||||
if (!sWorld->GetNewCharString().empty())
|
||||
@@ -1441,25 +1441,25 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
|
||||
|
||||
BarberShopStyleEntry const* bs_hair = sBarberShopStyleStore.LookupEntry(Hair);
|
||||
|
||||
if (!bs_hair || bs_hair->type != 0 || bs_hair->race != _player->getRace() || bs_hair->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))
|
||||
if (!bs_hair || bs_hair->Type != 0 || bs_hair->Race != _player->getRace() || bs_hair->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))
|
||||
return;
|
||||
|
||||
BarberShopStyleEntry const* bs_facialHair = sBarberShopStyleStore.LookupEntry(FacialHair);
|
||||
|
||||
if (!bs_facialHair || bs_facialHair->type != 2 || bs_facialHair->race != _player->getRace() || bs_facialHair->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))
|
||||
if (!bs_facialHair || bs_facialHair->Type != 2 || bs_facialHair->Race != _player->getRace() || bs_facialHair->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER))
|
||||
return;
|
||||
|
||||
BarberShopStyleEntry const* bs_skinColor = sBarberShopStyleStore.LookupEntry(SkinColor);
|
||||
|
||||
if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)))
|
||||
if (bs_skinColor && (bs_skinColor->Type != 3 || bs_skinColor->Race != _player->getRace() || bs_skinColor->Sex != _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER)))
|
||||
return;
|
||||
|
||||
if (!Player::ValidateAppearance(_player->getRace(), _player->getClass(), _player->GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_GENDER),
|
||||
bs_hair->hair_id,
|
||||
bs_hair->Data,
|
||||
Color,
|
||||
_player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_FACE_ID),
|
||||
bs_facialHair->hair_id,
|
||||
bs_skinColor ? bs_skinColor->hair_id : _player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID)))
|
||||
bs_facialHair->Data,
|
||||
bs_skinColor ? bs_skinColor->Data : _player->GetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID)))
|
||||
|
||||
return;
|
||||
|
||||
@@ -1476,7 +1476,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 cost = _player->GetBarberShopCost(bs_hair->hair_id, Color, bs_facialHair->hair_id, bs_skinColor);
|
||||
uint32 cost = _player->GetBarberShopCost(bs_hair->Data, Color, bs_facialHair->Data, bs_skinColor);
|
||||
|
||||
// 0 - ok
|
||||
// 1, 3 - not enough money
|
||||
@@ -1492,11 +1492,11 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
|
||||
_player->ModifyMoney(-int64(cost)); // it isn't free
|
||||
_player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER, cost);
|
||||
|
||||
_player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID, uint8(bs_hair->hair_id));
|
||||
_player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_STYLE_ID, uint8(bs_hair->Data));
|
||||
_player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_HAIR_COLOR_ID, uint8(Color));
|
||||
_player->SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE, uint8(bs_facialHair->hair_id));
|
||||
_player->SetByteValue(PLAYER_BYTES_2, PLAYER_BYTES_2_OFFSET_FACIAL_STYLE, uint8(bs_facialHair->Data));
|
||||
if (bs_skinColor)
|
||||
_player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID, uint8(bs_skinColor->hair_id));
|
||||
_player->SetByteValue(PLAYER_BYTES, PLAYER_BYTES_OFFSET_SKIN_ID, uint8(bs_skinColor->Data));
|
||||
|
||||
_player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP, 1);
|
||||
|
||||
@@ -1518,7 +1518,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
|
||||
{
|
||||
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph))
|
||||
{
|
||||
_player->RemoveAurasDueToSpell(gp->SpellId);
|
||||
_player->RemoveAurasDueToSpell(gp->SpellID);
|
||||
_player->SetGlyph(slot, 0);
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
@@ -2259,28 +2259,28 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
// new team
|
||||
if (newTeam == ALLIANCE)
|
||||
{
|
||||
uint32 bitIndex = htitleInfo->bit_index;
|
||||
uint32 bitIndex = htitleInfo->Mask_ID;
|
||||
uint32 index = bitIndex / 32;
|
||||
uint32 old_flag = 1 << (bitIndex % 32);
|
||||
uint32 new_flag = 1 << (atitleInfo->bit_index % 32);
|
||||
uint32 new_flag = 1 << (atitleInfo->Mask_ID % 32);
|
||||
if (knownTitles[index] & old_flag)
|
||||
{
|
||||
knownTitles[index] &= ~old_flag;
|
||||
// use index of the new title
|
||||
knownTitles[atitleInfo->bit_index / 32] |= new_flag;
|
||||
knownTitles[atitleInfo->Mask_ID / 32] |= new_flag;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 bitIndex = atitleInfo->bit_index;
|
||||
uint32 bitIndex = atitleInfo->Mask_ID;
|
||||
uint32 index = bitIndex / 32;
|
||||
uint32 old_flag = 1 << (bitIndex % 32);
|
||||
uint32 new_flag = 1 << (htitleInfo->bit_index % 32);
|
||||
uint32 new_flag = 1 << (htitleInfo->Mask_ID % 32);
|
||||
if (knownTitles[index] & old_flag)
|
||||
{
|
||||
knownTitles[index] &= ~old_flag;
|
||||
// use index of the new title
|
||||
knownTitles[htitleInfo->bit_index / 32] |= new_flag;
|
||||
knownTitles[htitleInfo->Mask_ID / 32] |= new_flag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2465,9 +2465,9 @@ void WorldSession::HandleOpeningCinematic(WorldPacket& /*recvData*/)
|
||||
|
||||
if (ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(_player->getClass()))
|
||||
{
|
||||
if (classEntry->CinematicSequence)
|
||||
_player->SendCinematicStart(classEntry->CinematicSequence);
|
||||
if (classEntry->CinematicSequenceID)
|
||||
_player->SendCinematicStart(classEntry->CinematicSequenceID);
|
||||
else if (ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(_player->getRace()))
|
||||
_player->SendCinematicStart(raceEntry->CinematicSequence);
|
||||
_player->SendCinematicStart(raceEntry->CinematicSequenceID);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user