mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Datastores: use generated member names for MapEntry fields
* load all dbc fields of MapEntry
This commit is contained in:
@@ -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->Name[LOCALE_enUS]);
|
||||
return true;
|
||||
}
|
||||
int32 difficulty = difficulty_str ? atoi(difficulty_str) : -1;
|
||||
@@ -1539,32 +1539,32 @@ public:
|
||||
handler->PSendSysMessage("Invalid difficulty %d - specify in range [0,%d).", difficulty, MAX_RAID_DIFFICULTY);
|
||||
return false;
|
||||
}
|
||||
if (difficulty >= 0 && !GetMapDifficultyData(mEntry->MapID, Difficulty(difficulty)))
|
||||
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->Name[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->Name[LOCALE_enUS]);
|
||||
for (uint8 diff = (mEntry->IsRaid() ? 0 : 1); diff < (mEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY); ++diff)
|
||||
{
|
||||
if (GetMapDifficultyData(mEntry->MapID, Difficulty(diff)))
|
||||
if (GetMapDifficultyData(mEntry->ID, Difficulty(diff)))
|
||||
{
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->name[LOCALE_enUS]);
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->MapID, Difficulty(diff));
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", diff, mEntry->Name[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->Name[LOCALE_enUS], difficulty);
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->name[LOCALE_enUS]);
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->MapID, Difficulty(difficulty));
|
||||
handler->PSendSysMessage("Resetting difficulty %d for '%s'.", difficulty, mEntry->Name[LOCALE_enUS]);
|
||||
sInstanceSaveMgr->ForceGlobalReset(mEntry->ID, Difficulty(difficulty));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1129,7 +1129,7 @@ public:
|
||||
{
|
||||
if (MapEntry const* mapInfo = sMapStore.LookupEntry(id))
|
||||
{
|
||||
std::string name = mapInfo->name;
|
||||
std::string name = mapInfo->Name;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -1147,7 +1147,7 @@ public:
|
||||
if (mapInfo->IsContinent())
|
||||
ss << handler->GetTrinityString(LANG_CONTINENT);
|
||||
|
||||
switch (mapInfo->map_type)
|
||||
switch (mapInfo->MapType)
|
||||
{
|
||||
case MAP_INSTANCE:
|
||||
ss << handler->GetTrinityString(LANG_INSTANCE);
|
||||
|
||||
@@ -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->Name : unknown),
|
||||
zoneId, (zoneEntry ? zoneEntry->area_name : unknown),
|
||||
areaId, (areaEntry ? areaEntry->area_name : unknown),
|
||||
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation());
|
||||
@@ -1848,7 +1848,7 @@ public:
|
||||
}
|
||||
|
||||
if (target)
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->name,
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->Name,
|
||||
(!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
(!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)));
|
||||
|
||||
|
||||
@@ -852,7 +852,7 @@ public:
|
||||
if (visibleMapId)
|
||||
{
|
||||
MapEntry const* visibleMap = sMapStore.LookupEntry(visibleMapId);
|
||||
if (!visibleMap || visibleMap->rootPhaseMap != int32(target->GetMapId()))
|
||||
if (!visibleMap || visibleMap->ParentMapID != int32(target->GetMapId()))
|
||||
{
|
||||
handler->SendSysMessage(LANG_PHASE_NOTFOUND);
|
||||
handler->SetSentErrorMessage(true);
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
npc_pet_gen_egbertAI(Creature* creature) : NullCreatureAI(creature)
|
||||
{
|
||||
if (Unit* owner = me->GetCharmerOrOwner())
|
||||
if (owner->GetMap()->GetEntry()->addon > 1)
|
||||
if (owner->GetMap()->GetEntry()->ExpansionID > 1)
|
||||
me->SetCanFly(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user