mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 04:08:27 +00:00
[Quest API] Add CloneAppearance() to Perl/Lua. (#2531)
* [Quest API] Add CloneAppearance() to Perl/Lua. # Perl - Add `$client->CloneAppearance(other)` to Perl. - Add `$client->CloneAppearance(other, clone_name)` to Perl. # Lua - Add `client:CloneAppearance(other)` to Lua. - Add `client:CloneAppearance(other, clone_name)` to Lua. # Notes - Allows operators to easily clone appearance between mobs in a script without relying on a plugin or module. * Update mob_appearance.cpp * Update mob.cpp
This commit is contained in:
@@ -2478,6 +2478,16 @@ Lua_Mob Lua_Mob::GetUltimateOwner() {
|
||||
return Lua_Mob(self->GetUltimateOwner());
|
||||
}
|
||||
|
||||
void Lua_Mob::CloneAppearance(Lua_Mob other) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->CloneAppearance(other);
|
||||
}
|
||||
|
||||
void Lua_Mob::CloneAppearance(Lua_Mob other, bool clone_name) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->CloneAppearance(other, clone_name);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_mob() {
|
||||
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -2557,6 +2567,8 @@ luabind::scope lua_register_mob() {
|
||||
.def("CheckLoSToLoc", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CheckLoSToLoc)
|
||||
.def("CheckNumHitsRemaining", &Lua_Mob::CheckNumHitsRemaining)
|
||||
.def("ClearSpecialAbilities", (void(Lua_Mob::*)(void))&Lua_Mob::ClearSpecialAbilities)
|
||||
.def("CloneAppearance", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CloneAppearance)
|
||||
.def("CloneAppearance", (void(Lua_Mob::*)(Lua_Mob,bool))&Lua_Mob::CloneAppearance)
|
||||
.def("CombatRange", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CombatRange)
|
||||
.def("Damage", (void(Lua_Mob::*)(Lua_Mob,int64,int,int))&Lua_Mob::Damage)
|
||||
.def("Damage", (void(Lua_Mob::*)(Lua_Mob,int64,int,int,bool))&Lua_Mob::Damage)
|
||||
|
||||
Reference in New Issue
Block a user