mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
update (core\store): sLFGDungeonStore update (#15325)
* update (core\store): sLFGDungeonStore update update (core\store): sLFGDungeonStore update Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * update (core\store): sLFGDungeonStore update Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --------- Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -847,9 +847,15 @@ CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, ui
|
||||
/// Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery)
|
||||
LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty)
|
||||
{
|
||||
for (LFGDungeonEntry const* dungeon : sLFGDungeonStore)
|
||||
if (dungeon->map == int32(mapId) && Difficulty(dungeon->difficulty) == difficulty)
|
||||
for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i)
|
||||
{
|
||||
LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i);
|
||||
if (!dungeon)
|
||||
continue;
|
||||
|
||||
if (dungeon->MapID == uint32(mapId) && Difficulty(dungeon->Difficulty) == difficulty)
|
||||
return dungeon;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -858,7 +864,7 @@ LFGDungeonEntry const* GetZoneLFGDungeonEntry(std::string const& zoneName, Local
|
||||
{
|
||||
for (LFGDungeonEntry const* dungeon : sLFGDungeonStore)
|
||||
{
|
||||
if (dungeon->type == lfg::LFG_TYPE_ZONE && zoneName.find(dungeon->name[locale]) != std::string::npos)
|
||||
if (dungeon->TypeID == lfg::LFG_TYPE_ZONE && zoneName.find(dungeon->Name[locale]) != std::string::npos)
|
||||
{
|
||||
return dungeon;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace lfg
|
||||
if (!dungeon)
|
||||
continue;
|
||||
|
||||
switch (dungeon->type)
|
||||
switch (dungeon->TypeID)
|
||||
{
|
||||
case LFG_TYPE_DUNGEON:
|
||||
case LFG_TYPE_HEROIC:
|
||||
|
||||
@@ -394,10 +394,10 @@ namespace lfg
|
||||
{
|
||||
LFGDungeonData(): name("")
|
||||
{ }
|
||||
LFGDungeonData(LFGDungeonEntry const* dbc): id(dbc->ID), name(dbc->name[0]), map(dbc->map),
|
||||
type(dbc->type), expansion(dbc->expansion), group(dbc->grouptype),
|
||||
minlevel(dbc->minlevel), maxlevel(dbc->maxlevel), difficulty(Difficulty(dbc->difficulty)),
|
||||
seasonal(dbc->flags & LFG_FLAG_SEASONAL), x(0.0f), y(0.0f), z(0.0f), o(0.0f)
|
||||
LFGDungeonData(LFGDungeonEntry const* dbc) : id(dbc->ID), name(dbc->Name[0]), map(dbc->MapID),
|
||||
type(dbc->TypeID), expansion(uint8(dbc->ExpansionLevel)), group(uint8(dbc->GroupID)),
|
||||
minlevel(uint8(dbc->MinLevel)), maxlevel(uint8(dbc->MaxLevel)), difficulty(Difficulty(dbc->Difficulty)),
|
||||
seasonal((dbc->Flags & LFG_FLAG_SEASONAL) != 0), x(0.0f), y(0.0f), z(0.0f), o(0.0f)
|
||||
{ }
|
||||
|
||||
uint32 id{0};
|
||||
|
||||
@@ -445,7 +445,7 @@ namespace lfg
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindConnectedPlayer(itRoles->first))
|
||||
{
|
||||
if (player->GetMapId() == static_cast<uint32>(dungeon->map))
|
||||
if (player->GetMapId() == static_cast<uint32>(dungeon->MapID))
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
|
||||
@@ -5878,7 +5878,7 @@ void Player::RewardReputation(Unit* victim, float rate)
|
||||
Map const* map = GetMap();
|
||||
if (map->IsNonRaidDungeon())
|
||||
if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty()))
|
||||
if (dungeon->reclevel == 80)
|
||||
if (dungeon->TargetLevel == 80)
|
||||
ChampioningFaction = GetChampioningFaction();
|
||||
}
|
||||
|
||||
|
||||
@@ -2256,7 +2256,7 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
|
||||
// Get level from LFGDungeonEntry because the one from AreaTableEntry is not valid
|
||||
// If area level is too big, do not add new taxi
|
||||
if (lfgDungeon->minlevel > level)
|
||||
if (lfgDungeon->MinLevel > level)
|
||||
{
|
||||
FillTaxiMask(field, 0);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user