mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Add IsPetOwnerOfClientBot(), add Lua and Perl methods
This commit is contained in:
+1
-1
@@ -2641,7 +2641,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
}
|
||||
}
|
||||
|
||||
if (give_exp && give_exp->IsTempPet() && (give_exp->IsPetOwnerClient() || give_exp->IsPetOwnerBot())) {
|
||||
if (give_exp && give_exp->IsTempPet() && give_exp->IsPetOwnerOfClientBot()) {
|
||||
if (give_exp->IsNPC() && give_exp->CastToNPC()->GetSwarmOwner()) {
|
||||
Mob* temp_owner = entity_list.GetMobID(give_exp->CastToNPC()->GetSwarmOwner());
|
||||
if (temp_owner) {
|
||||
|
||||
+8
-1
@@ -3268,6 +3268,12 @@ bool Lua_Mob::IsPetOwnerNPC()
|
||||
return self->IsPetOwnerNPC();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsPetOwnerOfClientBot()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsPetOwnerOfClientBot();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsDestructibleObject()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
@@ -3902,8 +3908,9 @@ luabind::scope lua_register_mob() {
|
||||
.def("IsPausedTimer", &Lua_Mob::IsPausedTimer)
|
||||
.def("IsPet", (bool(Lua_Mob::*)(void))&Lua_Mob::IsPet)
|
||||
.def("IsPetOwnerBot", &Lua_Mob::IsPetOwnerBot)
|
||||
.def("IsPetOwnerClient", &Lua_Mob::IsPetOwnerClient)
|
||||
.def("IsPetOwnerClient", &Lua_Mob::IsPetOwnerClient)
|
||||
.def("IsPetOwnerNPC", &Lua_Mob::IsPetOwnerNPC)
|
||||
.def("IsPetOwnerOfClientBot", &Lua_Mob::IsPetOwnerOfClientBot)
|
||||
.def("IsPureMeleeClass", &Lua_Mob::IsPureMeleeClass)
|
||||
.def("IsRoamer", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRoamer)
|
||||
.def("IsRooted", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRooted)
|
||||
|
||||
+2
-1
@@ -574,8 +574,9 @@ public:
|
||||
bool IsFamiliar();
|
||||
bool IsTargetLockPet();
|
||||
bool IsPetOwnerBot();
|
||||
bool IsPetOwnerClient();
|
||||
bool IsPetOwnerClient();
|
||||
bool IsPetOwnerNPC();
|
||||
bool IsPetOwnerOfClientBot();
|
||||
bool IsDestructibleObject();
|
||||
bool IsBoat();
|
||||
bool IsControllableBoat();
|
||||
|
||||
@@ -1179,6 +1179,7 @@ public:
|
||||
inline void SetPetOwnerClient(bool b) { pet_owner_client = b; }
|
||||
inline bool IsPetOwnerNPC() const { return pet_owner_npc; }
|
||||
inline void SetPetOwnerNPC(bool b) { pet_owner_npc = b; }
|
||||
inline bool IsPetOwnerOfClientBot() const { return pet_owner_bot || pet_owner_client; }
|
||||
inline bool IsTempPet() const { return _IsTempPet; }
|
||||
inline void SetTempPet(bool value) { _IsTempPet = value; }
|
||||
inline bool IsHorse() { return is_horse; }
|
||||
|
||||
@@ -3400,6 +3400,11 @@ bool Perl_Mob_IsPetOwnerNPC(Mob* self)
|
||||
return self->IsPetOwnerNPC();
|
||||
}
|
||||
|
||||
bool Perl_Mob_IsPetOwnerOfClientBot(Mob* self)
|
||||
{
|
||||
return self->IsPetOwnerOfClientBot();
|
||||
}
|
||||
|
||||
bool Perl_Mob_IsDestructibleObject(Mob* self)
|
||||
{
|
||||
return self->IsDestructibleObject();
|
||||
@@ -3999,6 +4004,7 @@ void perl_register_mob()
|
||||
package.add("IsPetOwnerBot", &Perl_Mob_IsPetOwnerBot);
|
||||
package.add("IsPetOwnerClient", &Perl_Mob_IsPetOwnerClient);
|
||||
package.add("IsPetOwnerNPC", &Perl_Mob_IsPetOwnerNPC);
|
||||
package.add("IsPetOwnerOfClientBot", &Perl_Mob_IsPetOwnerOfClientBot);
|
||||
package.add("IsPlayerCorpse", &Perl_Mob_IsPlayerCorpse);
|
||||
package.add("IsPureMeleeClass", &Perl_Mob_IsPureMeleeClass);
|
||||
package.add("IsRoamer", &Perl_Mob_IsRoamer);
|
||||
|
||||
Reference in New Issue
Block a user