mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Raid/Group lua stuff, renamed corpses
This commit is contained in:
parent
d14608356d
commit
55a964267e
@ -28,7 +28,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
|||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "doors.h"
|
#include "doors.h"
|
||||||
#include "beacon.h"
|
#include "beacon.h"
|
||||||
#include "PlayerCorpse.h"
|
#include "corpse.h"
|
||||||
#include "titles.h"
|
#include "titles.h"
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
#include "../common/classes.h"
|
#include "../common/classes.h"
|
||||||
|
|||||||
@ -14,6 +14,7 @@ SET(zone_sources
|
|||||||
client_packet.cpp
|
client_packet.cpp
|
||||||
client_process.cpp
|
client_process.cpp
|
||||||
command.cpp
|
command.cpp
|
||||||
|
corpse.cpp
|
||||||
doors.cpp
|
doors.cpp
|
||||||
effects.cpp
|
effects.cpp
|
||||||
embparser.cpp
|
embparser.cpp
|
||||||
@ -38,7 +39,7 @@ SET(zone_sources
|
|||||||
lua_entity_list.cpp
|
lua_entity_list.cpp
|
||||||
lua_general.cpp
|
lua_general.cpp
|
||||||
lua_group.cpp
|
lua_group.cpp
|
||||||
lua_hate_entry.cpp
|
lua_hate_list.cpp
|
||||||
lua_item.cpp
|
lua_item.cpp
|
||||||
lua_iteminst.cpp
|
lua_iteminst.cpp
|
||||||
lua_mob.cpp
|
lua_mob.cpp
|
||||||
@ -86,7 +87,6 @@ SET(zone_sources
|
|||||||
perlpacket.cpp
|
perlpacket.cpp
|
||||||
petitions.cpp
|
petitions.cpp
|
||||||
pets.cpp
|
pets.cpp
|
||||||
PlayerCorpse.cpp
|
|
||||||
QGlobals.cpp
|
QGlobals.cpp
|
||||||
questmgr.cpp
|
questmgr.cpp
|
||||||
QuestParserCollection.cpp
|
QuestParserCollection.cpp
|
||||||
@ -127,6 +127,7 @@ SET(zone_headers
|
|||||||
client_packet.h
|
client_packet.h
|
||||||
command.h
|
command.h
|
||||||
common.h
|
common.h
|
||||||
|
corpse.h
|
||||||
doors.h
|
doors.h
|
||||||
embparser.h
|
embparser.h
|
||||||
embperl.h
|
embperl.h
|
||||||
@ -145,7 +146,7 @@ SET(zone_headers
|
|||||||
lua_entity_list.h
|
lua_entity_list.h
|
||||||
lua_general.h
|
lua_general.h
|
||||||
lua_group.h
|
lua_group.h
|
||||||
lua_hate_entry.h
|
lua_hate_list.h
|
||||||
lua_item.h
|
lua_item.h
|
||||||
lua_iteminst.h
|
lua_iteminst.h
|
||||||
lua_mob.h
|
lua_mob.h
|
||||||
@ -169,7 +170,6 @@ SET(zone_headers
|
|||||||
perlpacket.h
|
perlpacket.h
|
||||||
petitions.h
|
petitions.h
|
||||||
pets.h
|
pets.h
|
||||||
PlayerCorpse.h
|
|
||||||
QGlobals.h
|
QGlobals.h
|
||||||
QuestInterface.h
|
QuestInterface.h
|
||||||
questmgr.h
|
questmgr.h
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "pets.h"
|
#include "pets.h"
|
||||||
#include "groups.h"
|
#include "groups.h"
|
||||||
#include "PlayerCorpse.h"
|
#include "corpse.h"
|
||||||
#include "zonedb.h"
|
#include "zonedb.h"
|
||||||
#include "StringIDs.h"
|
#include "StringIDs.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
|
|||||||
@ -33,7 +33,6 @@
|
|||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "worldserver.h"
|
#include "worldserver.h"
|
||||||
#include "PlayerCorpse.h"
|
|
||||||
#include "../common/guilds.h"
|
#include "../common/guilds.h"
|
||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
|
|||||||
@ -2,16 +2,14 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "client.h"
|
||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
#include "lua_npc.h"
|
#include "lua_npc.h"
|
||||||
#include "lua_item.h"
|
#include "lua_item.h"
|
||||||
#include "lua_iteminst.h"
|
#include "lua_iteminst.h"
|
||||||
#include "lua_group.h"
|
#include "lua_group.h"
|
||||||
#include "lua_raid.h"
|
#include "lua_raid.h"
|
||||||
#include "../common/item.h"
|
|
||||||
|
|
||||||
struct InventoryWhere { };
|
struct InventoryWhere { };
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "corpse.h"
|
||||||
#include "lua_corpse.h"
|
#include "lua_corpse.h"
|
||||||
|
|
||||||
luabind::scope lua_register_corpse() {
|
luabind::scope lua_register_corpse() {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
#include <luabind/object.hpp>
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "doors.h"
|
||||||
#include "lua_door.h"
|
#include "lua_door.h"
|
||||||
|
|
||||||
luabind::scope lua_register_door() {
|
luabind::scope lua_register_door() {
|
||||||
|
|||||||
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "entity.h"
|
||||||
#include "lua_entity.h"
|
#include "lua_entity.h"
|
||||||
#include "lua_mob.h"
|
#include "lua_mob.h"
|
||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|||||||
@ -12,11 +12,118 @@
|
|||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
#include "lua_npc.h"
|
#include "lua_npc.h"
|
||||||
|
|
||||||
|
void Lua_Group::DisbandGroup() {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->DisbandGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Lua_Group::IsGroupMember(Lua_Mob mob) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsGroupMember(mob);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::CastGroupSpell(Lua_Mob caster, int spell_id) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->CastGroupSpell(caster, spell_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::SplitExp(uint32 exp, Lua_Mob other) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitExp(exp, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::GroupMessage(Lua_Mob sender, int language, const char *message) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->GroupMessage(sender, language, 100, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Lua_Group::GetTotalGroupDamage(Lua_Mob other) {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetTotalGroupDamage(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitMoney(copper, silver, gold, platinum);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Lua_Client splitter) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitMoney(copper, silver, gold, platinum, splitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::SetLeader(Lua_Mob leader) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SetLeader(leader);
|
||||||
|
}
|
||||||
|
|
||||||
|
Lua_Mob Lua_Group::GetLeader() {
|
||||||
|
Lua_Safe_Call_Class(Lua_Mob);
|
||||||
|
return self->GetLeader();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *Lua_Group::GetLeaderName() {
|
||||||
|
Lua_Safe_Call_String();
|
||||||
|
return self->GetLeaderName();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Lua_Group::IsLeader(Lua_Mob leader) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsLeader(leader);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Group::GroupCount() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GroupCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Group::GetHighestLevel() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetHighestLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Group::TeleportGroup(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->TeleportGroup(sender, zone_id, instance_id, x, y, z, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Group::GetID() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetID();
|
||||||
|
}
|
||||||
|
|
||||||
|
Lua_Mob Lua_Group::GetMember(int index) {
|
||||||
|
Lua_Safe_Call_Class(Lua_Mob);
|
||||||
|
|
||||||
|
if(index >= 6 || index < 0) {
|
||||||
|
return Lua_Mob();
|
||||||
|
}
|
||||||
|
|
||||||
|
return self->members[index];
|
||||||
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_group() {
|
luabind::scope lua_register_group() {
|
||||||
return luabind::class_<Lua_Group>("Group")
|
return luabind::class_<Lua_Group>("Group")
|
||||||
.def(luabind::constructor<>())
|
.def(luabind::constructor<>())
|
||||||
.property("null", &Lua_Group::Null)
|
.property("null", &Lua_Group::Null)
|
||||||
.property("valid", &Lua_Group::Valid);
|
.property("valid", &Lua_Group::Valid)
|
||||||
|
.def("DisbandGroup", (void(Lua_Group::*)(void))&Lua_Group::DisbandGroup)
|
||||||
|
.def("IsGroupMember", (bool(Lua_Group::*)(Lua_Mob))&Lua_Group::IsGroupMember)
|
||||||
|
.def("CastGroupSpell", (void(Lua_Group::*)(Lua_Mob,int))&Lua_Group::CastGroupSpell)
|
||||||
|
.def("SplitExp", (void(Lua_Group::*)(uint32,Lua_Mob))&Lua_Group::SplitExp)
|
||||||
|
.def("GroupMessage", (void(Lua_Group::*)(Lua_Mob,int,const char* message))&Lua_Group::GroupMessage)
|
||||||
|
.def("GetTotalGroupDamage", (uint32(Lua_Group::*)(Lua_Mob))&Lua_Group::GetTotalGroupDamage)
|
||||||
|
.def("SplitMoney", (void(Lua_Group::*)(uint32,uint32,uint32,uint32))&Lua_Group::SplitMoney)
|
||||||
|
.def("SplitMoney", (void(Lua_Group::*)(uint32,uint32,uint32,uint32,Lua_Client))&Lua_Group::SplitMoney)
|
||||||
|
.def("SetLeader", (void(Lua_Group::*)(Lua_Mob))&Lua_Group::SetLeader)
|
||||||
|
.def("GetLeader", (Lua_Mob(Lua_Group::*)(void))&Lua_Group::GetLeader)
|
||||||
|
.def("GetLeaderName", (const char*(Lua_Group::*)(void))&Lua_Group::GetLeaderName)
|
||||||
|
.def("IsLeader", (bool(Lua_Group::*)(Lua_Mob))&Lua_Group::IsLeader)
|
||||||
|
.def("GroupCount", (int(Lua_Group::*)(void))&Lua_Group::GroupCount)
|
||||||
|
.def("GetHighestLevel", (int(Lua_Group::*)(void))&Lua_Group::GetHighestLevel)
|
||||||
|
.def("TeleportGroup", (void(Lua_Group::*)(Lua_Mob,uint32,uint32,float,float,float,float))&Lua_Group::TeleportGroup)
|
||||||
|
.def("GetID", (int(Lua_Group::*)(void))&Lua_Group::GetID)
|
||||||
|
.def("GetMember", (Lua_Mob(Lua_Group::*)(int))&Lua_Group::GetMember);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,6 +5,8 @@
|
|||||||
#include "lua_ptr.h"
|
#include "lua_ptr.h"
|
||||||
|
|
||||||
class Group;
|
class Group;
|
||||||
|
class Lua_Mob;
|
||||||
|
class Lua_Client;
|
||||||
|
|
||||||
namespace luabind {
|
namespace luabind {
|
||||||
struct scope;
|
struct scope;
|
||||||
@ -28,6 +30,24 @@ public:
|
|||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisbandGroup();
|
||||||
|
bool IsGroupMember(Lua_Mob mob);
|
||||||
|
void CastGroupSpell(Lua_Mob caster, int spell_id);
|
||||||
|
void SplitExp(uint32 exp, Lua_Mob other);
|
||||||
|
void GroupMessage(Lua_Mob sender, int language, const char *message);
|
||||||
|
uint32 GetTotalGroupDamage(Lua_Mob other);
|
||||||
|
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum);
|
||||||
|
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Lua_Client splitter);
|
||||||
|
void SetLeader(Lua_Mob leader);
|
||||||
|
Lua_Mob GetLeader();
|
||||||
|
const char *GetLeaderName();
|
||||||
|
bool IsLeader(Lua_Mob leader);
|
||||||
|
int GroupCount();
|
||||||
|
int GetHighestLevel();
|
||||||
|
void TeleportGroup(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h);
|
||||||
|
int GetID();
|
||||||
|
Lua_Mob GetMember(int index);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "hate_list.h"
|
#include "hate_list.h"
|
||||||
#include "lua_mob.h"
|
#include "lua_mob.h"
|
||||||
#include "lua_hate_entry.h"
|
#include "lua_hate_list.h"
|
||||||
|
|
||||||
struct Lua_HateList
|
struct Lua_HateList
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
#ifndef EQEMU_LUA_HATE_ENTRY_H
|
|
||||||
#define EQEMU_LUA_HATE_ENTRY_H
|
|
||||||
#ifdef LUA_EQEMU
|
|
||||||
|
|
||||||
#include "lua_ptr.h"
|
|
||||||
|
|
||||||
class Lua_Mob;
|
|
||||||
struct tHateEntry;
|
|
||||||
|
|
||||||
luabind::scope lua_register_hate_entry();
|
|
||||||
luabind::scope lua_register_hate_list();
|
|
||||||
|
|
||||||
class Lua_HateEntry : public Lua_Ptr<void>
|
|
||||||
{
|
|
||||||
typedef tHateEntry NativeType;
|
|
||||||
public:
|
|
||||||
Lua_HateEntry() { }
|
|
||||||
Lua_HateEntry(tHateEntry *d) : Lua_Ptr(d) { }
|
|
||||||
virtual ~Lua_HateEntry() { }
|
|
||||||
|
|
||||||
Lua_Mob GetEnt();
|
|
||||||
void SetEnt(Lua_Mob e);
|
|
||||||
int GetDamage();
|
|
||||||
void SetDamage(int value);
|
|
||||||
int GetHate();
|
|
||||||
void SetHate(int value);
|
|
||||||
int GetFrenzy();
|
|
||||||
void SetFrenzy(bool value);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
69
zone/lua_hate_list.cpp
Normal file
69
zone/lua_hate_list.cpp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#ifdef LUA_EQEMU
|
||||||
|
|
||||||
|
#include "lua.hpp"
|
||||||
|
#include <luabind/luabind.hpp>
|
||||||
|
#include <luabind/object.hpp>
|
||||||
|
#include <luabind/iterator_policy.hpp>
|
||||||
|
|
||||||
|
#include "masterentity.h"
|
||||||
|
#include "hate_list.h"
|
||||||
|
#include "lua_mob.h"
|
||||||
|
#include "lua_hate_list.h"
|
||||||
|
|
||||||
|
Lua_Mob Lua_HateEntry::GetEnt() {
|
||||||
|
Lua_Safe_Call_Class(Lua_Mob);
|
||||||
|
return Lua_Mob(self->ent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_HateEntry::SetEnt(Lua_Mob e) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->ent = e;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_HateEntry::GetDamage() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_HateEntry::SetDamage(int value) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->damage = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_HateEntry::GetHate() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->hate;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_HateEntry::SetHate(int value) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->hate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_HateEntry::GetFrenzy() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->bFrenzy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_HateEntry::SetFrenzy(bool value) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->bFrenzy = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
luabind::scope lua_register_hate_entry() {
|
||||||
|
|
||||||
|
return luabind::class_<Lua_HateEntry>("HateEntry")
|
||||||
|
.property("null", &Lua_HateEntry::Null)
|
||||||
|
.property("valid", &Lua_HateEntry::Valid)
|
||||||
|
.property("ent", &Lua_HateEntry::GetEnt, &Lua_HateEntry::SetEnt)
|
||||||
|
.property("damage", &Lua_HateEntry::GetDamage, &Lua_HateEntry::SetDamage)
|
||||||
|
.property("hate", &Lua_HateEntry::GetHate, &Lua_HateEntry::SetHate)
|
||||||
|
.property("frenzy", &Lua_HateEntry::GetFrenzy, &Lua_HateEntry::SetFrenzy);
|
||||||
|
}
|
||||||
|
|
||||||
|
luabind::scope lua_register_hate_list() {
|
||||||
|
return luabind::class_<Lua_HateList>("HateList")
|
||||||
|
.def_readwrite("entries", &Lua_HateList::entries, luabind::return_stl_iterator);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -2,6 +2,32 @@
|
|||||||
#define EQEMU_LUA_HATE_LIST_H
|
#define EQEMU_LUA_HATE_LIST_H
|
||||||
#ifdef LUA_EQEMU
|
#ifdef LUA_EQEMU
|
||||||
|
|
||||||
|
#include "lua_ptr.h"
|
||||||
|
|
||||||
|
class Lua_Mob;
|
||||||
|
struct tHateEntry;
|
||||||
|
|
||||||
|
luabind::scope lua_register_hate_entry();
|
||||||
|
luabind::scope lua_register_hate_list();
|
||||||
|
|
||||||
|
class Lua_HateEntry : public Lua_Ptr<void>
|
||||||
|
{
|
||||||
|
typedef tHateEntry NativeType;
|
||||||
|
public:
|
||||||
|
Lua_HateEntry() { }
|
||||||
|
Lua_HateEntry(tHateEntry *d) : Lua_Ptr(d) { }
|
||||||
|
virtual ~Lua_HateEntry() { }
|
||||||
|
|
||||||
|
Lua_Mob GetEnt();
|
||||||
|
void SetEnt(Lua_Mob e);
|
||||||
|
int GetDamage();
|
||||||
|
void SetDamage(int value);
|
||||||
|
int GetHate();
|
||||||
|
void SetHate(int value);
|
||||||
|
int GetFrenzy();
|
||||||
|
void SetFrenzy(bool value);
|
||||||
|
};
|
||||||
|
|
||||||
struct Lua_HateList
|
struct Lua_HateList
|
||||||
{
|
{
|
||||||
std::vector<Lua_HateEntry> entries;
|
std::vector<Lua_HateEntry> entries;
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "masterentity.h"
|
||||||
#include "lua_item.h"
|
#include "lua_item.h"
|
||||||
|
|||||||
@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "client.h"
|
||||||
|
#include "npc.h"
|
||||||
#include "lua_item.h"
|
#include "lua_item.h"
|
||||||
#include "lua_iteminst.h"
|
#include "lua_iteminst.h"
|
||||||
#include "lua_mob.h"
|
#include "lua_mob.h"
|
||||||
#include "lua_hate_entry.h"
|
|
||||||
#include "lua_hate_list.h"
|
#include "lua_hate_list.h"
|
||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "npc.h"
|
||||||
#include "lua_npc.h"
|
#include "lua_npc.h"
|
||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/object.hpp>
|
|
||||||
|
|
||||||
#include "masterentity.h"
|
#include "object.h"
|
||||||
#include "lua_object.h"
|
#include "lua_object.h"
|
||||||
|
|
||||||
luabind::scope lua_register_object() {
|
luabind::scope lua_register_object() {
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
#include "lua_item.h"
|
#include "lua_item.h"
|
||||||
#include "lua_iteminst.h"
|
#include "lua_iteminst.h"
|
||||||
#include "lua_mob.h"
|
#include "lua_mob.h"
|
||||||
#include "lua_hate_entry.h"
|
#include "lua_hate_list.h"
|
||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
#include "lua_npc.h"
|
#include "lua_npc.h"
|
||||||
#include "lua_spell.h"
|
#include "lua_spell.h"
|
||||||
|
|||||||
@ -12,11 +12,141 @@
|
|||||||
#include "lua_client.h"
|
#include "lua_client.h"
|
||||||
#include "lua_npc.h"
|
#include "lua_npc.h"
|
||||||
|
|
||||||
|
bool Lua_Raid::IsRaidMember(const char *name) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsRaidMember(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::CastGroupSpell(Lua_Mob caster, int spell_id, uint32 group_id) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->CastGroupSpell(caster, spell_id, group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Raid::GroupCount(uint32 group_id) {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GroupCount(group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Raid::RaidCount() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->RaidCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Lua_Raid::GetGroup(const char *c) {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetGroup(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Lua_Raid::GetGroup(Lua_Client c) {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetGroup(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::SplitExp(uint32 exp, Lua_Mob other) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitExp(exp, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Lua_Raid::GetTotalRaidDamage(Lua_Mob other) {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetTotalRaidDamage(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitMoney(copper, silver, gold, platinum);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Lua_Client splitter) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SplitMoney(copper, silver, gold, platinum, splitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::BalanceHP(int penalty, uint32 group_id) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->BalanceHP(penalty, group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Lua_Raid::IsLeader(const char *c) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsLeader(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Lua_Raid::IsLeader(Lua_Client c) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsLeader(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Lua_Raid::IsGroupLeader(const char *name) {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsGroupLeader(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Raid::GetHighestLevel() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetHighestLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Raid::GetLowestLevel() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetLowestLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
Lua_Client Lua_Raid::GetClientByIndex(int index) {
|
||||||
|
Lua_Safe_Call_Class(Lua_Client);
|
||||||
|
return self->GetClientByIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::TeleportGroup(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h, uint32 group_id) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->TeleportGroup(sender, zone_id, instance_id, x, y, z, h, group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lua_Raid::TeleportRaid(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h) {
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->TeleportRaid(sender, zone_id, instance_id, x, y, z, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Lua_Raid::GetID() {
|
||||||
|
Lua_Safe_Call_Int();
|
||||||
|
return self->GetID();
|
||||||
|
}
|
||||||
|
|
||||||
|
Lua_Client Lua_Raid::GetMember(int index) {
|
||||||
|
Lua_Safe_Call_Class(Lua_Client);
|
||||||
|
|
||||||
|
if(index >= 72 || index < 0) {
|
||||||
|
return Lua_Client();
|
||||||
|
}
|
||||||
|
|
||||||
|
return self->members[index].member;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
luabind::scope lua_register_raid() {
|
luabind::scope lua_register_raid() {
|
||||||
return luabind::class_<Lua_Raid>("Raid")
|
return luabind::class_<Lua_Raid>("Raid")
|
||||||
.def(luabind::constructor<>())
|
.def(luabind::constructor<>())
|
||||||
.property("null", &Lua_Raid::Null)
|
.property("null", &Lua_Raid::Null)
|
||||||
.property("valid", &Lua_Raid::Valid);
|
.property("valid", &Lua_Raid::Valid)
|
||||||
|
.def("IsRaidMember", (bool(Lua_Raid::*)(const char*))&Lua_Raid::IsRaidMember)
|
||||||
|
.def("CastGroupSpell", (void(Lua_Raid::*)(Lua_Mob,int,uint32))&Lua_Raid::CastGroupSpell)
|
||||||
|
.def("GroupCount", (int(Lua_Raid::*)(uint32))&Lua_Raid::GroupCount)
|
||||||
|
.def("RaidCount", (int(Lua_Raid::*)(void))&Lua_Raid::RaidCount)
|
||||||
|
.def("GetGroup", (uint32(Lua_Raid::*)(const char*))&Lua_Raid::GetGroup)
|
||||||
|
.def("SplitExp", (void(Lua_Raid::*)(uint32,Lua_Mob))&Lua_Raid::SplitExp)
|
||||||
|
.def("GetTotalRaidDamage", (uint32(Lua_Raid::*)(Lua_Mob))&Lua_Raid::GetTotalRaidDamage)
|
||||||
|
.def("SplitMoney", (void(Lua_Raid::*)(uint32,uint32,uint32,uint32))&Lua_Raid::SplitMoney)
|
||||||
|
.def("SplitMoney", (void(Lua_Raid::*)(uint32,uint32,uint32,uint32,Lua_Client))&Lua_Raid::SplitMoney)
|
||||||
|
.def("BalanceHP", (void(Lua_Raid::*)(int,uint32))&Lua_Raid::BalanceHP)
|
||||||
|
.def("IsLeader", (bool(Lua_Raid::*)(const char*))&Lua_Raid::IsLeader)
|
||||||
|
.def("IsGroupLeader", (bool(Lua_Raid::*)(const char*))&Lua_Raid::IsGroupLeader)
|
||||||
|
.def("GetHighestLevel", (int(Lua_Raid::*)(void))&Lua_Raid::GetHighestLevel)
|
||||||
|
.def("GetLowestLevel", (int(Lua_Raid::*)(void))&Lua_Raid::GetLowestLevel)
|
||||||
|
.def("GetClientByIndex", (Lua_Client(Lua_Raid::*)(int))&Lua_Raid::GetClientByIndex)
|
||||||
|
.def("TeleportGroup", (int(Lua_Raid::*)(Lua_Mob,uint32,uint32,float,float,float,float,uint32))&Lua_Raid::TeleportGroup)
|
||||||
|
.def("TeleportRaid", (int(Lua_Raid::*)(Lua_Mob,uint32,uint32,float,float,float,float))&Lua_Raid::TeleportRaid)
|
||||||
|
.def("GetID", (int(Lua_Raid::*)(void))&Lua_Raid::GetID)
|
||||||
|
.def("GetMember", (Lua_Client(Lua_Raid::*)(int))&Lua_Raid::GetMember);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,6 +5,8 @@
|
|||||||
#include "lua_ptr.h"
|
#include "lua_ptr.h"
|
||||||
|
|
||||||
class Raid;
|
class Raid;
|
||||||
|
class Lua_Client;
|
||||||
|
class Lua_Mob;
|
||||||
|
|
||||||
namespace luabind {
|
namespace luabind {
|
||||||
struct scope;
|
struct scope;
|
||||||
@ -28,6 +30,28 @@ public:
|
|||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsRaidMember(const char *name);
|
||||||
|
void CastGroupSpell(Lua_Mob caster, int spell_id, uint32 group_id);
|
||||||
|
int GroupCount(uint32 group_id);
|
||||||
|
int RaidCount();
|
||||||
|
uint32 GetGroup(const char *c);
|
||||||
|
uint32 GetGroup(Lua_Client c);
|
||||||
|
void SplitExp(uint32 exp, Lua_Mob other);
|
||||||
|
uint32 GetTotalRaidDamage(Lua_Mob other);
|
||||||
|
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum);
|
||||||
|
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Lua_Client splitter);
|
||||||
|
void BalanceHP(int penalty, uint32 group_id);
|
||||||
|
bool IsLeader(const char *c);
|
||||||
|
bool IsLeader(Lua_Client c);
|
||||||
|
bool IsGroupLeader(const char *name);
|
||||||
|
int GetHighestLevel();
|
||||||
|
int GetLowestLevel();
|
||||||
|
Lua_Client GetClientByIndex(int index);
|
||||||
|
void TeleportGroup(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h, uint32 group_id);
|
||||||
|
void TeleportRaid(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h);
|
||||||
|
int GetID();
|
||||||
|
Lua_Client GetMember(int index);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
#ifdef LUA_EQEMU
|
#ifdef LUA_EQEMU
|
||||||
|
|
||||||
#include "../common/spdat.h"
|
|
||||||
#include "lua_spell.h"
|
|
||||||
|
|
||||||
#include "lua.hpp"
|
#include "lua.hpp"
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
|
|
||||||
|
#include "../common/spdat.h"
|
||||||
|
#include "lua_spell.h"
|
||||||
|
|
||||||
int Lua_Spell::GetID() {
|
int Lua_Spell::GetID() {
|
||||||
Lua_Safe_Call_Int();
|
Lua_Safe_Call_Int();
|
||||||
return self->id;
|
return self->id;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
#include "raids.h"
|
#include "raids.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "PlayerCorpse.h"
|
#include "corpse.h"
|
||||||
#include "doors.h"
|
#include "doors.h"
|
||||||
#include "mob.h"
|
#include "mob.h"
|
||||||
#include "trap.h"
|
#include "trap.h"
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#undef seed
|
#undef seed
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "PlayerCorpse.h"
|
#include "corpse.h"
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||||
#undef THIS
|
#undef THIS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user