mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-04 21:43:51 +00:00
[Quest API] Convert Client GetLastName() method export to Mob export. (#1331)
This commit is contained in:
parent
324d48aa90
commit
0f23bd24cc
@ -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)
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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_<Lua_Mob, Lua_Entity>("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() {
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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, "$");
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user