diff --git a/zone/lua_client.cpp b/zone/lua_client.cpp index c963feec0..9541176c8 100644 --- a/zone/lua_client.cpp +++ b/zone/lua_client.cpp @@ -169,11 +169,6 @@ int Lua_Client::GetLanguageSkill(int skill_id) { return self->GetLanguageSkill(skill_id); } -const char *Lua_Client::GetLastName() { - Lua_Safe_Call_String(); - return self->GetLastName(); -} - int Lua_Client::GetLDoNPointsTheme(int theme) { Lua_Safe_Call_Int(); return self->GetLDoNPointsTheme(theme); @@ -2096,7 +2091,6 @@ luabind::scope lua_register_client() { .def("GetRaceBitmask", (int(Lua_Client::*)(void))&Lua_Client::GetRaceBitmask) .def("GetBaseFace", (int(Lua_Client::*)(void))&Lua_Client::GetBaseFace) .def("GetLanguageSkill", (int(Lua_Client::*)(int))&Lua_Client::GetLanguageSkill) - .def("GetLastName", (const char *(Lua_Client::*)(void))&Lua_Client::GetLastName) .def("GetLDoNPointsTheme", (int(Lua_Client::*)(int))&Lua_Client::GetLDoNPointsTheme) .def("GetBaseSTR", (int(Lua_Client::*)(void))&Lua_Client::GetBaseSTR) .def("GetBaseSTA", (int(Lua_Client::*)(void))&Lua_Client::GetBaseSTA) diff --git a/zone/lua_client.h b/zone/lua_client.h index 55b98087a..923231808 100644 --- a/zone/lua_client.h +++ b/zone/lua_client.h @@ -60,7 +60,6 @@ public: int GetRaceBitmask(); int GetBaseFace(); int GetLanguageSkill(int skill_id); - const char *GetLastName(); int GetLDoNPointsTheme(int theme); int GetBaseSTR(); int GetBaseSTA(); diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index e702b8bf1..2948c8c71 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -2342,6 +2342,11 @@ Lua_HateList Lua_Mob::GetHateListByDistance(int distance) { return ret; } +const char *Lua_Mob::GetLastName() { + Lua_Safe_Call_String(); + return self->GetLastName(); +} + luabind::scope lua_register_mob() { return luabind::class_("Mob") .def(luabind::constructor<>()) @@ -2743,7 +2748,8 @@ luabind::scope lua_register_mob() { .def("GetBucketRemaining", (std::string(Lua_Mob::*)(std::string))&Lua_Mob::GetBucketRemaining) .def("SetBucket", (void(Lua_Mob::*)(std::string,std::string))&Lua_Mob::SetBucket) .def("SetBucket", (void(Lua_Mob::*)(std::string,std::string,std::string))&Lua_Mob::SetBucket) - .def("IsHorse", &Lua_Mob::IsHorse); + .def("IsHorse", &Lua_Mob::IsHorse) + .def("GetLastName", &Lua_Mob::GetLastName); } luabind::scope lua_register_special_abilities() { diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 4b090765c..dbb3c8110 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -110,6 +110,7 @@ public: int GetClass(); int GetLevel(); const char *GetCleanName(); + const char *GetLastName(); Lua_Mob GetTarget(); void SetTarget(Lua_Mob t); double GetHPRatio(); diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 04e93beae..567067f64 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -446,24 +446,6 @@ XS(XS_Client_GetLanguageSkill) { XSRETURN(1); } -XS(XS_Client_GetLastName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLastName) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetLastName(THIS)"); // @categories Account and Character - { - Client *THIS; - Const_char *RETVAL; - dXSTARG; - VALIDATE_THIS_IS_CLIENT; - RETVAL = THIS->GetLastName(); - sv_setpv(TARG, RETVAL); - XSprePUSH; - PUSHTARG; - } - XSRETURN(1); -} - XS(XS_Client_GetLDoNPointsTheme); /* prototype to pass -Wmissing-prototypes */ XS(XS_Client_GetLDoNPointsTheme) { dXSARGS; @@ -5385,7 +5367,6 @@ XS(boot_Client) { newXSproto(strcpy(buf, "GetItemIDAt"), XS_Client_GetItemIDAt, file, "$$"); newXSproto(strcpy(buf, "GetItemInInventory"), XS_Client_GetItemInInventory, file, "$$"); newXSproto(strcpy(buf, "GetLanguageSkill"), XS_Client_GetLanguageSkill, file, "$$"); - newXSproto(strcpy(buf, "GetLastName"), XS_Client_GetLastName, file, "$"); newXSproto(strcpy(buf, "GetLDoNLosses"), XS_Client_GetLDoNLosses, file, "$"); newXSproto(strcpy(buf, "GetLDoNLossesTheme"), XS_Client_GetLDoNLossesTheme, file, "$$"); newXSproto(strcpy(buf, "GetLDoNPointsTheme"), XS_Client_GetLDoNPointsTheme, file, "$"); diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index f5dc1067a..fb4606d27 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -6235,6 +6235,24 @@ XS(XS_Mob_GetHateClosest) { XSRETURN(1); } +XS(XS_Mob_GetLastName); /* prototype to pass -Wmissing-prototypes */ +XS(XS_Mob_GetLastName) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Mob::GetLastName(THIS)"); // @categories Script Utility + { + Mob *THIS; + Const_char *last_name; + dXSTARG; + VALIDATE_THIS_IS_MOB; + last_name = THIS->GetLastName(); + sv_setpv(TARG, last_name); + XSprePUSH; + PUSHTARG; + } + XSRETURN(1); +} + #ifdef __cplusplus extern "C" #endif @@ -6583,6 +6601,7 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "SetBucket"), XS_Mob_SetBucket, file, "$$$;$"); newXSproto(strcpy(buf, "GetHateClosest"), XS_Mob_GetHateClosest, file, "$"); newXSproto(strcpy(buf, "GetHateListByDistance"), XS_Mob_GetHateListByDistance, file, "$;$"); + newXSproto(strcpy(buf, "GetLastName"), XS_Mob_GetLastName, file, "$"); XSRETURN_YES; }