diff options
| author | Rat <gmstreetrat@gmail.com> | 2014-11-10 15:18:01 +0100 |
|---|---|---|
| committer | Rat <gmstreetrat@gmail.com> | 2014-11-10 15:18:01 +0100 |
| commit | ac0ff1fc9b4c409089bbcb0256bdbc2f5cc4a405 (patch) | |
| tree | 9e939bb2b427ba8ae3e4c5512a6fc9975469c31f /src/server/scripts/Commands | |
| parent | d268b81044707e15266eadb4ab49f176135d4c26 (diff) | |
| parent | 43d5fb5eaefeafb34bea10ff5c6a2878c6c14df1 (diff) | |
Merge branch 'dbc' of https://github.com/Intel/TrinityCore into Intel-dbc
Conflicts:
src/server/game/DataStores/DBCStores.cpp
src/server/game/DataStores/DBCStructure.h
src/server/game/Events/GameEventMgr.cpp
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_go.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 40 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 18 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_modify.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reset.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_titles.cpp | 10 |
8 files changed, 49 insertions, 49 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 0b351e310f4..ec435e0bb2f 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); } } @@ -566,7 +566,7 @@ public: { FactionState const& faction = itr->second; FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID); - char const* factionName = factionEntry ? factionEntry->name : "#Not found#"; + char const* factionName = factionEntry ? factionEntry->Name_lang : "#Not found#"; ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]); std::ostringstream ss; diff --git a/src/server/scripts/Commands/cs_go.cpp b/src/server/scripts/Commands/cs_go.cpp index 162e1665177..c1f4f027c60 100644 --- a/src/server/scripts/Commands/cs_go.cpp +++ b/src/server/scripts/Commands/cs_go.cpp @@ -391,9 +391,9 @@ public: return false; } - if (!MapManager::IsValidMapCoord(at->mapid, at->x, at->y, at->z)) + if (!MapManager::IsValidMapCoord(at->MapID, at->Pos.X, at->Pos.Y, at->Pos.Z)) { - handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->x, at->y, at->mapid); + handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, at->Pos.X, at->Pos.Y, at->MapID); handler->SetSentErrorMessage(true); return false; } @@ -408,7 +408,7 @@ public: else player->SaveRecallPosition(); - player->TeleportTo(at->mapid, at->x, at->y, at->z, player->GetOrientation()); + player->TeleportTo(at->MapID, at->Pos.X, at->Pos.Y, at->Pos.Z, player->GetOrientation()); return true; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 60523428e6f..eb5be0950aa 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) { @@ -160,7 +160,7 @@ public: if (!entry) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->SpellID); if (!spellInfo) continue; @@ -266,7 +266,7 @@ public: return false; } - if (petFamily->petTalentType < 0) // not hunter pet + if (petFamily->PetTalentType < 0) // not hunter pet { handler->SendSysMessage(LANG_WRONG_PET_TYPE); handler->SetSentErrorMessage(true); @@ -284,7 +284,7 @@ public: continue; // prevent learn talent for different family (cheating) - if (((1 << petFamily->petTalentType) & talentTabInfo->petTalentMask) == 0) + if (((1 << petFamily->PetTalentType) & talentTabInfo->petTalentMask) == 0) continue; // search highest talent rank @@ -352,10 +352,10 @@ public: if (!skillInfo) continue; - if ((skillInfo->categoryId == SKILL_CATEGORY_PROFESSION || skillInfo->categoryId == SKILL_CATEGORY_SECONDARY) && - skillInfo->canLink) // only prof. with recipes have + if ((skillInfo->CategoryID == SKILL_CATEGORY_PROFESSION || skillInfo->CategoryID == SKILL_CATEGORY_SECONDARY) && + skillInfo->CanLink) // only prof. with recipes have { - HandleLearnSkillRecipesHelper(target, skillInfo->id); + HandleLearnSkillRecipesHelper(target, skillInfo->ID); } } @@ -395,12 +395,12 @@ public: if (!skillInfo) continue; - if ((skillInfo->categoryId != SKILL_CATEGORY_PROFESSION && - skillInfo->categoryId != SKILL_CATEGORY_SECONDARY) || - !skillInfo->canLink) // only prof with recipes have set + if ((skillInfo->CategoryID != SKILL_CATEGORY_PROFESSION && + skillInfo->CategoryID != SKILL_CATEGORY_SECONDARY) || + !skillInfo->CanLink) // only prof with recipes have set continue; - name = skillInfo->name; + name = skillInfo->DisplayName_lang; if (name.empty()) continue; @@ -413,10 +413,10 @@ public: if (!targetSkillInfo) return false; - HandleLearnSkillRecipesHelper(target, targetSkillInfo->id); + HandleLearnSkillRecipesHelper(target, targetSkillInfo->ID); - uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->id); - target->SetSkill(targetSkillInfo->id, target->GetSkillStep(targetSkillInfo->id), maxLevel, maxLevel); + uint16 maxLevel = target->GetPureMaxSkillValue(targetSkillInfo->ID); + target->SetSkill(targetSkillInfo->ID, target->GetSkillStep(targetSkillInfo->ID), maxLevel, maxLevel); handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_RECIPES, name.c_str()); return true; } @@ -432,26 +432,26 @@ public: continue; // wrong skill - if (skillLine->skillId != skillId) + if (skillLine->SkillLine != skillId) continue; // not high rank - if (skillLine->forward_spellid) + if (skillLine->SupercedesSpell) continue; // skip racial skills - if (skillLine->racemask != 0) + if (skillLine->RaceMask != 0) continue; // skip wrong class skills - if (skillLine->classmask && (skillLine->classmask & classmask) == 0) + if (skillLine->ClassMask && (skillLine->ClassMask & classmask) == 0) continue; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->SpellID); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; - player->LearnSpell(skillLine->spellId, false); + player->LearnSpell(skillLine->SpellID, false); } } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 714d1851a3e..7d8fec52143 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -299,7 +299,7 @@ public: { FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL; - std::string name = factionEntry->name; + std::string name = factionEntry->Name_lang; if (name.empty()) continue; @@ -461,7 +461,7 @@ public: ItemSetEntry const* set = sItemSetStore.LookupEntry(id); if (set) { - std::string name = set->name; + std::string name = set->Name_lang; if (name.empty()) continue; @@ -724,7 +724,7 @@ public: SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id); if (skillInfo) { - std::string name = skillInfo->name; + std::string name = skillInfo->DisplayName_lang; if (name.empty()) continue; @@ -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; } @@ -1132,7 +1132,7 @@ public: { if (MapEntry const* mapInfo = sMapStore.LookupEntry(id)) { - std::string name = mapInfo->name; + std::string name = mapInfo->MapName_lang; if (name.empty()) continue; @@ -1150,7 +1150,7 @@ public: if (mapInfo->IsContinent()) ss << handler->GetTrinityString(LANG_CONTINENT); - switch (mapInfo->map_type) + switch (mapInfo->InstanceType) { case MAP_INSTANCE: ss << handler->GetTrinityString(LANG_INSTANCE); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index bd7cb9175fa..4c2b7d40a89 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -202,7 +202,7 @@ public: char const* unknown = handler->GetTrinityString(LANG_UNKNOWN); handler->PSendSysMessage(LANG_MAP_POSITION, - mapId, (mapEntry ? mapEntry->name : unknown), + mapId, (mapEntry ? mapEntry->MapName_lang : unknown), zoneId, (zoneEntry ? zoneEntry->area_name : unknown), areaId, (areaEntry ? areaEntry->area_name : unknown), object->GetPhaseMask(), @@ -1359,7 +1359,7 @@ public: // add the skill to the player's book with step 1 (which is the first rank, in most cases something // like 'Apprentice <skill>'. target->SetSkill(skill, targetHasSkill ? target->GetSkillStep(skill) : 1, level, max); - handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->name, handler->GetNameLink(target).c_str(), level, max); + handler->PSendSysMessage(LANG_SET_SKILL, skill, skillLine->DisplayName_lang, handler->GetNameLink(target).c_str(), level, max); return true; } @@ -1714,7 +1714,7 @@ public: } if (target) - handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->name, + handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->MapName_lang, (!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)), (!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN))); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 0075891ba5f..24283dca7ac 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1233,16 +1233,16 @@ public: return false; } - if (factionEntry->reputationListID < 0) + if (factionEntry->ReputationIndex < 0) { - handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->name, factionId); + handler->PSendSysMessage(LANG_COMMAND_FACTION_NOREP_ERROR, factionEntry->Name_lang, factionId); handler->SetSentErrorMessage(true); return false; } target->GetReputationMgr().SetOneFactionReputation(factionEntry, amount, false); target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry)); - handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name, factionId, + handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->Name_lang, factionId, handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry)); return true; } 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)) 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 |
