mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
Add support for object display names
Ex. Kejek Forge in Stonebrunt Mountains
This commit is contained in:
parent
4360021fc9
commit
aaa116d97c
@ -30,7 +30,7 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9099
|
#define CURRENT_BINARY_DATABASE_VERSION 9100
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9008
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9008
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -353,6 +353,7 @@
|
|||||||
9097|2016_07_03_npc_class_as_last_name.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'NPC:UseClassAsLastName'|empty|
|
9097|2016_07_03_npc_class_as_last_name.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'NPC:UseClassAsLastName'|empty|
|
||||||
9098|2016_08_26_object_size_tilt.sql|SHOW COLUMNS FROM `object` LIKE 'size'|empty|
|
9098|2016_08_26_object_size_tilt.sql|SHOW COLUMNS FROM `object` LIKE 'size'|empty|
|
||||||
9099|2016_08_27_ip_exemptions.sql|SHOW TABLES LIKE 'ip_exemptions'|empty|
|
9099|2016_08_27_ip_exemptions.sql|SHOW TABLES LIKE 'ip_exemptions'|empty|
|
||||||
|
9100|2016_08_27_object_display_name.sql|SHOW COLUMNS FROM `object` LIKE 'display_name'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `object` ADD COLUMN `display_name` VARCHAR(64);
|
||||||
@ -543,6 +543,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
|||||||
coa->drop_id = click_object->drop_id;
|
coa->drop_id = click_object->drop_id;
|
||||||
coa->player_id = click_object->player_id;
|
coa->player_id = click_object->player_id;
|
||||||
coa->icon = m_icon;
|
coa->icon = m_icon;
|
||||||
|
strn0cpy(coa->object_name, m_display_name, 64);
|
||||||
|
|
||||||
//if this is not the main user, send them a close and a message
|
//if this is not the main user, send them a close and a message
|
||||||
if (user == nullptr || user == sender) {
|
if (user == nullptr || user == sender) {
|
||||||
@ -821,6 +822,11 @@ void Object::SetTiltY(float pos)
|
|||||||
safe_delete(app2);
|
safe_delete(app2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Object::SetDisplayName(const char *in_name)
|
||||||
|
{
|
||||||
|
strn0cpy(m_display_name, in_name, 64);
|
||||||
|
}
|
||||||
|
|
||||||
void Object::Depop()
|
void Object::Depop()
|
||||||
{
|
{
|
||||||
auto app = new EQApplicationPacket();
|
auto app = new EQApplicationPacket();
|
||||||
|
|||||||
@ -164,6 +164,8 @@ public:
|
|||||||
void SetSize(float size);
|
void SetSize(float size);
|
||||||
uint16 GetSolidType();
|
uint16 GetSolidType();
|
||||||
void SetSolidType(uint16 size);
|
void SetSolidType(uint16 size);
|
||||||
|
void SetDisplayName(const char *in_name);
|
||||||
|
const char *GetDisplayName() const { return m_display_name; }
|
||||||
|
|
||||||
const char* GetEntityVariable(const char *id);
|
const char* GetEntityVariable(const char *id);
|
||||||
void SetEntityVariable(const char *id, const char *m_var);
|
void SetEntityVariable(const char *id, const char *m_var);
|
||||||
@ -186,6 +188,7 @@ protected:
|
|||||||
float m_z;
|
float m_z;
|
||||||
float m_heading;
|
float m_heading;
|
||||||
bool m_ground_spawn;
|
bool m_ground_spawn;
|
||||||
|
char m_display_name[64];
|
||||||
|
|
||||||
std::map<std::string, std::string> o_EntityVariables;
|
std::map<std::string, std::string> o_EntityVariables;
|
||||||
|
|
||||||
|
|||||||
@ -162,7 +162,7 @@ bool Zone::LoadZoneObjects() {
|
|||||||
std::string query = StringFormat("SELECT id, zoneid, xpos, ypos, zpos, heading, "
|
std::string query = StringFormat("SELECT id, zoneid, xpos, ypos, zpos, heading, "
|
||||||
"itemid, charges, objectname, type, icon, unknown08, "
|
"itemid, charges, objectname, type, icon, unknown08, "
|
||||||
"unknown10, unknown20, unknown24, unknown76, size, tilt_x, "
|
"unknown10, unknown20, unknown24, unknown76, size, tilt_x, "
|
||||||
"tilt_y FROM object "
|
"tilt_y, display_name FROM object "
|
||||||
"WHERE zoneid = %i AND (version = %u OR version = -1)",
|
"WHERE zoneid = %i AND (version = %u OR version = -1)",
|
||||||
zoneid, instanceversion);
|
zoneid, instanceversion);
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = database.QueryDatabase(query);
|
||||||
@ -275,6 +275,7 @@ bool Zone::LoadZoneObjects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto object = new Object(id, type, icon, data, inst);
|
auto object = new Object(id, type, icon, data, inst);
|
||||||
|
object->SetDisplayName(row[19]);
|
||||||
entity_list.AddObject(object, false);
|
entity_list.AddObject(object, false);
|
||||||
if (type == OT_DROPPEDITEM && itemid != 0)
|
if (type == OT_DROPPEDITEM && itemid != 0)
|
||||||
entity_list.RemoveObject(object->GetID());
|
entity_list.RemoveObject(object->GetID());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user