mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 02:08:23 +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()) {
|
if (give_exp->IsNPC() && give_exp->CastToNPC()->GetSwarmOwner()) {
|
||||||
Mob* temp_owner = entity_list.GetMobID(give_exp->CastToNPC()->GetSwarmOwner());
|
Mob* temp_owner = entity_list.GetMobID(give_exp->CastToNPC()->GetSwarmOwner());
|
||||||
if (temp_owner) {
|
if (temp_owner) {
|
||||||
|
|||||||
@@ -3268,6 +3268,12 @@ bool Lua_Mob::IsPetOwnerNPC()
|
|||||||
return self->IsPetOwnerNPC();
|
return self->IsPetOwnerNPC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Lua_Mob::IsPetOwnerOfClientBot()
|
||||||
|
{
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsPetOwnerOfClientBot();
|
||||||
|
}
|
||||||
|
|
||||||
bool Lua_Mob::IsDestructibleObject()
|
bool Lua_Mob::IsDestructibleObject()
|
||||||
{
|
{
|
||||||
Lua_Safe_Call_Bool();
|
Lua_Safe_Call_Bool();
|
||||||
@@ -3904,6 +3910,7 @@ luabind::scope lua_register_mob() {
|
|||||||
.def("IsPetOwnerBot", &Lua_Mob::IsPetOwnerBot)
|
.def("IsPetOwnerBot", &Lua_Mob::IsPetOwnerBot)
|
||||||
.def("IsPetOwnerClient", &Lua_Mob::IsPetOwnerClient)
|
.def("IsPetOwnerClient", &Lua_Mob::IsPetOwnerClient)
|
||||||
.def("IsPetOwnerNPC", &Lua_Mob::IsPetOwnerNPC)
|
.def("IsPetOwnerNPC", &Lua_Mob::IsPetOwnerNPC)
|
||||||
|
.def("IsPetOwnerOfClientBot", &Lua_Mob::IsPetOwnerOfClientBot)
|
||||||
.def("IsPureMeleeClass", &Lua_Mob::IsPureMeleeClass)
|
.def("IsPureMeleeClass", &Lua_Mob::IsPureMeleeClass)
|
||||||
.def("IsRoamer", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRoamer)
|
.def("IsRoamer", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRoamer)
|
||||||
.def("IsRooted", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRooted)
|
.def("IsRooted", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRooted)
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ public:
|
|||||||
bool IsPetOwnerBot();
|
bool IsPetOwnerBot();
|
||||||
bool IsPetOwnerClient();
|
bool IsPetOwnerClient();
|
||||||
bool IsPetOwnerNPC();
|
bool IsPetOwnerNPC();
|
||||||
|
bool IsPetOwnerOfClientBot();
|
||||||
bool IsDestructibleObject();
|
bool IsDestructibleObject();
|
||||||
bool IsBoat();
|
bool IsBoat();
|
||||||
bool IsControllableBoat();
|
bool IsControllableBoat();
|
||||||
|
|||||||
@@ -1179,6 +1179,7 @@ public:
|
|||||||
inline void SetPetOwnerClient(bool b) { pet_owner_client = b; }
|
inline void SetPetOwnerClient(bool b) { pet_owner_client = b; }
|
||||||
inline bool IsPetOwnerNPC() const { return pet_owner_npc; }
|
inline bool IsPetOwnerNPC() const { return pet_owner_npc; }
|
||||||
inline void SetPetOwnerNPC(bool b) { pet_owner_npc = b; }
|
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 bool IsTempPet() const { return _IsTempPet; }
|
||||||
inline void SetTempPet(bool value) { _IsTempPet = value; }
|
inline void SetTempPet(bool value) { _IsTempPet = value; }
|
||||||
inline bool IsHorse() { return is_horse; }
|
inline bool IsHorse() { return is_horse; }
|
||||||
|
|||||||
@@ -3400,6 +3400,11 @@ bool Perl_Mob_IsPetOwnerNPC(Mob* self)
|
|||||||
return self->IsPetOwnerNPC();
|
return self->IsPetOwnerNPC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Perl_Mob_IsPetOwnerOfClientBot(Mob* self)
|
||||||
|
{
|
||||||
|
return self->IsPetOwnerOfClientBot();
|
||||||
|
}
|
||||||
|
|
||||||
bool Perl_Mob_IsDestructibleObject(Mob* self)
|
bool Perl_Mob_IsDestructibleObject(Mob* self)
|
||||||
{
|
{
|
||||||
return self->IsDestructibleObject();
|
return self->IsDestructibleObject();
|
||||||
@@ -3999,6 +4004,7 @@ void perl_register_mob()
|
|||||||
package.add("IsPetOwnerBot", &Perl_Mob_IsPetOwnerBot);
|
package.add("IsPetOwnerBot", &Perl_Mob_IsPetOwnerBot);
|
||||||
package.add("IsPetOwnerClient", &Perl_Mob_IsPetOwnerClient);
|
package.add("IsPetOwnerClient", &Perl_Mob_IsPetOwnerClient);
|
||||||
package.add("IsPetOwnerNPC", &Perl_Mob_IsPetOwnerNPC);
|
package.add("IsPetOwnerNPC", &Perl_Mob_IsPetOwnerNPC);
|
||||||
|
package.add("IsPetOwnerOfClientBot", &Perl_Mob_IsPetOwnerOfClientBot);
|
||||||
package.add("IsPlayerCorpse", &Perl_Mob_IsPlayerCorpse);
|
package.add("IsPlayerCorpse", &Perl_Mob_IsPlayerCorpse);
|
||||||
package.add("IsPureMeleeClass", &Perl_Mob_IsPureMeleeClass);
|
package.add("IsPureMeleeClass", &Perl_Mob_IsPureMeleeClass);
|
||||||
package.add("IsRoamer", &Perl_Mob_IsRoamer);
|
package.add("IsRoamer", &Perl_Mob_IsRoamer);
|
||||||
|
|||||||
Reference in New Issue
Block a user