mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Fix for quest::GetZoneLongName(zone_short_name) garbled output (#1134)
This commit is contained in:
parent
25c596656c
commit
be12cad7bd
@ -3733,10 +3733,11 @@ XS(XS__GetZoneLongName) {
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: quest::GetZoneLongName(string zone)");
|
||||
dXSTARG;
|
||||
char *zone = (char *) SvPV_nolen(ST(0));
|
||||
Const_char *RETVAL = quest_manager.GetZoneLongName(zone);
|
||||
|
||||
sv_setpv(TARG, RETVAL);
|
||||
std::string zone = (std::string) SvPV_nolen(ST(0));
|
||||
std::string RETVAL = quest_manager.GetZoneLongName(zone);
|
||||
|
||||
sv_setpv(TARG, RETVAL.c_str());
|
||||
XSprePUSH;
|
||||
PUSHTARG;
|
||||
XSRETURN(1);
|
||||
|
||||
@ -3272,13 +3272,11 @@ int32 QuestManager::GetZoneID(const char *zone) {
|
||||
return static_cast<int32>(ZoneID(zone));
|
||||
}
|
||||
|
||||
const char* QuestManager::GetZoneLongName(const char *zone) {
|
||||
char *long_name;
|
||||
content_db.GetZoneLongName(zone, &long_name);
|
||||
std::string ln = long_name;
|
||||
safe_delete_array(long_name);
|
||||
|
||||
return ln.c_str();
|
||||
std::string QuestManager::GetZoneLongName(std::string zone_short_name)
|
||||
{
|
||||
return zone_store.GetZoneLongName(
|
||||
zone_store.GetZoneID(zone_short_name)
|
||||
);
|
||||
}
|
||||
|
||||
void QuestManager::CrossZoneAssignTaskByCharID(int character_id, uint32 task_id, bool enforce_level_requirement) {
|
||||
|
||||
@ -280,7 +280,7 @@ public:
|
||||
void SendMail(const char *to, const char *from, const char *subject, const char *message);
|
||||
uint16 CreateDoor( const char* model, float x, float y, float z, float heading, uint8 opentype, uint16 size);
|
||||
int32 GetZoneID(const char *zone);
|
||||
const char *GetZoneLongName(const char *zone);
|
||||
static std::string GetZoneLongName(std::string zone_short_name);
|
||||
void CrossZoneAssignTaskByCharID(int character_id, uint32 task_id, bool enforce_level_requirement = false);
|
||||
void CrossZoneAssignTaskByGroupID(int group_id, uint32 task_id, bool enforce_level_requirement = false);
|
||||
void CrossZoneAssignTaskByRaidID(int raid_id, uint32 task_id, bool enforce_level_requirement = false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user