From 64f4a301e19bf3b5c34734d5ead26128b788f340 Mon Sep 17 00:00:00 2001 From: Intel Date: Thu, 6 Nov 2014 01:53:04 +0200 Subject: Core/DataStores: Updated ArmorLocation.dbc, AuctionHouse.dbc, BankBagSlotPrices.dbc, BannedAddOns.dbc, BarberShopStyle.dbc structs --- src/server/game/Handlers/CharacterHandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/server/game/Handlers/CharacterHandler.cpp') diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 3a083bb0a03..40f7eb98029 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1325,17 +1325,17 @@ 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->getGender()) + if (!bs_hair || bs_hair->Type != 0 || bs_hair->Race != _player->getRace() || bs_hair->Sex != _player->getGender()) return; BarberShopStyleEntry const* bs_facialHair = sBarberShopStyleStore.LookupEntry(FacialHair); - if (!bs_facialHair || bs_facialHair->type != 2 || bs_facialHair->race != _player->getRace() || bs_facialHair->gender != _player->getGender()) + if (!bs_facialHair || bs_facialHair->Type != 2 || bs_facialHair->Race != _player->getRace() || bs_facialHair->Sex != _player->getGender()) return; BarberShopStyleEntry const* bs_skinColor = sBarberShopStyleStore.LookupEntry(SkinColor); - if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->getGender())) + if (bs_skinColor && (bs_skinColor->Type != 3 || bs_skinColor->Race != _player->getRace() || bs_skinColor->Sex != _player->getGender())) return; GameObject* go = _player->FindNearestGameObjectOfType(GAMEOBJECT_TYPE_BARBER_CHAIR, 5.0f); @@ -1351,7 +1351,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 @@ -1367,11 +1367,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, 2, uint8(bs_hair->hair_id)); + _player->SetByteValue(PLAYER_BYTES, 2, uint8(bs_hair->Data)); _player->SetByteValue(PLAYER_BYTES, 3, uint8(Color)); - _player->SetByteValue(PLAYER_BYTES_2, 0, uint8(bs_facialHair->hair_id)); + _player->SetByteValue(PLAYER_BYTES_2, 0, uint8(bs_facialHair->Data)); if (bs_skinColor) - _player->SetByteValue(PLAYER_BYTES, 0, uint8(bs_skinColor->hair_id)); + _player->SetByteValue(PLAYER_BYTES, 0, uint8(bs_skinColor->Data)); _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP, 1); -- cgit v1.2.3 From e289335e0afb383e30a82a8585fe8430810f35da Mon Sep 17 00:00:00 2001 From: Intel Date: Fri, 7 Nov 2014 14:32:47 +0200 Subject: Core/DataStores: Updated BattlemasterList.dbc, CharStartOutfit.dbc, CharTitle.dbc structs --- src/server/game/Achievements/AchievementMgr.cpp | 2 +- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 10 ++-- src/server/game/Battlegrounds/BattlegroundMgr.h | 2 +- src/server/game/DataStores/DBCStores.cpp | 2 +- src/server/game/DataStores/DBCStructure.h | 61 ++++++++++++----------- src/server/game/DataStores/DBCfmt.h | 2 +- src/server/game/Entities/Player/Player.cpp | 18 +++---- src/server/game/Entities/Player/Player.h | 2 +- src/server/game/Events/GameEventMgr.cpp | 4 +- src/server/game/Globals/ObjectMgr.cpp | 8 +-- src/server/game/Groups/Group.cpp | 2 +- src/server/game/Handlers/CharacterHandler.cpp | 20 ++++---- src/server/scripts/Commands/cs_character.cpp | 8 +-- src/server/scripts/Commands/cs_lookup.cpp | 8 +-- src/server/scripts/Commands/cs_titles.cpp | 10 ++-- 15 files changed, 81 insertions(+), 78 deletions(-) (limited to 'src/server/game/Handlers/CharacterHandler.cpp') diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index a749396ad79..47424798ec0 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -370,7 +370,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE: { if (CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(known_title.title_id)) - return source && source->HasTitle(titleInfo->bit_index); + return source && source->HasTitle(titleInfo->MaskID); return false; } diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index eae6a831290..663530cd8ff 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -742,8 +742,8 @@ bool BattlegroundMgr::CreateBattleground(BattlegroundTemplate const* bgTemplate) AddBattleground(bg); } - bg->SetMapId(bgTemplate->BattlemasterEntry->mapid[0]); - bg->SetName(bgTemplate->BattlemasterEntry->name); + bg->SetMapId(bgTemplate->BattlemasterEntry->MapID[0]); + bg->SetName(bgTemplate->BattlemasterEntry->Name_lang); bg->SetInstanceID(0); bg->SetArenaorBGType(bgTemplate->IsArena()); bg->SetMinPlayersPerTeam(bgTemplate->MinPlayersPerTeam); @@ -852,8 +852,8 @@ void BattlegroundMgr::LoadBattlegroundTemplates() _battlegroundTemplates[bgTypeId] = bgTemplate; - if (bgTemplate.BattlemasterEntry->mapid[1] == -1) // in this case we have only one mapId - _battlegroundMapTemplates[bgTemplate.BattlemasterEntry->mapid[0]] = &_battlegroundTemplates[bgTypeId]; + if (bgTemplate.BattlemasterEntry->MapID[1] == -1) // in this case we have only one mapId + _battlegroundMapTemplates[bgTemplate.BattlemasterEntry->MapID[0]] = &_battlegroundTemplates[bgTypeId]; ++count; } @@ -1211,7 +1211,7 @@ BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId) uint32 weight = 0; BattlegroundSelectionWeightMap selectionWeights; - for (int32 mapId : bgTemplate->BattlemasterEntry->mapid) + for (int32 mapId : bgTemplate->BattlemasterEntry->MapID) { if (mapId == -1) break; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index 23689c03fba..0be6092eb4b 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -51,7 +51,7 @@ struct BattlegroundTemplate uint32 ScriptId; BattlemasterListEntry const* BattlemasterEntry; - bool IsArena() const { return BattlemasterEntry->type == MAP_ARENA; } + bool IsArena() const { return BattlemasterEntry->InstanceType == MAP_ARENA; } }; class BattlegroundMgr diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 6bf5b49b297..af24e182869 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -356,7 +356,7 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");//15595 for (uint32 i = 0; i < sCharStartOutfitStore.GetNumRows(); ++i) if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i)) - sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit; + sCharStartOutfitMap[outfit->RaceID | (outfit->ClassID << 8) | (outfit->GenderID << 16)] = outfit; LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");//15595 LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");//15595 diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index df25d288ad8..18096038b79 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -653,45 +653,48 @@ struct BarberShopStyleEntry struct BattlemasterListEntry { - uint32 id; // 0 - int32 mapid[8]; // 1-8 mapid - uint32 type; // 9 map type (3 - BG, 4 - arena) - //uint32 canJoinAsGroup; // 10 (0 or 1) - char* name; // 11 - uint32 maxGroupSize; // 12 maxGroupSize, used for checking if queue as group - uint32 HolidayWorldStateId; // 13 new 3.1 - uint32 minLevel; // 14, min level (sync with PvPDifficulty.dbc content) - uint32 maxLevel; // 15, max level (sync with PvPDifficulty.dbc content) - //uint32 maxGroupSizeRated; // 16 4.0.1 - //uint32 unk; // 17 - 4.0.6.13596 - //uint32 maxPlayers; // 18 4.0.1 - //uint32 unk1; // 19 4.0.3, value 2 for Rated Battlegrounds + uint32 ID; // 0 + uint32 MapID[16]; // 1-16 mapid + uint32 InstanceType; // 17 map type (3 - BG, 4 - arena) + //uint32 GroupsAllowed; // 18 (0 or 1) + char* Name_lang; // 19 + uint32 MaxGroupSize; // 20 maxGroupSize, used for checking if queue as group + uint32 HolidayWorldState; // 21 new 3.1 + uint32 MinLevel; // 22, min level (sync with PvPDifficulty.dbc content) + uint32 MaxLevel; // 23, max level (sync with PvPDifficulty.dbc content) + //uint32 RatedPlayers; // 24 4.0.1 + //uint32 MinPlayers; // 25 - 4.0.6.13596 + //uint32 MaxPlayers; // 26 4.0.1 + //uint32 Flags; // 27 4.0.3, value 2 for Rated Battlegrounds + //uint32 IconFileDataID; // 28 + //char* GameType_lang; // 29 + //uint32 Unk1; // 30 }; #define MAX_OUTFIT_ITEMS 24 struct CharStartOutfitEntry { - //uint32 Id; // 0 - uint8 Race; // 1 - uint8 Class; // 2 - uint8 Gender; // 3 - //uint8 Unused; // 4 - int32 ItemId[MAX_OUTFIT_ITEMS]; // 5-28 - //int32 ItemDisplayId[MAX_OUTFIT_ITEMS]; // 29-52 not required at server side - //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side - uint32 PetDisplayId; // 77 Pet Model ID for starting pet - uint32 PetFamilyEntry; // 78 Pet Family Entry for starting pet + //uint32 ID; // 0 + uint8 RaceID; // 1 + uint8 ClassID; // 2 + uint8 GenderID; // 3 + //uint8 OutfitID; // 4 + int32 ItemID[MAX_OUTFIT_ITEMS]; // 5-28 + //int32 ItemDisplayID[MAX_OUTFIT_ITEMS]; // 29-52 not required at server side + //int32 InventoryType[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side + uint32 PetDisplayID; // 77 Pet Model ID for starting pet + uint32 PetFamilyID; // 78 Pet Family Entry for starting pet }; struct CharTitlesEntry { - uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId() - //uint32 unk1; // 1 flags? - char* nameMale; // 2 m_name_lang - char* nameFemale; // 3 m_name1_lang - uint32 bit_index; // 4 m_mask_ID used in PLAYER_CHOSEN_TITLE and 1<ItemId[j] <= 0) + if (oEntry->ItemID[j] <= 0) continue; - uint32 itemId = oEntry->ItemId[j]; + uint32 itemId = oEntry->ItemID[j]; // just skip, reported in ObjectMgr::LoadItemTemplates ItemTemplate const* iProto = sObjectMgr->GetItemTemplate(itemId); @@ -9705,12 +9705,12 @@ void Player::SendBGWeekendWorldStates() for (uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i) { BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(i); - if (bl && bl->HolidayWorldStateId) + if (bl && bl->HolidayWorldState) { - if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->id)) - SendUpdateWorldState(bl->HolidayWorldStateId, 1); + if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->ID)) + SendUpdateWorldState(bl->HolidayWorldState, 1); else - SendUpdateWorldState(bl->HolidayWorldStateId, 0); + SendUpdateWorldState(bl->HolidayWorldState, 0); } } } @@ -24957,8 +24957,8 @@ bool Player::HasTitle(uint32 bitIndex) const void Player::SetTitle(CharTitlesEntry const* title, bool lost) { - uint32 fieldIndexOffset = title->bit_index / 32; - uint32 flag = 1 << (title->bit_index % 32); + uint32 fieldIndexOffset = title->MaskID / 32; + uint32 flag = 1 << (title->MaskID % 32); if (lost) { @@ -24976,7 +24976,7 @@ void Player::SetTitle(CharTitlesEntry const* title, bool lost) } WorldPacket data(SMSG_TITLE_EARNED, 4 + 4); - data << uint32(title->bit_index); + data << uint32(title->MaskID); data << uint32(lost ? 0 : 1); // 1 - earned, 0 - lost GetSession()->SendPacket(&data); } diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 8509ec2bcf1..fe8ef48d267 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2539,7 +2539,7 @@ class Player : public Unit, public GridObject void CompletedAchievement(AchievementEntry const* entry); bool HasTitle(uint32 bitIndex) const; - bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); } + bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->MaskID); } void SetTitle(CharTitlesEntry const* title, bool lost = false); //bool isActiveObject() const { return true; } diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 780360dc945..f8bc5e01c7b 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1484,10 +1484,10 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate) if (bgTypeId != BATTLEGROUND_TYPE_NONE) { BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId); - if (bl && bl->HolidayWorldStateId) + if (bl && bl->HolidayWorldState) { WorldPacket data; - sBattlegroundMgr->BuildUpdateWorldStatePacket(&data, bl->HolidayWorldStateId, Activate ? 1 : 0); + sBattlegroundMgr->BuildUpdateWorldStatePacket(&data, bl->HolidayWorldState, Activate ? 1 : 0); sWorld->SendGlobalMessage(&data); } } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a582f2b2afa..8ec41b82d7f 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2792,10 +2792,10 @@ void ObjectMgr::LoadItemTemplates() for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j) { - if (entry->ItemId[j] <= 0) + if (entry->ItemID[j] <= 0) continue; - uint32 item_id = entry->ItemId[j]; + uint32 item_id = entry->ItemID[j]; if (!GetItemTemplate(item_id)) notFoundOutfit.insert(item_id); @@ -3098,10 +3098,10 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 bool found = false; for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x) { - if (entry->ItemId[x] > 0 && uint32(entry->ItemId[x]) == itemId) + if (entry->ItemID[x] > 0 && uint32(entry->ItemID[x]) == itemId) { found = true; - const_cast(entry)->ItemId[x] = 0; + const_cast(entry)->ItemID[x] = 0; break; } } diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index a434df716f0..8795bd812de 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1851,7 +1851,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* // check for min / max count uint32 memberscount = GetMembersCount(); - if (memberscount > bgEntry->maxGroupSize) // no MinPlayerCount for battlegrounds + if (memberscount > bgEntry->MaxGroupSize) // no MinPlayerCount for battlegrounds return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side // get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 40f7eb98029..afbc283676d 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -2113,28 +2113,28 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) // new team if (team == TEAM_ALLIANCE) { - uint32 bitIndex = htitleInfo->bit_index; - uint32 index = bitIndex / 32; - uint32 old_flag = 1 << (bitIndex % 32); - uint32 new_flag = 1 << (atitleInfo->bit_index % 32); + uint32 maskID = htitleInfo->MaskID; + uint32 index = maskID / 32; + uint32 old_flag = 1 << (maskID % 32); + uint32 new_flag = 1 << (atitleInfo->MaskID % 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->MaskID / 32] |= new_flag; } } else { - uint32 bitIndex = atitleInfo->bit_index; - uint32 index = bitIndex / 32; - uint32 old_flag = 1 << (bitIndex % 32); - uint32 new_flag = 1 << (htitleInfo->bit_index % 32); + uint32 maskID = atitleInfo->MaskID; + uint32 index = maskID / 32; + uint32 old_flag = 1 << (maskID % 32); + uint32 new_flag = 1 << (htitleInfo->MaskID % 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->MaskID / 32] |= new_flag; } } diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 0b351e310f4..058f7435713 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -277,11 +277,11 @@ public: if (titleInfo && target->HasTitle(titleInfo)) { - std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale; + std::string name = target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang; if (name.empty()) continue; - char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index + char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID ? handler->GetTrinityString(LANG_ACTIVE) : ""; @@ -290,9 +290,9 @@ public: // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) - handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, localeNames[loc], knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->MaskID, id, titleNameStr, localeNames[loc], knownStr, activeStr); else - handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, name.c_str(), localeNames[loc], knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->MaskID, name.c_str(), localeNames[loc], knownStr, activeStr); } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index b4b0c2502ad..1833761ea17 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1072,7 +1072,7 @@ public: CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id); if (titleInfo) { - std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale; + std::string name = target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang; if (name.empty()) continue; @@ -1088,7 +1088,7 @@ public: char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : ""; - char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index + char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID ? handler->GetTrinityString(LANG_ACTIVE) : ""; @@ -1097,9 +1097,9 @@ public: // send title in "id (idx:idx) - [namedlink locale]" format if (handler->GetSession()) - handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleNameStr, "", knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->MaskID, id, titleNameStr, "", knownStr, activeStr); else - handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, titleNameStr, "", knownStr, activeStr); + handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->MaskID, titleNameStr, "", knownStr, activeStr); ++counter; } diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 0826e0ca476..60d376d867a 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -94,9 +94,9 @@ public: std::string tNameLink = handler->GetNameLink(target); target->SetTitle(titleInfo); // to be sure that title now known - target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index); + target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->MaskID); - handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, tNameLink.c_str()); + handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, tNameLink.c_str()); return true; } @@ -138,7 +138,7 @@ public: std::string tNameLink = handler->GetNameLink(target); char titleNameStr[80]; - snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str()); + snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, target->GetName().c_str()); target->SetTitle(titleInfo); handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str()); @@ -186,7 +186,7 @@ public: std::string tNameLink = handler->GetNameLink(target); char titleNameStr[80]; - snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str()); + snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->NameMale_lang : titleInfo->NameFemale_lang, target->GetName().c_str()); handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str()); @@ -225,7 +225,7 @@ public: for (uint32 i = 1; i < sCharTitlesStore.GetNumRows(); ++i) if (CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i)) - titles2 &= ~(uint64(1) << tEntry->bit_index); + titles2 &= ~(uint64(1) << tEntry->MaskID); titles &= ~titles2; // remove not existed titles -- cgit v1.2.3 From 7c72f27b7c83b10636e57e30ca036f5b6bc5820e Mon Sep 17 00:00:00 2001 From: Intel Date: Fri, 7 Nov 2014 17:39:16 +0200 Subject: Core/DataStores: Updated ChatChannels.dbc, ChrClasses.dbc, ChrRaces.dbc structs --- src/server/game/Chat/Channels/Channel.cpp | 6 +- src/server/game/DataStores/DBCStores.cpp | 4 +- src/server/game/DataStores/DBCStructure.h | 98 ++++++++++++++++----------- src/server/game/DataStores/DBCfmt.h | 4 +- src/server/game/Entities/Player/Player.cpp | 28 ++++---- src/server/game/Entities/Unit/StatSystem.cpp | 8 +-- src/server/game/Globals/ObjectMgr.cpp | 4 +- src/server/game/Globals/ObjectMgr.h | 16 +++++ src/server/game/Guilds/GuildFinderMgr.cpp | 5 +- src/server/game/Handlers/CharacterHandler.cpp | 22 +++--- src/server/scripts/Commands/cs_learn.cpp | 2 +- src/server/scripts/Commands/cs_reset.cpp | 2 +- 12 files changed, 118 insertions(+), 81 deletions(-) (limited to 'src/server/game/Handlers/CharacterHandler.cpp') diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 8b4274022c2..73c067ddf99 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -44,13 +44,13 @@ Channel::Channel(std::string const& name, uint32 channelId, uint32 team): _flags |= CHANNEL_FLAG_GENERAL; // for all built-in channels - if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel + if (ch->Flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel _flags |= CHANNEL_FLAG_TRADE; - if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels + if (ch->Flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels _flags |= CHANNEL_FLAG_CITY; - if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel + if (ch->Flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel _flags |= CHANNEL_FLAG_LFG; else // for all other channels _flags |= CHANNEL_FLAG_NOT_LFG; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index af24e182869..653b94ffa2f 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -914,13 +914,13 @@ AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_ char const* GetRaceName(uint8 race, uint8 /*locale*/) { ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race); - return raceEntry ? raceEntry->name : NULL; + return raceEntry ? raceEntry->Name_lang : NULL; } char const* GetClassName(uint8 class_, uint8 /*locale*/) { ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_); - return classEntry ? classEntry->name : NULL; + return classEntry ? classEntry->Name_lang : NULL; } uint32 GetAreaFlagByMapId(uint32 mapid) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 18096038b79..a099680b692 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -699,53 +699,73 @@ struct CharTitlesEntry struct ChatChannelsEntry { - uint32 ChannelID; // 0 - uint32 flags; // 1 - //uint32 // 2 m_factionGroup - char* pattern; // 3 m_name_lang - //char* name; // 4 m_shortcut_lang + uint32 ID; // 0 + uint32 Flags; // 1 + //uint32 FactionGroup // 2 + char* Name_lang; // 3 + //char* Shortcut_lang; // 4 }; struct ChrClassesEntry { - uint32 ClassID; // 0 - uint32 powerType; // 1 m_DisplayPower - // 2 m_petNameToken - char* name; // 3 m_name_lang - //char* nameFemale; // 4 m_name_female_lang - //char* nameNeutralGender; // 5 m_name_male_lang - //char* capitalizedName // 6, m_filename - uint32 spellfamily; // 7 m_spellClassSet - //uint32 flags2; // 8 m_flags (0x08 HasRelicSlot) - uint32 CinematicSequence; // 9 m_cinematicSequenceID - uint32 expansion; // 10 m_required_expansion - uint32 APPerStrenth; // 11 Attack Power bonus per point of strength - uint32 APPerAgility; // 12 Attack Power bonus per point of agility - uint32 RAPPerAgility; // 13 Ranged Attack Power bonus per point of agility + uint32 ID; // 0 + uint32 PowerType; // 1 + //char* PetNameToken // 2 + char* Name_lang; // 3 + //char* NameFemale_lang; // 4 + //char* NameMale_lang; // 5 + //char* Filename; // 6 + uint32 SpellClassSet; // 7 + //uint32 Flags; // 8 + uint32 CinematicSequenceID; // 9 + uint32 AttackPowerPerStrength; // 10 Attack Power bonus per point of strength + uint32 AttackPowerPerAgility; // 11 Attack Power bonus per point of agility + uint32 RangedAttackPowerPerAgility; // 12 Ranged Attack Power bonus per point of agility + //uint32 DefaultSpec; // 13 + //uint32 CreateScreenFileDataID; // 14 + //uint32 SelectScreenFileDataID; // 15 + //uint32 LowResScreenFileDataID; // 16 + //uint32 IconFileDataID; // 17 + //uint32 Unk1; // 18 }; struct ChrRacesEntry { - uint32 RaceID; // 0 + uint32 ID; // 0 uint32 Flags; // 1 - uint32 FactionID; // 2 facton template id - // 3 unused - uint32 model_m; // 4 - uint32 model_f; // 5 - // 6 unused - uint32 TeamID; // 7 (7-Alliance 1-Horde) - // 8-11 unused - uint32 CinematicSequence; // 12 id from CinematicSequences.dbc - //uint32 unk_322; // 13 m_alliance (0 alliance, 1 horde, 2 not available?) - char* name; // 14 m_name_lang used for DBC language detection/selection - //char* nameFemale; // 15 m_name_female_lang - //char* nameNeutralGender; // 16 m_name_male_lang - // 17-18 m_facialHairCustomization[2] - // 19 m_hairCustomization - uint32 expansion; // 20 m_required_expansion - //uint32 // 21 (23 for worgens) - //uint32 // 22 4.0.0 - //uint32 // 23 4.0.0 + uint32 FactionID; // 2 faction template id + //uint32 ExplorationSoundID; // 3 + uint32 MaleDisplayID; // 4 + uint32 FemaleDisplayID; // 5 + //char* ClientPrefix; // 6 + //uint32 BaseLanguage; // 7 + //uint32 CreatureType; // 8 + //uint32 ResSicknessSpellID; // 9 + //uint32 SplashSoundID; // 10 + //char* ClientFileString; // 11 + uint32 CinematicSequenceID; // 12 + uint32 TeamID; // 13 m_alliance (0 alliance, 1 horde, 2 neutral) + char* Name_lang; // 14 + //char* NameFemale_lang; // 15 + //char* NameMale_lang; // 16 + //char* FacialHairCustomization[2]; // 17-18 + //char* HairCustomization; // 19 + //uint32 RaceRelated; // 20 + //uint32 UnalteredVisualRaceID; // 21 + //uint32 UAMaleCreatureSoundDataID; // 22 + //uint32 UAFemaleCreatureSoundDataID; // 23 + //uint32 CharComponentTextureLayoutID; // 24 + //uint32 DefaultClassID; // 25 + //uint32 CreateScreenFileDataID; // 26 + //uint32 SelectScreenFileDataID; // 27 + //float MaleCustomizeOffset[3]; // 28-30 + //float FemaleCustomizeOffset[3]; // 31-33 + //uint32 NeutralRaceID; // 34 + //uint32 LowResScreenFileDataID; // 35 + //uint32 HighResMaleDisplayID; // 36 + //uint32 HighResFemaleDisplayID; // 37 + //uint32 CharComponentTexLayoutHiResID; // 38 + //uint32 Unk; // 39 }; struct ChrPowerTypesEntry @@ -1535,7 +1555,7 @@ struct MapEntry bool IsContinent() const { - return ID == 0 || ID == 1 || ID == 530 || ID == 571 || ID == 1116; + return ID == 0 || ID == 1 || ID == 530 || ID == 571 || ID == 870 || ID == 1116; } bool IsDynamicDifficultyMap() const { return (Flags & MAP_FLAG_DYNAMIC_DIFFICULTY) != 0; } diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 92de682017c..0f12fd0f220 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -38,8 +38,8 @@ char const BattlemasterListEntryfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx"; char const CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxii"; char const CharTitlesEntryfmt[] = "nxssix"; char const ChatChannelsEntryfmt[] = "nixsx"; -char const ChrClassesEntryfmt[] = "nixsxxxixiiiii"; -char const ChrRacesEntryfmt[] = "niixiixixxxxixsxxxxxixxx"; +char const ChrClassesEntryfmt[] = "nixsxxxixiiiixxxxx"; +char const ChrRacesEntryfmt[] = "niixiixxxxxxiisxxxxxxxxxxxxxxxxxxxxxxxxx"; char const ChrClassesXPowerTypesfmt[] = "nii"; char const CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; char const CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxxx"; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 985d03bd539..1d322cf61eb 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -965,7 +965,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac SetMap(sMapMgr->CreateMap(info->mapId, this)); - uint8 powertype = cEntry->powerType; + uint8 powertype = cEntry->PowerType; SetObjectScale(1.0f); @@ -5329,13 +5329,13 @@ void Player::RepopAtGraveyard() bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, AreaTableEntry const* zone) { - if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE) + if (channel->Flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE) return false; - if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->flags & AREA_FLAG_SLAVE_CAPITAL))) + if ((channel->Flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->flags & AREA_FLAG_SLAVE_CAPITAL))) return false; - if ((channel->flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId()) + if ((channel->Flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId()) return false; return true; @@ -5400,22 +5400,22 @@ void Player::UpdateLocalChannels(uint32 newZone) if (CanJoinConstantChannelInZone(channel, current_zone)) { - if (!(channel->flags & CHANNEL_DBC_FLAG_GLOBAL)) + if (!(channel->Flags & CHANNEL_DBC_FLAG_GLOBAL)) { - if (channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) + if (channel->Flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) continue; // Already on the channel, as city channel names are not changing char new_channel_name_buf[100]; char const* currentNameExt; - if (channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) + if (channel->Flags & CHANNEL_DBC_FLAG_CITY_ONLY) currentNameExt = sObjectMgr->GetTrinityStringForDBCLocale(LANG_CHANNEL_CITY); else currentNameExt = current_zone_name.c_str(); - snprintf(new_channel_name_buf, 100, channel->pattern, currentNameExt); + snprintf(new_channel_name_buf, 100, channel->Name_lang, currentNameExt); - joinChannel = cMgr->GetJoinChannel(new_channel_name_buf, channel->ChannelID); + joinChannel = cMgr->GetJoinChannel(new_channel_name_buf, channel->ID); if (usedChannel) { if (joinChannel != usedChannel) @@ -5428,7 +5428,7 @@ void Player::UpdateLocalChannels(uint32 newZone) } } else - joinChannel = cMgr->GetJoinChannel(channel->pattern, channel->ChannelID); + joinChannel = cMgr->GetJoinChannel(channel->Name_lang, channel->ID); } else removeChannel = usedChannel; @@ -6617,8 +6617,8 @@ uint32 Player::TeamForRace(uint8 race) { switch (rEntry->TeamID) { + case 0: return ALLIANCE; case 1: return HORDE; - case 7: return ALLIANCE; } TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID); } @@ -21612,8 +21612,8 @@ void Player::InitDataForForm(bool reapplyMods) default: // 0, for example { ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(getClass()); - if (cEntry && cEntry->powerType < MAX_POWERS && uint32(getPowerType()) != cEntry->powerType) - setPowerType(Powers(cEntry->powerType)); + if (cEntry && cEntry->PowerType < MAX_POWERS && uint32(getPowerType()) != cEntry->PowerType) + setPowerType(Powers(cEntry->PowerType)); break; } } @@ -23378,7 +23378,7 @@ void Player::ResetSpells(bool myClassOnly) ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(getClass()); if (!clsEntry) return; - family = clsEntry->spellfamily; + family = clsEntry->SpellClassSet; for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter) { diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 541a7c711ec..729cd4f1a41 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -318,17 +318,17 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) if (ranged) { index = UNIT_FIELD_RANGED_ATTACK_POWER; - val2 = (level + std::max(GetStat(STAT_AGILITY) - 10.0f, 0.0f)) * entry->RAPPerAgility; + val2 = (level + std::max(GetStat(STAT_AGILITY) - 10.0f, 0.0f)) * entry->RangedAttackPowerPerAgility; } else { - float strengthValue = std::max((GetStat(STAT_STRENGTH) - 10.0f) * entry->APPerStrenth, 0.0f); - float agilityValue = std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerAgility, 0.0f); + float strengthValue = std::max((GetStat(STAT_STRENGTH) - 10.0f) * entry->AttackPowerPerStrength, 0.0f); + float agilityValue = std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->AttackPowerPerAgility, 0.0f); SpellShapeshiftFormEntry const* form = sSpellShapeshiftFormStore.LookupEntry(GetShapeshiftForm()); // Directly taken from client, SHAPESHIFT_FLAG_AP_FROM_STRENGTH ? if (form && form->flags1 & 0x20) - agilityValue += std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->APPerStrenth, 0.0f); + agilityValue += std::max((GetStat(STAT_AGILITY) - 10.0f) * entry->AttackPowerPerStrength, 0.0f); val2 = strengthValue + agilityValue; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 8ec41b82d7f..c46131270b4 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -3188,8 +3188,8 @@ void ObjectMgr::LoadPlayerInfo() info->positionY = positionY; info->positionZ = positionZ; info->orientation = orientation; - info->displayId_m = rEntry->model_m; - info->displayId_f = rEntry->model_f; + info->displayId_m = rEntry->MaleDisplayID; + info->displayId_f = rEntry->FemaleDisplayID; _playerInfo[current_race][current_class] = info; ++count; diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 045e8705f19..b56500a1a10 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1353,8 +1353,24 @@ class ObjectMgr void LoadRealmNames(); std::string GetRealmName(uint32 realm) const; + ExpansionRequirementContainer const& GetRaceExpansionRequirements() const { return _raceExpansionRequirementStore; } + uint8 const GetRaceExpansionRequirement(uint8 race) + { + auto itr = _raceExpansionRequirementStore.find(race); + if (itr != _raceExpansionRequirementStore.end()) + return itr->second; + return EXPANSION_CLASSIC; + } + ExpansionRequirementContainer const& GetClassExpansionRequirements() const { return _classExpansionRequirementStore; } + uint8 const GetClassExpansionRequirement(uint8 race) + { + auto itr = _classExpansionRequirementStore.find(race); + if (itr != _classExpansionRequirementStore.end()) + return itr->second; + return EXPANSION_CLASSIC; + } private: // first free id for selected id type diff --git a/src/server/game/Guilds/GuildFinderMgr.cpp b/src/server/game/Guilds/GuildFinderMgr.cpp index 81a16a5d2f1..67a00d3dff8 100644 --- a/src/server/game/Guilds/GuildFinderMgr.cpp +++ b/src/server/game/Guilds/GuildFinderMgr.cpp @@ -62,10 +62,9 @@ void GuildFinderMgr::LoadGuildSettings() bool listed = (fields[5].GetUInt8() != 0); std::string comment = fields[6].GetString(); - TeamId guildTeam = TEAM_ALLIANCE; + TeamId guildTeam = TEAM_NEUTRAL; if (ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(fields[7].GetUInt8())) - if (raceEntry->TeamID == 1) - guildTeam = TEAM_HORDE; + guildTeam = (TeamId)raceEntry->TeamID; LFGuildSettings settings(listed, guildTeam, guildId, classRoles, availability, interests, level, comment); _guildSettings[guildId] = settings; diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index afbc283676d..d868cd1bd13 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -356,17 +356,19 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CharacterCrea } // prevent character creating Expansion race without Expansion account - if (raceEntry->expansion > Expansion()) + uint8 raceExpansionRequirement = sObjectMgr->GetRaceExpansionRequirement(charCreate.CreateInfo->Race); + if (raceExpansionRequirement > Expansion()) { - TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, charCreate.CreateInfo->Race); + TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceExpansionRequirement, charCreate.CreateInfo->Race); SendCharCreate(CHAR_CREATE_EXPANSION); return; } // prevent character creating Expansion class without Expansion account - if (classEntry->expansion > Expansion()) + uint8 classExpansionRequirement = sObjectMgr->GetClassExpansionRequirement(charCreate.CreateInfo->Class); + if (classExpansionRequirement > Expansion()) { - TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, charCreate.CreateInfo->Class); + TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classExpansionRequirement, charCreate.CreateInfo->Class); SendCharCreate(CHAR_CREATE_EXPANSION_CLASS); return; } @@ -940,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()) @@ -2241,10 +2243,10 @@ 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); } } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 60523428e6f..886e866d66a 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -152,7 +152,7 @@ public: ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass()); if (!classEntry) return true; - uint32 family = classEntry->spellfamily; + uint32 family = classEntry->SpellClassSet; for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) { diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 46fe0c64330..9d2621c0010 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -93,7 +93,7 @@ public: return false; } - uint8 powerType = classEntry->powerType; + uint8 powerType = classEntry->PowerType; // reset m_form if no aura if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT)) -- cgit v1.2.3 From a7f56c2208a5ae63011721a8fd69b8b2a33ac653 Mon Sep 17 00:00:00 2001 From: Intel Date: Sat, 8 Nov 2014 20:21:17 +0200 Subject: Core/DataStores: Updated GameObjectDisplayInfo.dbc, GemProperties.dbc, GlyphProperties.dbc, GlyphSlot.dbc, GuildPerkSpells.dbc structs --- src/server/collision/Models/GameObjectModel.cpp | 2 +- src/server/game/Chat/Chat.cpp | 2 +- src/server/game/Chat/ChatLink.cpp | 4 +- src/server/game/DataStores/DBCStores.cpp | 12 +-- src/server/game/DataStores/DBCStructure.h | 97 +++++++++++----------- src/server/game/DataStores/DBCfmt.h | 6 +- src/server/game/Entities/GameObject/GameObject.cpp | 6 +- src/server/game/Entities/Item/Item.cpp | 2 +- src/server/game/Entities/Player/Player.cpp | 14 ++-- src/server/game/Guilds/Guild.cpp | 12 +-- src/server/game/Handlers/CalendarHandler.cpp | 2 +- src/server/game/Handlers/CharacterHandler.cpp | 2 +- src/server/game/Handlers/ItemHandler.cpp | 10 +-- src/server/game/Reputation/ReputationMgr.cpp | 2 +- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 +- src/server/game/Spells/Spell.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 8 +- 17 files changed, 93 insertions(+), 94 deletions(-) (limited to 'src/server/game/Handlers/CharacterHandler.cpp') diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index bb2837be4c4..0e8811d43d1 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -96,7 +96,7 @@ GameObjectModel::~GameObjectModel() bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info) { - ModelList::const_iterator it = model_list.find(info.Displayid); + ModelList::const_iterator it = model_list.find(info.ID); if (it == model_list.end()) return false; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index afe55563290..fce0fc99b4a 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -1033,7 +1033,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) if (!glyphPropEntry) return 0; - return glyphPropEntry->SpellId; + return glyphPropEntry->SpellID; } } diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 7e4f1d1a0ff..4077c875511 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -522,10 +522,10 @@ bool GlyphChatLink::Initialize(std::istringstream& iss) return false; } // Validate glyph's spell - _spell = sSpellMgr->GetSpellInfo(_glyph->SpellId); + _spell = sSpellMgr->GetSpellInfo(_glyph->SpellID); if (!_spell) { - TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId); + TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellID); return false; } return true; diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index cfe595b3140..1ce2252e310 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -411,12 +411,12 @@ void LoadDBCStores(const std::string& dataPath) { if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i)) { - if (info->maxX < info->minX) - std::swap(*(float*)(&info->maxX), *(float*)(&info->minX)); - if (info->maxY < info->minY) - std::swap(*(float*)(&info->maxY), *(float*)(&info->minY)); - if (info->maxZ < info->minZ) - std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ)); + if (info->GeoBoxMax.X < info->GeoBoxMin.X) + std::swap(*(float*)(&info->GeoBoxMax.X), *(float*)(&info->GeoBoxMin.X)); + if (info->GeoBoxMax.Y < info->GeoBoxMin.Y) + std::swap(*(float*)(&info->GeoBoxMax.Y), *(float*)(&info->GeoBoxMin.Y)); + if (info->GeoBoxMax.Z < info->GeoBoxMin.Z) + std::swap(*(float*)(&info->GeoBoxMax.Z), *(float*)(&info->GeoBoxMin.Z)); } } diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index beadfad83a9..cd462e5f5ee 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1079,41 +1079,40 @@ struct FactionTemplateEntry struct GameObjectDisplayInfoEntry { - uint32 Displayid; // 0 m_ID - char* filename; // 1 - //uint32 unk1[10]; //2-11 - float minX; - float minY; - float minZ; - float maxX; - float maxY; - float maxZ; - //uint32 transport; //18 + uint32 ID; // 0 + uint32 FileDataID; // 1 + //uint32 Sound[10]; // 2-11 + DBCPosition3D GeoBoxMin; // 12-14 + DBCPosition3D GeoBoxMax; // 15-17 + //uint32 ObjectEffectPackageID; // 18 + //float OverrideLootEffectScale; // 19 + //float OverrideNameScale; // 20 }; struct GemPropertiesEntry { - uint32 ID; // 0 m_id - uint32 spellitemenchantement; // 1 m_enchant_id - // 2 m_maxcount_inv - // 3 m_maxcount_item - uint32 color; // 4 m_type - uint32 minJewelCraftingSkill; // 5 m_minJewelCraftingSkill + uint32 ID; // 0 + uint32 EnchantID; // 1 + //uint32 MaxCountInv; // 2 + //uint32 MaxCountItem; // 3 + uint32 Type; // 4 + uint32 MinItemLevel; // 5 }; struct GlyphPropertiesEntry { - uint32 Id; - uint32 SpellId; - uint32 TypeFlags; - uint32 IconId; // GlyphIconId (SpellIcon.dbc) + uint32 ID; // 0 + uint32 SpellID; // 1 + uint32 Type; // 2 + uint32 SpellIconID; // 3 GlyphIconId (SpellIcon.dbc) + //uint32 GlyphExclusiveCategoryID; // 4 }; struct GlyphSlotEntry { - uint32 Id; - uint32 TypeFlags; - uint32 Order; + uint32 ID; // 0 + uint32 Type; // 1 + //uint32 Tooltip; // 2 }; // All Gt* DBC store data for 100 levels, some by 100 per class/race @@ -1207,9 +1206,9 @@ struct GtOCTBaseMPByClassEntry struct GuildPerkSpellsEntry { - //uint32 Id; - uint32 Level; - uint32 SpellId; + //uint32 ID; // 0 + uint32 GuildLevel; // 1 + uint32 SpellID; // 2 }; /* no used @@ -1234,49 +1233,49 @@ struct HolidayNamesEntry struct HolidaysEntry { - uint32 Id; // 0 m_ID - uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 m_duration - uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 m_date (dates in unix time starting at January, 1, 2000) - uint32 Region; // 37 m_region (wow region) - uint32 Looping; // 38 m_looping - uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 m_calendarFlags - //uint32 holidayNameId; // 49 m_holidayNameID (HolidayNames.dbc) - //uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) - char* TextureFilename; // 51 m_textureFilename - uint32 Priority; // 52 m_priority - uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) - //uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) + uint32 ID; // 0 m_ID + uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 m_duration + uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 m_date (dates in unix time starting at January, 1, 2000) + uint32 Region; // 37 m_region (wow region) + uint32 Looping; // 38 m_looping + uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 m_calendarFlags + //uint32 HolidayNameID; // 49 m_holidayNameID (HolidayNames.dbc) + //uint32 HolidayDescriptionID; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) + char* TextureFilename; // 51 m_textureFilename + uint32 Priority; // 52 m_priority + uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) + //uint32 Flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) }; // ImportPriceArmor.dbc struct ImportPriceArmorEntry { - uint32 InventoryType; // 1 Id/InventoryType - float ClothFactor; // 2 Price factor cloth - float LeatherFactor; // 3 Price factor leather - float MailFactor; // 4 Price factor mail - float PlateFactor; // 5 Price factor plate + uint32 ID; // 1 Id/InventoryType + float ClothFactor; // 2 Price factor cloth + float LeatherFactor; // 3 Price factor leather + float MailFactor; // 4 Price factor mail + float PlateFactor; // 5 Price factor plate }; // ImportPriceQuality.dbc struct ImportPriceQualityEntry { - uint32 QualityId; // 1 Quality Id (+1?) - float Factor; // 2 Price factor + uint32 ID; // 1 Quality Id (+1?) + float Factor; // 2 Price factor }; // ImportPriceShield.dbc struct ImportPriceShieldEntry { - uint32 Id; // 1 Unk id (only 1 and 2) - float Factor; // 2 Price factor + uint32 ID; // 1 Unk id (only 1 and 2) + float Factor; // 2 Price factor }; // ImportPriceWeapon.dbc struct ImportPriceWeaponEntry { - uint32 Id; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4) - float Factor; // 2 Price factor + uint32 ID; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4) + float Factor; // 2 Price factor }; // ItemPriceBase.dbc diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 725e0f51b42..327acec4982 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -57,10 +57,10 @@ char const EmotesEntryfmt[] = "nxxiiixx"; char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixsxi"; char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; -char const GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffxxx"; +char const GameObjectDisplayInfofmt[] = "nixxxxxxxxxxffffffxxx"; char const GemPropertiesEntryfmt[] = "nixxii"; -char const GlyphPropertiesfmt[] = "niii"; -char const GlyphSlotfmt[] = "nii"; +char const GlyphPropertiesfmt[] = "niiix"; +char const GlyphSlotfmt[] = "nix"; char const GtBarberShopCostBasefmt[] = "xf"; char const GtCombatRatingsfmt[] = "xf"; char const GtOCTHpPerStaminafmt[] = "df"; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index c010e3f1506..2b13c859255 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1875,9 +1875,9 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const float cosB = dy / dist; dx = dist * (cosA * cosB + sinA * sinB); dy = dist * (cosA * sinB - sinA * cosB); - return dx < info->maxX + radius && dx > info->minX - radius - && dy < info->maxY + radius && dy > info->minY - radius - && dz < info->maxZ + radius && dz > info->minZ - radius; + return dx < info->GeoBoxMax.X + radius && dx > info->GeoBoxMin.X - radius + && dy < info->GeoBoxMax.Y + radius && dy > info->GeoBoxMin.Y - radius + && dz < info->GeoBoxMax.Z + radius && dz > info->GeoBoxMin.Z - radius; } void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= NULL*/) diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 2eb4026bf07..0fd97b41f00 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -948,7 +948,7 @@ bool Item::GemsFitSockets() const { GemPropertiesEntry const* gemProperty = sGemPropertiesStore.LookupEntry(gemProto->GemProperties); if (gemProperty) - GemColor = gemProperty->color; + GemColor = gemProperty->Type; } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3dec68360da..711b4030465 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -17910,13 +17910,13 @@ void Player::_LoadGlyphAuras() { if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i))) { - if (gp->TypeFlags == gs->TypeFlags) + if (gp->Type == gs->Type) { - CastSpell(this, gp->SpellId, true); + CastSpell(this, gp->SpellID, true); continue; } else - TC_LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags); + TC_LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->Type, gs->Type); } else TC_LOG_ERROR("entities.player", "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i); @@ -22494,7 +22494,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) if (!gemProperty) continue; - uint8 GemColor = gemProperty->color; + uint8 GemColor = gemProperty->Type; for (uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1) { @@ -24915,7 +24915,7 @@ void Player::InitGlyphsForLevel() uint32 slot = 0; for (uint32 i = 0; i < sGlyphSlotStore.GetNumRows() && slot < MAX_GLYPH_SLOT_INDEX; ++i) if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(i)) - SetGlyphSlot(slot++, gs->Id); + SetGlyphSlot(slot++, gs->ID); uint8 level = getLevel(); uint32 slotMask = 0; @@ -26646,7 +26646,7 @@ void Player::ActivateSpec(uint8 spec) // remove secondary glyph if (uint32 oldglyph = GetGlyph(GetActiveSpec(), slot)) if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph)) - RemoveAurasDueToSpell(old_gp->SpellId); + RemoveAurasDueToSpell(old_gp->SpellID); SetActiveSpec(spec); uint32 spentTalents = 0; @@ -26701,7 +26701,7 @@ void Player::ActivateSpec(uint8 spec) // apply primary glyph if (glyph) if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) - CastSpell(this, gp->SpellId, true); + CastSpell(this, gp->SpellID, true); SetGlyph(slot, glyph); } diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 125239dd539..d92716a0fec 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -2374,8 +2374,8 @@ void Guild::SendLoginInfo(WorldSession* session) for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level <= GetLevel()) - player->LearnSpell(entry->SpellId, true); + if (entry->GuildLevel <= GetLevel()) + player->LearnSpell(entry->SpellID, true); SendGuildReputationWeeklyCap(session, member->GetWeekReputation()); @@ -2830,8 +2830,8 @@ void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level <= GetLevel()) - player->RemoveSpell(entry->SpellId, false, false); + if (entry->GuildLevel <= GetLevel()) + player->RemoveSpell(entry->SpellID, false, false); } _DeleteMemberFromDB(guid.GetCounter()); @@ -3586,8 +3586,8 @@ void Guild::GiveXP(uint32 xp, Player* source) std::vector perksToLearn; for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i) if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i)) - if (entry->Level > oldLevel && entry->Level <= GetLevel()) - perksToLearn.push_back(entry->SpellId); + if (entry->GuildLevel > oldLevel && entry->GuildLevel <= GetLevel()) + perksToLearn.push_back(entry->SpellID); // Notify all online players that guild level changed and learn perks for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr) diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index 83302e3201f..ed4429ebaa3 100644 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -158,7 +158,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) { HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(666); - data << uint32(holiday->Id); // m_ID + data << uint32(holiday->ID); // m_ID data << uint32(holiday->Region); // m_region, might be looping data << uint32(holiday->Looping); // m_looping, might be region data << uint32(holiday->Priority); // m_priority diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index d868cd1bd13..1aa19063123 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1395,7 +1395,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); } diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 69ebd8717cc..69c8ffb143c 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1123,19 +1123,19 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) } // tried to put normal gem in meta socket - if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->color != SOCKET_COLOR_META) + if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->Type != SOCKET_COLOR_META) return; // tried to put meta gem in normal socket - if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->color == SOCKET_COLOR_META) + if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->Type == SOCKET_COLOR_META) return; // tried to put normal gem in cogwheel socket - if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->color != SOCKET_COLOR_COGWHEEL) + if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->Type != SOCKET_COLOR_COGWHEEL) return; // tried to put cogwheel gem in normal socket - if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->color == SOCKET_COLOR_COGWHEEL) + if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->Type == SOCKET_COLOR_COGWHEEL) return; } @@ -1143,7 +1143,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData) uint32 OldEnchants[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments { - GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0; + GemEnchants[i] = (GemProps[i]) ? GemProps[i]->EnchantID : 0; OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i)); } diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index d5ca307344d..359a8f3946a 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -333,7 +333,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi { if (FactionEntry const* factionEntryCalc = sFactionStore.LookupEntry(*itr)) { - if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->ParentFactionCapOut)) + if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->ParentFactionCapIn)) continue; int32 spilloverRep = int32(spillOverRepOut * factionEntryCalc->ParentFactionModIn); if (spilloverRep != 0 || !incremental) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index cb7df6c2650..64a0c92d107 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1250,12 +1250,12 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const { if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId)) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellID); if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE))) continue; if (spellInfo->Stances & (1 << (GetMiscValue() - 1))) - target->CastSpell(target, glyph->SpellId, true, NULL, this); + target->CastSpell(target, glyph->SpellID, true, NULL, this); } } } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 659e7ad46ef..cb2e2e82e9d 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5095,7 +5095,7 @@ SpellCastResult Spell::CheckCast(bool strict) { uint32 glyphId = m_spellInfo->Effects[i].MiscValue; if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId)) - if (m_caster->HasAura(gp->SpellId)) + if (m_caster->HasAura(gp->SpellID)) return SPELL_FAILED_UNIQUE_GLYPH; break; } diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 5dcdcc9fcea..0f84226cf06 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4026,7 +4026,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphSlotEntry const* newGlyphSlot = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_glyphIndex))) { - if (newGlyphProperties->TypeFlags != newGlyphSlot->TypeFlags) + if (newGlyphProperties->Type != newGlyphSlot->Type) { SendCastResult(SPELL_FAILED_INVALID_GLYPH); return; // glyph slot mismatch @@ -4038,12 +4038,12 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId); + player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); player->SetGlyph(m_glyphIndex, 0); } } - player->CastSpell(m_caster, newGlyphProperties->SpellId, true); + player->CastSpell(m_caster, newGlyphProperties->SpellID, true); player->SetGlyph(m_glyphIndex, newGlyph); player->SendTalentsInfoData(false); } @@ -4052,7 +4052,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) { if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph)) { - player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId); + player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID); player->SetGlyph(m_glyphIndex, 0); player->SendTalentsInfoData(false); } -- cgit v1.2.3