This commit is contained in:
committed by
Stoabrogga
parent
6cac3f881f
commit
9dd623e061
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1570914351382462135');
|
||||||
|
|
||||||
|
ALTER TABLE `points_of_interest` CHANGE `Data` `Importance` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0';
|
||||||
@@ -234,7 +234,7 @@ struct GossipMenuItemsLocale
|
|||||||
|
|
||||||
struct PointOfInterestLocale
|
struct PointOfInterestLocale
|
||||||
{
|
{
|
||||||
StringVector IconName;
|
StringVector Name;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_EQUIPMENT_ITEMS 3
|
#define MAX_EQUIPMENT_ITEMS 3
|
||||||
|
|||||||
@@ -244,19 +244,19 @@ void PlayerMenu::SendPointOfInterest(uint32 poiId) const
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string iconText = poi->icon_name;
|
std::string name = poi->Name;
|
||||||
int32 locale = _session->GetSessionDbLocaleIndex();
|
int32 locale = _session->GetSessionDbLocaleIndex();
|
||||||
if (locale >= 0)
|
if (locale >= 0)
|
||||||
if (PointOfInterestLocale const* localeData = sObjectMgr->GetPointOfInterestLocale(poiId))
|
if (PointOfInterestLocale const* localeData = sObjectMgr->GetPointOfInterestLocale(poiId))
|
||||||
ObjectMgr::GetLocaleString(localeData->IconName, locale, iconText);
|
ObjectMgr::GetLocaleString(localeData->Name, locale, name);
|
||||||
|
|
||||||
WorldPacket data(SMSG_GOSSIP_POI, 4 + 4 + 4 + 4 + 4 + 20); // guess size
|
WorldPacket data(SMSG_GOSSIP_POI, 4 + 4 + 4 + 4 + 4 + 20); // guess size
|
||||||
data << uint32(poi->flags);
|
data << uint32(poi->Flags);
|
||||||
data << float(poi->x);
|
data << float(poi->PositionX);
|
||||||
data << float(poi->y);
|
data << float(poi->PositionY);
|
||||||
data << uint32(poi->icon);
|
data << uint32(poi->Icon);
|
||||||
data << uint32(poi->data);
|
data << uint32(poi->Importance);
|
||||||
data << iconText;
|
data << name;
|
||||||
|
|
||||||
_session->SendPacket(&data);
|
_session->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
|
|||||||
if (locale == LOCALE_enUS)
|
if (locale == LOCALE_enUS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
AddLocaleString(Name, locale, data.IconName);
|
AddLocaleString(Name, locale, data.Name);
|
||||||
|
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
|
|
||||||
@@ -7148,7 +7148,7 @@ void ObjectMgr::LoadPointsOfInterest()
|
|||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6
|
// 0 1 2 3 4 5 6
|
||||||
QueryResult result = WorldDatabase.Query("SELECT ID, PositionX, PositionY, Icon, Flags, Data, Name FROM points_of_interest");
|
QueryResult result = WorldDatabase.Query("SELECT ID, PositionX, PositionY, Icon, Flags, Importance, Name FROM points_of_interest");
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
@@ -7164,17 +7164,17 @@ void ObjectMgr::LoadPointsOfInterest()
|
|||||||
uint32 point_id = fields[0].GetUInt32();
|
uint32 point_id = fields[0].GetUInt32();
|
||||||
|
|
||||||
PointOfInterest POI;
|
PointOfInterest POI;
|
||||||
POI.entry = point_id;
|
POI.ID = point_id;
|
||||||
POI.x = fields[1].GetFloat();
|
POI.PositionX = fields[1].GetFloat();
|
||||||
POI.y = fields[2].GetFloat();
|
POI.PositionY = fields[2].GetFloat();
|
||||||
POI.icon = fields[3].GetUInt32();
|
POI.Icon = fields[3].GetUInt32();
|
||||||
POI.flags = fields[4].GetUInt32();
|
POI.Flags = fields[4].GetUInt32();
|
||||||
POI.data = fields[5].GetUInt32();
|
POI.Importance = fields[5].GetUInt32();
|
||||||
POI.icon_name = fields[6].GetString();
|
POI.Name = fields[6].GetString();
|
||||||
|
|
||||||
if (!Trinity::IsValidMapCoord(POI.x, POI.y))
|
if (!Trinity::IsValidMapCoord(POI.PositionX, POI.PositionY))
|
||||||
{
|
{
|
||||||
sLog->outErrorDb("Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.x, POI.y);
|
sLog->outErrorDb("Table `points_of_interest` (ID: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.PositionX, POI.PositionY);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -567,13 +567,13 @@ struct RepSpilloverTemplate
|
|||||||
|
|
||||||
struct PointOfInterest
|
struct PointOfInterest
|
||||||
{
|
{
|
||||||
uint32 entry;
|
uint32 ID;
|
||||||
float x;
|
float PositionX;
|
||||||
float y;
|
float PositionY;
|
||||||
uint32 icon;
|
uint32 Icon;
|
||||||
uint32 flags;
|
uint32 Flags;
|
||||||
uint32 data;
|
uint32 Importance;
|
||||||
std::string icon_name;
|
std::string Name;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GossipMenuItems
|
struct GossipMenuItems
|
||||||
|
|||||||
Reference in New Issue
Block a user