Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/AuctionHouseBot/AuctionHouseBot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ bool AuctionBotConfig::Reload()
char const* AuctionBotConfig::GetItemClassName(ItemClass itemclass)
{
ItemClassEntry const* itemClassEntry = sItemClassStore.LookupEntry(itemclass);
return itemClassEntry ? itemClassEntry->name[sWorld.GetDefaultDbcLocale()] : "";
return itemClassEntry ? itemClassEntry->ClassName_lang[sWorld.GetDefaultDbcLocale()] : "";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ bool BattleGround::IsTeamScoreInRange(Team team, uint32 minScore, uint32 maxScor
void BattleGround::SetBracket(PvPDifficultyEntry const* bracketEntry)
{
m_BracketId = bracketEntry->GetBracketId();
SetLevelRange(bracketEntry->minLevel, bracketEntry->maxLevel);
SetLevelRange(bracketEntry->MinLevel, bracketEntry->MaxLevel);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundAB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ WorldSafeLocsEntry const* BattleGroundAB::GetClosestGraveYard(Player* player)
{
continue;
}
float dist = (entry->x - plr_x) * (entry->x - plr_x) + (entry->y - plr_y) * (entry->y - plr_y);
float dist = (entry->Loc_0 - plr_x) * (entry->Loc_0 - plr_x) + (entry->Loc_1 - plr_y) * (entry->Loc_1 - plr_y);
if (mindist > dist)
{
mindist = dist;
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundAV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* plr)
{
continue;
}
float dist = (entry->x - x) * (entry->x - x) + (entry->y - y) * (entry->y - y);
float dist = (entry->Loc_0 - x) * (entry->Loc_0 - x) + (entry->Loc_1 - y) * (entry->Loc_1 - y);
if (mindist > dist)
{
mindist = dist;
Expand Down
4 changes: 2 additions & 2 deletions src/game/BattleGround/BattleGroundEY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ WorldSafeLocsEntry const* BattleGroundEY::GetClosestGraveYard(Player* player)
float plr_z = player->GetPositionZ();


distance = (entry->x - plr_x) * (entry->x - plr_x) + (entry->y - plr_y) * (entry->y - plr_y) + (entry->z - plr_z) * (entry->z - plr_z);
distance = (entry->Loc_0 - plr_x) * (entry->Loc_0 - plr_x) + (entry->Loc_1 - plr_y) * (entry->Loc_1 - plr_y) + (entry->Loc_2 - plr_z) * (entry->Loc_2 - plr_z);
nearestDistance = distance;

for (uint8 i = 0; i < EY_NODES_MAX; ++i)
Expand All @@ -666,7 +666,7 @@ WorldSafeLocsEntry const* BattleGroundEY::GetClosestGraveYard(Player* player)
}
else
{
distance = (entry->x - plr_x) * (entry->x - plr_x) + (entry->y - plr_y) * (entry->y - plr_y) + (entry->z - plr_z) * (entry->z - plr_z);
distance = (entry->Loc_0 - plr_x) * (entry->Loc_0 - plr_x) + (entry->Loc_1 - plr_y) * (entry->Loc_1 - plr_y) + (entry->Loc_2 - plr_z) * (entry->Loc_2 - plr_z);
if (distance < nearestDistance)
{
nearestDistance = distance;
Expand Down
18 changes: 9 additions & 9 deletions src/game/BattleGround/BattleGroundMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ void BattleGroundMgr::CreateInitialBattleGrounds()

BattleGroundTypeId bgTypeID = BattleGroundTypeId(bgTypeID_);

bool IsArena = (bl->type == TYPE_ARENA);
bool IsArena = (bl->InstanceType == TYPE_ARENA);
uint32 MinPlayersPerTeam = fields[1].GetUInt32();
uint32 MaxPlayersPerTeam = fields[2].GetUInt32();

Expand All @@ -1089,9 +1089,9 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(start1);
if (start)
{
AStartLoc[0] = start->x;
AStartLoc[1] = start->y;
AStartLoc[2] = start->z;
AStartLoc[0] = start->Loc_0;
AStartLoc[1] = start->Loc_1;
AStartLoc[2] = start->Loc_2;
AStartLoc[3] = fields[4].GetFloat();
}
else if (bgTypeID == BATTLEGROUND_AA || bgTypeID == BATTLEGROUND_RB)
Expand All @@ -1112,9 +1112,9 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
start = sWorldSafeLocsStore.LookupEntry(start2);
if (start)
{
HStartLoc[0] = start->x;
HStartLoc[1] = start->y;
HStartLoc[2] = start->z;
HStartLoc[0] = start->Loc_0;
HStartLoc[1] = start->Loc_1;
HStartLoc[2] = start->Loc_2;
HStartLoc[3] = fields[6].GetFloat();
}
else if (bgTypeID == BATTLEGROUND_AA || bgTypeID == BATTLEGROUND_RB)
Expand All @@ -1131,8 +1131,8 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
}

float startMaxDist = fields[7].GetFloat();
// sLog.outDetail("Creating battleground %s, %u-%u", bl->name[sWorld.GetDBClang()], MinLvl, MaxLvl);
if (!CreateBattleGround(bgTypeID, IsArena, MinPlayersPerTeam, MaxPlayersPerTeam, bl->minLevel, bl->maxLevel, bl->name[sWorld.GetDefaultDbcLocale()], bl->mapid[0], AStartLoc[0], AStartLoc[1], AStartLoc[2], AStartLoc[3], HStartLoc[0], HStartLoc[1], HStartLoc[2], HStartLoc[3], startMaxDist))
// sLog.outDetail("Creating battleground %s, %u-%u", bl->Name_lang[sWorld.GetDBClang()], MinLvl, MaxLvl);
if (!CreateBattleGround(bgTypeID, IsArena, MinPlayersPerTeam, MaxPlayersPerTeam, bl->MinLevel, bl->MaxLevel, bl->Name_lang[sWorld.GetDefaultDbcLocale()], bl->MapID[0], AStartLoc[0], AStartLoc[1], AStartLoc[2], AStartLoc[3], HStartLoc[0], HStartLoc[1], HStartLoc[2], HStartLoc[3], startMaxDist))
{
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/BattleGround/BattleGroundQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ GroupQueueInfo* BattleGroundQueue::AddGroup(Player* leader, Group* grp, BattleGr
uint32 MinPlayers = bg->GetMinPlayersPerTeam();
uint32 qHorde = 0;
uint32 qAlliance = 0;
uint32 q_min_level = bracketEntry->minLevel;
uint32 q_max_level = bracketEntry->maxLevel;
uint32 q_min_level = bracketEntry->MinLevel;
uint32 q_max_level = bracketEntry->MaxLevel;
GroupsQueueType::const_iterator itr;
for (itr = m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[bracketId][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr)
if (!(*itr)->IsInvitedToBGInstanceGUID)
Expand Down
4 changes: 2 additions & 2 deletions src/game/ChatCommands/AchievementCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void ChatHandler::ShowAchievementCriteriaListHelper(AchievementCriteriaEntry con
ss << " = " << target->GetAchievementMgr().GetCriteriaProgressCounter(criEntry);
}

if (achEntry->flags & ACHIEVEMENT_FLAG_COUNTER)
if (achEntry->Flags & ACHIEVEMENT_FLAG_COUNTER)
{
ss << GetMangosString(LANG_COUNTER);
}
Expand Down Expand Up @@ -166,7 +166,7 @@ bool ChatHandler::HandleAchievementAddCommand(char* args)
}

AchievementEntry const* achEntry = sAchievementStore.LookupEntry(achId);
if (!achEntry || achEntry->flags & ACHIEVEMENT_FLAG_COUNTER)
if (!achEntry || achEntry->Flags & ACHIEVEMENT_FLAG_COUNTER)
{
PSendSysMessage(LANG_ACHIEVEMENT_NOT_EXIST, achId);
SetSentErrorMessage(true);
Expand Down
4 changes: 2 additions & 2 deletions src/game/ChatCommands/CastAndAuraCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ bool ChatHandler::HandleAuraGroupCommand(char* args)
else
{
AddAuraToPlayer(spellInfo, playerTarget, m_session->GetPlayer());
PSendSysMessage(LANG_COMMAND_AURAGROUP_AURA_APPLIED, spellInfo->Id, nameLink.c_str());
PSendSysMessage(LANG_COMMAND_AURAGROUP_AURA_APPLIED, spellInfo->ID, nameLink.c_str());
return true;
}
}
Expand All @@ -468,7 +468,7 @@ bool ChatHandler::HandleAuraGroupCommand(char* args)
}

AddAuraToPlayer(spellInfo, pl, m_session->GetPlayer());
PSendSysMessage(LANG_COMMAND_AURAGROUP_AURA_APPLIED, spellInfo->Id, nameLink.c_str());
PSendSysMessage(LANG_COMMAND_AURAGROUP_AURA_APPLIED, spellInfo->ID, nameLink.c_str());

}

Expand Down
4 changes: 2 additions & 2 deletions src/game/ChatCommands/CreatureCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ bool ChatHandler::HandleNpcAddVendorCurrencyCommand(char* args)

sObjectMgr.AddVendorItem(vendor_entry, currencyId, VENDOR_ITEM_TYPE_CURRENCY, maxcount, 0, extendedcost);

std::string name = sCurrencyTypesStore.LookupEntry(currencyId)->name[0];
std::string name = sCurrencyTypesStore.LookupEntry(currencyId)->Name_lang[0];

PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, currencyId, name.c_str(), maxcount, 0, extendedcost);
return true;
Expand Down Expand Up @@ -381,7 +381,7 @@ bool ChatHandler::HandleNpcDelVendorCurrencyCommand(char* args)
return false;
}

std::string name = sCurrencyTypesStore.LookupEntry(itemId)->name[0];
std::string name = sCurrencyTypesStore.LookupEntry(itemId)->Name_lang[0];

PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, name.c_str());
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/game/ChatCommands/DebugCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
}
// Heals (Also count Mana Shield and Absorb effects as heals)
if (spellEffect->Effect == SPELL_EFFECT_HEAL || spellEffect->Effect == SPELL_EFFECT_HEAL_MAX_HEALTH ||
(spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && (spellEffect->EffectApplyAuraName == SPELL_AURA_SCHOOL_ABSORB || spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)))
(spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && (spellEffect->EffectAura == SPELL_AURA_SCHOOL_ABSORB || spellEffect->EffectAura == SPELL_AURA_PERIODIC_HEAL)))
{
isDirectHeal = true;
break;
Expand All @@ -1705,7 +1705,7 @@ bool ChatHandler::HandleDebugSpellCoefsCommand(char* args)
continue;
}
// Periodic Heals
if (spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && spellEffect->EffectApplyAuraName == SPELL_AURA_PERIODIC_HEAL)
if (spellEffect->Effect == SPELL_EFFECT_APPLY_AURA && spellEffect->EffectAura == SPELL_AURA_PERIODIC_HEAL)
{
isDotHeal = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/game/ChatCommands/GMCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ bool ChatHandler::HandleGMVisibleCommand(char* args)
m_session->SendNotification(LANG_INVISIBLE_VISIBLE);
if (invisibleAuraInfo)
{
player->RemoveAurasDueToSpell(invisibleAuraInfo->Id);
player->RemoveAurasDueToSpell(invisibleAuraInfo->ID);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/game/ChatCommands/GameObjectCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

void ChatHandler::ShowAchievementListHelper(AchievementEntry const* achEntry, LocaleConstant loc, time_t const* date /*= NULL*/, Player* target /*= NULL */)
{
std::string name = achEntry->name[loc];
std::string name = achEntry->Title_lang[loc];

ObjectGuid guid = target ? target->GetObjectGuid() : ObjectGuid();

Expand Down
6 changes: 3 additions & 3 deletions src/game/ChatCommands/InstanceCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
if (const MapEntry* entry = sMapStore.LookupEntry(itr->first))
{
PSendSysMessage("map: %d (%s) inst: %d perm: %s diff: %d canReset: %s TTR: %s",
itr->first, entry->name[GetSessionDbcLocale()], state->GetInstanceId(), itr->second.perm ? "yes" : "no",
itr->first, entry->MapName_lang[GetSessionDbcLocale()], state->GetInstanceId(), itr->second.perm ? "yes" : "no",
state->GetDifficulty(), state->CanReset() ? "yes" : "no", timeleft.c_str());
}
else
Expand All @@ -90,7 +90,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
if (const MapEntry* entry = sMapStore.LookupEntry(itr->first))
{
PSendSysMessage("map: %d (%s) inst: %d perm: %s diff: %s canReset: %s TTR: %s",
itr->first, entry->name[GetSessionDbcLocale()], state->GetInstanceId(), itr->second.perm ? "yes" : "no",
itr->first, entry->MapName_lang[GetSessionDbcLocale()], state->GetInstanceId(), itr->second.perm ? "yes" : "no",
state->GetDifficulty(), state->CanReset() ? "yes" : "no", timeleft.c_str());
}
else
Expand Down Expand Up @@ -157,7 +157,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(char* args)
if (const MapEntry* entry = sMapStore.LookupEntry(itr->first))
{
PSendSysMessage("unbinding map: %d (%s) inst: %d perm: %s diff: %s canReset: %s TTR: %s",
itr->first, entry->name[GetSessionDbcLocale()], save->GetInstanceId(), itr->second.perm ? "yes" : "no",
itr->first, entry->MapName_lang[GetSessionDbcLocale()], save->GetInstanceId(), itr->second.perm ? "yes" : "no",
save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
}
else
Expand Down
20 changes: 10 additions & 10 deletions src/game/ChatCommands/ListCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool ChatHandler::HandleListAurasCommand(char* /*args*/)
bool talent = GetTalentSpellCost(itr->second->GetId()) > 0;

SpellAuraHolder* holder = itr->second;
char const* name = holder->GetSpellProto()->SpellName[GetSessionDbcLocale()];
char const* name = holder->GetSpellProto()->Name_lang[GetSessionDbcLocale()];

for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
{
Expand Down Expand Up @@ -116,7 +116,7 @@ bool ChatHandler::HandleListAurasCommand(char* /*args*/)
{
bool talent = GetTalentSpellCost((*itr)->GetId()) > 0;

char const* name = (*itr)->GetSpellProto()->SpellName[GetSessionDbcLocale()];
char const* name = (*itr)->GetSpellProto()->Name_lang[GetSessionDbcLocale()];

if (m_session)
{
Expand Down Expand Up @@ -660,7 +660,7 @@ bool ChatHandler::HandleListCreatureCommand(char* args)

void ChatHandler::ShowSpellListHelper(Player* target, SpellEntry const* spellInfo, LocaleConstant loc)
{
uint32 id = spellInfo->Id;
uint32 id = spellInfo->ID;

bool known = target && target->HasSpell(id);
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(EFFECT_INDEX_0);
Expand All @@ -678,7 +678,7 @@ void ChatHandler::ShowSpellListHelper(Player* target, SpellEntry const* spellInf

// send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format
std::ostringstream ss;
char const* nameStr = (spellInfo->SpellName && spellInfo->SpellName[loc]) ? spellInfo->SpellName[loc] : "";
char const* nameStr = (spellInfo->Name_lang && spellInfo->Name_lang[loc]) ? spellInfo->Name_lang[loc] : "";
if (m_session)
{
ss << id << " - |cffffffff|Hspell:" << id << "|h[" << nameStr;
Expand All @@ -690,7 +690,7 @@ void ChatHandler::ShowSpellListHelper(Player* target, SpellEntry const* spellInf

// include the spell's subtext ("Rank N" / label) to distinguish same-named
// spells; fall back to the computed numeric rank when there is no subtext
char const* subText = spellInfo->Rank ? spellInfo->Rank[loc] : NULL;
char const* subText = spellInfo->NameSubtext_lang ? spellInfo->NameSubtext_lang[loc] : NULL;
if (subText && *subText)
{
ss << " " << subText;
Expand Down Expand Up @@ -745,11 +745,11 @@ void ChatHandler::ShowCurrencyListHelper(Player* target, CurrencyTypesEntry cons
std::ostringstream ss;
if (m_session)
{
ss << id << " - |cff00aa00|Hcurrency:" << id << "|h[" << currency->name[loc];
ss << id << " - |cff00aa00|Hcurrency:" << id << "|h[" << currency->Name_lang[loc];
}
else
{
ss << id << " - " << currency->name[loc];
ss << id << " - " << currency->Name_lang[loc];
}

if (m_session)
Expand Down Expand Up @@ -813,8 +813,8 @@ bool ChatHandler::ShowPlayerListHelper(QueryResult* result, uint32* limit, bool
ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race);
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);

char const* race_name = raceEntry ? raceEntry->name[GetSessionDbcLocale()] : "<?>";
char const* class_name = classEntry ? classEntry->name[GetSessionDbcLocale()] : "<?>";
char const* race_name = raceEntry ? raceEntry->Name_lang[GetSessionDbcLocale()] : "<?>";
char const* class_name = classEntry ? classEntry->Name_lang[GetSessionDbcLocale()] : "<?>";

if (!m_session)
{
Expand All @@ -839,7 +839,7 @@ bool ChatHandler::ShowPlayerListHelper(QueryResult* result, uint32* limit, bool

void ChatHandler::ShowFactionListHelper(FactionEntry const* factionEntry, LocaleConstant loc, FactionState const* repState /*= NULL*/, Player* target /*= NULL */)
{
std::string name = factionEntry->name[loc];
std::string name = factionEntry->Name_lang[loc];

// send faction in "id - [faction] rank reputation [visible] [at war] [own team] [unknown] [invisible] [inactive]" format
// or "id - [faction] [no reputation]" format
Expand Down
Loading
Loading