Store area name for explore travel target

This commit is contained in:
郑佩茹
2022-09-22 16:03:27 -06:00
parent afd2151769
commit 08c70e9ffe
2 changed files with 8 additions and 5 deletions

View File

@@ -1273,10 +1273,10 @@ bool ExploreTravelDestination::isActive(Player* bot)
return !(currFields & val);
}
std::string const ExploreTravelDestination::getTitle()
{
return points[0]->getAreaName();
};
//std::string const ExploreTravelDestination::getTitle()
//{
// return points[0]->getAreaName();
//};
bool GrindTravelDestination::isActive(Player* bot)
{
@@ -2268,6 +2268,7 @@ void TravelMgr::LoadQuestTravelTable()
loc->setMaxVisitors(1000, 0);
loc->setCooldownDelay(1000);
loc->setExpireDelay(1000);
loc->setTitle(area->area_name[0]);
exploreLocs.insert_or_assign(area->ID, loc);
}
else

View File

@@ -709,11 +709,13 @@ class ExploreTravelDestination : public TravelDestination
bool isActive(Player* bot) override;
std::string const getName() override { return "ExploreTravelDestination"; }
int32 getEntry() override { return 0; }
std::string const getTitle() override;
std::string const getTitle() override { return title; };
virtual void setTitle(std::string newTitle) { title = newTitle; }
virtual uint32 getAreaId() { return areaId; }
protected:
uint32 areaId;
std::string title = "";
};
//A location with zone exploration target(s)