diff options
| author | Shauren <shauren.trinity@gmail.com> | 2018-03-12 18:20:26 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2018-03-12 23:11:49 +0100 |
| commit | 007b5a68c50bbee7d05acec888d3273c2a5a8577 (patch) | |
| tree | 4818b60a73730b98ae4785d0630edbd6cd27d5bf /src/server/scripts/Commands | |
| parent | 50a912af72ca84095eab5effa7d70e8a50ff8a04 (diff) | |
Core/DataStores: Fixed db2 structures after 7.3.5
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_go.cpp | 20 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 8 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reset.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_titles.cpp | 6 |
8 files changed, 28 insertions, 28 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 3db021e02c9..9107c0c2ebb 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -276,11 +276,11 @@ public: if (titleInfo && target->HasTitle(titleInfo)) { - std::string name = (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()]; + std::string name = (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[handler->GetSessionDbcLocale()]; if (name.empty()) continue; - char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID + char const* activeStr = target->GetInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID ? handler->GetTrinityString(LANG_ACTIVE) : ""; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 9dc55050c08..255a0854226 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -399,9 +399,9 @@ public: } if ((node->Pos.X == 0.0f && node->Pos.Y == 0.0f && node->Pos.Z == 0.0f) || - !MapManager::IsValidMapCoord(node->MapID, node->Pos.X, node->Pos.Y, node->Pos.Z)) + !MapManager::IsValidMapCoord(node->ContinentID, node->Pos.X, node->Pos.Y, node->Pos.Z)) { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, node->Pos.X, node->Pos.Y, node->MapID); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, node->Pos.X, node->Pos.Y, uint32(node->ContinentID)); handler->SetSentErrorMessage(true); return false; } @@ -416,7 +416,7 @@ public: else player->SaveRecallPosition(); - player->TeleportTo(node->MapID, node->Pos.X, node->Pos.Y, node->Pos.Z, player->GetOrientation()); + player->TeleportTo(node->ContinentID, node->Pos.X, node->Pos.Y, node->Pos.Z, player->GetOrientation()); return true; } @@ -444,9 +444,9 @@ public: return false; } - if (!MapManager::IsValidMapCoord(at->MapID, at->Pos.X, at->Pos.Y, at->Pos.Z)) + if (!MapManager::IsValidMapCoord(at->ContinentID, at->Pos.X, at->Pos.Y, at->Pos.Z)) { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->Pos.X, at->Pos.Y, at->MapID); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->Pos.X, at->Pos.Y, uint32(at->ContinentID)); handler->SetSentErrorMessage(true); return false; } @@ -461,7 +461,7 @@ public: else player->SaveRecallPosition(); - player->TeleportTo(at->MapID, at->Pos.X, at->Pos.Y, at->Pos.Z, player->GetOrientation()); + player->TeleportTo(at->ContinentID, at->Pos.X, at->Pos.Y, at->Pos.Z, player->GetOrientation()); return true; } @@ -504,7 +504,7 @@ public: AreaTableEntry const* zoneEntry = areaEntry->ParentAreaID ? sAreaTableStore.LookupEntry(areaEntry->ParentAreaID) : areaEntry; ASSERT(zoneEntry); - Map const* map = sMapMgr->CreateBaseMap(zoneEntry->MapID); + Map const* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID); if (map->Instanceable()) { @@ -515,9 +515,9 @@ public: sDB2Manager.Zone2MapCoordinates(areaEntry->ParentAreaID ? uint32(areaEntry->ParentAreaID) : areaId, x, y); - if (!MapManager::IsValidMapCoord(zoneEntry->MapID, x, y)) + if (!MapManager::IsValidMapCoord(zoneEntry->ContinentID, x, y)) { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, zoneEntry->MapID); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, x, y, uint32(zoneEntry->ContinentID)); handler->SetSentErrorMessage(true); return false; } @@ -534,7 +534,7 @@ public: float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y)); - player->TeleportTo(zoneEntry->MapID, x, y, z, player->GetOrientation()); + player->TeleportTo(zoneEntry->ContinentID, x, y, z, player->GetOrientation()); return true; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index f3438e884d1..6e62278b825 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -156,7 +156,7 @@ public: if (!entry) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->SpellID); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->Spell); if (!spellInfo) continue; @@ -424,7 +424,7 @@ public: continue; // wrong skill - if (skillLine->SkillLine != skillId) + if (skillLine->SkillLine != int32(skillId)) continue; // not high rank @@ -439,11 +439,11 @@ public: if (skillLine->ClassMask && (skillLine->ClassMask & classmask) == 0) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->SpellID); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->Spell); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; - player->LearnSpell(skillLine->SpellID, false); + player->LearnSpell(skillLine->Spell, false); } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index fc0f20b4083..1c235bb8483 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1027,10 +1027,10 @@ public: // send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format if (handler->GetSession()) handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name.c_str(), "", - nodeEntry->MapID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); + uint32(nodeEntry->ContinentID), nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); else handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name.c_str(), "", - nodeEntry->MapID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); + uint32(nodeEntry->ContinentID), nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z); if (!found) found = true; @@ -1134,7 +1134,7 @@ public: continue; int32 locale = handler->GetSessionDbcLocale(); - std::string name = (gender == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[locale]; + std::string name = (gender == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[locale]; if (name.empty()) continue; @@ -1147,7 +1147,7 @@ public: if (locale == handler->GetSessionDbcLocale()) continue; - name = (gender == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[locale]; + name = (gender == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[locale]; if (name.empty()) continue; @@ -1166,7 +1166,7 @@ public: char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : ""; - char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID + char const* activeStr = target && target->GetInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->MaskID ? handler->GetTrinityString(LANG_ACTIVE) : ""; diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 287ab41b972..58855334412 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1282,7 +1282,7 @@ public: auto itr = std::find_if(sItemSparseStore.begin(), sItemSparseStore.end(), [&itemName](ItemSparseEntry const* sparse) { for (uint32 i = 0; i < MAX_LOCALES; ++i) - if (itemName == sparse->Name->Str[i]) + if (itemName == sparse->Display->Str[i]) return true; return false; }); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 09d76fd5e20..d7be9d12c18 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1040,7 +1040,7 @@ public: return false; } - std::string formattedPowerName = powerType->PowerTypeToken; + std::string formattedPowerName = powerType->NameGlobalStringTag; bool upperCase = true; for (char& c : formattedPowerName) { @@ -1060,7 +1060,7 @@ public: } NotifyModification(handler, target, LANG_YOU_CHANGE_POWER, LANG_YOUR_POWER_CHANGED, formattedPowerName.c_str(), powerAmount, powerAmount); - powerAmount *= powerType->UIModifier; + powerAmount *= powerType->DisplayModifier; target->SetMaxPower(Powers(powerType->PowerTypeEnum), powerAmount); target->SetPower(Powers(powerType->PowerTypeEnum), powerAmount); return true; diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index f9346261173..10c924b89ed 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -99,7 +99,7 @@ public: return false; } - uint8 powerType = classEntry->PowerType; + uint8 powerType = classEntry->DisplayPower; // reset m_form if no aura if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT)) diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 946137f342f..b493f810e13 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -96,7 +96,7 @@ public: target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->MaskID); handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, - (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[handler->GetSessionDbcLocale()], tNameLink.c_str()); return true; } @@ -139,7 +139,7 @@ public: std::string tNameLink = handler->GetNameLink(target); std::string titleNameStr = Trinity::StringFormat( - (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[handler->GetSessionDbcLocale()], target->GetName().c_str() ); @@ -189,7 +189,7 @@ public: std::string tNameLink = handler->GetNameLink(target); std::string titleNameStr = Trinity::StringFormat( - (target->getGender() == GENDER_MALE ? titleInfo->NameMale : titleInfo->NameFemale)->Str[handler->GetSessionDbcLocale()], + (target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1)->Str[handler->GetSessionDbcLocale()], target->GetName().c_str() ); |
