mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[Bug Fix] Fix possible crash with zone name methods. (#2055)
- ZoneLongName and ZoneName were returning nullptr in places that were then attempting to use that nullptr value, causing zone crashes.
This commit is contained in:
parent
8e62383997
commit
b75741ff4e
@ -1146,12 +1146,13 @@ const char *lua_get_zone_long_name() {
|
|||||||
|
|
||||||
const char *lua_get_zone_long_name_by_name(const char* zone_name) {
|
const char *lua_get_zone_long_name_by_name(const char* zone_name) {
|
||||||
return ZoneLongName(
|
return ZoneLongName(
|
||||||
ZoneID(zone_name)
|
ZoneID(zone_name),
|
||||||
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *lua_get_zone_long_name_by_id(uint32 zone_id) {
|
const char *lua_get_zone_long_name_by_id(uint32 zone_id) {
|
||||||
return ZoneLongName(zone_id);
|
return ZoneLongName(zone_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *lua_get_zone_short_name() {
|
const char *lua_get_zone_short_name() {
|
||||||
@ -1162,7 +1163,7 @@ const char *lua_get_zone_short_name() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *lua_get_zone_short_name_by_id(uint32 zone_id) {
|
const char *lua_get_zone_short_name_by_id(uint32 zone_id) {
|
||||||
return ZoneName(zone_id);
|
return ZoneName(zone_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int lua_get_zone_instance_id() {
|
int lua_get_zone_instance_id() {
|
||||||
|
|||||||
@ -3234,15 +3234,15 @@ int32 QuestManager::GetZoneID(const char *zone) {
|
|||||||
|
|
||||||
std::string QuestManager::GetZoneLongName(std::string zone_short_name)
|
std::string QuestManager::GetZoneLongName(std::string zone_short_name)
|
||||||
{
|
{
|
||||||
return ZoneLongName(ZoneID(zone_short_name));
|
return ZoneLongName(ZoneID(zone_short_name), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string QuestManager::GetZoneLongNameByID(uint32 zone_id) {
|
std::string QuestManager::GetZoneLongNameByID(uint32 zone_id) {
|
||||||
return ZoneLongName(zone_id);
|
return ZoneLongName(zone_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string QuestManager::GetZoneShortName(uint32 zone_id) {
|
std::string QuestManager::GetZoneShortName(uint32 zone_id) {
|
||||||
return ZoneName(zone_id);
|
return ZoneName(zone_id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QuestManager::EnableRecipe(uint32 recipe_id)
|
bool QuestManager::EnableRecipe(uint32 recipe_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user