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
@@ -280,11 +280,11 @@ public:
|
||||
{
|
||||
if (target->HasTitle(titleInfo))
|
||||
{
|
||||
std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale;
|
||||
std::string name = target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
|
||||
char const* activeStr = target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->Mask_ID
|
||||
? handler->GetTrinityString(LANG_ACTIVE)
|
||||
: "";
|
||||
|
||||
@@ -293,9 +293,9 @@ public:
|
||||
|
||||
// send title in "id (idx:idx) - [namedlink locale]" format
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, titleInfo->ID, titleInfo->bit_index, titleInfo->ID, titleNameStr, localeNames[loc], knownStr, activeStr);
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, titleInfo->ID, titleInfo->Mask_ID, titleInfo->ID, titleNameStr, localeNames[loc], knownStr, activeStr);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, titleInfo->ID, titleInfo->bit_index, name.c_str(), localeNames[loc], knownStr, activeStr);
|
||||
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, titleInfo->ID, titleInfo->Mask_ID, name.c_str(), localeNames[loc], knownStr, activeStr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,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 : "#Not found#";
|
||||
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
|
||||
std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]);
|
||||
std::ostringstream ss;
|
||||
|
||||
@@ -136,9 +136,9 @@ public:
|
||||
}
|
||||
|
||||
// Dump camera locations
|
||||
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(cineSeq->cinematicCamera))
|
||||
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(cineSeq->Camera[0]))
|
||||
{
|
||||
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera);
|
||||
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->Camera[0]);
|
||||
uint32 count = 1;
|
||||
for (FlyByCamera const& cam : *flyByCameras)
|
||||
{
|
||||
@@ -1530,7 +1530,7 @@ public:
|
||||
}
|
||||
if (!mEntry->IsDungeon())
|
||||
{
|
||||
handler->PSendSysMessage("'%s' is not a dungeon map.", mEntry->Name[LOCALE_enUS]);
|
||||
handler->PSendSysMessage("'%s' is not a dungeon map.", mEntry->MapName[LOCALE_enUS]);
|
||||
return true;
|
||||
}
|
||||
int32 difficulty = difficulty_str ? atoi(difficulty_str) : -1;
|
||||
@@ -1541,29 +1541,29 @@ public:
|
||||
}
|
||||
if (difficulty >= 0 && !GetMapDifficultyData(mEntry->ID, Difficulty(difficulty)))
|
||||
{
|
||||
handler->PSendSysMessage("Difficulty %d is not valid for '%s'.", difficulty, mEntry->Name[LOCALE_enUS]);
|
||||
handler->PSendSysMessage("Difficulty %d is not valid for '%s'.", difficulty, mEntry->MapName[LOCALE_enUS]);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (difficulty == -1)
|
||||
{
|
||||
handler->PSendSysMessage("Resetting all difficulties for '%s'.", mEntry->Name[LOCALE_enUS]);
|
||||
handler->PSendSysMessage("Resetting all difficulties for '%s'.", mEntry->MapName[LOCALE_enUS]);
|
||||
for (uint8 diff = (mEntry->IsRaid() ? 0 : 1); diff < (mEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY); ++diff)
|
||||
{
|
||||
if (GetMapDifficultyData(mEntry->ID, Difficulty(diff)))
|
||||
{
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->Name[LOCALE_enUS]);
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->MapName[LOCALE_enUS]);
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(diff));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mEntry->IsNonRaidDungeon() && difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
||||
{
|
||||
handler->PSendSysMessage("'%s' does not have any permanent saves for difficulty %d.", mEntry->Name[LOCALE_enUS], difficulty);
|
||||
handler->PSendSysMessage("'%s' does not have any permanent saves for difficulty %d.", mEntry->MapName[LOCALE_enUS], difficulty);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->Name[LOCALE_enUS]);
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->MapName[LOCALE_enUS]);
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(difficulty));
|
||||
}
|
||||
return true;
|
||||
@@ -1596,9 +1596,9 @@ public:
|
||||
for (uint32 i = 0; i < sWorldSafeLocsStore.GetNumRows(); ++i)
|
||||
{
|
||||
WorldSafeLocsEntry const* loc = sWorldSafeLocsStore.LookupEntry(i);
|
||||
if (loc && loc->map_id == player->GetMapId())
|
||||
if (loc && loc->Continent == player->GetMapId())
|
||||
{
|
||||
float dist = (loc->x - x) * (loc->x - x) + (loc->y - y) * (loc->y - y) + (loc->z - z) * (loc->z - z);
|
||||
float dist = (loc->Loc.X - x) * (loc->Loc.X - x) + (loc->Loc.Y - y) * (loc->Loc.Y - y) + (loc->Loc.Z - z) * (loc->Loc.Z - z);
|
||||
if (dist < distNearest)
|
||||
{
|
||||
distNearest = dist;
|
||||
@@ -1609,7 +1609,7 @@ public:
|
||||
}
|
||||
|
||||
if (nearestLoc)
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->x, nearestLoc->y, nearestLoc->z);
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->Loc.X, nearestLoc->Loc.Y, nearestLoc->Loc.Z);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD_NOTFOUND);
|
||||
|
||||
|
||||
@@ -192,9 +192,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!MapManager::IsValidMapCoord(gy->map_id, gy->x, gy->y, gy->z))
|
||||
if (!MapManager::IsValidMapCoord(gy->Continent, gy->Loc.X, gy->Loc.Y, gy->Loc.Z))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->x, gy->y, gy->map_id);
|
||||
handler->PSendSysMessage(LANG_INVALID_TARGET_COORD, gy->Loc.X, gy->Loc.Y, gy->Continent);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
else
|
||||
player->SaveRecallPosition();
|
||||
|
||||
player->TeleportTo(gy->map_id, gy->x, gy->y, gy->z, player->GetOrientation());
|
||||
player->TeleportTo(gy->Continent, gy->Loc.X, gy->Loc.Y, gy->Loc.Z, player->GetOrientation());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
return DoTeleport(handler, { node->map_id, { node->x, node->y, node->z } });
|
||||
return DoTeleport(handler, { node->ContinentID, { node->Pos.X, node->Pos.Y, node->Pos.Z } });
|
||||
}
|
||||
|
||||
static bool HandleGoAreaTriggerCommand(ChatHandler* handler, Variant<Hyperlink<areatrigger>, uint32> areaTriggerId)
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
return DoTeleport(handler, { at->mapid, { at->x, at->y, at->z } });
|
||||
return DoTeleport(handler, { at->ContinentID, { at->Pos.X, at->Pos.Y, at->Pos.Z } });
|
||||
}
|
||||
|
||||
//teleport at coordinates
|
||||
|
||||
@@ -672,7 +672,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, gameObjectInfo->AIName.c_str(), sObjectMgr->GetScriptName(gameObjectInfo->ScriptId).c_str());
|
||||
|
||||
if (GameObjectDisplayInfoEntry const* modelInfo = sGameObjectDisplayInfoStore.LookupEntry(displayId))
|
||||
handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->maxX, modelInfo->maxY, modelInfo->maxZ, modelInfo->minX, modelInfo->minY, modelInfo->minZ);
|
||||
handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->GeoBoxMax.X, modelInfo->GeoBoxMax.X, modelInfo->GeoBoxMax.Z, modelInfo->GeoBoxMin.X, modelInfo->GeoBoxMin.Y, modelInfo->GeoBoxMin.Z);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -151,11 +151,11 @@ public:
|
||||
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(handler->GetSession()->GetPlayer()->getClass());
|
||||
if (!classEntry)
|
||||
return true;
|
||||
uint32 family = classEntry->spellfamily;
|
||||
uint32 family = classEntry->SpellClassSet;
|
||||
|
||||
for (SkillLineAbilityEntry const* entry : sSkillLineAbilityStore)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(entry->Spell);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
for (TalentEntry const* talentInfo : sTalentStore)
|
||||
{
|
||||
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab);
|
||||
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID);
|
||||
if (!talentTabInfo)
|
||||
continue;
|
||||
|
||||
@@ -204,9 +204,9 @@ public:
|
||||
uint32 spellId = 0;
|
||||
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
|
||||
{
|
||||
if (talentInfo->RankID[rank] != 0)
|
||||
if (talentInfo->SpellRank[rank] != 0)
|
||||
{
|
||||
spellId = talentInfo->RankID[rank];
|
||||
spellId = talentInfo->SpellRank[rank];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -257,7 +257,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);
|
||||
@@ -266,12 +266,12 @@ public:
|
||||
|
||||
for (TalentEntry const* talentInfo : sTalentStore)
|
||||
{
|
||||
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab);
|
||||
TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TabID);
|
||||
if (!talentTabInfo)
|
||||
continue;
|
||||
|
||||
// prevent learn talent for different family (cheating)
|
||||
if (((1 << petFamily->petTalentType) & talentTabInfo->petTalentMask) == 0)
|
||||
if (((1 << petFamily->PetTalentType) & talentTabInfo->CategoryEnumID) == 0)
|
||||
continue;
|
||||
|
||||
// search highest talent rank
|
||||
@@ -279,9 +279,9 @@ public:
|
||||
|
||||
for (int8 rank = MAX_TALENT_RANK - 1; rank >= 0; --rank)
|
||||
{
|
||||
if (talentInfo->RankID[rank] != 0)
|
||||
if (talentInfo->SpellRank[rank] != 0)
|
||||
{
|
||||
spellId = talentInfo->RankID[rank];
|
||||
spellId = talentInfo->SpellRank[rank];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -339,10 +339,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,12 +382,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;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -400,10 +400,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;
|
||||
}
|
||||
@@ -415,26 +415,26 @@ public:
|
||||
for (SkillLineAbilityEntry const* skillLine : sSkillLineAbilityStore)
|
||||
{
|
||||
// wrong skill
|
||||
if (skillLine->skillId != skillId)
|
||||
if (skillLine->SkillLine != skillId)
|
||||
continue;
|
||||
|
||||
// not high rank
|
||||
if (skillLine->forward_spellid)
|
||||
if (skillLine->SupercededBySpell)
|
||||
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->Spell);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false))
|
||||
continue;
|
||||
|
||||
player->LearnSpell(skillLine->spellId, false);
|
||||
player->LearnSpell(skillLine->Spell, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
{
|
||||
FactionState const* factionState = target ? target->GetReputationMgr().GetState(factionEntry) : nullptr;
|
||||
|
||||
std::string name = factionEntry->name;
|
||||
std::string name = factionEntry->Name;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
ItemSetEntry const* set = sItemSetStore.LookupEntry(id);
|
||||
if (set)
|
||||
{
|
||||
std::string name = set->name;
|
||||
std::string name = set->Name;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -721,7 +721,7 @@ public:
|
||||
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
|
||||
if (skillInfo)
|
||||
{
|
||||
std::string name = skillInfo->name;
|
||||
std::string name = skillInfo->DisplayName;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -950,7 +950,7 @@ public:
|
||||
TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id);
|
||||
if (nodeEntry)
|
||||
{
|
||||
std::string name = nodeEntry->name;
|
||||
std::string name = nodeEntry->Name;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -966,10 +966,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, id, id, name.c_str(), "",
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
nodeEntry->ContinentID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, id, name.c_str(), "",
|
||||
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
|
||||
nodeEntry->ContinentID, nodeEntry->Pos.X, nodeEntry->Pos.Y, nodeEntry->Pos.Z);
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
@@ -1069,7 +1069,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->Name : titleInfo->Name1;
|
||||
|
||||
if (name.empty())
|
||||
continue;
|
||||
@@ -1085,7 +1085,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->Mask_ID
|
||||
? handler->GetTrinityString(LANG_ACTIVE)
|
||||
: "";
|
||||
|
||||
@@ -1094,9 +1094,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->Mask_ID, 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->Mask_ID, titleNameStr, "", knownStr, activeStr);
|
||||
|
||||
++counter;
|
||||
}
|
||||
@@ -1129,7 +1129,7 @@ public:
|
||||
{
|
||||
if (MapEntry const* mapInfo = sMapStore.LookupEntry(id))
|
||||
{
|
||||
std::string name = mapInfo->Name;
|
||||
std::string name = mapInfo->MapName;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ public:
|
||||
uint32 channelId = 0;
|
||||
for (ChatChannelsEntry const* entry : sChatChannelsStore)
|
||||
{
|
||||
if (strstr(entry->pattern, channelStr))
|
||||
if (strstr(entry->Name, channelStr))
|
||||
{
|
||||
channelId = entry->ChannelID;
|
||||
channelId = entry->ID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
char const* unknown = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
|
||||
handler->PSendSysMessage(LANG_MAP_POSITION,
|
||||
mapId, (mapEntry ? mapEntry->Name : unknown),
|
||||
mapId, (mapEntry ? mapEntry->MapName : unknown),
|
||||
zoneId, (zoneEntry ? zoneEntry->AreaName : unknown),
|
||||
areaId, (areaEntry ? areaEntry->AreaName : unknown),
|
||||
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
|
||||
@@ -1500,7 +1500,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, handler->GetNameLink(target).c_str(), level, max);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1848,7 +1848,7 @@ public:
|
||||
}
|
||||
|
||||
if (target)
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->Name,
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->MapName,
|
||||
(!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
(!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)));
|
||||
|
||||
|
||||
@@ -789,16 +789,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, 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, factionId,
|
||||
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,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))
|
||||
|
||||
@@ -93,9 +93,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->Mask_ID);
|
||||
|
||||
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->Name : titleInfo->Name1, tNameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
std::string titleNameStr = Trinity::StringFormat(target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str());
|
||||
std::string titleNameStr = Trinity::StringFormat(target->getGender() == GENDER_MALE ? titleInfo->Name : titleInfo->Name1, target->GetName().c_str());
|
||||
|
||||
target->SetTitle(titleInfo);
|
||||
handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr.c_str(), tNameLink.c_str());
|
||||
@@ -183,7 +183,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->Name : titleInfo->Name1, target->GetName().c_str());
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
|
||||
uint64 allValidTitleMask = 0;
|
||||
for (CharTitlesEntry const* tEntry : sCharTitlesStore)
|
||||
allValidTitleMask |= (uint64(1) << tEntry->bit_index);
|
||||
allValidTitleMask |= (uint64(1) << tEntry->Mask_ID);
|
||||
|
||||
titles &= allValidTitleMask; // remove non-existing titles
|
||||
|
||||
|
||||
+1
-1
@@ -1213,7 +1213,7 @@ class spell_maloriak_master_adventurer_award : public AuraScript
|
||||
return;
|
||||
|
||||
player->SetTitle(titleInfo);
|
||||
player->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index);
|
||||
player->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->Mask_ID);
|
||||
}
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -80,7 +80,7 @@ class npc_tb_spirit_guide : public CreatureScript
|
||||
}
|
||||
|
||||
if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(areaId))
|
||||
player->TeleportTo(safeLoc->map_id, safeLoc->x, safeLoc->y, safeLoc->z, 0);
|
||||
player->TeleportTo(safeLoc->Continent, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -947,7 +947,7 @@ class at_bring_your_orphan_to : public AreaTriggerScript
|
||||
uint32 questId = 0;
|
||||
uint32 orphanId = 0;
|
||||
|
||||
switch (trigger->id)
|
||||
switch (trigger->ID)
|
||||
{
|
||||
case AT_DOWN_AT_THE_DOCKS:
|
||||
questId = QUEST_DOWN_AT_THE_DOCKS;
|
||||
|
||||
@@ -240,7 +240,7 @@ class npc_wg_spirit_guide : public CreatureScript
|
||||
for (uint8 i = 0; i < gy.size(); i++)
|
||||
if (action - GOSSIP_ACTION_INFO_DEF == i && gy[i]->GetControlTeamId() == player->GetTeamId())
|
||||
if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(gy[i]->GetGraveyardId()))
|
||||
player->TeleportTo(safeLoc->map_id, safeLoc->x, safeLoc->y, safeLoc->z, 0);
|
||||
player->TeleportTo(safeLoc->Continent, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -506,7 +506,7 @@ class achievement_wg_didnt_stand_a_chance : public AchievementCriteriaScript
|
||||
return false;
|
||||
|
||||
if (Vehicle* vehicle = source->GetVehicle())
|
||||
if (vehicle->GetVehicleInfo()->m_ID == 244) // Wintergrasp Tower Cannon
|
||||
if (vehicle->GetVehicleInfo()->ID == 244) // Wintergrasp Tower Cannon
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
if (atEntry)
|
||||
{
|
||||
// 5.0f is safe-distance
|
||||
if (player->GetDistance(atEntry->x, atEntry->y, atEntry->z) > 5.0f + atEntry->radius)
|
||||
if (player->GetDistance(atEntry->Pos.X, atEntry->Pos.Y, atEntry->Pos.Z) > 5.0f + atEntry->Radius)
|
||||
{
|
||||
// he dropped it further, summon mound
|
||||
GameObject* go = new GameObject;
|
||||
@@ -202,7 +202,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
if (atEntry)
|
||||
{
|
||||
// 5.0f is safe-distance
|
||||
if (player->GetDistance(atEntry->x, atEntry->y, atEntry->z) > 5.0f + atEntry->radius)
|
||||
if (player->GetDistance(atEntry->Pos.X, atEntry->Pos.Y, atEntry->Pos.Z) > 5.0f + atEntry->Radius)
|
||||
{
|
||||
// he dropped it further, summon mound
|
||||
GameObject* go = new GameObject;
|
||||
|
||||
@@ -3021,7 +3021,7 @@ class spell_gen_running_wild : public SpellScriptLoader
|
||||
|
||||
// cast speed aura
|
||||
if (MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(aurEff->GetAmount()))
|
||||
target->CastSpell(target, mountCapability->SpeedModSpell, TRIGGERED_FULL_MASK);
|
||||
target->CastSpell(target, mountCapability->ModSpellAuraID, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -3960,7 +3960,7 @@ public:
|
||||
{
|
||||
target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN);
|
||||
if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender()))
|
||||
target->PlayDistanceSound(soundEntry->SoundId);
|
||||
target->PlayDistanceSound(soundEntry->ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -286,13 +286,13 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
|
||||
for (uint8 s = 0; s < 3; ++s)
|
||||
{
|
||||
if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
|
||||
if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->EffectArg[s]);
|
||||
if (!spellInfo)
|
||||
{
|
||||
TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().GetCounter(), enchant->spellid[s]);
|
||||
TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUID().GetCounter(), enchant->EffectArg[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -305,9 +305,9 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
continue;
|
||||
|
||||
if (spellInfo->IsPositive())
|
||||
player->CastSpell(player, enchant->spellid[s], true, item);
|
||||
player->CastSpell(player, enchant->EffectArg[s], true, item);
|
||||
else
|
||||
player->CastSpell(target, enchant->spellid[s], true, item);
|
||||
player->CastSpell(target, enchant->EffectArg[s], true, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
|
||||
if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE ||
|
||||
(player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED)))
|
||||
{
|
||||
switch (trigger->id)
|
||||
switch (trigger->ID)
|
||||
{
|
||||
case AT_SHOLAZAR:
|
||||
player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, true);
|
||||
@@ -266,7 +266,7 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript
|
||||
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override
|
||||
{
|
||||
uint32 triggerId = trigger->id;
|
||||
uint32 triggerId = trigger->ID;
|
||||
// Second trigger happened too early after first, skip for now
|
||||
if (GameTime::GetGameTime() - _triggerTimes[triggerId] < AREATRIGGER_TALK_COOLDOWN)
|
||||
return false;
|
||||
@@ -324,8 +324,8 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript
|
||||
if (!player->IsAlive())
|
||||
return false;
|
||||
|
||||
uint32 triggerId = trigger->id;
|
||||
if (GameTime::GetGameTime() - _triggerTimes[trigger->id] < SUMMON_COOLDOWN)
|
||||
uint32 triggerId = trigger->ID;
|
||||
if (GameTime::GetGameTime() - _triggerTimes[trigger->ID] < SUMMON_COOLDOWN)
|
||||
return false;
|
||||
|
||||
switch (triggerId)
|
||||
@@ -354,7 +354,7 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript
|
||||
|
||||
player->SummonCreature(NPC_SPOTLIGHT, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000);
|
||||
player->AddAura(SPELL_A52_NEURALYZER, player);
|
||||
_triggerTimes[trigger->id] = GameTime::GetGameTime();
|
||||
_triggerTimes[trigger->ID] = GameTime::GetGameTime();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ class go_ethereum_prison : public GameObjectScript
|
||||
{
|
||||
uint32 Spell = 0;
|
||||
|
||||
switch (pFaction->faction)
|
||||
switch (pFaction->Faction)
|
||||
{
|
||||
case 1011: Spell = SPELL_REP_LC; break;
|
||||
case 935: Spell = SPELL_REP_SHAT; break;
|
||||
|
||||
Reference in new issue
Block a user