mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-19 11:42:25 +00:00
Exports continue, mob and some constants
This commit is contained in:
parent
31a20a1e4c
commit
9fd07b4dd4
@ -261,6 +261,9 @@ IF(EQEMU_BUILD_PERL)
|
||||
ENDIF(EQEMU_BUILD_PERL)
|
||||
IF(EQEMU_BUILD_LUA)
|
||||
ADD_DEFINITIONS(-DLUA_EQEMU)
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(/bigobj)
|
||||
ENDIF()
|
||||
ENDIF(EQEMU_BUILD_LUA)
|
||||
|
||||
OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF)
|
||||
|
||||
@ -204,8 +204,12 @@ SET(zone_sources ${zone_sources}
|
||||
lua/lua_door.cpp
|
||||
lua/lua_entity.cpp
|
||||
lua/lua_extra_attack_options.cpp
|
||||
lua/lua_inventory_where.cpp
|
||||
lua/lua_npc.cpp
|
||||
lua/lua_mob.cpp
|
||||
lua/lua_mob_a.cpp
|
||||
lua/lua_mob_b.cpp
|
||||
lua/lua_mob_c.cpp
|
||||
lua/lua_object.cpp
|
||||
lua/lua_general.cpp
|
||||
lua/lua_parser.cpp
|
||||
@ -226,8 +230,12 @@ SOURCE_GROUP(lua FILES
|
||||
lua/lua_extra_attack_options.cpp
|
||||
lua/lua_events.h
|
||||
lua/lua_forward.h
|
||||
lua/lua_inventory_where.cpp
|
||||
lua/lua_npc.cpp
|
||||
lua/lua_mob.cpp
|
||||
lua/lua_mob_a.cpp
|
||||
lua/lua_mob_b.cpp
|
||||
lua/lua_mob_c.cpp
|
||||
lua/lua_object.cpp
|
||||
lua/lua_general.cpp
|
||||
lua/lua_parser.cpp
|
||||
|
||||
@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "water_map.h"
|
||||
#include "worldserver.h"
|
||||
#include "zone.h"
|
||||
#include "lua_parser.h"
|
||||
#include "lua/lua_parser.h"
|
||||
#include "fastmath.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@ -5450,7 +5450,7 @@ void Client::SetPortExemption(bool v)
|
||||
m_PortExemption = v;
|
||||
}
|
||||
|
||||
void Client::Signal(uint32 data)
|
||||
void Client::Signal(int data)
|
||||
{
|
||||
char buf[32];
|
||||
snprintf(buf, 31, "%d", data);
|
||||
|
||||
@ -1099,6 +1099,7 @@ public:
|
||||
|
||||
void MarkSingleCompassLoc(float in_x, float in_y, float in_z, uint8 count=1);
|
||||
|
||||
virtual void Signal(int signal);
|
||||
void CalcItemScale();
|
||||
bool CalcItemScale(uint32 slot_x, uint32 slot_y); // behavior change: 'slot_y' is now [RANGE]_END and not [RANGE]_END + 1
|
||||
void DoItemEnterZone();
|
||||
@ -1114,7 +1115,6 @@ public:
|
||||
void SuspendMinion();
|
||||
void Doppelganger(uint16 spell_id, Mob *target, const char *name_override, int pet_count, int pet_duration);
|
||||
void NotifyNewTitlesAvailable();
|
||||
void Signal(uint32 data);
|
||||
Mob *GetBindSightTarget() { return bind_sight_target; }
|
||||
void SetBindSightTarget(Mob *n) { bind_sight_target = n; }
|
||||
const uint16 GetBoatID() const { return controlling_boat_id; }
|
||||
|
||||
@ -5054,7 +5054,7 @@ void Client::Handle_OP_ControlBoat(const EQApplicationPacket *app)
|
||||
FastQueuePacket(&outapp);
|
||||
safe_delete(outapp);
|
||||
// have the boat signal itself, so quests can be triggered by boat use
|
||||
boat->CastToNPC()->SignalNPC(0);
|
||||
boat->Signal(0);
|
||||
}
|
||||
|
||||
void Client::Handle_OP_CorpseDrag(const EQApplicationPacket *app)
|
||||
|
||||
@ -3147,7 +3147,7 @@ void EntityList::SignalMobsByNPCID(uint32 snpc, int signal_id)
|
||||
while (it != npc_list.end()) {
|
||||
NPC *pit = it->second;
|
||||
if (pit->GetNPCTypeID() == snpc)
|
||||
pit->SignalNPC(signal_id);
|
||||
pit->Signal(signal_id);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "queryserv.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "lua_parser.h"
|
||||
#include "lua/lua_parser.h"
|
||||
#include "string_ids.h"
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "../client.h"
|
||||
|
||||
void lua_register_client(sol::state *state) {
|
||||
state->new_usertype<Client>("Client",
|
||||
sol::base_classes, sol::bases<Mob, Entity>()
|
||||
);
|
||||
auto client = state->create_simple_usertype<Client>(sol::base_classes, sol::bases<Mob, Entity>());
|
||||
|
||||
state->set_usertype("Client", client);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "../corpse.h"
|
||||
|
||||
void lua_register_corpse(sol::state *state) {
|
||||
state->new_usertype<Corpse>("Corpse",
|
||||
sol::base_classes, sol::bases<Mob, Entity>()
|
||||
);
|
||||
auto corpse = state->create_simple_usertype<Corpse>(sol::base_classes, sol::bases<Mob, Entity>());
|
||||
|
||||
state->set_usertype("Corpse", corpse);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "../doors.h"
|
||||
|
||||
void lua_register_doors(sol::state *state) {
|
||||
state->new_usertype<Doors>("Doors",
|
||||
sol::base_classes, sol::bases<Entity>()
|
||||
);
|
||||
auto door = state->create_simple_usertype<Doors>(sol::base_classes, sol::bases<Entity>());
|
||||
|
||||
state->set_usertype("Door", door);
|
||||
}
|
||||
|
||||
@ -5,33 +5,36 @@
|
||||
#include "../corpse.h"
|
||||
#include "../doors.h"
|
||||
#include "../object.h"
|
||||
#include "../trap.h"
|
||||
#include "../encounter.h"
|
||||
#include "../beacon.h"
|
||||
|
||||
void lua_register_entity(sol::state *state) {
|
||||
state->new_usertype<Entity>("Entity",
|
||||
"IsClient", &Entity::IsClient,
|
||||
"IsNPC", &Entity::IsNPC,
|
||||
"IsMob", &Entity::IsMob,
|
||||
"IsMerc", &Entity::IsMerc,
|
||||
"IsCorpse", &Entity::IsCorpse,
|
||||
"IsPlayerCorpse", &Entity::IsPlayerCorpse,
|
||||
"IsNPCCorpse", &Entity::IsNPCCorpse,
|
||||
"IsObject", &Entity::IsObject,
|
||||
"IsDoor", &Entity::IsDoor,
|
||||
"IsTrap", &Entity::IsTrap,
|
||||
"IsBeacon", &Entity::IsBeacon,
|
||||
"IsEncounter", &Entity::IsEncounter,
|
||||
"IsBot", &Entity::IsBot,
|
||||
"IsAura", &Entity::IsAura,
|
||||
"CastToClient", (Client*(Entity::*)())&Entity::CastToClient,
|
||||
"CastToMob", (Mob*(Entity::*)())&Entity::CastToMob,
|
||||
//"CastToMerc", (Merc*(Entity::*)())&Entity::CastToMerc,
|
||||
"CastToCorpse", (Corpse*(Entity::*)())&Entity::CastToCorpse,
|
||||
"CastToObject", (Object*(Entity::*)())&Entity::CastToObject,
|
||||
"CastToDoors", (Doors*(Entity::*)())&Entity::CastToDoors,
|
||||
//"CastToTrap", (Trap*(Entity::*)())&Entity::CastToTrap,
|
||||
//"CastToBeacon", (Beacon*(Entity::*)())&Entity::CastToBeacon,
|
||||
//"CastToEncounter", (Encounter*(Entity::*)())&Entity::CastToEncounter,
|
||||
"GetID", &Entity::GetID,
|
||||
"GetName", &Entity::GetName
|
||||
);
|
||||
auto entity = state->create_simple_usertype<Entity>();
|
||||
entity.set("IsClient", &Entity::IsClient);
|
||||
entity.set("IsNPC", &Entity::IsNPC);
|
||||
entity.set("IsMob", &Entity::IsMob);
|
||||
entity.set("IsMerc", &Entity::IsMerc);
|
||||
entity.set("IsCorpse", &Entity::IsCorpse);
|
||||
entity.set("IsPlayerCorpse", &Entity::IsPlayerCorpse);
|
||||
entity.set("IsNPCCorpse", &Entity::IsNPCCorpse);
|
||||
entity.set("IsObject", &Entity::IsObject);
|
||||
entity.set("IsDoor", &Entity::IsDoor);
|
||||
entity.set("IsTrap", &Entity::IsTrap);
|
||||
entity.set("IsBeacon", &Entity::IsBeacon);
|
||||
entity.set("IsEncounter", &Entity::IsEncounter);
|
||||
entity.set("IsBot", &Entity::IsBot);
|
||||
entity.set("IsAura", &Entity::IsAura);
|
||||
entity.set("CastToClient", (Client*(Entity::*)())&Entity::CastToClient);
|
||||
entity.set("CastToMob", (Mob*(Entity::*)())&Entity::CastToMob);
|
||||
entity.set("CastToMerc", (Merc*(Entity::*)())&Entity::CastToMerc);
|
||||
entity.set("CastToCorpse", (Corpse*(Entity::*)())&Entity::CastToCorpse);
|
||||
entity.set("CastToObject", (Object*(Entity::*)())&Entity::CastToObject);
|
||||
entity.set("CastToDoors", (Doors*(Entity::*)())&Entity::CastToDoors);
|
||||
entity.set("CastToTrap", (Trap*(Entity::*)())&Entity::CastToTrap);
|
||||
entity.set("CastToBeacon", (Beacon*(Entity::*)())&Entity::CastToBeacon);
|
||||
entity.set("CastToEncounter", (Encounter*(Entity::*)())&Entity::CastToEncounter);
|
||||
entity.set("GetID", &Entity::GetID);
|
||||
entity.set("GetName", &Entity::GetName);
|
||||
state->set_usertype("Entity", entity);
|
||||
}
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
void lua_register_general(sol::state *state);
|
||||
void lua_register_extra_attack_options(sol::state *state);
|
||||
void lua_register_inventory_where(sol::state *state);
|
||||
void lua_register_entity(sol::state *state);
|
||||
void lua_register_mob(sol::state *state);
|
||||
void lua_register_npc(sol::state *state);
|
||||
void lua_register_client(sol::state *state);
|
||||
void lua_register_doors(sol::state *state);
|
||||
void lua_register_corpse(sol::state *state);
|
||||
void lua_register_object(sol::state *state);
|
||||
void lua_register_object(sol::state *state);
|
||||
void lua_register_general(sol::state *state);
|
||||
12
zone/lua/lua_inventory_where.cpp
Normal file
12
zone/lua/lua_inventory_where.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include <sol.hpp>
|
||||
#include "../client.h"
|
||||
|
||||
void lua_register_inventory_where(sol::state *state) {
|
||||
state->create_named_table("InventoryWhere",
|
||||
"Personal", static_cast<int>(invWherePersonal),
|
||||
"Bank", static_cast<int>(invWhereBank),
|
||||
"SharedBank", static_cast<int>(invWhereSharedBank),
|
||||
"Trading", static_cast<int>(invWhereTrading),
|
||||
"Cursor", static_cast<int>(invWhereCursor)
|
||||
);
|
||||
}
|
||||
@ -1,538 +1,18 @@
|
||||
#include <sol.hpp>
|
||||
#include "../mob.h"
|
||||
|
||||
void mob_depop(Mob &m) {
|
||||
m.Depop();
|
||||
}
|
||||
|
||||
void mob_depop(Mob &m, bool start_spawn_timer) {
|
||||
m.Depop(start_spawn_timer);
|
||||
}
|
||||
|
||||
bool mob_behind_mob(Mob &m) {
|
||||
return m.BehindMob();
|
||||
}
|
||||
|
||||
bool mob_behind_mob(Mob &m, Mob *other) {
|
||||
return m.BehindMob(other);
|
||||
}
|
||||
|
||||
bool mob_behind_mob(Mob &m, Mob *other, float ourx) {
|
||||
return m.BehindMob(other, ourx);
|
||||
}
|
||||
|
||||
bool mob_behind_mob(Mob &m, Mob *other, float ourx, float oury) {
|
||||
return m.BehindMob(other, ourx, oury);
|
||||
}
|
||||
|
||||
void mob_set_level(Mob &m, uint8 level) {
|
||||
m.SetLevel(level);
|
||||
}
|
||||
|
||||
void mob_set_level(Mob &m, uint8 level, bool command) {
|
||||
m.SetLevel(level, command);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other) {
|
||||
return m.Attack(other);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other, int hand) {
|
||||
return m.Attack(other, hand);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other, int hand, bool from_riposte) {
|
||||
return m.Attack(other, hand, from_riposte);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough, bool is_from_spell) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough, is_from_spell);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough, bool is_from_spell, ExtraAttackOptions *opts) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough, is_from_spell, opts);
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill));
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable);
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot);
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot, bool bufftic) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot, bufftic);
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot, bool bufftic, int special) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot, bufftic, static_cast<eSpecialAttacks>(special));
|
||||
}
|
||||
|
||||
void mob_heal_damage(Mob &m, uint32 amount) {
|
||||
m.HealDamage(amount);
|
||||
}
|
||||
|
||||
void mob_heal_damage(Mob &m, uint32 amount, Mob *caster) {
|
||||
m.HealDamage(amount, caster);
|
||||
}
|
||||
|
||||
void mob_heal_damage(Mob &m, uint32 amount, Mob *caster, uint16 spell_id) {
|
||||
m.HealDamage(amount, caster, spell_id);
|
||||
}
|
||||
|
||||
uint32 mob_get_level_con(Mob &m, uint8 other) {
|
||||
return m.GetLevelCon(other);
|
||||
}
|
||||
|
||||
uint32 mob_get_level_con(Mob &m, uint8 mylevel, uint8 other) {
|
||||
return m.GetLevelCon(mylevel, other);
|
||||
}
|
||||
|
||||
void mob_do_anim(Mob &m, int animnum) {
|
||||
m.DoAnim(animnum);
|
||||
}
|
||||
|
||||
void mob_do_anim(Mob &m, int animnum, int type) {
|
||||
m.DoAnim(animnum, type);
|
||||
}
|
||||
|
||||
void mob_do_anim(Mob &m, int animnum, int type, bool ackreq) {
|
||||
m.DoAnim(animnum, type, ackreq);
|
||||
}
|
||||
|
||||
void mob_do_anim(Mob &m, int animnum, int type, bool ackreq, int filter) {
|
||||
m.DoAnim(animnum, type, ackreq, static_cast<eqFilterType>(filter));
|
||||
}
|
||||
|
||||
void mob_change_size(Mob &m, float sz) {
|
||||
m.ChangeSize(sz);
|
||||
}
|
||||
|
||||
void mob_change_size(Mob &m, float sz, bool no_restriction) {
|
||||
m.ChangeSize(sz, no_restriction);
|
||||
}
|
||||
|
||||
void mob_gm_move(Mob &m, float x, float y, float z) {
|
||||
m.GMMove(x, y, z);
|
||||
}
|
||||
|
||||
void mob_gm_move(Mob &m, float x, float y, float z, float heading) {
|
||||
m.GMMove(x, y, z, heading);
|
||||
}
|
||||
|
||||
void mob_gm_move(Mob &m, float x, float y, float z, float heading, bool send_update) {
|
||||
m.GMMove(x, y, z, heading, send_update);
|
||||
}
|
||||
|
||||
void mob_try_move_along(Mob &m, float distance, float angle) {
|
||||
m.TryMoveAlong(distance, angle);
|
||||
}
|
||||
|
||||
void mob_try_move_along(Mob &m, float distance, float angle, bool send) {
|
||||
m.TryMoveAlong(distance, angle, send);
|
||||
}
|
||||
void RegisterMobTypesA(sol::simple_usertype<Mob> &type);
|
||||
void RegisterMobTypesB(sol::simple_usertype<Mob> &type);
|
||||
void RegisterMobTypesC(sol::simple_usertype<Mob> &type);
|
||||
|
||||
void lua_register_mob(sol::state *state) {
|
||||
state->new_usertype<Mob>("Mob",
|
||||
sol::base_classes, sol::bases<Entity>(),
|
||||
"GetName", &Mob::GetName,
|
||||
"Depop", sol::overload(
|
||||
(void(*)(Mob&))&mob_depop,
|
||||
(void(*)(Mob&, bool))&mob_depop),
|
||||
"BehindMob", sol::overload(
|
||||
(bool(*)(Mob&))&mob_behind_mob,
|
||||
(bool(*)(Mob&,Mob*))&mob_behind_mob,
|
||||
(bool(*)(Mob&, Mob*, float))&mob_behind_mob,
|
||||
(bool(*)(Mob&, Mob*, float, float))&mob_behind_mob),
|
||||
"SetLevel", sol::overload(
|
||||
(void(*)(Mob&, uint8))&mob_set_level,
|
||||
(void(*)(Mob&, uint8, bool))&mob_set_level),
|
||||
"IsMoving", &Mob::IsMoving,
|
||||
"GoToBind", &Mob::GoToBind,
|
||||
"Attack", sol::overload(
|
||||
(bool(*)(Mob&, Mob*))&mob_attack,
|
||||
(bool(*)(Mob&, Mob*, int))&mob_attack,
|
||||
(bool(*)(Mob&, Mob*, int, bool))&mob_attack,
|
||||
(bool(*)(Mob&, Mob*, int, bool, bool))&mob_attack,
|
||||
(bool(*)(Mob&, Mob*, int, bool, bool, bool))&mob_attack,
|
||||
(bool(*)(Mob&, Mob*, int, bool, bool, bool, ExtraAttackOptions*))&mob_attack),
|
||||
"Damage", sol::overload(
|
||||
(void(*)(Mob&, Mob*, int32, uint16, int))&mob_damage,
|
||||
(void(*)(Mob&, Mob*, int32, uint16, int, bool))&mob_damage,
|
||||
(void(*)(Mob&, Mob*, int32, uint16, int, bool, int8))&mob_damage,
|
||||
(void(*)(Mob&, Mob*, int32, uint16, int, bool, int8, bool))&mob_damage,
|
||||
(void(*)(Mob&, Mob*, int32, uint16, int, bool, int8, bool, int))&mob_damage),
|
||||
"RangedAttack", &Mob::RangedAttack,
|
||||
"ThrowingAttack", &Mob::ThrowingAttack,
|
||||
"Heal", &Mob::Heal,
|
||||
"HealDamage", sol::overload(
|
||||
(void(*)(Mob&, uint32))&mob_heal_damage,
|
||||
(void(*)(Mob&, uint32, Mob*))&mob_heal_damage,
|
||||
(void(*)(Mob&, uint32, Mob*, uint16))&mob_heal_damage),
|
||||
"GetLevelCon", sol::overload(
|
||||
(uint32(*)(Mob&, uint8))&mob_get_level_con,
|
||||
(uint32(*)(Mob&, uint8, uint8))&mob_get_level_con),
|
||||
"SetHP", &Mob::SetHP,
|
||||
"DoAnim", sol::overload(
|
||||
(void(*)(Mob&, int))&mob_do_anim,
|
||||
(void(*)(Mob&, int, int))&mob_do_anim,
|
||||
(void(*)(Mob&, int, int, bool))&mob_do_anim,
|
||||
(void(*)(Mob&, int, int, bool, int))&mob_do_anim),
|
||||
"ChangeSize", sol::overload(
|
||||
(void(*)(Mob&, float))&mob_change_size,
|
||||
(void(*)(Mob&, float, bool))&mob_change_size),
|
||||
"GMMove", sol::overload(
|
||||
(void(*)(Mob&, float, float, float))&mob_gm_move,
|
||||
(void(*)(Mob&, float, float, float, float))&mob_gm_move,
|
||||
(void(*)(Mob&, float, float, float, float, bool))&mob_gm_move),
|
||||
"GMMove", sol::overload(
|
||||
(void(*)(Mob&, float, float))&mob_try_move_along,
|
||||
(void(*)(Mob&, float, float, bool))&mob_try_move_along),
|
||||
"HasProcs", &Mob::HasProcs
|
||||
/*
|
||||
.def("IsInvisible", (bool(Lua_Mob::*)(void))&Lua_Mob::IsInvisible)
|
||||
.def("IsInvisible", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::IsInvisible)
|
||||
.def("SetInvisible", &Lua_Mob::SetInvisible)
|
||||
.def("FindBuff", &Lua_Mob::FindBuff)
|
||||
.def("FindType", (bool(Lua_Mob::*)(int))&Lua_Mob::FindType)
|
||||
.def("FindType", (bool(Lua_Mob::*)(int,bool))&Lua_Mob::FindType)
|
||||
.def("FindType", (bool(Lua_Mob::*)(int,bool,int))&Lua_Mob::FindType)
|
||||
.def("GetBuffSlotFromType", &Lua_Mob::GetBuffSlotFromType)
|
||||
.def("GetBaseRace", &Lua_Mob::GetBaseRace)
|
||||
.def("GetBaseGender", &Lua_Mob::GetBaseGender)
|
||||
.def("GetDeity", &Lua_Mob::GetDeity)
|
||||
.def("GetRace", &Lua_Mob::GetRace)
|
||||
.def("GetGender", &Lua_Mob::GetGender)
|
||||
.def("GetTexture", &Lua_Mob::GetTexture)
|
||||
.def("GetHelmTexture", &Lua_Mob::GetHelmTexture)
|
||||
.def("GetHairColor", &Lua_Mob::GetHairColor)
|
||||
.def("GetBeardColor", &Lua_Mob::GetBeardColor)
|
||||
.def("GetEyeColor1", &Lua_Mob::GetEyeColor1)
|
||||
.def("GetEyeColor2", &Lua_Mob::GetEyeColor2)
|
||||
.def("GetHairStyle", &Lua_Mob::GetHairStyle)
|
||||
.def("GetLuclinFace", &Lua_Mob::GetLuclinFace)
|
||||
.def("GetBeard", &Lua_Mob::GetBeard)
|
||||
.def("GetDrakkinHeritage", &Lua_Mob::GetDrakkinHeritage)
|
||||
.def("GetDrakkinTattoo", &Lua_Mob::GetDrakkinTattoo)
|
||||
.def("GetDrakkinDetails", &Lua_Mob::GetDrakkinDetails)
|
||||
.def("GetClass", &Lua_Mob::GetClass)
|
||||
.def("GetLevel", &Lua_Mob::GetLevel)
|
||||
.def("GetCleanName", &Lua_Mob::GetCleanName)
|
||||
.def("GetTarget", &Lua_Mob::GetTarget)
|
||||
.def("SetTarget", &Lua_Mob::SetTarget)
|
||||
.def("GetHPRatio", &Lua_Mob::GetHPRatio)
|
||||
.def("IsWarriorClass", &Lua_Mob::IsWarriorClass)
|
||||
.def("GetHP", &Lua_Mob::GetHP)
|
||||
.def("GetMaxHP", &Lua_Mob::GetMaxHP)
|
||||
.def("GetItemHPBonuses", &Lua_Mob::GetItemHPBonuses)
|
||||
.def("GetSpellHPBonuses", &Lua_Mob::GetSpellHPBonuses)
|
||||
.def("GetWalkspeed", &Lua_Mob::GetWalkspeed)
|
||||
.def("GetRunspeed", &Lua_Mob::GetRunspeed)
|
||||
.def("GetCasterLevel", &Lua_Mob::GetCasterLevel)
|
||||
.def("GetMaxMana", &Lua_Mob::GetMaxMana)
|
||||
.def("GetMana", &Lua_Mob::GetMana)
|
||||
.def("SetMana", &Lua_Mob::SetMana)
|
||||
.def("GetManaRatio", &Lua_Mob::GetManaRatio)
|
||||
.def("GetAC", &Lua_Mob::GetAC)
|
||||
.def("GetATK", &Lua_Mob::GetATK)
|
||||
.def("GetSTR", &Lua_Mob::GetSTR)
|
||||
.def("GetSTA", &Lua_Mob::GetSTA)
|
||||
.def("GetDEX", &Lua_Mob::GetDEX)
|
||||
.def("GetAGI", &Lua_Mob::GetAGI)
|
||||
.def("GetINT", &Lua_Mob::GetINT)
|
||||
.def("GetWIS", &Lua_Mob::GetWIS)
|
||||
.def("GetCHA", &Lua_Mob::GetCHA)
|
||||
.def("GetMR", &Lua_Mob::GetMR)
|
||||
.def("GetFR", &Lua_Mob::GetFR)
|
||||
.def("GetDR", &Lua_Mob::GetDR)
|
||||
.def("GetPR", &Lua_Mob::GetPR)
|
||||
.def("GetCR", &Lua_Mob::GetCR)
|
||||
.def("GetCorruption", &Lua_Mob::GetCorruption)
|
||||
.def("GetPhR", &Lua_Mob::GetPhR)
|
||||
.def("GetMaxSTR", &Lua_Mob::GetMaxSTR)
|
||||
.def("GetMaxSTA", &Lua_Mob::GetMaxSTA)
|
||||
.def("GetMaxDEX", &Lua_Mob::GetMaxDEX)
|
||||
.def("GetMaxAGI", &Lua_Mob::GetMaxAGI)
|
||||
.def("GetMaxINT", &Lua_Mob::GetMaxINT)
|
||||
.def("GetMaxWIS", &Lua_Mob::GetMaxWIS)
|
||||
.def("GetMaxCHA", &Lua_Mob::GetMaxCHA)
|
||||
.def("ResistSpell", (double(Lua_Mob::*)(int,int,Lua_Mob))&Lua_Mob::ResistSpell)
|
||||
.def("ResistSpell", (double(Lua_Mob::*)(int,int,Lua_Mob,bool))&Lua_Mob::ResistSpell)
|
||||
.def("ResistSpell", (double(Lua_Mob::*)(int,int,Lua_Mob,bool,int))&Lua_Mob::ResistSpell)
|
||||
.def("ResistSpell", (double(Lua_Mob::*)(int,int,Lua_Mob,bool,int,bool))&Lua_Mob::ResistSpell)
|
||||
.def("GetSpecializeSkillValue", &Lua_Mob::GetSpecializeSkillValue)
|
||||
.def("GetNPCTypeID", &Lua_Mob::GetNPCTypeID)
|
||||
.def("IsTargeted", &Lua_Mob::IsTargeted)
|
||||
.def("GetX", &Lua_Mob::GetX)
|
||||
.def("GetY", &Lua_Mob::GetY)
|
||||
.def("GetZ", &Lua_Mob::GetZ)
|
||||
.def("GetHeading", &Lua_Mob::GetHeading)
|
||||
.def("GetWaypointX", &Lua_Mob::GetWaypointX)
|
||||
.def("GetWaypointY", &Lua_Mob::GetWaypointY)
|
||||
.def("GetWaypointZ", &Lua_Mob::GetWaypointZ)
|
||||
.def("GetWaypointH", &Lua_Mob::GetWaypointH)
|
||||
.def("GetWaypointPause", &Lua_Mob::GetWaypointPause)
|
||||
.def("GetWaypointID", &Lua_Mob::GetWaypointID)
|
||||
.def("SetCurrentWP", &Lua_Mob::SetCurrentWP)
|
||||
.def("GetSize", &Lua_Mob::GetSize)
|
||||
.def("Message", &Lua_Mob::Message)
|
||||
.def("Message_StringID", &Lua_Mob::Message_StringID)
|
||||
.def("Say", &Lua_Mob::Say)
|
||||
.def("QuestSay", &Lua_Mob::QuestSay)
|
||||
.def("Shout", &Lua_Mob::Shout)
|
||||
.def("Emote", &Lua_Mob::Emote)
|
||||
.def("InterruptSpell", (void(Lua_Mob::*)(void))&Lua_Mob::InterruptSpell)
|
||||
.def("InterruptSpell", (void(Lua_Mob::*)(int))&Lua_Mob::InterruptSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int,int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int,int,int,int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("CastSpell", (bool(Lua_Mob::*)(int,int,int,int,int,int,int,int,int))&Lua_Mob::CastSpell)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob))&Lua_Mob::SpellFinished)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob,int))&Lua_Mob::SpellFinished)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob,int,int))&Lua_Mob::SpellFinished)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob,int,int,uint32))&Lua_Mob::SpellFinished)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob,int,int,uint32,int))&Lua_Mob::SpellFinished)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob,int,int,uint32,int,bool))&Lua_Mob::SpellFinished)
|
||||
.def("SendBeginCast", &Lua_Mob::SendBeginCast)
|
||||
.def("SpellEffect", &Lua_Mob::SpellEffect)
|
||||
.def("GetPet", &Lua_Mob::GetPet)
|
||||
.def("GetOwner", &Lua_Mob::GetOwner)
|
||||
.def("GetHateList", &Lua_Mob::GetHateList)
|
||||
.def("GetHateTop", (Lua_Mob(Lua_Mob::*)(void))&Lua_Mob::GetHateTop)
|
||||
.def("GetHateDamageTop", (Lua_Mob(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetHateDamageTop)
|
||||
.def("GetHateRandom", (Lua_Mob(Lua_Mob::*)(void))&Lua_Mob::GetHateRandom)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::AddToHateList)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::AddToHateList)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int,int))&Lua_Mob::AddToHateList)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int,int,bool))&Lua_Mob::AddToHateList)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int,int,bool,bool))&Lua_Mob::AddToHateList)
|
||||
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int,int,bool,bool,bool))&Lua_Mob::AddToHateList)
|
||||
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::SetHate)
|
||||
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::SetHate)
|
||||
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob,int,int))&Lua_Mob::SetHate)
|
||||
.def("HalveAggro", &Lua_Mob::HalveAggro)
|
||||
.def("DoubleAggro", &Lua_Mob::DoubleAggro)
|
||||
.def("GetHateAmount", (uint32(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetHateAmount)
|
||||
.def("GetHateAmount", (uint32(Lua_Mob::*)(Lua_Mob,bool))&Lua_Mob::GetHateAmount)
|
||||
.def("GetDamageAmount", (uint32(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetDamageAmount)
|
||||
.def("WipeHateList", (void(Lua_Mob::*)(void))&Lua_Mob::WipeHateList)
|
||||
.def("CheckAggro", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CheckAggro)
|
||||
.def("Stun", (void(Lua_Mob::*)(int))&Lua_Mob::Stun)
|
||||
.def("UnStun", (void(Lua_Mob::*)(void))&Lua_Mob::UnStun)
|
||||
.def("IsStunned", (bool(Lua_Mob::*)(void))&Lua_Mob::IsStunned)
|
||||
.def("Spin", (void(Lua_Mob::*)(void))&Lua_Mob::Spin)
|
||||
.def("Kill", (void(Lua_Mob::*)(void))&Lua_Mob::Kill)
|
||||
.def("CanThisClassDoubleAttack", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassDoubleAttack)
|
||||
.def("CanThisClassDualWield", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassDualWield)
|
||||
.def("CanThisClassRiposte", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassRiposte)
|
||||
.def("CanThisClassDodge", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassDodge)
|
||||
.def("CanThisClassParry", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassParry)
|
||||
.def("CanThisClassBlock", (bool(Lua_Mob::*)(void))&Lua_Mob::CanThisClassBlock)
|
||||
.def("SetInvul", (void(Lua_Mob::*)(bool))&Lua_Mob::SetInvul)
|
||||
.def("GetInvul", (bool(Lua_Mob::*)(void))&Lua_Mob::GetInvul)
|
||||
.def("SetExtraHaste", (void(Lua_Mob::*)(int))&Lua_Mob::SetExtraHaste)
|
||||
.def("GetHaste", (int(Lua_Mob::*)(void))&Lua_Mob::GetHaste)
|
||||
.def("GetHandToHandDamage", (int(Lua_Mob::*)(void))&Lua_Mob::GetHandToHandDamage)
|
||||
.def("GetHandToHandDelay", (int(Lua_Mob::*)(void))&Lua_Mob::GetHandToHandDelay)
|
||||
.def("Mesmerize", (void(Lua_Mob::*)(void))&Lua_Mob::Mesmerize)
|
||||
.def("IsMezzed", (bool(Lua_Mob::*)(void))&Lua_Mob::IsMezzed)
|
||||
.def("IsEnraged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEnraged)
|
||||
.def("GetReverseFactionCon", (int(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetReverseFactionCon)
|
||||
.def("IsAIControlled", (bool(Lua_Mob::*)(void))&Lua_Mob::IsAIControlled)
|
||||
.def("GetAggroRange", (float(Lua_Mob::*)(void))&Lua_Mob::GetAggroRange)
|
||||
.def("GetAssistRange", (float(Lua_Mob::*)(void))&Lua_Mob::GetAssistRange)
|
||||
.def("SetPetOrder", (void(Lua_Mob::*)(int))&Lua_Mob::SetPetOrder)
|
||||
.def("GetPetOrder", (int(Lua_Mob::*)(void))&Lua_Mob::GetPetOrder)
|
||||
.def("IsRoamer", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRoamer)
|
||||
.def("IsRooted", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRooted)
|
||||
.def("IsEngaged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEngaged)
|
||||
.def("FaceTarget", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::FaceTarget)
|
||||
.def("SetHeading", (void(Lua_Mob::*)(double))&Lua_Mob::SetHeading)
|
||||
.def("CalculateHeadingToTarget", (double(Lua_Mob::*)(double,double))&Lua_Mob::CalculateHeadingToTarget)
|
||||
.def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition)
|
||||
.def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::CalculateNewPosition)
|
||||
.def("CalculateDistance", (float(Lua_Mob::*)(double,double,double))&Lua_Mob::CalculateDistance)
|
||||
.def("SendTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendTo)
|
||||
.def("SendToFixZ", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendToFixZ)
|
||||
.def("NPCSpecialAttacks", (void(Lua_Mob::*)(const char*,int))&Lua_Mob::NPCSpecialAttacks)
|
||||
.def("NPCSpecialAttacks", (void(Lua_Mob::*)(const char*,int,bool))&Lua_Mob::NPCSpecialAttacks)
|
||||
.def("NPCSpecialAttacks", (void(Lua_Mob::*)(const char*,int,bool,bool))&Lua_Mob::NPCSpecialAttacks)
|
||||
.def("GetResist", (int(Lua_Mob::*)(int))&Lua_Mob::GetResist)
|
||||
.def("Charmed", (bool(Lua_Mob::*)(void))&Lua_Mob::Charmed)
|
||||
.def("CheckAggroAmount", (int(Lua_Mob::*)(int))&Lua_Mob::CheckAggroAmount)
|
||||
.def("CheckAggroAmount", (int(Lua_Mob::*)(int,bool))&Lua_Mob::CheckAggroAmount)
|
||||
.def("CheckHealAggroAmount", (int(Lua_Mob::*)(int))&Lua_Mob::CheckHealAggroAmount)
|
||||
.def("CheckHealAggroAmount", (int(Lua_Mob::*)(int,uint32))&Lua_Mob::CheckHealAggroAmount)
|
||||
.def("GetAA", (int(Lua_Mob::*)(int))&Lua_Mob::GetAA)
|
||||
.def("GetAAByAAID", (int(Lua_Mob::*)(int))&Lua_Mob::GetAAByAAID)
|
||||
.def("SetAA", (bool(Lua_Mob::*)(int,int))&Lua_Mob::SetAA)
|
||||
.def("SetAA", (bool(Lua_Mob::*)(int,int,int))&Lua_Mob::SetAA)
|
||||
.def("DivineAura", (bool(Lua_Mob::*)(void))&Lua_Mob::DivineAura)
|
||||
.def("SetOOCRegen", (void(Lua_Mob::*)(int))&Lua_Mob::SetOOCRegen)
|
||||
.def("GetEntityVariable", (const char*(Lua_Mob::*)(const char*))&Lua_Mob::GetEntityVariable)
|
||||
.def("SetEntityVariable", (void(Lua_Mob::*)(const char*,const char*))&Lua_Mob::SetEntityVariable)
|
||||
.def("EntityVariableExists", (bool(Lua_Mob::*)(const char*))&Lua_Mob::EntityVariableExists)
|
||||
.def("Signal", (void(Lua_Mob::*)(uint32))&Lua_Mob::Signal)
|
||||
.def("CombatRange", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CombatRange)
|
||||
.def("DoSpecialAttackDamage", (void(Lua_Mob::*)(Lua_Mob,int,int))&Lua_Mob::DoSpecialAttackDamage)
|
||||
.def("DoSpecialAttackDamage", (void(Lua_Mob::*)(Lua_Mob,int,int,int))&Lua_Mob::DoSpecialAttackDamage)
|
||||
.def("DoSpecialAttackDamage", (void(Lua_Mob::*)(Lua_Mob,int,int,int,int))&Lua_Mob::DoSpecialAttackDamage)
|
||||
.def("DoSpecialAttackDamage", (void(Lua_Mob::*)(Lua_Mob,int,int,int,int,int))&Lua_Mob::DoSpecialAttackDamage)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_Item))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_Item,int))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_Item,int,int))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoThrowingAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_Item,int,int,int))&Lua_Mob::DoThrowingAttackDmg)
|
||||
.def("DoMeleeSkillAttackDmg", (void(Lua_Mob::*)(Lua_Mob,int,int))&Lua_Mob::DoMeleeSkillAttackDmg)
|
||||
.def("DoMeleeSkillAttackDmg", (void(Lua_Mob::*)(Lua_Mob,int,int,int))&Lua_Mob::DoMeleeSkillAttackDmg)
|
||||
.def("DoMeleeSkillAttackDmg", (void(Lua_Mob::*)(Lua_Mob,int,int,int,int))&Lua_Mob::DoMeleeSkillAttackDmg)
|
||||
.def("DoMeleeSkillAttackDmg", (void(Lua_Mob::*)(Lua_Mob,int,int,int,int,bool))&Lua_Mob::DoMeleeSkillAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_ItemInst))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_ItemInst,int))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_ItemInst,int,int))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("DoArcheryAttackDmg", (void(Lua_Mob::*)(Lua_Mob,Lua_ItemInst,Lua_ItemInst,int,int,int))&Lua_Mob::DoArcheryAttackDmg)
|
||||
.def("CheckLoS", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CheckLoS)
|
||||
.def("CheckLoSToLoc", (bool(Lua_Mob::*)(double,double,double))&Lua_Mob::CheckLoSToLoc)
|
||||
.def("CheckLoSToLoc", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CheckLoSToLoc)
|
||||
.def("FindGroundZ", (double(Lua_Mob::*)(double,double))&Lua_Mob::FindGroundZ)
|
||||
.def("FindGroundZ", (double(Lua_Mob::*)(double,double,double))&Lua_Mob::FindGroundZ)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::ProjectileAnimation)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int,bool))&Lua_Mob::ProjectileAnimation)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int,bool,double))&Lua_Mob::ProjectileAnimation)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int,bool,double,double))&Lua_Mob::ProjectileAnimation)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int,bool,double,double,double))&Lua_Mob::ProjectileAnimation)
|
||||
.def("ProjectileAnimation", (void(Lua_Mob::*)(Lua_Mob,int,bool,double,double,double,double))&Lua_Mob::ProjectileAnimation)
|
||||
.def("HasNPCSpecialAtk", (bool(Lua_Mob::*)(const char*))&Lua_Mob::HasNPCSpecialAtk)
|
||||
.def("SendAppearanceEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,uint32,uint32))&Lua_Mob::SendAppearanceEffect)
|
||||
.def("SendAppearanceEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,uint32,uint32,Lua_Client))&Lua_Mob::SendAppearanceEffect)
|
||||
.def("SetFlyMode", (void(Lua_Mob::*)(int))&Lua_Mob::SetFlyMode)
|
||||
.def("SetTexture", (void(Lua_Mob::*)(int))&Lua_Mob::SetTexture)
|
||||
.def("SetRace", (void(Lua_Mob::*)(int))&Lua_Mob::SetRace)
|
||||
.def("SetGender", (void(Lua_Mob::*)(int))&Lua_Mob::SetGender)
|
||||
.def("SendIllusionPacket", (void(Lua_Mob::*)(luabind::adl::object))&Lua_Mob::SendIllusionPacket)
|
||||
.def("ChangeRace", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeRace)
|
||||
.def("ChangeGender", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeGender)
|
||||
.def("ChangeTexture", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeTexture)
|
||||
.def("ChangeHelmTexture", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHelmTexture)
|
||||
.def("ChangeHairColor", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHairColor)
|
||||
.def("ChangeBeardColor", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeBeardColor)
|
||||
.def("ChangeEyeColor1", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeEyeColor1)
|
||||
.def("ChangeEyeColor2", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeEyeColor2)
|
||||
.def("ChangeHairStyle", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHairStyle)
|
||||
.def("ChangeLuclinFace", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeLuclinFace)
|
||||
.def("ChangeBeard", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeBeard)
|
||||
.def("ChangeDrakkinHeritage", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinHeritage)
|
||||
.def("ChangeDrakkinTattoo", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinTattoo)
|
||||
.def("ChangeDrakkinDetails", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinDetails)
|
||||
.def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32))&Lua_Mob::CameraEffect)
|
||||
.def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32,Lua_Client))&Lua_Mob::CameraEffect)
|
||||
.def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32,Lua_Client,bool))&Lua_Mob::CameraEffect)
|
||||
.def("SendSpellEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,bool,uint32))&Lua_Mob::SendSpellEffect)
|
||||
.def("SendSpellEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,bool,uint32,bool))&Lua_Mob::SendSpellEffect)
|
||||
.def("SendSpellEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,bool,uint32,bool,Lua_Client))&Lua_Mob::SendSpellEffect)
|
||||
.def("TempName", (void(Lua_Mob::*)(void))&Lua_Mob::TempName)
|
||||
.def("TempName", (void(Lua_Mob::*)(const char*))&Lua_Mob::TempName)
|
||||
.def("GetGlobal", (std::string(Lua_Mob::*)(const char*))&Lua_Mob::GetGlobal)
|
||||
.def("SetGlobal", (void(Lua_Mob::*)(const char*,const char*,int,const char*))&Lua_Mob::SetGlobal)
|
||||
.def("SetGlobal", (void(Lua_Mob::*)(const char*,const char*,int,const char*,Lua_Mob))&Lua_Mob::SetGlobal)
|
||||
.def("TarGlobal", (void(Lua_Mob::*)(const char*,const char*,const char*,int,int,int))&Lua_Mob::TarGlobal)
|
||||
.def("DelGlobal", (void(Lua_Mob::*)(const char*))&Lua_Mob::DelGlobal)
|
||||
.def("SetSlotTint", (void(Lua_Mob::*)(int,int,int,int))&Lua_Mob::SetSlotTint)
|
||||
.def("WearChange", (void(Lua_Mob::*)(int,int,uint32))&Lua_Mob::WearChange)
|
||||
.def("DoKnockback", (void(Lua_Mob::*)(Lua_Mob,uint32,uint32))&Lua_Mob::DoKnockback)
|
||||
.def("AddNimbusEffect", (void(Lua_Mob::*)(int))&Lua_Mob::AddNimbusEffect)
|
||||
.def("RemoveNimbusEffect", (void(Lua_Mob::*)(int))&Lua_Mob::RemoveNimbusEffect)
|
||||
.def("IsFeared", (bool(Lua_Mob::*)(void))&Lua_Mob::IsFeared)
|
||||
.def("IsBlind", (bool(Lua_Mob::*)(void))&Lua_Mob::IsBlind)
|
||||
.def("IsRunning", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRunning)
|
||||
.def("SetRunning", (void(Lua_Mob::*)(bool))&Lua_Mob::SetRunning)
|
||||
.def("SetBodyType", (void(Lua_Mob::*)(int,bool))&Lua_Mob::SetBodyType)
|
||||
.def("SetTargetable", (void(Lua_Mob::*)(bool))&Lua_Mob::SetTargetable)
|
||||
.def("ModSkillDmgTaken", (void(Lua_Mob::*)(int,int))&Lua_Mob::ModSkillDmgTaken)
|
||||
.def("GetModSkillDmgTaken", (int(Lua_Mob::*)(int))&Lua_Mob::GetModSkillDmgTaken)
|
||||
.def("GetSkillDmgTaken", (int(Lua_Mob::*)(int))&Lua_Mob::GetSkillDmgTaken)
|
||||
.def("GetFcDamageAmtIncoming", &Lua_Mob::GetFcDamageAmtIncoming)
|
||||
.def("GetSkillDmgAmt", (int(Lua_Mob::*)(int))&Lua_Mob::GetSkillDmgAmt)
|
||||
.def("SetAllowBeneficial", (void(Lua_Mob::*)(bool))&Lua_Mob::SetAllowBeneficial)
|
||||
.def("GetAllowBeneficial", (bool(Lua_Mob::*)(void))&Lua_Mob::GetAllowBeneficial)
|
||||
.def("IsBeneficialAllowed", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::IsBeneficialAllowed)
|
||||
.def("ModVulnerability", (void(Lua_Mob::*)(int,int))&Lua_Mob::ModVulnerability)
|
||||
.def("GetModVulnerability", (int(Lua_Mob::*)(int))&Lua_Mob::GetModVulnerability)
|
||||
.def("SetDisableMelee", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDisableMelee)
|
||||
.def("IsMeleeDisabled", (bool(Lua_Mob::*)(void))&Lua_Mob::IsMeleeDisabled)
|
||||
.def("SetFlurryChance", (void(Lua_Mob::*)(int))&Lua_Mob::SetFlurryChance)
|
||||
.def("GetFlurryChance", (int(Lua_Mob::*)(void))&Lua_Mob::GetFlurryChance)
|
||||
.def("GetSkill", (int(Lua_Mob::*)(int))&Lua_Mob::GetSkill)
|
||||
.def("GetSpecialAbility", (int(Lua_Mob::*)(int))&Lua_Mob::GetSpecialAbility)
|
||||
.def("GetSpecialAbilityParam", (int(Lua_Mob::*)(int,int))&Lua_Mob::GetSpecialAbilityParam)
|
||||
.def("SetSpecialAbility", (void(Lua_Mob::*)(int,int))&Lua_Mob::SetSpecialAbility)
|
||||
.def("SetSpecialAbilityParam", (void(Lua_Mob::*)(int,int,int))&Lua_Mob::SetSpecialAbilityParam)
|
||||
.def("ClearSpecialAbilities", (void(Lua_Mob::*)(void))&Lua_Mob::ClearSpecialAbilities)
|
||||
.def("ProcessSpecialAbilities", (void(Lua_Mob::*)(std::string))&Lua_Mob::ProcessSpecialAbilities)
|
||||
.def("GetAppearance", (uint32(Lua_Mob::*)(void))&Lua_Mob::GetAppearance)
|
||||
.def("SetAppearance", (void(Lua_Mob::*)(int))&Lua_Mob::SetAppearance)
|
||||
.def("SetAppearance", (void(Lua_Mob::*)(int,bool))&Lua_Mob::SetAppearance)
|
||||
.def("SetDestructibleObject", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDestructibleObject)
|
||||
.def("IsImmuneToSpell", (bool(Lua_Mob::*)(int,Lua_Mob))&Lua_Mob::IsImmuneToSpell)
|
||||
.def("BuffFadeBySpellID", (void(Lua_Mob::*)(int))&Lua_Mob::BuffFadeBySpellID)
|
||||
.def("BuffFadeByEffect", (void(Lua_Mob::*)(int))&Lua_Mob::BuffFadeByEffect)
|
||||
.def("BuffFadeByEffect", (void(Lua_Mob::*)(int,int))&Lua_Mob::BuffFadeByEffect)
|
||||
.def("BuffFadeAll", (void(Lua_Mob::*)(void))&Lua_Mob::BuffFadeAll)
|
||||
.def("BuffFadeBySlot", (void(Lua_Mob::*)(int))&Lua_Mob::BuffFadeBySlot)
|
||||
.def("BuffFadeBySlot", (void(Lua_Mob::*)(int,bool))&Lua_Mob::BuffFadeBySlot)
|
||||
.def("CanBuffStack", (int(Lua_Mob::*)(int,int))&Lua_Mob::CanBuffStack)
|
||||
.def("CanBuffStack", (int(Lua_Mob::*)(int,int,bool))&Lua_Mob::CanBuffStack)
|
||||
.def("SetPseudoRoot", (void(Lua_Mob::*)(bool))&Lua_Mob::SetPseudoRoot)
|
||||
.def("SeeInvisible", (uint8(Lua_Mob::*)(void))&Lua_Mob::SeeInvisible)
|
||||
.def("SeeInvisibleUndead", (bool(Lua_Mob::*)(void))&Lua_Mob::SeeInvisibleUndead)
|
||||
.def("SeeHide", (bool(Lua_Mob::*)(void))&Lua_Mob::SeeHide)
|
||||
.def("SeeImprovedHide", (bool(Lua_Mob::*)(bool))&Lua_Mob::SeeImprovedHide)
|
||||
.def("GetNimbusEffect1", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect1)
|
||||
.def("GetNimbusEffect2", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect2)
|
||||
.def("GetNimbusEffect3", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect3)
|
||||
.def("IsTargetable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsTargetable)
|
||||
.def("HasShieldEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquiped)
|
||||
.def("HasTwoHandBluntEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquiped)
|
||||
.def("HasTwoHanderEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHanderEquipped)
|
||||
.def("GetHerosForgeModel", (int32(Lua_Mob::*)(uint8))&Lua_Mob::GetHerosForgeModel)
|
||||
.def("IsEliteMaterialItem", (uint32(Lua_Mob::*)(uint8))&Lua_Mob::IsEliteMaterialItem)
|
||||
.def("GetBaseSize", (double(Lua_Mob::*)(void))&Lua_Mob::GetBaseSize)
|
||||
.def("HasOwner", (bool(Lua_Mob::*)(void))&Lua_Mob::HasOwner)
|
||||
.def("IsPet", (bool(Lua_Mob::*)(void))&Lua_Mob::IsPet)
|
||||
.def("HasPet", (bool(Lua_Mob::*)(void))&Lua_Mob::HasPet)
|
||||
.def("IsSilenced", (bool(Lua_Mob::*)(void))&Lua_Mob::IsSilenced)
|
||||
.def("IsAmnesiad", (bool(Lua_Mob::*)(void))&Lua_Mob::IsAmnesiad)
|
||||
.def("GetMeleeMitigation", (int32(Lua_Mob::*)(void))&Lua_Mob::GetMeleeMitigation)
|
||||
.def("GetWeaponDamageBonus", &Lua_Mob::GetWeaponDamageBonus)
|
||||
.def("GetItemBonuses", &Lua_Mob::GetItemBonuses)
|
||||
.def("GetSpellBonuses", &Lua_Mob::GetSpellBonuses)
|
||||
.def("GetAABonuses", &Lua_Mob::GetAABonuses)
|
||||
.def("GetMeleeDamageMod_SE", &Lua_Mob::GetMeleeDamageMod_SE)
|
||||
.def("GetMeleeMinDamageMod_SE", &Lua_Mob::GetMeleeMinDamageMod_SE)
|
||||
.def("IsAttackAllowed", &Lua_Mob::IsAttackAllowed)
|
||||
.def("IsCasting", &Lua_Mob::IsCasting)
|
||||
.def("AttackAnimation", &Lua_Mob::AttackAnimation)
|
||||
.def("GetWeaponDamage", &Lua_Mob::GetWeaponDamage)
|
||||
.def("IsBerserk", &Lua_Mob::IsBerserk)
|
||||
.def("TryFinishingBlow", &Lua_Mob::TryFinishingBlow)
|
||||
.def("GetBodyType", &Lua_Mob::GetBodyType)
|
||||
.def("GetOrigBodyType", &Lua_Mob::GetOrigBodyType)
|
||||
.def("CheckNumHitsRemaining", &Lua_Mob::CheckNumHitsRemaining);
|
||||
*/
|
||||
);
|
||||
//Because Mob is such a large usertype trying to pass everything at once is stressful on the template compiler (lots of memory / cpu)
|
||||
//(esp on windows which uses a 32bit compiler by default and often runs out of allocated heap trying to compile it)
|
||||
//So instead of creating/registering the usertype in one go we'll create a simple usertype and fill it in steps before registering it with lua
|
||||
auto mob = state->create_simple_usertype<Mob>(sol::base_classes, sol::bases<Entity>());
|
||||
RegisterMobTypesA(mob);
|
||||
RegisterMobTypesB(mob);
|
||||
RegisterMobTypesC(mob);
|
||||
|
||||
state->set_usertype("Mob", mob);
|
||||
}
|
||||
|
||||
543
zone/lua/lua_mob_a.cpp
Normal file
543
zone/lua/lua_mob_a.cpp
Normal file
@ -0,0 +1,543 @@
|
||||
#include <sol.hpp>
|
||||
#include "../mob.h"
|
||||
|
||||
void mob_depop(Mob &m) {
|
||||
m.Depop();
|
||||
}
|
||||
|
||||
void mob_depop1(Mob &m, bool start_spawn_timer) {
|
||||
m.Depop(start_spawn_timer);
|
||||
}
|
||||
|
||||
bool mob_behind_mob(Mob &m) {
|
||||
return m.BehindMob();
|
||||
}
|
||||
|
||||
bool mob_behind_mob1(Mob &m, Mob *other) {
|
||||
return m.BehindMob(other);
|
||||
}
|
||||
|
||||
bool mob_behind_mob2(Mob &m, Mob *other, float ourx) {
|
||||
return m.BehindMob(other, ourx);
|
||||
}
|
||||
|
||||
bool mob_behind_mob3(Mob &m, Mob *other, float ourx, float oury) {
|
||||
return m.BehindMob(other, ourx, oury);
|
||||
}
|
||||
|
||||
void mob_set_level(Mob &m, uint8 level) {
|
||||
m.SetLevel(level);
|
||||
}
|
||||
|
||||
void mob_set_level1(Mob &m, uint8 level, bool command) {
|
||||
m.SetLevel(level, command);
|
||||
}
|
||||
|
||||
bool mob_attack(Mob &m, Mob *other) {
|
||||
return m.Attack(other);
|
||||
}
|
||||
|
||||
bool mob_attack1(Mob &m, Mob *other, int hand) {
|
||||
return m.Attack(other, hand);
|
||||
}
|
||||
|
||||
bool mob_attack2(Mob &m, Mob *other, int hand, bool from_riposte) {
|
||||
return m.Attack(other, hand, from_riposte);
|
||||
}
|
||||
|
||||
bool mob_attack3(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough);
|
||||
}
|
||||
|
||||
bool mob_attack4(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough, bool is_from_spell) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough, is_from_spell);
|
||||
}
|
||||
|
||||
bool mob_attack5(Mob &m, Mob *other, int hand, bool from_riposte, bool is_strikethrough, bool is_from_spell, ExtraAttackOptions *opts) {
|
||||
return m.Attack(other, hand, from_riposte, is_strikethrough, is_from_spell, opts);
|
||||
}
|
||||
|
||||
void mob_damage(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill));
|
||||
}
|
||||
|
||||
void mob_damage1(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable);
|
||||
}
|
||||
|
||||
void mob_damage2(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot);
|
||||
}
|
||||
|
||||
void mob_damage3(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot, bool bufftic) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot, bufftic);
|
||||
}
|
||||
|
||||
void mob_damage4(Mob &m, Mob *from, int32 damage, uint16 spell_id, int attack_skill, bool avoidable, int8 buffslot, bool bufftic, int special) {
|
||||
m.Damage(from, damage, spell_id, static_cast<EQEmu::skills::SkillType>(attack_skill), avoidable, buffslot, bufftic, static_cast<eSpecialAttacks>(special));
|
||||
}
|
||||
|
||||
void mob_heal_damage(Mob &m, uint32 amount) {
|
||||
m.HealDamage(amount);
|
||||
}
|
||||
|
||||
void mob_heal_damage1(Mob &m, uint32 amount, Mob *caster) {
|
||||
m.HealDamage(amount, caster);
|
||||
}
|
||||
|
||||
void mob_heal_damage2(Mob &m, uint32 amount, Mob *caster, uint16 spell_id) {
|
||||
m.HealDamage(amount, caster, spell_id);
|
||||
}
|
||||
|
||||
uint32 mob_get_level_con(Mob &m, uint8 other) {
|
||||
return m.GetLevelCon(other);
|
||||
}
|
||||
|
||||
uint32 mob_get_level_con1(Mob &m, uint8 mylevel, uint8 other) {
|
||||
return m.GetLevelCon(mylevel, other);
|
||||
}
|
||||
|
||||
void mob_do_anim(Mob &m, int animnum) {
|
||||
m.DoAnim(animnum);
|
||||
}
|
||||
|
||||
void mob_do_anim1(Mob &m, int animnum, int type) {
|
||||
m.DoAnim(animnum, type);
|
||||
}
|
||||
|
||||
void mob_do_anim2(Mob &m, int animnum, int type, bool ackreq) {
|
||||
m.DoAnim(animnum, type, ackreq);
|
||||
}
|
||||
|
||||
void mob_do_anim3(Mob &m, int animnum, int type, bool ackreq, int filter) {
|
||||
m.DoAnim(animnum, type, ackreq, static_cast<eqFilterType>(filter));
|
||||
}
|
||||
|
||||
void mob_change_size(Mob &m, float sz) {
|
||||
m.ChangeSize(sz);
|
||||
}
|
||||
|
||||
void mob_change_size1(Mob &m, float sz, bool no_restriction) {
|
||||
m.ChangeSize(sz, no_restriction);
|
||||
}
|
||||
|
||||
void mob_gm_move(Mob &m, float x, float y, float z) {
|
||||
m.GMMove(x, y, z);
|
||||
}
|
||||
|
||||
void mob_gm_move1(Mob &m, float x, float y, float z, float heading) {
|
||||
m.GMMove(x, y, z, heading);
|
||||
}
|
||||
|
||||
void mob_gm_move2(Mob &m, float x, float y, float z, float heading, bool send_update) {
|
||||
m.GMMove(x, y, z, heading, send_update);
|
||||
}
|
||||
|
||||
void mob_try_move_along(Mob &m, float distance, float angle) {
|
||||
m.TryMoveAlong(distance, angle);
|
||||
}
|
||||
|
||||
void mob_try_move_along1(Mob &m, float distance, float angle, bool send) {
|
||||
m.TryMoveAlong(distance, angle, send);
|
||||
}
|
||||
|
||||
bool mob_is_invisible(Mob &m) {
|
||||
return m.IsInvisible();
|
||||
}
|
||||
|
||||
bool mob_is_invisible1(Mob &m, Mob *other) {
|
||||
return m.IsInvisible(other);
|
||||
}
|
||||
|
||||
bool mob_find_type(Mob &m, uint16 type) {
|
||||
return m.FindType(type);
|
||||
}
|
||||
|
||||
bool mob_find_type1(Mob &m, uint16 type, bool offensive) {
|
||||
return m.FindType(type, offensive);
|
||||
}
|
||||
|
||||
bool mob_find_type2(Mob &m, uint16 type, bool offensive, uint16 threshold) {
|
||||
return m.FindType(type, offensive, threshold);
|
||||
}
|
||||
|
||||
float mob_resist_spell(Mob &m, uint8 type, uint16 spell_id, Mob *caster) {
|
||||
return m.ResistSpell(type, spell_id, caster);
|
||||
}
|
||||
|
||||
float mob_resist_spell1(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override);
|
||||
}
|
||||
|
||||
float mob_resist_spell2(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override, resist_override);
|
||||
}
|
||||
|
||||
float mob_resist_spell3(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool chr_check) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override, resist_override, chr_check);
|
||||
}
|
||||
|
||||
float mob_resist_spell4(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool chr_check, bool chrm_tick) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override, resist_override, chr_check, chrm_tick);
|
||||
}
|
||||
|
||||
float mob_resist_spell5(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool chr_check, bool chrm_tick, bool is_root) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override, resist_override, chr_check, chrm_tick, is_root);
|
||||
}
|
||||
|
||||
float mob_resist_spell6(Mob &m, uint8 type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool chr_check, bool chrm_tick, bool is_root, int level_override) {
|
||||
return m.ResistSpell(type, spell_id, caster, use_resist_override, resist_override, chr_check, chrm_tick, is_root, level_override);
|
||||
}
|
||||
|
||||
void mob_interrupt_spell(Mob &m) {
|
||||
m.InterruptSpell();
|
||||
}
|
||||
|
||||
void mob_interrupt_spell1(Mob &m, uint16 spell_id) {
|
||||
m.InterruptSpell(spell_id);
|
||||
}
|
||||
|
||||
float mob_get_waypoint_x(Mob& m) {
|
||||
return m.GetCurrentWayPoint().x;
|
||||
}
|
||||
|
||||
float mob_get_waypoint_y(Mob& m) {
|
||||
return m.GetCurrentWayPoint().y;
|
||||
}
|
||||
|
||||
float mob_get_waypoint_z(Mob& m) {
|
||||
return m.GetCurrentWayPoint().z;
|
||||
}
|
||||
|
||||
float mob_get_waypoint_h(Mob& m) {
|
||||
return m.GetCurrentWayPoint().w;
|
||||
}
|
||||
|
||||
void mob_message(Mob &m, int type, const std::string &msg) {
|
||||
m.Message(type, "%s", msg.c_str());
|
||||
}
|
||||
|
||||
void mob_say(Mob &m, const std::string &msg) {
|
||||
m.Say("%s", msg.c_str());
|
||||
}
|
||||
|
||||
void mob_shout(Mob &m, const std::string &msg) {
|
||||
m.Shout("%s", msg.c_str());
|
||||
}
|
||||
|
||||
void mob_emote(Mob &m, const std::string &msg) {
|
||||
m.Emote("%s", msg.c_str());
|
||||
}
|
||||
|
||||
bool mob_cast_spell(Mob &m, uint16 spell_id, uint16 target_id) {
|
||||
return m.CastSpell(spell_id, target_id);
|
||||
}
|
||||
|
||||
bool mob_cast_spell1(Mob &m, uint16 spell_id, uint16 target_id, int slot) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot));
|
||||
}
|
||||
|
||||
bool mob_cast_spell2(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time);
|
||||
}
|
||||
|
||||
bool mob_cast_spell3(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr);
|
||||
}
|
||||
|
||||
bool mob_cast_spell4(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost, uint32 item_slot) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr, item_slot);
|
||||
}
|
||||
|
||||
bool mob_cast_spell5(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost, uint32 item_slot, uint32 timer) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr, item_slot, timer);
|
||||
}
|
||||
|
||||
bool mob_cast_spell6(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost, uint32 item_slot, uint32 timer, uint32 timer_duration) {
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr, item_slot, timer, timer_duration);
|
||||
}
|
||||
|
||||
bool mob_cast_spell7(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost, uint32 item_slot, uint32 timer, uint32 timer_duration, int16 resist_adjust) {
|
||||
int16 res = resist_adjust;
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr, item_slot, timer, timer_duration, &res);
|
||||
}
|
||||
|
||||
bool mob_cast_spell8(Mob &m, uint16 spell_id, uint16 target_id, int slot, int32 cast_time, int32 mana_cost, uint32 item_slot, uint32 timer, uint32 timer_duration, int16 resist_adjust, uint32 aa_id) {
|
||||
int16 res = resist_adjust;
|
||||
return m.CastSpell(spell_id, target_id, static_cast<EQEmu::CastingSlot>(slot), cast_time, mana_cost, nullptr, item_slot, timer, timer_duration, &res, aa_id);
|
||||
}
|
||||
|
||||
bool mob_spell_finished(Mob &m, uint16 spell_id, Mob *target) {
|
||||
return m.SpellFinished(spell_id, target);
|
||||
}
|
||||
|
||||
bool mob_spell_finished1(Mob &m, uint16 spell_id, Mob *target, int slot) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot));
|
||||
}
|
||||
|
||||
bool mob_spell_finished2(Mob &m, uint16 spell_id, Mob *target, int slot, uint16 mana_used) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot), mana_used);
|
||||
}
|
||||
|
||||
bool mob_spell_finished3(Mob &m, uint16 spell_id, Mob *target, int slot, uint16 mana_used, uint32 inventory_slot) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot), mana_used, inventory_slot);
|
||||
}
|
||||
|
||||
bool mob_spell_finished4(Mob &m, uint16 spell_id, Mob *target, int slot, uint16 mana_used, uint32 inventory_slot, int16 resist_adjust) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot), mana_used, inventory_slot, resist_adjust);
|
||||
}
|
||||
|
||||
bool mob_spell_finished5(Mob &m, uint16 spell_id, Mob *target, int slot, uint16 mana_used, uint32 inventory_slot, int16 resist_adjust, bool isproc) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot), mana_used, inventory_slot, resist_adjust, isproc);
|
||||
}
|
||||
|
||||
bool mob_spell_finished6(Mob &m, uint16 spell_id, Mob *target, int slot, uint16 mana_used, uint32 inventory_slot, int16 resist_adjust, bool isproc, int level_override) {
|
||||
return m.SpellFinished(spell_id, target, static_cast<EQEmu::CastingSlot>(slot), mana_used, inventory_slot, resist_adjust, isproc, level_override);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list(Mob &m, Mob *other) {
|
||||
m.AddToHateList(other);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list1(Mob &m, Mob *other, uint32 hate) {
|
||||
m.AddToHateList(other, hate);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list2(Mob &m, Mob *other, uint32 hate, int32 damage) {
|
||||
m.AddToHateList(other, hate, damage);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list3(Mob &m, Mob *other, uint32 hate, int32 damage, bool yell_for_help) {
|
||||
m.AddToHateList(other, hate, damage, yell_for_help);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list4(Mob &m, Mob *other, uint32 hate, int32 damage, bool yell_for_help, bool frenzy) {
|
||||
m.AddToHateList(other, hate, damage, yell_for_help, frenzy);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list5(Mob &m, Mob *other, uint32 hate, int32 damage, bool yell_for_help, bool frenzy, bool bufftic) {
|
||||
m.AddToHateList(other, hate, damage, yell_for_help, frenzy, bufftic);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list6(Mob &m, Mob *other, uint32 hate, int32 damage, bool yell_for_help, bool frenzy, bool bufftic, uint16 spell_id) {
|
||||
m.AddToHateList(other, hate, damage, yell_for_help, frenzy, bufftic, spell_id);
|
||||
}
|
||||
|
||||
void mob_add_to_hate_list7(Mob &m, Mob *other, uint32 hate, int32 damage, bool yell_for_help, bool frenzy, bool bufftic, uint16 spell_id, bool pet_command) {
|
||||
m.AddToHateList(other, hate, damage, yell_for_help, frenzy, bufftic, spell_id, pet_command);
|
||||
}
|
||||
|
||||
void mob_set_hate(Mob &m, Mob *other) {
|
||||
m.SetHateAmountOnEnt(other);
|
||||
}
|
||||
|
||||
void mob_set_hate1(Mob &m, Mob *other, int hate) {
|
||||
m.SetHateAmountOnEnt(other, hate);
|
||||
}
|
||||
|
||||
void mob_set_hate2(Mob &m, Mob *other, int hate, int damage) {
|
||||
m.SetHateAmountOnEnt(other, hate, damage);
|
||||
}
|
||||
|
||||
void RegisterMobTypesA(sol::simple_usertype<Mob> &mob) {
|
||||
mob.set("GetName", &Mob::GetName);
|
||||
mob.set("Depop", sol::overload(
|
||||
&mob_depop,
|
||||
&mob_depop1));
|
||||
mob.set("BehindMob", sol::overload(
|
||||
&mob_behind_mob,
|
||||
&mob_behind_mob1,
|
||||
&mob_behind_mob2,
|
||||
&mob_behind_mob3));
|
||||
mob.set("SetLevel", sol::overload(
|
||||
&mob_set_level,
|
||||
&mob_set_level1));
|
||||
mob.set("IsMoving", &Mob::IsMoving);
|
||||
mob.set("GotoBind", &Mob::GoToBind);
|
||||
mob.set("Attack", sol::overload(
|
||||
&mob_attack,
|
||||
&mob_attack1,
|
||||
&mob_attack2,
|
||||
&mob_attack3,
|
||||
&mob_attack4,
|
||||
&mob_attack5));
|
||||
mob.set("Damage", sol::overload(
|
||||
&mob_damage,
|
||||
&mob_damage1,
|
||||
&mob_damage2,
|
||||
&mob_damage3,
|
||||
&mob_damage4));
|
||||
mob.set("RangedAttack", &Mob::RangedAttack);
|
||||
mob.set("ThrowingAttack", &Mob::ThrowingAttack);
|
||||
mob.set("Heal", &Mob::Heal);
|
||||
mob.set("HealDamage", sol::overload(
|
||||
&mob_heal_damage,
|
||||
&mob_heal_damage1,
|
||||
&mob_heal_damage2));
|
||||
mob.set("GetLevelCon", sol::overload(
|
||||
&mob_get_level_con,
|
||||
&mob_get_level_con1));
|
||||
mob.set("SetHP", &Mob::SetHP);
|
||||
mob.set("DoAnim", sol::overload(
|
||||
&mob_do_anim,
|
||||
&mob_do_anim1,
|
||||
&mob_do_anim2,
|
||||
&mob_do_anim3));
|
||||
mob.set("ChangeSize", sol::overload(
|
||||
&mob_change_size,
|
||||
&mob_change_size1));
|
||||
mob.set("GMMove", sol::overload(
|
||||
&mob_gm_move,
|
||||
&mob_gm_move1,
|
||||
&mob_gm_move2));
|
||||
mob.set("GMMove", sol::overload(
|
||||
&mob_try_move_along,
|
||||
&mob_try_move_along1));
|
||||
mob.set("HasProcs", &Mob::HasProcs);
|
||||
mob.set("IsInvisible", sol::overload(
|
||||
&mob_is_invisible,
|
||||
&mob_is_invisible1));
|
||||
mob.set("SetInvisible", &Mob::SetInvisible);
|
||||
mob.set("FindBuff", &Mob::FindBuff);
|
||||
mob.set("FindType", sol::overload(
|
||||
&mob_find_type,
|
||||
&mob_find_type1,
|
||||
&mob_find_type2));
|
||||
mob.set("GetBuffSlotFromType", &Mob::GetBuffSlotFromType);
|
||||
mob.set("GetBaseRace", &Mob::GetBaseRace);
|
||||
mob.set("GetBaseGender", &Mob::GetBaseGender);
|
||||
mob.set("GetDeity", &Mob::GetDeity);
|
||||
mob.set("GetRace", &Mob::GetRace);
|
||||
mob.set("GetGender", &Mob::GetGender);
|
||||
mob.set("GetTexture", &Mob::GetTexture);
|
||||
mob.set("GetHelmTexture", &Mob::GetHelmTexture);
|
||||
mob.set("GetHairColor", &Mob::GetHairColor);
|
||||
mob.set("GetBeardColor", &Mob::GetBeardColor);
|
||||
mob.set("GetEyeColor1", &Mob::GetEyeColor1);
|
||||
mob.set("GetEyeColor2", &Mob::GetEyeColor2);
|
||||
mob.set("GetHairStyle", &Mob::GetHairStyle);
|
||||
mob.set("GetLuclinFace", &Mob::GetLuclinFace);
|
||||
mob.set("GetBeard", &Mob::GetBeard);
|
||||
mob.set("GetDrakkinHeritage", &Mob::GetDrakkinHeritage);
|
||||
mob.set("GetDrakkinTattoo", &Mob::GetDrakkinTattoo);
|
||||
mob.set("GetDrakkinDetails", &Mob::GetDrakkinDetails);
|
||||
mob.set("GetClass", &Mob::GetClass);
|
||||
mob.set("GetLevel", &Mob::GetLevel);
|
||||
mob.set("GetCleanName", &Mob::GetCleanName);
|
||||
mob.set("GetTarget", &Mob::GetTarget);
|
||||
mob.set("SetTarget", &Mob::SetTarget);
|
||||
mob.set("GetHPRatio", &Mob::GetHPRatio);
|
||||
mob.set("IsWarriorClass", &Mob::IsWarriorClass);
|
||||
mob.set("GetHP", &Mob::GetHP);
|
||||
mob.set("GetMaxHP", &Mob::GetMaxHP);
|
||||
mob.set("GetItemHPBonuses", &Mob::GetItemHPBonuses);
|
||||
mob.set("GetSpellHPBonuses", &Mob::GetSpellHPBonuses);
|
||||
mob.set("GetWalkspeed", &Mob::GetWalkspeed);
|
||||
mob.set("GetRunspeed", &Mob::GetRunspeed);
|
||||
mob.set("GetCasterLevel", &Mob::GetCasterLevel);
|
||||
mob.set("GetMaxMana", &Mob::GetMaxMana);
|
||||
mob.set("GetMana", &Mob::GetMana);
|
||||
mob.set("SetMana", &Mob::SetMana);
|
||||
mob.set("GetManaRatio", &Mob::GetManaRatio);
|
||||
mob.set("GetAC", &Mob::GetAC);
|
||||
mob.set("GetATK", &Mob::GetATK);
|
||||
mob.set("GetSTR", &Mob::GetSTR);
|
||||
mob.set("GetSTA", &Mob::GetSTA);
|
||||
mob.set("GetDEX", &Mob::GetDEX);
|
||||
mob.set("GetAGI", &Mob::GetAGI);
|
||||
mob.set("GetINT", &Mob::GetINT);
|
||||
mob.set("GetWIS", &Mob::GetWIS);
|
||||
mob.set("GetCHA", &Mob::GetCHA);
|
||||
mob.set("GetMR", &Mob::GetMR);
|
||||
mob.set("GetFR", &Mob::GetFR);
|
||||
mob.set("GetDR", &Mob::GetDR);
|
||||
mob.set("GetPR", &Mob::GetPR);
|
||||
mob.set("GetCR", &Mob::GetCR);
|
||||
mob.set("GetCorruption", &Mob::GetCorrup);
|
||||
mob.set("GetPhR", &Mob::GetPhR);
|
||||
mob.set("GetMaxSTR", &Mob::GetMaxSTR);
|
||||
mob.set("GetMaxSTA", &Mob::GetMaxSTA);
|
||||
mob.set("GetMaxDEX", &Mob::GetMaxDEX);
|
||||
mob.set("GetMaxAGI", &Mob::GetMaxAGI);
|
||||
mob.set("GetMaxINT", &Mob::GetMaxINT);
|
||||
mob.set("GetMaxWIS", &Mob::GetMaxWIS);
|
||||
mob.set("GetMaxCHA", &Mob::GetMaxCHA);
|
||||
mob.set("ResistSpell", sol::overload(
|
||||
&mob_resist_spell,
|
||||
&mob_resist_spell1,
|
||||
&mob_resist_spell2,
|
||||
&mob_resist_spell3,
|
||||
&mob_resist_spell4,
|
||||
&mob_resist_spell5,
|
||||
&mob_resist_spell6));
|
||||
mob.set("GetSpecializeSkillValue", &Mob::GetSpecializeSkillValue);
|
||||
mob.set("GetNPCTypeID", &Mob::GetNPCTypeID);
|
||||
mob.set("IsTargeted", (bool(Mob::*)() const)&Mob::IsTargeted);
|
||||
mob.set("GetX", &Mob::GetX);
|
||||
mob.set("GetY", &Mob::GetY);
|
||||
mob.set("GetZ", &Mob::GetZ);
|
||||
mob.set("GetHeading", &Mob::GetHeading);
|
||||
mob.set("GetWaypointX", &mob_get_waypoint_x);
|
||||
mob.set("GetWaypointY", &mob_get_waypoint_y);
|
||||
mob.set("GetWaypointZ", &mob_get_waypoint_z);
|
||||
mob.set("GetWaypointH", &mob_get_waypoint_h);
|
||||
mob.set("GetWaypointPause", &Mob::GetCWPP);
|
||||
mob.set("GetWaypointID", &Mob::GetCWP);
|
||||
mob.set("SetCurrentWP", &Mob::SetCurrentWP);
|
||||
mob.set("GetSize", &Mob::GetSize);
|
||||
mob.set("Message", &mob_message);
|
||||
mob.set("Message_StringID", (void(Mob::*)(uint32, uint32, uint32))&Mob::Message_StringID);
|
||||
mob.set("Say", &mob_say);
|
||||
mob.set("QuestSay", &Mob::QuestJournalledSay);
|
||||
mob.set("Shout", &mob_shout);
|
||||
mob.set("Emote", &mob_emote);
|
||||
mob.set("InterruptSpell", sol::overload(
|
||||
&mob_interrupt_spell,
|
||||
&mob_interrupt_spell1));
|
||||
mob.set("CastSpell", sol::overload(
|
||||
&mob_cast_spell,
|
||||
&mob_cast_spell1,
|
||||
&mob_cast_spell2,
|
||||
&mob_cast_spell3,
|
||||
&mob_cast_spell4,
|
||||
&mob_cast_spell5,
|
||||
&mob_cast_spell6,
|
||||
&mob_cast_spell7,
|
||||
&mob_cast_spell8));
|
||||
mob.set("SpellFinished", sol::overload(
|
||||
&mob_spell_finished,
|
||||
&mob_spell_finished1,
|
||||
&mob_spell_finished2,
|
||||
&mob_spell_finished3,
|
||||
&mob_spell_finished4,
|
||||
&mob_spell_finished5,
|
||||
&mob_spell_finished6));
|
||||
mob.set("SendBeginCast", &Mob::SendBeginCast);
|
||||
mob.set("SpellEffect", &Mob::SpellEffect);
|
||||
mob.set("GetPet", &Mob::GetPet);
|
||||
mob.set("GetOwner", &Mob::GetOwner);
|
||||
mob.set("GetHateList", &Mob::GetHateList);
|
||||
mob.set("GetHateTop", &Mob::GetHateTop);
|
||||
mob.set("GetHateDamageTop", &Mob::GetHateDamageTop);
|
||||
mob.set("GetHateRandom", &Mob::GetHateRandom);
|
||||
mob.set("AddToHateList", sol::overload(
|
||||
&mob_add_to_hate_list,
|
||||
&mob_add_to_hate_list1,
|
||||
&mob_add_to_hate_list2,
|
||||
&mob_add_to_hate_list3,
|
||||
&mob_add_to_hate_list4,
|
||||
&mob_add_to_hate_list5,
|
||||
&mob_add_to_hate_list6,
|
||||
&mob_add_to_hate_list7));
|
||||
mob.set("SetHate", sol::overload(
|
||||
&mob_set_hate,
|
||||
&mob_set_hate1,
|
||||
&mob_set_hate2));
|
||||
mob.set("HalveAggro", &Mob::HalveAggro);
|
||||
mob.set("DoubleAggro", &Mob::DoubleAggro);
|
||||
mob.set("GetHateAmount", &Mob::GetHateAmount);
|
||||
mob.set("GetHateAmount", &Mob::GetHateAmount);
|
||||
mob.set("GetDamageAmount", &Mob::GetDamageAmount);
|
||||
mob.set("WipeHateList", &Mob::WipeHateList);
|
||||
mob.set("CheckAggro", &Mob::CheckAggro);
|
||||
}
|
||||
396
zone/lua/lua_mob_b.cpp
Normal file
396
zone/lua/lua_mob_b.cpp
Normal file
@ -0,0 +1,396 @@
|
||||
#include <sol.hpp>
|
||||
#include "../mob.h"
|
||||
|
||||
bool mob_calculate_new_position(Mob &m, float x, float y, float z, float speed) {
|
||||
return m.CalculateNewPosition(x, y, z, speed);
|
||||
}
|
||||
|
||||
bool mob_calculate_new_position1(Mob &m, float x, float y, float z, float speed, bool check_z) {
|
||||
return m.CalculateNewPosition(x, y, z, speed, check_z);
|
||||
}
|
||||
|
||||
bool mob_calculate_new_position2(Mob &m, float x, float y, float z, float speed, bool check_z, bool calculate_heading) {
|
||||
return m.CalculateNewPosition(x, y, z, speed, check_z, calculate_heading);
|
||||
}
|
||||
|
||||
void mob_npc_special_attacks(Mob &m, const char *parse, int permtag) {
|
||||
m.NPCSpecialAttacks(parse, permtag);
|
||||
}
|
||||
|
||||
void mob_npc_special_attacks1(Mob &m, const char *parse, int permtag, bool reset) {
|
||||
m.NPCSpecialAttacks(parse, permtag, reset);
|
||||
}
|
||||
|
||||
void mob_npc_special_attacks2(Mob &m, const char *parse, int permtag, bool reset, bool remove) {
|
||||
m.NPCSpecialAttacks(parse, permtag, reset, remove);
|
||||
}
|
||||
|
||||
int32 mob_check_aggro_amount(Mob &m, uint16 spell_id, Mob *target) {
|
||||
return m.CheckAggroAmount(spell_id, target);
|
||||
}
|
||||
|
||||
int32 mob_check_aggro_amount1(Mob &m, uint16 spell_id, Mob *target, bool isproc) {
|
||||
return m.CheckAggroAmount(spell_id, target, isproc);
|
||||
}
|
||||
|
||||
int32 mob_check_heal_aggro_amount(Mob &m, uint16 spell_id, Mob *target) {
|
||||
return m.CheckHealAggroAmount(spell_id, target);
|
||||
}
|
||||
|
||||
int32 mob_check_heal_aggro_amount1(Mob &m, uint16 spell_id, Mob *target, uint32 heal_possible) {
|
||||
return m.CheckHealAggroAmount(spell_id, target, heal_possible);
|
||||
}
|
||||
|
||||
void mob_set_aa(Mob &m, uint32 rank_id, uint32 new_value) {
|
||||
m.SetAA(rank_id, new_value);
|
||||
}
|
||||
|
||||
void mob_set_aa1(Mob &m, uint32 rank_id, uint32 new_value, uint32 charges) {
|
||||
m.SetAA(rank_id, new_value, charges);
|
||||
}
|
||||
|
||||
void mob_do_special_attack_damage(Mob &m, Mob *who, int skill, int base_damage) {
|
||||
m.DoSpecialAttackDamage(who, static_cast<EQEmu::skills::SkillType>(skill), base_damage);
|
||||
}
|
||||
|
||||
void mob_do_special_attack_damage1(Mob &m, Mob *who, int skill, int base_damage, int min_damage) {
|
||||
m.DoSpecialAttackDamage(who, static_cast<EQEmu::skills::SkillType>(skill), base_damage, min_damage);
|
||||
}
|
||||
|
||||
void mob_do_special_attack_damage2(Mob &m, Mob *who, int skill, int base_damage, int min_damage, int32 hate_override) {
|
||||
m.DoSpecialAttackDamage(who, static_cast<EQEmu::skills::SkillType>(skill), base_damage, min_damage, hate_override);
|
||||
}
|
||||
|
||||
void mob_do_special_attack_damage3(Mob &m, Mob *who, int skill, int base_damage, int min_damage, int32 hate_override, int reuse_time) {
|
||||
m.DoSpecialAttackDamage(who, static_cast<EQEmu::skills::SkillType>(skill), base_damage, min_damage, hate_override, reuse_time);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage(Mob &m, Mob *other) {
|
||||
m.DoThrowingAttackDmg(other);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage1(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon) {
|
||||
m.DoThrowingAttackDmg(other, weapon);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage2(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage3(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage4(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage5(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage6(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage7(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_slot) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_slot);
|
||||
}
|
||||
|
||||
void mob_do_throwing_attack_damage8(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemData *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_slot, float speed) {
|
||||
m.DoThrowingAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_slot, speed);
|
||||
}
|
||||
|
||||
void mob_do_melee_skill_attack_damage(Mob &m, Mob *other, uint16 weapon_damage, int skillinuse) {
|
||||
m.DoMeleeSkillAttackDmg(other, weapon_damage, static_cast<EQEmu::skills::SkillType>(skillinuse));
|
||||
}
|
||||
|
||||
void mob_do_melee_skill_attack_damage1(Mob &m, Mob *other, uint16 weapon_damage, int skillinuse, int16 chance_mod) {
|
||||
m.DoMeleeSkillAttackDmg(other, weapon_damage, static_cast<EQEmu::skills::SkillType>(skillinuse), chance_mod);
|
||||
}
|
||||
|
||||
void mob_do_melee_skill_attack_damage2(Mob &m, Mob *other, uint16 weapon_damage, int skillinuse, int16 chance_mod, int16 focus) {
|
||||
m.DoMeleeSkillAttackDmg(other, weapon_damage, static_cast<EQEmu::skills::SkillType>(skillinuse), chance_mod, focus);
|
||||
}
|
||||
|
||||
void mob_do_melee_skill_attack_damage3(Mob &m, Mob *other, uint16 weapon_damage, int skillinuse, int16 chance_mod, int16 focus, bool can_riposte) {
|
||||
m.DoMeleeSkillAttackDmg(other, weapon_damage, static_cast<EQEmu::skills::SkillType>(skillinuse), chance_mod, focus, can_riposte);
|
||||
}
|
||||
|
||||
void mob_do_melee_skill_attack_damage4(Mob &m, Mob *other, uint16 weapon_damage, int skillinuse, int16 chance_mod, int16 focus, bool can_riposte, int reuse_time) {
|
||||
m.DoMeleeSkillAttackDmg(other, weapon_damage, static_cast<EQEmu::skills::SkillType>(skillinuse), chance_mod, focus, can_riposte, reuse_time);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage(Mob &m, Mob *other) {
|
||||
m.DoArcheryAttackDmg(other);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage1(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon) {
|
||||
m.DoArcheryAttackDmg(other, weapon);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage2(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage3(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage4(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage5(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage6(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage7(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage8(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_id) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_id);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage9(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_id, const EQEmu::ItemData *ammo_data) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_id, ammo_data);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage10(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_id, const EQEmu::ItemData *ammo_data, int ammo_slot) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_id, ammo_data, ammo_slot);
|
||||
}
|
||||
|
||||
void mob_do_archery_attack_damage11(Mob &m, Mob *other, const EQEmu::ItemInstance *weapon, const EQEmu::ItemInstance *ammo,
|
||||
uint16 weapon_damage, int16 chance_mod, int16 focus, int reuse_time, uint32 range_id, int ammo_id, const EQEmu::ItemData *ammo_data, int ammo_slot, float speed) {
|
||||
m.DoArcheryAttackDmg(other, weapon, ammo, weapon_damage, chance_mod, focus, reuse_time, range_id, ammo_slot, ammo_data, ammo_slot, speed);
|
||||
}
|
||||
|
||||
bool mob_check_los(Mob &m, Mob *other) {
|
||||
return m.CheckLosFN(other);
|
||||
}
|
||||
|
||||
bool mob_check_los_to_loc(Mob &m, float x, float y, float z) {
|
||||
return m.CheckLosFN(x, y, z, 6.0f);
|
||||
}
|
||||
|
||||
bool mob_check_los_to_loc1(Mob &m, float x, float y, float z, float mob_size) {
|
||||
return m.CheckLosFN(x, y, z, mob_size);
|
||||
}
|
||||
|
||||
float mob_find_ground_z(Mob &m, float x, float y) {
|
||||
return m.GetGroundZ(x, y);
|
||||
}
|
||||
|
||||
float mob_find_ground_z1(Mob &m, float x, float y, float offset) {
|
||||
return m.GetGroundZ(x, y, offset);
|
||||
}
|
||||
|
||||
void mob_projectile_animation(Mob &m, Mob *to, int item_id) {
|
||||
m.ProjectileAnimation(to, item_id);
|
||||
}
|
||||
|
||||
void mob_projectile_animation1(Mob &m, Mob *to, int item_id, bool is_arrow) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow);
|
||||
}
|
||||
|
||||
void mob_projectile_animation2(Mob &m, Mob *to, int item_id, bool is_arrow, float speed) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed);
|
||||
}
|
||||
|
||||
void mob_projectile_animation3(Mob &m, Mob *to, int item_id, bool is_arrow, float speed, float angle) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed, angle);
|
||||
}
|
||||
|
||||
void mob_projectile_animation4(Mob &m, Mob *to, int item_id, bool is_arrow, float speed, float angle, float tilt) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed, angle, tilt);
|
||||
}
|
||||
|
||||
void mob_projectile_animation5(Mob &m, Mob *to, int item_id, bool is_arrow, float speed, float angle, float tilt, float arc) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed, angle, tilt, arc);
|
||||
}
|
||||
|
||||
void mob_projectile_animation6(Mob &m, Mob *to, int item_id, bool is_arrow, float speed, float angle, float tilt, float arc, const std::string &id_file) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed, angle, tilt, arc, id_file.c_str());
|
||||
}
|
||||
|
||||
void mob_projectile_animation7(Mob &m, Mob *to, int item_id, bool is_arrow, float speed, float angle, float tilt, float arc, const std::string &id_file, int skillinuse) {
|
||||
m.ProjectileAnimation(to, item_id, is_arrow, speed, angle, tilt, arc, id_file.c_str(), static_cast<EQEmu::skills::SkillType>(skillinuse));
|
||||
}
|
||||
|
||||
void mob_send_appearance_effect(Mob &m, uint32 param1, uint32 param2, uint32 param3, uint32 param4, uint32 param5) {
|
||||
m.SendAppearanceEffect(param1, param2, param2, param4, param5);
|
||||
}
|
||||
|
||||
void mob_send_appearance_effect1(Mob &m, uint32 param1, uint32 param2, uint32 param3, uint32 param4, uint32 param5, Client *target) {
|
||||
m.SendAppearanceEffect(param1, param2, param2, param4, param5, target);
|
||||
}
|
||||
|
||||
void mob_set_texture(Mob &m, int in) {
|
||||
m.SendIllusionPacket(m.GetRace(), 0xFF, in);
|
||||
}
|
||||
|
||||
void mob_set_race(Mob &m, int in) {
|
||||
m.SendIllusionPacket(in);
|
||||
}
|
||||
|
||||
void mob_set_gender(Mob &m, int in) {
|
||||
m.SendIllusionPacket(m.GetRace(), in);
|
||||
}
|
||||
|
||||
void RegisterMobTypesB(sol::simple_usertype<Mob> &mob) {
|
||||
mob.set("Stun", &Mob::Stun);
|
||||
mob.set("UnStun", &Mob::UnStun);
|
||||
mob.set("IsStunned", &Mob::IsStunned);
|
||||
mob.set("Spin", &Mob::Spin);
|
||||
mob.set("Kill", &Mob::Kill);
|
||||
mob.set("CanThisClassDoubleAttack", &Mob::CanThisClassDoubleAttack);
|
||||
mob.set("CanThisClassDualWield", &Mob::CanThisClassDualWield);
|
||||
mob.set("CanThisClassRiposte", &Mob::CanThisClassRiposte);
|
||||
mob.set("CanThisClassDodge", &Mob::CanThisClassDodge);
|
||||
mob.set("CanThisClassParry", &Mob::CanThisClassParry);
|
||||
mob.set("CanThisClassBlock", &Mob::CanThisClassBlock);
|
||||
mob.set("SetInvul", &Mob::SetInvul);
|
||||
mob.set("GetInvul", &Mob::GetInvul);
|
||||
mob.set("SetExtraHaste", &Mob::SetExtraHaste);
|
||||
mob.set("GetHaste", &Mob::GetHaste);
|
||||
mob.set("GetHandToHandDamage", &Mob::GetHandToHandDamage);
|
||||
mob.set("GetHandToHandDelay", &Mob::GetHandToHandDelay);
|
||||
mob.set("Mesmerize", &Mob::Mesmerize);
|
||||
mob.set("IsMezzed", &Mob::IsMezzed);
|
||||
mob.set("IsEnraged", &Mob::IsEnraged);
|
||||
mob.set("GetReverseFactionCon", &Mob::GetReverseFactionCon);
|
||||
mob.set("IsAIControlled", &Mob::IsAIControlled);
|
||||
mob.set("GetAggroRange", &Mob::GetAggroRange);
|
||||
mob.set("GetAssistRange", &Mob::GetAssistRange);
|
||||
mob.set("SetPetOrder", &Mob::SetPetOrder);
|
||||
mob.set("GetPetOrder", &Mob::GetPetOrder);
|
||||
mob.set("IsRoamer", &Mob::IsRoamer);
|
||||
mob.set("IsRooted", &Mob::IsRooted);
|
||||
mob.set("IsEngaged", &Mob::IsEngaged);
|
||||
mob.set("FaceTarget", &Mob::FaceTarget);
|
||||
mob.set("SetHeading", &Mob::SetHeading);
|
||||
mob.set("CalculateHeadingToTarget", &Mob::CalculateHeadingToTarget);
|
||||
mob.set("CalculateNewPosition", sol::overload(
|
||||
&mob_calculate_new_position,
|
||||
&mob_calculate_new_position1,
|
||||
&mob_calculate_new_position2));
|
||||
mob.set("CalculateDistance", &Mob::CalculateDistance);
|
||||
mob.set("SendTo", &Mob::SendTo);
|
||||
mob.set("SendToFixZ", &Mob::SendToFixZ);
|
||||
mob.set("NPCSpecialAttacks", sol::overload(
|
||||
&mob_npc_special_attacks,
|
||||
&mob_npc_special_attacks1,
|
||||
&mob_npc_special_attacks2));
|
||||
mob.set("GetResist", &Mob::GetResist);
|
||||
mob.set("Charmed", &Mob::Charmed);
|
||||
mob.set("CheckAggroAmount", sol::overload(
|
||||
&mob_check_aggro_amount,
|
||||
&mob_check_aggro_amount1));
|
||||
mob.set("CheckHealAggroAmount", sol::overload(
|
||||
&mob_check_heal_aggro_amount,
|
||||
&mob_check_heal_aggro_amount1));
|
||||
mob.set("GetAA", &Mob::GetAA);
|
||||
mob.set("GetAA", &Mob::GetAA);
|
||||
mob.set("SetAA", sol::overload(
|
||||
&mob_set_aa,
|
||||
&mob_set_aa1));
|
||||
mob.set("DivineAura", &Mob::DivineAura);
|
||||
mob.set("SetOOCRegen", &Mob::SetOOCRegen);
|
||||
mob.set("GetEntityVariable", &Mob::GetEntityVariable);
|
||||
mob.set("SetEntityVariable", &Mob::SetEntityVariable);
|
||||
mob.set("EntityVariableExists", &Mob::EntityVariableExists);
|
||||
mob.set("Signal", &Mob::Signal);
|
||||
mob.set("CombatRange", &Mob::CombatRange);
|
||||
mob.set("DoSpecialAttackDamage", sol::overload(
|
||||
&mob_do_special_attack_damage,
|
||||
&mob_do_special_attack_damage1,
|
||||
&mob_do_special_attack_damage2,
|
||||
&mob_do_special_attack_damage3));
|
||||
mob.set("DoThrowingAttackDmg", sol::overload(
|
||||
&mob_do_throwing_attack_damage,
|
||||
&mob_do_throwing_attack_damage1,
|
||||
&mob_do_throwing_attack_damage2,
|
||||
&mob_do_throwing_attack_damage3,
|
||||
&mob_do_throwing_attack_damage4,
|
||||
&mob_do_throwing_attack_damage5,
|
||||
&mob_do_throwing_attack_damage6,
|
||||
&mob_do_throwing_attack_damage7,
|
||||
&mob_do_throwing_attack_damage8));
|
||||
mob.set("DoMeleeSkillAttackDmg", sol::overload(
|
||||
&mob_do_melee_skill_attack_damage,
|
||||
&mob_do_melee_skill_attack_damage1,
|
||||
&mob_do_melee_skill_attack_damage2,
|
||||
&mob_do_melee_skill_attack_damage3,
|
||||
&mob_do_melee_skill_attack_damage4));
|
||||
mob.set("DoArcheryAttackDmg", sol::overload(
|
||||
&mob_do_archery_attack_damage,
|
||||
&mob_do_archery_attack_damage1,
|
||||
&mob_do_archery_attack_damage2,
|
||||
&mob_do_archery_attack_damage3,
|
||||
&mob_do_archery_attack_damage4,
|
||||
&mob_do_archery_attack_damage5,
|
||||
&mob_do_archery_attack_damage6,
|
||||
&mob_do_archery_attack_damage7,
|
||||
&mob_do_archery_attack_damage8,
|
||||
&mob_do_archery_attack_damage9,
|
||||
&mob_do_archery_attack_damage10,
|
||||
&mob_do_archery_attack_damage11));
|
||||
mob.set("CheckLoS", &mob_check_los);
|
||||
mob.set("CheckLoSToLoc", sol::overload(
|
||||
&mob_check_los_to_loc,
|
||||
&mob_check_los_to_loc1));
|
||||
mob.set("FindGroundZ", sol::overload(
|
||||
&mob_find_ground_z,
|
||||
&mob_find_ground_z1));
|
||||
mob.set("ProjectileAnimation", sol::overload(
|
||||
&mob_projectile_animation,
|
||||
&mob_projectile_animation1,
|
||||
&mob_projectile_animation2,
|
||||
&mob_projectile_animation3,
|
||||
&mob_projectile_animation4,
|
||||
&mob_projectile_animation5,
|
||||
&mob_projectile_animation6,
|
||||
&mob_projectile_animation7));
|
||||
mob.set("HasNPCSpecialAtk", &Mob::HasNPCSpecialAtk);
|
||||
mob.set("SendAppearanceEffect", sol::overload(
|
||||
&mob_send_appearance_effect,
|
||||
&mob_send_appearance_effect1));
|
||||
mob.set("SetFlyMode", &Mob::SetFlyMode);
|
||||
mob.set("SetTexture", &mob_set_texture);
|
||||
mob.set("SetRace", &mob_set_race);
|
||||
mob.set("SetGender", &mob_set_gender);
|
||||
mob.set("SendIllusionPacket", &Mob::SendIllusionPacket);
|
||||
mob.set("ChangeRace", &Mob::ChangeRace);
|
||||
mob.set("ChangeGender", &Mob::ChangeGender);
|
||||
mob.set("ChangeTexture", &Mob::ChangeTexture);
|
||||
mob.set("ChangeHelmTexture", &Mob::ChangeHelmTexture);
|
||||
mob.set("ChangeHairColor", &Mob::ChangeHairColor);
|
||||
mob.set("ChangeBeardColor", &Mob::ChangeBeardColor);
|
||||
mob.set("ChangeEyeColor1", &Mob::ChangeEyeColor1);
|
||||
mob.set("ChangeEyeColor2", &Mob::ChangeEyeColor2);
|
||||
mob.set("ChangeHairStyle", &Mob::ChangeHairStyle);
|
||||
mob.set("ChangeLuclinFace", &Mob::ChangeLuclinFace);
|
||||
mob.set("ChangeBeard", &Mob::ChangeBeard);
|
||||
mob.set("ChangeDrakkinHeritage", &Mob::ChangeDrakkinHeritage);
|
||||
mob.set("ChangeDrakkinTattoo", &Mob::ChangeDrakkinTattoo);
|
||||
mob.set("ChangeDrakkinDetails", &Mob::ChangeDrakkinDetails);
|
||||
}
|
||||
180
zone/lua/lua_mob_c.cpp
Normal file
180
zone/lua/lua_mob_c.cpp
Normal file
@ -0,0 +1,180 @@
|
||||
#include <sol.hpp>
|
||||
#include "../mob.h"
|
||||
|
||||
void mob_camera_effect(Mob &m, uint32 duration, uint32 intensity) {
|
||||
m.CameraEffect(duration, intensity);
|
||||
}
|
||||
|
||||
void mob_camera_effect1(Mob &m, uint32 duration, uint32 intensity, Client *c) {
|
||||
m.CameraEffect(duration, intensity, c);
|
||||
}
|
||||
|
||||
void mob_camera_effect2(Mob &m, uint32 duration, uint32 intensity, Client *c, bool global) {
|
||||
m.CameraEffect(duration, intensity, c, global);
|
||||
}
|
||||
|
||||
void mob_send_spell_effect(Mob &m, uint32 effectid, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020) {
|
||||
m.SendSpellEffect(effectid, duration, finish_delay, zone_wide, unk020);
|
||||
}
|
||||
|
||||
void mob_send_spell_effect1(Mob &m, uint32 effectid, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect) {
|
||||
m.SendSpellEffect(effectid, duration, finish_delay, zone_wide, unk020, perm_effect);
|
||||
}
|
||||
|
||||
void mob_send_spell_effect2(Mob &m, uint32 effectid, uint32 duration, uint32 finish_delay, bool zone_wide, uint32 unk020, bool perm_effect, Client *c) {
|
||||
m.SendSpellEffect(effectid, duration, finish_delay, zone_wide, unk020, perm_effect, c);
|
||||
}
|
||||
|
||||
void mob_temp_name(Mob &m) {
|
||||
m.TempName();
|
||||
}
|
||||
|
||||
void mob_temp_name1(Mob &m, const std::string &name) {
|
||||
m.TempName(name.c_str());
|
||||
}
|
||||
|
||||
void mob_set_appearance(Mob &m, int app) {
|
||||
m.SetAppearance(static_cast<EmuAppearance>(app));
|
||||
}
|
||||
|
||||
void mob_set_appearance1(Mob &m, int app, bool ignore_self) {
|
||||
m.SetAppearance(static_cast<EmuAppearance>(app), ignore_self);
|
||||
}
|
||||
|
||||
void mob_buff_fade_by_effect(Mob &m, int effect_id) {
|
||||
m.BuffFadeByEffect(effect_id);
|
||||
}
|
||||
|
||||
void mob_buff_fade_by_effect1(Mob &m, int effect_id, int skipslot) {
|
||||
m.BuffFadeByEffect(effect_id, skipslot);
|
||||
}
|
||||
|
||||
void mob_buff_fade_by_slot(Mob &m, int slot) {
|
||||
m.BuffFadeBySlot(slot);
|
||||
}
|
||||
|
||||
void mob_buff_fade_by_slot1(Mob &m, int slot, bool recalc_bonuses) {
|
||||
m.BuffFadeBySlot(slot, recalc_bonuses);
|
||||
}
|
||||
|
||||
int mob_can_buff_stack(Mob &m, uint16 spell_id, uint8 caster_level) {
|
||||
return m.CanBuffStack(spell_id, caster_level);
|
||||
}
|
||||
|
||||
int mob_can_buff_stack1(Mob &m, uint16 spell_id, uint8 caster_level, bool fail_if_overwrite) {
|
||||
return m.CanBuffStack(spell_id, caster_level, fail_if_overwrite);
|
||||
}
|
||||
|
||||
int mob_get_weapon_damage(Mob &m, Mob *against, EQEmu::ItemInstance *weapon) {
|
||||
return m.GetWeaponDamage(against, weapon);
|
||||
}
|
||||
|
||||
std::tuple<bool, int> mob_try_finishing_blow(Mob &m, Mob *defender, int damage) {
|
||||
auto r = m.TryFinishingBlow(defender, damage);
|
||||
|
||||
return std::make_tuple(r, damage);
|
||||
}
|
||||
|
||||
void RegisterMobTypesC(sol::simple_usertype<Mob> &mob) {
|
||||
mob.set("CameraEffect", sol::overload(
|
||||
&mob_camera_effect,
|
||||
&mob_camera_effect1,
|
||||
&mob_camera_effect2));
|
||||
mob.set("SendSpellEffect", sol::overload(
|
||||
&mob_send_spell_effect,
|
||||
&mob_send_spell_effect1,
|
||||
&mob_send_spell_effect2));
|
||||
mob.set("TempName", sol::overload(
|
||||
&mob_temp_name,
|
||||
&mob_temp_name1));
|
||||
mob.set("GetGlobal", &Mob::GetGlobal);
|
||||
mob.set("SetGlobal", &Mob::SetGlobal);
|
||||
mob.set("SetGlobal", &Mob::SetGlobal);
|
||||
mob.set("TarGlobal", &Mob::TarGlobal);
|
||||
mob.set("DelGlobal", &Mob::DelGlobal);
|
||||
mob.set("SetSlotTint", &Mob::SetSlotTint);
|
||||
mob.set("WearChange", &Mob::WearChange);
|
||||
mob.set("DoKnockback", &Mob::DoKnockback);
|
||||
mob.set("AddNimbusEffect", &Mob::AddNimbusEffect);
|
||||
mob.set("RemoveNimbusEffect", &Mob::RemoveNimbusEffect);
|
||||
mob.set("IsFeared", &Mob::IsFeared);
|
||||
mob.set("IsBlind", &Mob::IsBlind);
|
||||
mob.set("IsRunning", &Mob::IsRunning);
|
||||
mob.set("SetRunning", &Mob::SetRunning);
|
||||
mob.set("SetBodyType", &Mob::SetBodyType);
|
||||
mob.set("SetTargetable", &Mob::SetTargetable);
|
||||
mob.set("ModSkillDmgTaken", &Mob::ModSkillDmgTaken);
|
||||
mob.set("GetModSkillDmgTaken", &Mob::GetModSkillDmgTaken);
|
||||
mob.set("GetSkillDmgTaken", &Mob::GetSkillDmgTaken);
|
||||
mob.set("GetFcDamageAmtIncoming", &Mob::GetFcDamageAmtIncoming);
|
||||
mob.set("GetSkillDmgAmt", &Mob::GetSkillDmgAmt);
|
||||
mob.set("SetAllowBeneficial", &Mob::SetAllowBeneficial);
|
||||
mob.set("GetAllowBeneficial", &Mob::GetAllowBeneficial);
|
||||
mob.set("IsBeneficialAllowed", &Mob::IsBeneficialAllowed);
|
||||
mob.set("ModVulnerability", &Mob::ModVulnerability);
|
||||
mob.set("GetModVulnerability", &Mob::GetModVulnerability);
|
||||
mob.set("SetDisableMelee", &Mob::SetDisableMelee);
|
||||
mob.set("IsMeleeDisabled", &Mob::IsMeleeDisabled);
|
||||
mob.set("SetFlurryChance", &Mob::SetFlurryChance);
|
||||
mob.set("GetFlurryChance", &Mob::GetFlurryChance);
|
||||
mob.set("GetSkill", &Mob::GetSkill);
|
||||
mob.set("GetSpecialAbility", &Mob::GetSpecialAbility);
|
||||
mob.set("GetSpecialAbilityParam", &Mob::GetSpecialAbilityParam);
|
||||
mob.set("SetSpecialAbility", &Mob::SetSpecialAbility);
|
||||
mob.set("SetSpecialAbilityParam", &Mob::SetSpecialAbilityParam);
|
||||
mob.set("ClearSpecialAbilities", &Mob::ClearSpecialAbilities);
|
||||
mob.set("ProcessSpecialAbilities", &Mob::ProcessSpecialAbilities);
|
||||
mob.set("GetAppearance", &Mob::GetAppearance);
|
||||
mob.set("SetAppearance", sol::overload(
|
||||
&mob_set_appearance,
|
||||
&mob_set_appearance1));
|
||||
mob.set("SetDestructibleObject", &Mob::SetDestructibleObject);
|
||||
mob.set("IsImmuneToSpell", &Mob::IsImmuneToSpell);
|
||||
mob.set("BuffFadeBySpellID", &Mob::BuffFadeBySpellID);
|
||||
mob.set("BuffFadeAll", &Mob::BuffFadeAll);
|
||||
mob.set("BuffFadeByEffect", sol::overload(
|
||||
&mob_buff_fade_by_effect,
|
||||
&mob_buff_fade_by_effect1));
|
||||
mob.set("BuffFadeBySlot", sol::overload(
|
||||
&mob_buff_fade_by_slot,
|
||||
&mob_buff_fade_by_slot1));
|
||||
mob.set("CanBuffStack", sol::overload(
|
||||
&mob_can_buff_stack,
|
||||
&mob_can_buff_stack1));
|
||||
mob.set("SetPseudoRoot", &Mob::SetPseudoRoot);
|
||||
mob.set("SeeInvisible", &Mob::SeeInvisible);
|
||||
mob.set("SeeInvisibleUndead", &Mob::SeeInvisibleUndead);
|
||||
mob.set("SeeHide", &Mob::SeeHide);
|
||||
mob.set("SeeImprovedHide", &Mob::SeeImprovedHide);
|
||||
mob.set("GetNimbusEffect1", &Mob::GetNimbusEffect1);
|
||||
mob.set("GetNimbusEffect2", &Mob::GetNimbusEffect2);
|
||||
mob.set("GetNimbusEffect3", &Mob::GetNimbusEffect3);
|
||||
mob.set("IsTargetable", &Mob::IsTargetable);
|
||||
mob.set("HasShieldEquiped", &Mob::HasShieldEquiped);
|
||||
mob.set("HasTwoHandBluntEquiped", &Mob::HasTwoHandBluntEquiped);
|
||||
mob.set("HasTwoHanderEquipped", &Mob::HasTwoHanderEquipped);
|
||||
mob.set("GetHerosForgeModel", &Mob::GetHerosForgeModel);
|
||||
mob.set("IsEliteMaterialItem", &Mob::IsEliteMaterialItem);
|
||||
mob.set("GetBaseSize", &Mob::GetBaseSize);
|
||||
mob.set("HasOwner", &Mob::HasOwner);
|
||||
mob.set("IsPet", &Mob::IsPet);
|
||||
mob.set("HasPet", &Mob::HasPet);
|
||||
mob.set("IsSilenced", &Mob::IsSilenced);
|
||||
mob.set("IsAmnesiad", &Mob::IsAmnesiad);
|
||||
mob.set("GetMeleeMitigation", &Mob::GetMeleeMitigation);
|
||||
mob.set("GetWeaponDamageBonus", &Mob::GetWeaponDamageBonus);
|
||||
mob.set("GetItemBonuses", &Mob::GetItemBonuses);
|
||||
mob.set("GetSpellBonuses", &Mob::GetSpellBonuses);
|
||||
mob.set("GetAABonuses", &Mob::GetAABonuses);
|
||||
mob.set("GetMeleeDamageMod_SE", &Mob::GetMeleeDamageMod_SE);
|
||||
mob.set("GetMeleeMinDamageMod_SE", &Mob::GetMeleeMinDamageMod_SE);
|
||||
mob.set("IsAttackAllowed", &Mob::IsAttackAllowed);
|
||||
mob.set("IsCasting", &Mob::IsCasting);
|
||||
mob.set("AttackAnimation", &Mob::AttackAnimation);
|
||||
mob.set("GetWeaponDamage", &mob_get_weapon_damage);
|
||||
mob.set("IsBerserk", &Mob::IsBerserk);
|
||||
mob.set("TryFinishingBlow", &mob_try_finishing_blow);
|
||||
mob.set("GetBodyType", &Mob::GetBodyType);
|
||||
mob.set("GetOrigBodyType", &Mob::GetOrigBodyType);
|
||||
mob.set("CheckNumHitsRemaining", &Mob::CheckNumHitsRemaining);
|
||||
}
|
||||
@ -1,8 +1,241 @@
|
||||
#include <sol.hpp>
|
||||
#include "../npc.h"
|
||||
|
||||
void lua_register_npc(sol::state *state) {
|
||||
state->new_usertype<NPC>("NPC",
|
||||
sol::base_classes, sol::bases<Mob, Entity>()
|
||||
);
|
||||
void npc_add_item(NPC &n, uint32 item_id, uint16 charges) {
|
||||
n.AddItem(item_id, charges);
|
||||
}
|
||||
|
||||
void npc_add_item1(NPC &n, uint32 item_id, uint16 charges, bool equipitem) {
|
||||
n.AddItem(item_id, charges, equipitem);
|
||||
}
|
||||
|
||||
void npc_add_item2(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1);
|
||||
}
|
||||
|
||||
void npc_add_item3(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1, uint32 aug2) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1, aug2);
|
||||
}
|
||||
|
||||
void npc_add_item4(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1, uint32 aug2, uint32 aug3) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1, aug2, aug3);
|
||||
}
|
||||
|
||||
void npc_add_item5(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1, aug2, aug3, aug4);
|
||||
}
|
||||
|
||||
void npc_add_item6(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1, aug2, aug3, aug4, aug5);
|
||||
}
|
||||
|
||||
void npc_add_item7(NPC &n, uint32 item_id, uint16 charges, bool equipitem, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, uint32 aug6) {
|
||||
n.AddItem(item_id, charges, equipitem, aug1, aug2, aug3, aug4, aug5, aug6);
|
||||
}
|
||||
|
||||
void npc_add_loot_table(NPC &n) {
|
||||
n.AddLootTable();
|
||||
}
|
||||
|
||||
void npc_add_loot_table1(NPC &n, uint32 ltid) {
|
||||
n.AddLootTable(ltid);
|
||||
}
|
||||
|
||||
void npc_remove_item(NPC &n, uint32 item_id) {
|
||||
n.RemoveItem(item_id);
|
||||
}
|
||||
|
||||
void npc_remove_item1(NPC &n, uint32 item_id, uint16 quantity) {
|
||||
n.RemoveItem(item_id, quantity);
|
||||
}
|
||||
|
||||
void npc_remove_item2(NPC &n, uint32 item_id, uint16 quantity, uint16 slot) {
|
||||
n.RemoveItem(item_id, quantity, slot);
|
||||
}
|
||||
|
||||
void npc_add_cash(NPC &n, uint16 copper, uint16 silver, uint16 gold, uint16 plat) {
|
||||
n.AddCash(copper, silver, gold, plat);
|
||||
}
|
||||
|
||||
void npc_save_guard_spot(NPC &n) {
|
||||
n.SaveGuardSpot();
|
||||
}
|
||||
|
||||
void npc_save_guard_spot1(NPC &n, bool clear_guard_spot) {
|
||||
n.SaveGuardSpot(clear_guard_spot);
|
||||
}
|
||||
|
||||
void npc_ai_set_roambox(NPC &n, float max_distance, float variance) {
|
||||
n.AI_SetRoambox(max_distance, variance);
|
||||
}
|
||||
|
||||
void npc_ai_set_roambox1(NPC &n, float max_distance, float variance, uint32 delay) {
|
||||
n.AI_SetRoambox(max_distance, variance, delay);
|
||||
}
|
||||
|
||||
void npc_ai_set_roambox2(NPC &n, float max_distance, float variance, uint32 delay, uint32 min_delay) {
|
||||
n.AI_SetRoambox(max_distance, variance, delay, min_delay);
|
||||
}
|
||||
|
||||
float npc_get_spawn_point_x(NPC &n) {
|
||||
return n.GetSpawnPoint().x;
|
||||
}
|
||||
|
||||
float npc_get_spawn_point_y(NPC &n) {
|
||||
return n.GetSpawnPoint().y;
|
||||
}
|
||||
|
||||
float npc_get_spawn_point_z(NPC &n) {
|
||||
return n.GetSpawnPoint().z;
|
||||
}
|
||||
|
||||
float npc_get_spawn_point_h(NPC &n) {
|
||||
return n.GetSpawnPoint().w;
|
||||
}
|
||||
|
||||
float npc_get_guard_point_x(NPC &n) {
|
||||
return n.GetGuardPoint().x;
|
||||
}
|
||||
|
||||
float npc_get_guard_point_y(NPC &n) {
|
||||
return n.GetGuardPoint().y;
|
||||
}
|
||||
|
||||
float npc_get_guard_point_z(NPC &n) {
|
||||
return n.GetGuardPoint().z;
|
||||
}
|
||||
|
||||
float npc_get_guard_point_h(NPC &n) {
|
||||
return n.GetGuardPoint().w;
|
||||
}
|
||||
|
||||
void npc_add_ai_spell(NPC &n, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust) {
|
||||
return n.AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, 0, 0);
|
||||
}
|
||||
|
||||
void npc_add_ai_spell1(NPC &n, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp) {
|
||||
return n.AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, min_hp, 0);
|
||||
}
|
||||
|
||||
void npc_add_ai_spell2(NPC &n, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp, int max_hp) {
|
||||
return n.AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, min_hp, max_hp);
|
||||
}
|
||||
|
||||
void lua_register_npc(sol::state *state) {
|
||||
auto npc = state->create_simple_usertype<NPC>(sol::base_classes, sol::bases<Mob, Entity>());
|
||||
|
||||
npc.set("Signal", &NPC::Signal);
|
||||
npc.set("CheckNPCFactionAlly", &NPC::CheckNPCFactionAlly);
|
||||
npc.set("AddItem", sol::overload(
|
||||
&npc_add_item,
|
||||
&npc_add_item1,
|
||||
&npc_add_item2,
|
||||
&npc_add_item3,
|
||||
&npc_add_item4,
|
||||
&npc_add_item5,
|
||||
&npc_add_item6,
|
||||
&npc_add_item7
|
||||
));
|
||||
npc.set("AddLootTable", sol::overload(
|
||||
&npc_add_loot_table,
|
||||
&npc_add_loot_table1
|
||||
));
|
||||
npc.set("RemoveItem", sol::overload(
|
||||
&npc_remove_item,
|
||||
&npc_remove_item1,
|
||||
&npc_remove_item2
|
||||
));
|
||||
npc.set("ClearItemList", &NPC::ClearItemList);
|
||||
npc.set("AddCash", &npc_add_cash);
|
||||
npc.set("RemoveCash", &NPC::RemoveCash);
|
||||
npc.set("CountLoot", &NPC::CountLoot);
|
||||
npc.set("GetLoottableID", &NPC::GetLoottableID);
|
||||
npc.set("GetCopper", &NPC::GetCopper);
|
||||
npc.set("GetSilver", &NPC::GetSilver);
|
||||
npc.set("GetGold", &NPC::GetGold);
|
||||
npc.set("GetPlatinum", &NPC::GetPlatinum);
|
||||
npc.set("SetCopper", &NPC::SetCopper);
|
||||
npc.set("SetSilver", &NPC::SetSilver);
|
||||
npc.set("SetGold", &NPC::SetGold);
|
||||
npc.set("SetPlatinum", &NPC::SetPlatinum);
|
||||
npc.set("SetGrid", &NPC::SetGrid);
|
||||
npc.set("SetSaveWaypoint", &NPC::SetSaveWaypoint);
|
||||
npc.set("SetSp2", &NPC::SetSp2);
|
||||
npc.set("GetWaypointMax", &NPC::GetWaypointMax);
|
||||
npc.set("GetGrid", &NPC::GetGrid);
|
||||
npc.set("GetSp2", &NPC::GetSp2);
|
||||
npc.set("GetNPCFactionID", &NPC::GetNPCFactionID);
|
||||
npc.set("GetPrimaryFaction", &NPC::GetPrimaryFaction);
|
||||
npc.set("GetNPCHate", &NPC::GetNPCHate);
|
||||
npc.set("IsOnHatelist", &NPC::IsOnHatelist);
|
||||
npc.set("SetNPCFactionID", &NPC::SetNPCFactionID);
|
||||
npc.set("GetMaxDMG", &NPC::GetMaxDMG);
|
||||
npc.set("GetMinDMG", &NPC::GetMinDMG);
|
||||
npc.set("IsAnimal", &NPC::IsAnimal);
|
||||
npc.set("GetPetSpellID", &NPC::GetPetSpellID);
|
||||
npc.set("SetPetSpellID", &NPC::SetPetSpellID);
|
||||
npc.set("GetMaxDamage", &NPC::GetMaxDamage);
|
||||
npc.set("SetTaunting", &NPC::SetTaunting);
|
||||
npc.set("PickPocket", &NPC::PickPocket);
|
||||
npc.set("StartSwarmTimer", &NPC::StartSwarmTimer);
|
||||
npc.set("DoClassAttacks", &NPC::DoClassAttacks);
|
||||
npc.set("GetMaxWp", &NPC::GetMaxWp);
|
||||
npc.set("DisplayWaypointInfo", &NPC::DisplayWaypointInfo);
|
||||
npc.set("CalculateNewWaypoint", &NPC::CalculateNewWaypoint);
|
||||
npc.set("AssignWaypoints", &NPC::AssignWaypoints);
|
||||
npc.set("SetWaypointPause", &NPC::SetWaypointPause);
|
||||
npc.set("UpdateWaypoint", &NPC::UpdateWaypoint);
|
||||
npc.set("StopWandering", &NPC::StopWandering);
|
||||
npc.set("ResumeWandering", &NPC::ResumeWandering);
|
||||
npc.set("PauseWandering", &NPC::PauseWandering);
|
||||
npc.set("MoveTo", &NPC::MoveTo);
|
||||
npc.set("NextGuardPosition", &NPC::NextGuardPosition);
|
||||
npc.set("SaveGuardSpot", sol::overload(
|
||||
&npc_save_guard_spot,
|
||||
&npc_save_guard_spot1
|
||||
));
|
||||
npc.set("IsGuarding", &NPC::IsGuarding);
|
||||
npc.set("AI_SetRoambox", sol::overload(
|
||||
&npc_ai_set_roambox,
|
||||
&npc_ai_set_roambox1
|
||||
));
|
||||
npc.set("GetNPCSpellsID", &NPC::GetNPCSpellsID);
|
||||
npc.set("GetSpawnPointID", &NPC::GetSpawnPointID);
|
||||
npc.set("GetSpawnPointX", &npc_get_spawn_point_x);
|
||||
npc.set("GetSpawnPointY", &npc_get_spawn_point_y);
|
||||
npc.set("GetSpawnPointZ", &npc_get_spawn_point_z);
|
||||
npc.set("GetSpawnPointH", &npc_get_spawn_point_h);
|
||||
npc.set("GetGuardPointX", &npc_get_guard_point_x);
|
||||
npc.set("GetGuardPointY", &npc_get_guard_point_y);
|
||||
npc.set("GetGuardPointZ", &npc_get_guard_point_z);
|
||||
npc.set("GetGuardPointH", &npc_get_guard_point_h);
|
||||
npc.set("SetPrimSkill", &NPC::SetPrimSkill);
|
||||
npc.set("SetSecSkill", &NPC::SetSecSkill);
|
||||
npc.set("GetPrimSkill", &NPC::GetPrimSkill);
|
||||
npc.set("GetSecSkill", &NPC::GetSecSkill);
|
||||
npc.set("GetSwarmOwner", &NPC::GetSwarmOwner);
|
||||
npc.set("GetSwarmTarget", &NPC::GetSwarmTarget);
|
||||
npc.set("SetSwarmTarget", &NPC::SetSwarmTarget);
|
||||
npc.set("ModifyNPCStat", &NPC::ModifyNPCStat);
|
||||
npc.set("AI_SetRoambox", sol::overload(
|
||||
&npc_add_ai_spell,
|
||||
&npc_add_ai_spell1,
|
||||
&npc_add_ai_spell2
|
||||
));
|
||||
npc.set("RemoveAISpell", &NPC::RemoveSpellFromNPCList);
|
||||
npc.set("SetSpellFocusDMG", &NPC::SetSpellFocusDMG);
|
||||
npc.set("SetSpellFocusHeal", &NPC::SetSpellFocusHeal);
|
||||
npc.set("GetSpellFocusDMG", &NPC::GetSpellFocusDMG);
|
||||
npc.set("GetSpellFocusHeal", &NPC::GetSpellFocusHeal);
|
||||
npc.set("GetSlowMitigation", &NPC::GetSlowMitigation);
|
||||
npc.set("GetAttackSpeed", &NPC::GetAttackSpeed);
|
||||
npc.set("GetAttackDelay", &NPC::GetAttackDelay);
|
||||
npc.set("GetAccuracyRating", &NPC::GetAccuracyRating);
|
||||
npc.set("GetSpawnKillCount", &NPC::GetSpawnKillCount);
|
||||
npc.set("GetScore", &NPC::GetScore);
|
||||
npc.set("MerchantOpenShop", &NPC::MerchantOpenShop);
|
||||
npc.set("MerchantCloseShop", &NPC::MerchantCloseShop);
|
||||
npc.set("GetRawAC", &NPC::GetRawAC);
|
||||
npc.set("GetAvoidanceRating", &NPC::GetAvoidanceRating);
|
||||
state->set_usertype("NPC", npc);
|
||||
}
|
||||
|
||||
@ -2,36 +2,35 @@
|
||||
#include "../object.h"
|
||||
|
||||
void lua_register_object(sol::state *state) {
|
||||
state->new_usertype<Object>("Object",
|
||||
sol::base_classes, sol::bases<Entity>(),
|
||||
"Depop", &Object::Depop,
|
||||
"Repop", &Object::Repop,
|
||||
"SetModelName", &Object::SetModelName,
|
||||
"GetModelName", &Object::GetModelName,
|
||||
"GetX", &Object::GetX,
|
||||
"GetY", &Object::GetY,
|
||||
"GetZ", &Object::GetZ,
|
||||
"GetHeading", &Object::GetHeading,
|
||||
"SetX", &Object::SetX,
|
||||
"SetY", &Object::SetY,
|
||||
"SetZ", &Object::SetZ,
|
||||
"SetHeading", &Object::SetHeading,
|
||||
"SetLocation", &Object::SetLocation,
|
||||
"SetItemID", &Object::SetItemID,
|
||||
"SetIcon", &Object::SetIcon,
|
||||
"GetIcon", &Object::GetIcon,
|
||||
"SetType", &Object::SetType,
|
||||
"GetType", &Object::GetType,
|
||||
"GetDBID", &Object::GetDBID,
|
||||
"ClearUser", &Object::ClearUser,
|
||||
"Save", &Object::Save,
|
||||
"VarSave", &Object::VarSave,
|
||||
"DeleteItem", &Object::DeleteItem,
|
||||
"StartDecay", &Object::StartDecay,
|
||||
"Delete", sol::overload((void(Object::*)())&Object::Delete, (void(Object::*)(bool))&Object::Delete),
|
||||
"IsGroundSpawn", &Object::IsGroundSpawn,
|
||||
"GetEntityVariable", &Object::GetEntityVariable,
|
||||
"SetEntityVariable", &Object::SetEntityVariable,
|
||||
"EntityVariableExists", &Object::EntityVariableExists
|
||||
);
|
||||
auto object = state->create_simple_usertype<Object>(sol::base_classes, sol::bases<Entity>());
|
||||
object.set("Depop", &Object::Depop);
|
||||
object.set("Repop", &Object::Repop);
|
||||
object.set("SetModelName", &Object::SetModelName);
|
||||
object.set("GetModelName", &Object::GetModelName);
|
||||
object.set("GetX", &Object::GetX);
|
||||
object.set("GetY", &Object::GetY);
|
||||
object.set("GetZ", &Object::GetZ);
|
||||
object.set("GetHeading", &Object::GetHeading);
|
||||
object.set("SetX", &Object::SetX);
|
||||
object.set("SetY", &Object::SetY);
|
||||
object.set("SetZ", &Object::SetZ);
|
||||
object.set("SetHeading", &Object::SetHeading);
|
||||
object.set("SetLocation", &Object::SetLocation);
|
||||
object.set("SetItemID", &Object::SetItemID);
|
||||
object.set("SetIcon", &Object::SetIcon);
|
||||
object.set("GetIcon", &Object::GetIcon);
|
||||
object.set("SetType", &Object::SetType);
|
||||
object.set("GetType", &Object::GetType);
|
||||
object.set("GetDBID", &Object::GetDBID);
|
||||
object.set("ClearUser", &Object::ClearUser);
|
||||
object.set("Save", &Object::Save);
|
||||
object.set("VarSave", &Object::VarSave);
|
||||
object.set("DeleteItem", &Object::DeleteItem);
|
||||
object.set("StartDecay", &Object::StartDecay);
|
||||
object.set("Delete", sol::overload((void(Object::*)())&Object::Delete, (void(Object::*)(bool))&Object::Delete));
|
||||
object.set("IsGroundSpawn", &Object::IsGroundSpawn);
|
||||
object.set("GetEntityVariable", &Object::GetEntityVariable);
|
||||
object.set("SetEntityVariable", &Object::SetEntityVariable);
|
||||
object.set("EntityVariableExists", &Object::EntityVariableExists);
|
||||
state->set_usertype("Object", object);
|
||||
}
|
||||
|
||||
@ -829,7 +829,7 @@ void LuaParser::LoadScript(const std::string &filename, const std::string &packa
|
||||
Script s;
|
||||
s.Env = sol::environment(*mImpl->state, sol::create, mImpl->state->globals());
|
||||
try {
|
||||
auto res = mImpl->state->safe_script_file(filename);
|
||||
auto res = mImpl->state->safe_script_file(filename, s.Env);
|
||||
if (res.valid()) {
|
||||
s.Loaded = true;
|
||||
}
|
||||
@ -861,6 +861,7 @@ bool LuaParser::HasFunction(const std::string &subname, const std::string &packa
|
||||
}
|
||||
|
||||
void LuaParser::MapFunctions() {
|
||||
lua_register_inventory_where(mImpl->state.get());
|
||||
lua_register_extra_attack_options(mImpl->state.get());
|
||||
lua_register_entity(mImpl->state.get());
|
||||
lua_register_mob(mImpl->state.get());
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
#include <sol.hpp>
|
||||
#include "../mob.h"
|
||||
|
||||
void lua_register_special_abilities(sol::state *state) {
|
||||
state->create_named_table("SpecialAbility");
|
||||
}
|
||||
31
zone/mob.cpp
31
zone/mob.cpp
@ -3242,37 +3242,6 @@ void Mob::Warp(const glm::vec3& location)
|
||||
SendPosition();
|
||||
}
|
||||
|
||||
int16 Mob::GetResist(uint8 type) const
|
||||
{
|
||||
if (IsNPC())
|
||||
{
|
||||
if (type == 1)
|
||||
return MR + spellbonuses.MR + itembonuses.MR;
|
||||
else if (type == 2)
|
||||
return FR + spellbonuses.FR + itembonuses.FR;
|
||||
else if (type == 3)
|
||||
return CR + spellbonuses.CR + itembonuses.CR;
|
||||
else if (type == 4)
|
||||
return PR + spellbonuses.PR + itembonuses.PR;
|
||||
else if (type == 5)
|
||||
return DR + spellbonuses.DR + itembonuses.DR;
|
||||
}
|
||||
else if (IsClient())
|
||||
{
|
||||
if (type == 1)
|
||||
return CastToClient()->GetMR();
|
||||
else if (type == 2)
|
||||
return CastToClient()->GetFR();
|
||||
else if (type == 3)
|
||||
return CastToClient()->GetCR();
|
||||
else if (type == 4)
|
||||
return CastToClient()->GetPR();
|
||||
else if (type == 5)
|
||||
return CastToClient()->GetDR();
|
||||
}
|
||||
return 25;
|
||||
}
|
||||
|
||||
uint32 Mob::GetLevelHP(uint8 tlevel)
|
||||
{
|
||||
int multiplier = 0;
|
||||
|
||||
@ -633,6 +633,7 @@ public:
|
||||
//Quest
|
||||
void CameraEffect(uint32 duration, uint32 intensity, Client *c = nullptr, bool global = false);
|
||||
inline bool GetQglobal() const { return qglobal; }
|
||||
virtual void Signal(int signal) { };
|
||||
|
||||
//Other Packet
|
||||
void CreateDespawnPacket(EQApplicationPacket* app, bool Decay);
|
||||
@ -1020,7 +1021,6 @@ public:
|
||||
bool CheckWillAggro(Mob *mob);
|
||||
|
||||
void InstillDoubt(Mob *who);
|
||||
int16 GetResist(uint8 type) const;
|
||||
Mob* GetShieldTarget() const { return shield_target; }
|
||||
void SetShieldTarget(Mob* mob) { shield_target = mob; }
|
||||
bool HasActiveSong() const { return(bardsong != 0); }
|
||||
|
||||
@ -60,7 +60,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "tasks.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "embparser.h"
|
||||
#include "lua_parser.h"
|
||||
#include "lua/lua_parser.h"
|
||||
#include "questmgr.h"
|
||||
|
||||
#include "../common/event/event_loop.h"
|
||||
|
||||
@ -2507,9 +2507,9 @@ int32 NPC::CalcMaxMana() {
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::SignalNPC(int _signal_id)
|
||||
void NPC::Signal(int signal)
|
||||
{
|
||||
signal_q.push_back(_signal_id);
|
||||
signal_q.push_back(signal);
|
||||
}
|
||||
|
||||
NPC_Emote_Struct* NPC::GetNPCEmote(uint16 emoteid, uint8 event_) {
|
||||
|
||||
@ -253,7 +253,7 @@ public:
|
||||
void DepopSwarmPets();
|
||||
void PetOnSpawn(NewSpawn_Struct* ns);
|
||||
|
||||
void SignalNPC(int _signal_id);
|
||||
virtual void Signal(int signal);
|
||||
|
||||
inline int32 GetNPCFactionID() const { return npc_faction_id; }
|
||||
inline int32 GetPrimaryFaction() const { return primary_faction; }
|
||||
|
||||
@ -62,7 +62,7 @@ XS(XS_NPC_SignalNPC) {
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
THIS->SignalNPC(_signal_id);
|
||||
THIS->Signal(_signal_id);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
@ -764,7 +764,7 @@ void Spawn2::SpawnConditionChanged(const SpawnCondition &c, int16 old_value) {
|
||||
int signal_id = c.on_change - SpawnCondition::DoSignalMin;
|
||||
Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Our condition is now %s. Signaling our mob with %d.", spawn2_id, new_state?"enabled":"disabled", signal_id);
|
||||
if(npcthis != nullptr)
|
||||
npcthis->SignalNPC(signal_id);
|
||||
npcthis->Signal(signal_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "entity.h"
|
||||
#include "mob.h"
|
||||
#include "string_ids.h"
|
||||
#include "lua_parser.h"
|
||||
#include "lua/lua_parser.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -1840,7 +1840,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
CZNPCSignal_Struct* CZCN = (CZNPCSignal_Struct*)pack->pBuffer;
|
||||
NPC* n = entity_list.GetNPCByNPCTypeID(CZCN->npctype_id);
|
||||
if (n != 0) {
|
||||
n->SignalNPC(CZCN->data);
|
||||
n->Signal(CZCN->data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user