mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
[CPP] Update C++ standard to C++17 (#2308)
* Update C++ standard to C++17 * Nuke EQ::Any in favor of std::any * Remove std::iterator due to deprecation * Replace result_of with invoke_result due to deprecation
This commit is contained in:
parent
f4f5728195
commit
5331f4d841
@ -12,7 +12,7 @@ IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 14)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SET(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
@ -20,7 +20,8 @@ IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
ADD_DEFINITIONS(-DCRASH_LOGGING)
|
||||
|
||||
ADD_DEFINITIONS(-D_HAS_AUTO_PTR_ETC) # for Luabind on C++17
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
ELSE(MSVC)
|
||||
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
|
||||
|
||||
@ -472,7 +472,6 @@ SET(repositories
|
||||
|
||||
SET(common_headers
|
||||
additive_lagged_fibonacci_engine.h
|
||||
any.h
|
||||
base_packet.h
|
||||
base_data.h
|
||||
bodytypes.h
|
||||
|
||||
190
common/any.h
190
common/any.h
@ -1,190 +0,0 @@
|
||||
/*
|
||||
* Boost Software License - Version 1.0 - August 17th, 2003
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person or organization
|
||||
* obtaining a copy of the software and accompanying documentation covered by
|
||||
* this license (the "Software") to use, reproduce, display, distribute,
|
||||
* execute, and transmit the Software, and to prepare derivative works of the
|
||||
* Software, and to permit third-parties to whom the Software is furnished to
|
||||
* do so, all subject to the following:
|
||||
*
|
||||
* The copyright notices in the Software and this entire statement, including
|
||||
* the above license grant, this restriction and the following disclaimer,
|
||||
* must be included in all copies of the Software, in whole or in part, and
|
||||
* all derivative works of the Software, unless such copies or derivative
|
||||
* works are solely in the form of machine-executable object code generated by
|
||||
* a source language processor.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// EQ::Any is a modified version of Boost::Any and as such retains the Boost licensing.
|
||||
|
||||
#ifndef EQEMU_COMMON_ANY_H
|
||||
#define EQEMU_COMMON_ANY_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace EQ
|
||||
{
|
||||
class Any
|
||||
{
|
||||
public:
|
||||
Any()
|
||||
: content(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
Any(const ValueType &value)
|
||||
: content(new Holder<ValueType>(value))
|
||||
{
|
||||
}
|
||||
|
||||
Any(const Any &other)
|
||||
: content(other.content ? other.content->clone() : 0)
|
||||
{
|
||||
}
|
||||
|
||||
~Any()
|
||||
{
|
||||
if(content)
|
||||
delete content;
|
||||
}
|
||||
|
||||
Any& swap(Any &rhs)
|
||||
{
|
||||
std::swap(content, rhs.content);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
Any& operator=(const ValueType &rhs)
|
||||
{
|
||||
Any(rhs).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Any& operator=(Any rhs)
|
||||
{
|
||||
rhs.swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return !content;
|
||||
}
|
||||
|
||||
const std::type_info& type() const
|
||||
{
|
||||
return content ? content->type() : typeid(void);
|
||||
}
|
||||
|
||||
class Placeholder
|
||||
{
|
||||
public:
|
||||
virtual ~Placeholder()
|
||||
{
|
||||
}
|
||||
|
||||
virtual const std::type_info& type() const = 0;
|
||||
virtual Placeholder* clone() const = 0;
|
||||
};
|
||||
|
||||
|
||||
template<typename ValueType>
|
||||
class Holder : public Placeholder
|
||||
{
|
||||
public:
|
||||
Holder(const ValueType &value)
|
||||
: held(value)
|
||||
{
|
||||
}
|
||||
|
||||
virtual const std::type_info& type() const
|
||||
{
|
||||
return typeid(ValueType);
|
||||
}
|
||||
|
||||
virtual Placeholder* clone() const
|
||||
{
|
||||
return new Holder(held);
|
||||
}
|
||||
|
||||
ValueType held;
|
||||
|
||||
private:
|
||||
Holder& operator=(const Holder&);
|
||||
};
|
||||
|
||||
private:
|
||||
template<typename ValueType>
|
||||
friend ValueType* any_cast(Any*);
|
||||
|
||||
template<typename ValueType>
|
||||
friend ValueType* unsafe_any_cast(Any*);
|
||||
|
||||
Placeholder* content;
|
||||
};
|
||||
|
||||
class bad_any_cast : public std::bad_cast
|
||||
{
|
||||
public:
|
||||
virtual const char * what() const throw()
|
||||
{
|
||||
return "DBI::bad_any_cast: failed conversion using DBI::any_cast";
|
||||
}
|
||||
};
|
||||
|
||||
template<typename ValueType>
|
||||
ValueType* any_cast(Any* operand)
|
||||
{
|
||||
return operand &&
|
||||
operand->type() == typeid(ValueType) ? &static_cast<Any::Holder<ValueType>*>(operand->content)->held : nullptr;
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
inline const ValueType* any_cast(const Any* operand)
|
||||
{
|
||||
return any_cast<ValueType>(const_cast<Any*>(operand));
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
ValueType any_cast(Any& operand)
|
||||
{
|
||||
typedef typename std::remove_reference<ValueType>::type nonref;
|
||||
nonref* result = any_cast<nonref>(&operand);
|
||||
if(!result)
|
||||
throw bad_any_cast();
|
||||
return *result;
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
inline ValueType any_cast(const Any& operand)
|
||||
{
|
||||
typedef typename std::remove_reference<ValueType>::type nonref;
|
||||
return any_cast<const nonref&>(const_cast<Any&>(operand));
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
inline ValueType* unsafe_any_cast(Any* operand)
|
||||
{
|
||||
return &static_cast<Any::Holder<ValueType>*>(operand->content)->held;
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
inline const ValueType* unsafe_any_cast(const Any* operand)
|
||||
{
|
||||
return unsafe_any_cast<ValueType>(const_cast<Any*>(operand));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
#include <any>
|
||||
#include <functional>
|
||||
#include <exception>
|
||||
#include "event_loop.h"
|
||||
#include "../any.h"
|
||||
|
||||
namespace EQ {
|
||||
class Task
|
||||
{
|
||||
public:
|
||||
typedef std::function<void(const EQ::Any&)> ResolveFn;
|
||||
typedef std::function<void(const std::any&)> ResolveFn;
|
||||
typedef std::function<void(const std::exception&)> RejectFn;
|
||||
typedef std::function<void()> FinallyFn;
|
||||
typedef std::function<void(ResolveFn, RejectFn)> TaskFn;
|
||||
@ -19,7 +19,7 @@ namespace EQ {
|
||||
RejectFn on_catch;
|
||||
FinallyFn on_finally;
|
||||
bool has_result;
|
||||
EQ::Any result;
|
||||
std::any result;
|
||||
bool has_error;
|
||||
std::exception error;
|
||||
};
|
||||
@ -63,7 +63,7 @@ namespace EQ {
|
||||
uv_queue_work(EventLoop::Get().Handle(), m_work, [](uv_work_t* req) {
|
||||
TaskBaton *baton = (TaskBaton*)req->data;
|
||||
|
||||
baton->fn([baton](const EQ::Any& result) {
|
||||
baton->fn([baton](const std::any& result) {
|
||||
baton->has_error = false;
|
||||
baton->has_result = true;
|
||||
baton->result = result;
|
||||
|
||||
@ -60,8 +60,8 @@ namespace EQ
|
||||
}
|
||||
|
||||
template<typename Fn, typename... Args>
|
||||
auto Enqueue(Fn&& fn, Args&&... args) -> std::future<typename std::result_of<Fn(Args...)>::type> {
|
||||
using return_type = typename std::result_of<Fn(Args...)>::type;
|
||||
auto Enqueue(Fn&& fn, Args&&... args) -> std::future<typename std::invoke_result<Fn, Args...>::type> {
|
||||
using return_type = typename std::invoke_result<Fn, Args...>::type;
|
||||
|
||||
auto task = std::make_shared<std::packaged_task<return_type()>>(
|
||||
std::bind(std::forward<Fn>(fn), std::forward<Args>(args)...)
|
||||
|
||||
@ -10,8 +10,14 @@
|
||||
#include <iterator>
|
||||
#include "types.h"
|
||||
|
||||
class MySQLRequestRow : public std::iterator<std::input_iterator_tag, MYSQL_ROW>
|
||||
class MySQLRequestRow
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::input_iterator_tag;
|
||||
using value_type = MYSQL_ROW;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = MYSQL_ROW*;
|
||||
using reference = MYSQL_ROW&;
|
||||
|
||||
private:
|
||||
MYSQL_RES* m_Result;
|
||||
|
||||
@ -471,7 +471,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
case CLIENT_CONNECTING: {
|
||||
if (ConnectingOpcodes.count(opcode) != 1) {
|
||||
//Hate const cast but everything in lua needs to be non-const even if i make it non-mutable
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(const_cast<EQApplicationPacket*>(app));
|
||||
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 1, &args);
|
||||
|
||||
@ -495,7 +495,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
ClientPacketProc p;
|
||||
p = ConnectedOpcodes[opcode];
|
||||
if (p == nullptr) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(const_cast<EQApplicationPacket*>(app));
|
||||
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 0, &args);
|
||||
|
||||
@ -3012,7 +3012,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
if (old_aug) { // An old augment was removed in order to be replaced with the new one (augment_action 2)
|
||||
CalcBonuses();
|
||||
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(old_aug);
|
||||
parse->EventItem(EVENT_UNAUGMENT_ITEM, this, tobe_auged, nullptr, "", in_augment->augment_index, &args);
|
||||
|
||||
@ -3026,7 +3026,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
|
||||
aug = tobe_auged->GetAugment(in_augment->augment_index);
|
||||
if (aug) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
parse->EventItem(EVENT_AUGMENT_ITEM, this, tobe_auged, nullptr, "", in_augment->augment_index, &args);
|
||||
|
||||
@ -3082,7 +3082,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
case AugmentActions::Remove:
|
||||
aug = tobe_auged->GetAugment(in_augment->augment_index);
|
||||
if (aug) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
parse->EventItem(EVENT_UNAUGMENT_ITEM, this, tobe_auged, nullptr, "", in_augment->augment_index, &args);
|
||||
args.assign(1, tobe_auged);
|
||||
@ -3132,7 +3132,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
// Augments can be destroyed with a right click -> Destroy at any time.
|
||||
aug = tobe_auged->GetAugment(in_augment->augment_index);
|
||||
if (aug) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
parse->EventItem(EVENT_UNAUGMENT_ITEM, this, tobe_auged, nullptr, "", in_augment->augment_index, &args);
|
||||
args.assign(1, tobe_auged);
|
||||
@ -4236,7 +4236,7 @@ void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
std::string export_string = fmt::format("{}", cd->doorid);
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(currentdoor);
|
||||
if (parse->EventPlayer(EVENT_CLICK_DOOR, this, export_string, 0, &args) == 0)
|
||||
{
|
||||
@ -4259,7 +4259,7 @@ void Client::Handle_OP_ClickObject(const EQApplicationPacket *app)
|
||||
|
||||
object->HandleClick(this, click_object);
|
||||
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(object);
|
||||
|
||||
std::string export_string = fmt::format("{}", click_object->drop_id);
|
||||
|
||||
@ -1309,7 +1309,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
||||
EntityList::RemoveNumbers(corpse_name),
|
||||
GetID()
|
||||
);
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(inst);
|
||||
args.push_back(this);
|
||||
bool prevent_loot = false;
|
||||
|
||||
@ -201,7 +201,7 @@ void PerlembParser::ReloadQuests()
|
||||
|
||||
int PerlembParser::EventCommon(
|
||||
QuestEventID event, uint32 objid, const char *data, NPC *npcmob, EQ::ItemInstance *item_inst, const SPDat_Spell_Struct* spell, Mob *mob,
|
||||
uint32 extradata, bool global, std::vector<EQ::Any> *extra_pointers
|
||||
uint32 extradata, bool global, std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
if (!perl) {
|
||||
@ -297,7 +297,7 @@ int PerlembParser::EventCommon(
|
||||
|
||||
int PerlembParser::EventNPC(
|
||||
QuestEventID evt, NPC *npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
return EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, nullptr, nullptr, init, extra_data, false, extra_pointers);
|
||||
@ -305,7 +305,7 @@ int PerlembParser::EventNPC(
|
||||
|
||||
int PerlembParser::EventGlobalNPC(
|
||||
QuestEventID evt, NPC *npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
return EventCommon(evt, npc->GetNPCTypeID(), data.c_str(), npc, nullptr, nullptr, init, extra_data, true, extra_pointers);
|
||||
@ -313,7 +313,7 @@ int PerlembParser::EventGlobalNPC(
|
||||
|
||||
int PerlembParser::EventPlayer(
|
||||
QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
return EventCommon(evt, 0, data.c_str(), nullptr, nullptr, nullptr, client, extra_data, false, extra_pointers);
|
||||
@ -321,7 +321,7 @@ int PerlembParser::EventPlayer(
|
||||
|
||||
int PerlembParser::EventGlobalPlayer(
|
||||
QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
return EventCommon(evt, 0, data.c_str(), nullptr, nullptr, nullptr, client, extra_data, true, extra_pointers);
|
||||
@ -329,7 +329,7 @@ int PerlembParser::EventGlobalPlayer(
|
||||
|
||||
int PerlembParser::EventItem(
|
||||
QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
// needs pointer validation on 'item' argument
|
||||
@ -338,7 +338,7 @@ int PerlembParser::EventItem(
|
||||
|
||||
int PerlembParser::EventSpell(
|
||||
QuestEventID evt, NPC *npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers
|
||||
std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
return EventCommon(evt, spell_id, data.c_str(), npc, nullptr, &spells[spell_id], client, extra_data, false, extra_pointers);
|
||||
@ -1308,7 +1308,7 @@ void PerlembParser::ExportItemVariables(std::string &package_name, Mob *mob)
|
||||
|
||||
void PerlembParser::ExportEventVariables(
|
||||
std::string &package_name, QuestEventID event, uint32 objid, const char *data,
|
||||
NPC *npcmob, EQ::ItemInstance *item_inst, Mob *mob, uint32 extradata, std::vector<EQ::Any> *extra_pointers
|
||||
NPC *npcmob, EQ::ItemInstance *item_inst, Mob *mob, uint32 extradata, std::vector<std::any> *extra_pointers
|
||||
)
|
||||
{
|
||||
switch (event) {
|
||||
@ -1327,7 +1327,7 @@ void PerlembParser::ExportEventVariables(
|
||||
if (extra_pointers) {
|
||||
size_t sz = extra_pointers->size();
|
||||
for (size_t i = 0; i < sz; ++i) {
|
||||
EQ::ItemInstance *inst = EQ::any_cast<EQ::ItemInstance *>(extra_pointers->at(i));
|
||||
EQ::ItemInstance *inst = std::any_cast<EQ::ItemInstance *>(extra_pointers->at(i));
|
||||
|
||||
std::string var_name = "item";
|
||||
var_name += std::to_string(i + 1);
|
||||
|
||||
@ -49,17 +49,17 @@ public:
|
||||
~PerlembParser();
|
||||
|
||||
virtual int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventGlobalPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
virtual bool HasQuestSub(uint32 npcid, QuestEventID evt);
|
||||
virtual bool HasGlobalQuestSub(QuestEventID evt);
|
||||
@ -91,7 +91,7 @@ private:
|
||||
void ExportVarComplex(const char *pkgprefix, const char *varname, const char *value);
|
||||
|
||||
int EventCommon(QuestEventID event, uint32 objid, const char * data, NPC* npcmob, EQ::ItemInstance* item_inst, const SPDat_Spell_Struct* spell, Mob* mob,
|
||||
uint32 extradata, bool global, std::vector<EQ::Any> *extra_pointers);
|
||||
uint32 extradata, bool global, std::vector<std::any> *extra_pointers);
|
||||
int SendCommands(const char *pkgprefix, const char *event, uint32 spell_id, Mob* other, Mob* mob, EQ::ItemInstance *item_inst, const SPDat_Spell_Struct *spell);
|
||||
void MapFunctions();
|
||||
|
||||
@ -108,7 +108,7 @@ private:
|
||||
void ExportZoneVariables(std::string &package_name);
|
||||
void ExportItemVariables(std::string &package_name, Mob *mob);
|
||||
void ExportEventVariables(std::string &package_name, QuestEventID event, uint32 objid, const char * data,
|
||||
NPC* npcmob, EQ::ItemInstance* item_inst, Mob* mob, uint32 extradata, std::vector<EQ::Any> *extra_pointers);
|
||||
NPC* npcmob, EQ::ItemInstance* item_inst, Mob* mob, uint32 extradata, std::vector<std::any> *extra_pointers);
|
||||
|
||||
std::map<uint32, PerlQuestStatus> npc_quest_status_;
|
||||
PerlQuestStatus global_npc_quest_status_;
|
||||
|
||||
@ -1803,7 +1803,7 @@ void EntityList::QueueClientsStatus(Mob *sender, const EQApplicationPacket *app,
|
||||
void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
|
||||
{
|
||||
if (winner->GetLevelCon(winner->GetLevel(), loser->GetLevel()) > 2) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(winner);
|
||||
args.push_back(loser);
|
||||
|
||||
@ -3605,7 +3605,7 @@ void EntityList::ClearFeignAggro(Mob *targ)
|
||||
}
|
||||
|
||||
if (targ->IsClient()) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(it->second);
|
||||
int i = parse->EventPlayer(EVENT_FEIGN_DEATH, targ->CastToClient(), "", 0, &args);
|
||||
if (i != 0) {
|
||||
@ -3952,10 +3952,10 @@ void EntityList::ProcessMove(Client *c, const glm::vec3& location)
|
||||
for (auto iter = events.begin(); iter != events.end(); ++iter) {
|
||||
quest_proximity_event& evt = (*iter);
|
||||
if (evt.npc) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
parse->EventNPC(evt.event_id, evt.npc, evt.client, "", 0, &args);
|
||||
} else {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(&evt.area_id);
|
||||
args.push_back(&evt.area_type);
|
||||
parse->EventPlayer(evt.event_id, evt.client, "", 0, &args);
|
||||
@ -4011,7 +4011,7 @@ void EntityList::ProcessMove(NPC *n, float x, float y, float z) {
|
||||
|
||||
for (auto iter = events.begin(); iter != events.end(); ++iter) {
|
||||
quest_proximity_event &evt = (*iter);
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(&evt.area_id);
|
||||
args.push_back(&evt.area_type);
|
||||
parse->EventNPC(evt.event_id, evt.npc, evt.client, "", 0, &args);
|
||||
|
||||
@ -374,7 +374,7 @@ void Client::GoFish()
|
||||
}
|
||||
|
||||
if (inst) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FISH_SUCCESS, this, "", inst->GetID(), &args);
|
||||
}
|
||||
@ -494,7 +494,7 @@ void Client::ForageItem(bool guarantee) {
|
||||
}
|
||||
|
||||
if(inst) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst->GetID(), &args);
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ void load_encounter_with_data(std::string name, std::string info_str) {
|
||||
entity_list.AddEncounter(enc);
|
||||
lua_encounters[name] = enc;
|
||||
lua_encounters_loaded[name] = true;
|
||||
std::vector<EQ::Any> info_ptrs;
|
||||
std::vector<std::any> info_ptrs;
|
||||
info_ptrs.push_back(&info_str);
|
||||
parse->EventEncounter(EVENT_ENCOUNTER_LOAD, name, "", 0, &info_ptrs);
|
||||
}
|
||||
@ -137,7 +137,7 @@ void unload_encounter_with_data(std::string name, std::string info_str) {
|
||||
lua_encounters[name]->Depop();
|
||||
lua_encounters.erase(name);
|
||||
lua_encounters_loaded.erase(name);
|
||||
std::vector<EQ::Any> info_ptrs;
|
||||
std::vector<std::any> info_ptrs;
|
||||
info_ptrs.push_back(&info_str);
|
||||
parse->EventEncounter(EVENT_ENCOUNTER_UNLOAD, name, "", 0, &info_ptrs);
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ LuaParser::~LuaParser() {
|
||||
}
|
||||
|
||||
int LuaParser::EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -291,7 +291,7 @@ int LuaParser::EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data,
|
||||
}
|
||||
|
||||
int LuaParser::EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -309,7 +309,7 @@ int LuaParser::EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string
|
||||
}
|
||||
|
||||
int LuaParser::_EventNPC(std::string package_name, QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
const char *sub_name = LuaEvents[evt];
|
||||
|
||||
int start = lua_gettop(L);
|
||||
@ -369,7 +369,7 @@ int LuaParser::_EventNPC(std::string package_name, QuestEventID evt, NPC* npc, M
|
||||
}
|
||||
|
||||
int LuaParser::EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -387,7 +387,7 @@ int LuaParser::EventPlayer(QuestEventID evt, Client *client, std::string data, u
|
||||
}
|
||||
|
||||
int LuaParser::EventGlobalPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -405,7 +405,7 @@ int LuaParser::EventGlobalPlayer(QuestEventID evt, Client *client, std::string d
|
||||
}
|
||||
|
||||
int LuaParser::_EventPlayer(std::string package_name, QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
const char *sub_name = LuaEvents[evt];
|
||||
int start = lua_gettop(L);
|
||||
|
||||
@ -463,7 +463,7 @@ int LuaParser::_EventPlayer(std::string package_name, QuestEventID evt, Client *
|
||||
}
|
||||
|
||||
int LuaParser::EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -483,7 +483,7 @@ int LuaParser::EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *ite
|
||||
}
|
||||
|
||||
int LuaParser::_EventItem(std::string package_name, QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob,
|
||||
std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
const char *sub_name = LuaEvents[evt];
|
||||
|
||||
int start = lua_gettop(L);
|
||||
@ -548,7 +548,7 @@ int LuaParser::_EventItem(std::string package_name, QuestEventID evt, Client *cl
|
||||
}
|
||||
|
||||
int LuaParser::EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -564,7 +564,7 @@ int LuaParser::EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spe
|
||||
}
|
||||
|
||||
int LuaParser::_EventSpell(std::string package_name, QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func) {
|
||||
const char *sub_name = LuaEvents[evt];
|
||||
|
||||
int start = lua_gettop(L);
|
||||
@ -629,7 +629,7 @@ int LuaParser::_EventSpell(std::string package_name, QuestEventID evt, NPC* npc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int LuaParser::EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
int LuaParser::EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -645,7 +645,7 @@ int LuaParser::EventEncounter(QuestEventID evt, std::string encounter_name, std:
|
||||
}
|
||||
|
||||
int LuaParser::_EventEncounter(std::string package_name, QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
const char *sub_name = LuaEvents[evt];
|
||||
|
||||
int start = lua_gettop(L);
|
||||
@ -1170,7 +1170,7 @@ void LuaParser::MapFunctions(lua_State *L) {
|
||||
}
|
||||
|
||||
int LuaParser::DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -1216,7 +1216,7 @@ int LuaParser::DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::stri
|
||||
}
|
||||
|
||||
int LuaParser::DispatchEventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -1245,7 +1245,7 @@ int LuaParser::DispatchEventPlayer(QuestEventID evt, Client *client, std::string
|
||||
}
|
||||
|
||||
int LuaParser::DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
@ -1291,7 +1291,7 @@ int LuaParser::DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInsta
|
||||
}
|
||||
|
||||
int LuaParser::DispatchEventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
evt = ConvertLuaEvent(evt);
|
||||
if(evt >= _LargestEventID) {
|
||||
return 0;
|
||||
|
||||
@ -37,19 +37,19 @@ public:
|
||||
~LuaParser();
|
||||
|
||||
virtual int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventGlobalPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
virtual bool HasQuestSub(uint32 npc_id, QuestEventID evt);
|
||||
virtual bool HasGlobalQuestSub(QuestEventID evt);
|
||||
@ -75,13 +75,13 @@ public:
|
||||
virtual uint32 GetIdentifier() { return 0xb0712acc; }
|
||||
|
||||
virtual int DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int DispatchEventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
virtual int DispatchEventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
static LuaParser* Instance() {
|
||||
static LuaParser inst;
|
||||
@ -107,15 +107,15 @@ private:
|
||||
LuaParser& operator=(const LuaParser&);
|
||||
|
||||
int _EventNPC(std::string package_name, QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
int _EventPlayer(std::string package_name, QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
int _EventItem(std::string package_name, QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data,
|
||||
uint32 extra_data, std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
uint32 extra_data, std::vector<std::any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
int _EventSpell(std::string package_name, QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
std::vector<std::any> *extra_pointers, luabind::adl::object *l_func = nullptr);
|
||||
int _EventEncounter(std::string package_name, QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
void LoadScript(std::string filename, std::string package_name);
|
||||
void MapFunctions(lua_State *L);
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
//NPC
|
||||
void handle_npc_event_say(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
npc->DoQuestPause(init);
|
||||
|
||||
Lua_Client l_client(reinterpret_cast<Client*>(init));
|
||||
@ -44,7 +44,7 @@ void handle_npc_event_say(QuestInterface *parse, lua_State* L, NPC* npc, Mob *in
|
||||
}
|
||||
|
||||
void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(reinterpret_cast<Client*>(init));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
@ -58,7 +58,7 @@ void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *
|
||||
size_t sz = extra_pointers->size();
|
||||
for(size_t i = 0; i < sz; ++i) {
|
||||
std::string prefix = "item" + std::to_string(i + 1);
|
||||
EQ::ItemInstance *inst = EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(i));
|
||||
EQ::ItemInstance *inst = std::any_cast<EQ::ItemInstance*>(extra_pointers->at(i));
|
||||
|
||||
Lua_ItemInst l_inst = inst;
|
||||
luabind::adl::object l_inst_o = luabind::adl::object(L, l_inst);
|
||||
@ -83,7 +83,7 @@ void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *
|
||||
}
|
||||
|
||||
void handle_npc_event_hp(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if(extra_data == 1) {
|
||||
lua_pushinteger(L, -1);
|
||||
lua_setfield(L, -2, "hp_event");
|
||||
@ -100,7 +100,7 @@ void handle_npc_event_hp(QuestInterface *parse, lua_State* L, NPC* npc, Mob *ini
|
||||
}
|
||||
|
||||
void handle_npc_single_mob(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Mob l_mob(init);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
l_mob_o.push(L);
|
||||
@ -108,7 +108,7 @@ void handle_npc_single_mob(QuestInterface *parse, lua_State* L, NPC* npc, Mob *i
|
||||
}
|
||||
|
||||
void handle_npc_single_client(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(reinterpret_cast<Client*>(init));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
@ -116,7 +116,7 @@ void handle_npc_single_client(QuestInterface *parse, lua_State* L, NPC* npc, Mob
|
||||
}
|
||||
|
||||
void handle_npc_single_npc(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_NPC l_npc(reinterpret_cast<NPC*>(init));
|
||||
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
|
||||
l_npc_o.push(L);
|
||||
@ -124,7 +124,7 @@ void handle_npc_single_npc(QuestInterface *parse, lua_State* L, NPC* npc, Mob *i
|
||||
}
|
||||
|
||||
void handle_npc_task_accepted(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(reinterpret_cast<Client*>(init));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
@ -135,7 +135,7 @@ void handle_npc_task_accepted(QuestInterface *parse, lua_State* L, NPC* npc, Mob
|
||||
}
|
||||
|
||||
void handle_npc_popup(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Mob l_mob(init);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
l_mob_o.push(L);
|
||||
@ -146,7 +146,7 @@ void handle_npc_popup(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init,
|
||||
}
|
||||
|
||||
void handle_npc_waypoint(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Mob l_mob(init);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
l_mob_o.push(L);
|
||||
@ -157,7 +157,7 @@ void handle_npc_waypoint(QuestInterface *parse, lua_State* L, NPC* npc, Mob *ini
|
||||
}
|
||||
|
||||
void handle_npc_hate(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Mob l_mob(init);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
l_mob_o.push(L);
|
||||
@ -169,19 +169,19 @@ void handle_npc_hate(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, s
|
||||
|
||||
|
||||
void handle_npc_signal(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "signal");
|
||||
}
|
||||
|
||||
void handle_npc_timer(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushstring(L, data.c_str());
|
||||
lua_setfield(L, -2, "timer");
|
||||
}
|
||||
|
||||
void handle_npc_death(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Mob l_mob(init);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
l_mob_o.push(L);
|
||||
@ -209,7 +209,7 @@ void handle_npc_death(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init,
|
||||
}
|
||||
|
||||
void handle_npc_cast(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int spell_id = std::stoi(data);
|
||||
if(IsValidSpell(spell_id)) {
|
||||
Lua_Spell l_spell(&spells[spell_id]);
|
||||
@ -225,31 +225,31 @@ void handle_npc_cast(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, s
|
||||
}
|
||||
|
||||
void handle_npc_area(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
lua_pushinteger(L, *EQ::any_cast<int*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, *std::any_cast<int*>(extra_pointers->at(0)));
|
||||
lua_setfield(L, -2, "area_id");
|
||||
|
||||
lua_pushinteger(L, *EQ::any_cast<int*>(extra_pointers->at(1)));
|
||||
lua_pushinteger(L, *std::any_cast<int*>(extra_pointers->at(1)));
|
||||
lua_setfield(L, -2, "area_type");
|
||||
}
|
||||
|
||||
void handle_npc_null(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
}
|
||||
|
||||
void handle_npc_loot_zone(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(reinterpret_cast<Client*>(init));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
lua_setfield(L, -2, "other");
|
||||
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
|
||||
Lua_Corpse l_corpse(EQ::any_cast<Corpse*>(extra_pointers->at(1)));
|
||||
Lua_Corpse l_corpse(std::any_cast<Corpse*>(extra_pointers->at(1)));
|
||||
luabind::adl::object l_corpse_o = luabind::adl::object(L, l_corpse);
|
||||
l_corpse_o.push(L);
|
||||
lua_setfield(L, -2, "corpse");
|
||||
@ -257,7 +257,7 @@ void handle_npc_loot_zone(QuestInterface *parse, lua_State* L, NPC* npc, Mob *in
|
||||
|
||||
//Player
|
||||
void handle_player_say(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushstring(L, data.c_str());
|
||||
lua_setfield(L, -2, "message");
|
||||
|
||||
@ -266,7 +266,7 @@ void handle_player_say(QuestInterface *parse, lua_State* L, Client* client, std:
|
||||
}
|
||||
|
||||
void handle_player_environmental_damage(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers){
|
||||
std::vector<std::any> *extra_pointers){
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "env_damage");
|
||||
@ -279,7 +279,7 @@ void handle_player_environmental_damage(QuestInterface *parse, lua_State* L, Cli
|
||||
}
|
||||
|
||||
void handle_player_death(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
|
||||
Mob *o = entity_list.GetMobID(std::stoi(sep.arg[0]));
|
||||
@ -309,13 +309,13 @@ void handle_player_death(QuestInterface *parse, lua_State* L, Client* client, st
|
||||
}
|
||||
|
||||
void handle_player_timer(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushstring(L, data.c_str());
|
||||
lua_setfield(L, -2, "timer");
|
||||
}
|
||||
|
||||
void handle_player_discover_item(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
const EQ::ItemData *item = database.GetItem(extra_data);
|
||||
if(item) {
|
||||
Lua_Item l_item(item);
|
||||
@ -331,51 +331,51 @@ void handle_player_discover_item(QuestInterface *parse, lua_State* L, Client* cl
|
||||
}
|
||||
|
||||
void handle_player_fish_forage_success(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
}
|
||||
|
||||
void handle_player_click_object(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_Object l_object(EQ::any_cast<Object*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Object l_object(std::any_cast<Object*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_object_o = luabind::adl::object(L, l_object);
|
||||
l_object_o.push(L);
|
||||
lua_setfield(L, -2, "object");
|
||||
}
|
||||
|
||||
void handle_player_click_door(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_Door l_door(EQ::any_cast<Doors*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Door l_door(std::any_cast<Doors*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_door_o = luabind::adl::object(L, l_door);
|
||||
l_door_o.push(L);
|
||||
lua_setfield(L, -2, "door");
|
||||
}
|
||||
|
||||
void handle_player_signal(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "signal");
|
||||
}
|
||||
|
||||
void handle_player_popup_response(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "popup_id");
|
||||
}
|
||||
|
||||
void handle_player_pick_up(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
}
|
||||
|
||||
void handle_player_cast(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
|
||||
int spell_id = std::stoi(sep.arg[0]);
|
||||
@ -399,13 +399,13 @@ void handle_player_cast(QuestInterface *parse, lua_State* L, Client* client, std
|
||||
}
|
||||
|
||||
void handle_player_task_fail(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "task_id");
|
||||
}
|
||||
|
||||
void handle_player_zone(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
@ -416,36 +416,36 @@ void handle_player_zone(QuestInterface *parse, lua_State* L, Client* client, std
|
||||
}
|
||||
|
||||
void handle_player_duel_win(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_Client l_client(EQ::any_cast<Client*>(extra_pointers->at(1)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(std::any_cast<Client*>(extra_pointers->at(1)));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
lua_setfield(L, -2, "other");
|
||||
}
|
||||
|
||||
void handle_player_duel_loss(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_Client l_client(EQ::any_cast<Client*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Client l_client(std::any_cast<Client*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_client_o = luabind::adl::object(L, l_client);
|
||||
l_client_o.push(L);
|
||||
lua_setfield(L, -2, "other");
|
||||
}
|
||||
|
||||
void handle_player_loot(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
|
||||
Lua_Corpse l_corpse(EQ::any_cast<Corpse*>(extra_pointers->at(1)));
|
||||
Lua_Corpse l_corpse(std::any_cast<Corpse*>(extra_pointers->at(1)));
|
||||
luabind::adl::object l_corpse_o = luabind::adl::object(L, l_corpse);
|
||||
l_corpse_o.push(L);
|
||||
lua_setfield(L, -2, "corpse");
|
||||
}
|
||||
|
||||
void handle_player_task_stage_complete(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "task_id");
|
||||
@ -455,7 +455,7 @@ void handle_player_task_stage_complete(QuestInterface *parse, lua_State* L, Clie
|
||||
}
|
||||
|
||||
void handle_player_task_update(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "count");
|
||||
@ -468,7 +468,7 @@ void handle_player_task_update(QuestInterface *parse, lua_State* L, Client* clie
|
||||
}
|
||||
|
||||
void handle_player_command(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str(), ' ', 10, 100, true);
|
||||
std::string command(sep.arg[0] + 1);
|
||||
lua_pushstring(L, command.c_str());
|
||||
@ -487,7 +487,7 @@ void handle_player_command(QuestInterface *parse, lua_State* L, Client* client,
|
||||
}
|
||||
|
||||
void handle_player_combine(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, extra_data);
|
||||
lua_setfield(L, -2, "recipe_id");
|
||||
|
||||
@ -496,24 +496,24 @@ void handle_player_combine(QuestInterface *parse, lua_State* L, Client* client,
|
||||
}
|
||||
|
||||
void handle_player_feign(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_NPC l_npc(EQ::any_cast<NPC*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_NPC l_npc(std::any_cast<NPC*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
|
||||
l_npc_o.push(L);
|
||||
lua_setfield(L, -2, "other");
|
||||
}
|
||||
|
||||
void handle_player_area(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
lua_pushinteger(L, *EQ::any_cast<int*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, *std::any_cast<int*>(extra_pointers->at(0)));
|
||||
lua_setfield(L, -2, "area_id");
|
||||
|
||||
lua_pushinteger(L, *EQ::any_cast<int*>(extra_pointers->at(1)));
|
||||
lua_pushinteger(L, *std::any_cast<int*>(extra_pointers->at(1)));
|
||||
lua_setfield(L, -2, "area_type");
|
||||
}
|
||||
|
||||
void handle_player_respawn(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "option");
|
||||
|
||||
@ -522,8 +522,8 @@ void handle_player_respawn(QuestInterface *parse, lua_State* L, Client* client,
|
||||
}
|
||||
|
||||
void handle_player_packet(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_Packet l_packet(EQ::any_cast<EQApplicationPacket*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_Packet l_packet(std::any_cast<EQApplicationPacket*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_packet_o = luabind::adl::object(L, l_packet);
|
||||
l_packet_o.push(L);
|
||||
lua_setfield(L, -2, "packet");
|
||||
@ -533,10 +533,10 @@ void handle_player_packet(QuestInterface *parse, lua_State* L, Client* client, s
|
||||
}
|
||||
|
||||
void handle_player_null(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
}
|
||||
|
||||
void handle_player_use_skill(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
void handle_player_use_skill(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "skill_id");
|
||||
@ -545,11 +545,11 @@ void handle_player_use_skill(QuestInterface *parse, lua_State* L, Client* client
|
||||
lua_setfield(L, -2, "skill_level");
|
||||
}
|
||||
|
||||
void handle_test_buff(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_test_buff(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
}
|
||||
|
||||
void handle_player_combine_validate(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers) {
|
||||
std::vector<std::any>* extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, extra_data);
|
||||
lua_setfield(L, -2, "recipe_id");
|
||||
@ -574,7 +574,7 @@ void handle_player_combine_validate(QuestInterface* parse, lua_State* L, Client*
|
||||
}
|
||||
|
||||
void handle_player_bot_command(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers) {
|
||||
std::vector<std::any>* extra_pointers) {
|
||||
Seperator sep(data.c_str(), ' ', 10, 100, true);
|
||||
std::string bot_command(sep.arg[0] + 1);
|
||||
lua_pushstring(L, bot_command.c_str());
|
||||
@ -592,7 +592,7 @@ void handle_player_bot_command(QuestInterface* parse, lua_State* L, Client* clie
|
||||
lua_setfield(L, -2, "args");
|
||||
}
|
||||
|
||||
void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushnumber(L, std::stof(sep.arg[0]));
|
||||
lua_setfield(L, -2, "from_x");
|
||||
@ -604,36 +604,36 @@ void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std
|
||||
lua_setfield(L, -2, "from_z");
|
||||
}
|
||||
|
||||
void handle_player_quest_combine(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_quest_combine(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "container_slot");
|
||||
}
|
||||
|
||||
void handle_player_consider(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_consider(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "entity_id");
|
||||
}
|
||||
|
||||
void handle_player_consider_corpse(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_consider_corpse(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
lua_pushinteger(L, std::stoi(data));
|
||||
lua_setfield(L, -2, "corpse_entity_id");
|
||||
}
|
||||
|
||||
//Item
|
||||
void handle_item_click(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, extra_data);
|
||||
lua_setfield(L, -2, "slot_id");
|
||||
}
|
||||
|
||||
void handle_item_timer(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushstring(L, data.c_str());
|
||||
lua_setfield(L, -2, "timer");
|
||||
}
|
||||
|
||||
void handle_item_proc(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
|
||||
Lua_Mob l_mob(mob);
|
||||
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
|
||||
@ -654,7 +654,7 @@ void handle_item_proc(QuestInterface *parse, lua_State* L, Client* client, EQ::I
|
||||
}
|
||||
|
||||
void handle_item_loot(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if(mob && mob->IsCorpse()) {
|
||||
Lua_Corpse l_corpse(mob->CastToCorpse());
|
||||
luabind::adl::object l_corpse_o = luabind::adl::object(L, l_corpse);
|
||||
@ -669,14 +669,14 @@ void handle_item_loot(QuestInterface *parse, lua_State* L, Client* client, EQ::I
|
||||
}
|
||||
|
||||
void handle_item_equip(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushinteger(L, extra_data);
|
||||
lua_setfield(L, -2, "slot_id");
|
||||
}
|
||||
|
||||
void handle_item_augment(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "aug");
|
||||
@ -686,8 +686,8 @@ void handle_item_augment(QuestInterface *parse, lua_State* L, Client* client, EQ
|
||||
}
|
||||
|
||||
void handle_item_augment_insert(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
@ -697,8 +697,8 @@ void handle_item_augment_insert(QuestInterface *parse, lua_State* L, Client* cli
|
||||
}
|
||||
|
||||
void handle_item_augment_remove(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(EQ::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
Lua_ItemInst l_item(std::any_cast<EQ::ItemInstance*>(extra_pointers->at(0)));
|
||||
luabind::adl::object l_item_o = luabind::adl::object(L, l_item);
|
||||
l_item_o.push(L);
|
||||
lua_setfield(L, -2, "item");
|
||||
@ -706,16 +706,16 @@ void handle_item_augment_remove(QuestInterface *parse, lua_State* L, Client* cli
|
||||
lua_pushinteger(L, extra_data);
|
||||
lua_setfield(L, -2, "slot_id");
|
||||
|
||||
lua_pushboolean(L, *EQ::any_cast<bool*>(extra_pointers->at(1)));
|
||||
lua_pushboolean(L, *std::any_cast<bool*>(extra_pointers->at(1)));
|
||||
lua_setfield(L, -2, "destroyed");
|
||||
}
|
||||
|
||||
void handle_item_null(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
}
|
||||
|
||||
//Spell
|
||||
void handle_spell_event(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
void handle_spell_event(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
if(npc) {
|
||||
Lua_Mob l_npc(npc);
|
||||
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
|
||||
@ -755,7 +755,7 @@ void handle_spell_event(QuestInterface *parse, lua_State* L, NPC* npc, Client* c
|
||||
lua_setfield(L, -2, "spell");
|
||||
}
|
||||
|
||||
void handle_translocate_finish(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
void handle_translocate_finish(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
if(npc) {
|
||||
Lua_Mob l_npc(npc);
|
||||
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
|
||||
@ -773,7 +773,7 @@ void handle_translocate_finish(QuestInterface *parse, lua_State* L, NPC* npc, Cl
|
||||
lua_setfield(L, -2, "target");
|
||||
}
|
||||
|
||||
void handle_player_equip_item(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
void handle_player_equip_item(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
lua_pushnumber(L, extra_data);
|
||||
lua_setfield(L, -2, "item_id");
|
||||
|
||||
@ -791,16 +791,16 @@ void handle_player_equip_item(QuestInterface *parse, lua_State* L, Client* clien
|
||||
lua_setfield(L, -2, "item");
|
||||
}
|
||||
|
||||
void handle_spell_null(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers) { }
|
||||
void handle_spell_null(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers) { }
|
||||
|
||||
void handle_encounter_timer(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
lua_pushstring(L, data.c_str());
|
||||
lua_setfield(L, -2, "timer");
|
||||
}
|
||||
|
||||
void handle_encounter_load(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if (encounter) {
|
||||
Lua_Encounter l_enc(encounter);
|
||||
luabind::adl::object l_enc_o = luabind::adl::object(L, l_enc);
|
||||
@ -808,27 +808,27 @@ void handle_encounter_load(QuestInterface *parse, lua_State* L, Encounter* encou
|
||||
lua_setfield(L, -2, "encounter");
|
||||
}
|
||||
if (extra_pointers) {
|
||||
std::string *str = EQ::any_cast<std::string*>(extra_pointers->at(0));
|
||||
std::string *str = std::any_cast<std::string*>(extra_pointers->at(0));
|
||||
lua_pushstring(L, str->c_str());
|
||||
lua_setfield(L, -2, "data");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_encounter_unload(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if (extra_pointers) {
|
||||
std::string *str = EQ::any_cast<std::string*>(extra_pointers->at(0));
|
||||
std::string *str = std::any_cast<std::string*>(extra_pointers->at(0));
|
||||
lua_pushstring(L, str->c_str());
|
||||
lua_setfield(L, -2, "data");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_encounter_null(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
|
||||
}
|
||||
|
||||
void handle_player_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "skill_id");
|
||||
@ -843,7 +843,7 @@ void handle_player_skill_up(QuestInterface* parse, lua_State* L, Client* client,
|
||||
lua_setfield(L, -2, "is_tradeskill");
|
||||
}
|
||||
|
||||
void handle_player_language_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<EQ::Any>* extra_pointers) {
|
||||
void handle_player_language_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data, std::vector<std::any>* extra_pointers) {
|
||||
Seperator sep(data.c_str());
|
||||
lua_pushinteger(L, std::stoi(sep.arg[0]));
|
||||
lua_setfield(L, -2, "skill_id");
|
||||
|
||||
@ -2,162 +2,162 @@
|
||||
#define _EQE_LUA_PARSER_EVENTS_H
|
||||
#ifdef LUA_EQEMU
|
||||
|
||||
typedef void(*NPCArgumentHandler)(QuestInterface*, lua_State*, NPC*, Mob*, std::string, uint32, std::vector<EQ::Any>*);
|
||||
typedef void(*PlayerArgumentHandler)(QuestInterface*, lua_State*, Client*, std::string, uint32, std::vector<EQ::Any>*);
|
||||
typedef void(*ItemArgumentHandler)(QuestInterface*, lua_State*, Client*, EQ::ItemInstance*, Mob*, std::string, uint32, std::vector<EQ::Any>*);
|
||||
typedef void(*SpellArgumentHandler)(QuestInterface*, lua_State*, NPC*, Client*, uint32, std::string, uint32, std::vector<EQ::Any>*);
|
||||
typedef void(*EncounterArgumentHandler)(QuestInterface*, lua_State*, Encounter* encounter, std::string, uint32, std::vector<EQ::Any>*);
|
||||
typedef void(*NPCArgumentHandler)(QuestInterface*, lua_State*, NPC*, Mob*, std::string, uint32, std::vector<std::any>*);
|
||||
typedef void(*PlayerArgumentHandler)(QuestInterface*, lua_State*, Client*, std::string, uint32, std::vector<std::any>*);
|
||||
typedef void(*ItemArgumentHandler)(QuestInterface*, lua_State*, Client*, EQ::ItemInstance*, Mob*, std::string, uint32, std::vector<std::any>*);
|
||||
typedef void(*SpellArgumentHandler)(QuestInterface*, lua_State*, NPC*, Client*, uint32, std::string, uint32, std::vector<std::any>*);
|
||||
typedef void(*EncounterArgumentHandler)(QuestInterface*, lua_State*, Encounter* encounter, std::string, uint32, std::vector<std::any>*);
|
||||
|
||||
//NPC
|
||||
void handle_npc_event_say(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_event_hp(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_single_mob(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_single_client(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_single_npc(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_task_accepted(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_popup(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_waypoint(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_hate(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_signal(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_timer(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_death(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_cast(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_area(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_null(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_npc_loot_zone(QuestInterface *parse, lua_State* L, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
//Player
|
||||
void handle_player_say(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_environmental_damage(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_death(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_timer(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_discover_item(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_fish_forage_success(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_click_object(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_click_door(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_signal(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_popup_response(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_pick_up(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_cast(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_task_fail(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_zone(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_duel_win(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_duel_loss(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_loot(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_task_stage_complete(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_task_update(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_command(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_combine(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_feign(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_area(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_respawn(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_packet(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_null(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_use_skill(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_test_buff(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_combine_validate(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_bot_command(QuestInterface *parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_player_warp(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_quest_combine(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_consider(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_consider_corpse(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_equip_item(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
void handle_player_language_skill_up(QuestInterface* parse, lua_State* L, Client* client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any>* extra_pointers);
|
||||
std::vector<std::any>* extra_pointers);
|
||||
|
||||
//Item
|
||||
void handle_item_click(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_timer(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_proc(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_loot(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_equip(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_augment(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_augment_insert(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_augment_remove(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_item_null(QuestInterface *parse, lua_State* L, Client* client, EQ::ItemInstance* item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
//Spell
|
||||
void handle_spell_event(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_translocate_finish(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_spell_null(QuestInterface *parse, lua_State* L, NPC* npc, Client* client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
|
||||
//Encounter
|
||||
void handle_encounter_timer(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_encounter_load(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_encounter_unload(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
void handle_encounter_null(QuestInterface *parse, lua_State* L, Encounter* encounter, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -512,7 +512,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
|
||||
database.GetItemRecastTimestamp(sender->CharacterID(), item->RecastType));
|
||||
|
||||
std::string export_string = fmt::format("{}", item->ID);
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(m_inst);
|
||||
if(parse->EventPlayer(EVENT_PLAYER_PICKUP, sender, export_string, GetID(), &args))
|
||||
{
|
||||
|
||||
@ -40,14 +40,14 @@ void CullPoints(std::vector<FindPerson_Point> &points) {
|
||||
}
|
||||
|
||||
void Client::SendPathPacket(const std::vector<FindPerson_Point> &points) {
|
||||
EQ::Any data(points);
|
||||
std::any data(points);
|
||||
EQ::Task([=](EQ::Task::ResolveFn resolve, EQ::Task::RejectFn reject) {
|
||||
auto points = EQ::any_cast<std::vector<FindPerson_Point>>(data);
|
||||
auto points = std::any_cast<std::vector<FindPerson_Point>>(data);
|
||||
CullPoints(points);
|
||||
resolve(points);
|
||||
})
|
||||
.Then([this](const EQ::Any &result) {
|
||||
auto points = EQ::any_cast<std::vector<FindPerson_Point>>(result);
|
||||
.Then([this](const std::any &result) {
|
||||
auto points = std::any_cast<std::vector<FindPerson_Point>>(result);
|
||||
if (points.size() < 2) {
|
||||
if (Admin() > AccountStatus::Steward) {
|
||||
Message(Chat::System, "Too few points");
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
#define _EQE_QUESTINTERFACE_H
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../common/any.h"
|
||||
#include "event_codes.h"
|
||||
#include <any>
|
||||
|
||||
class Client;
|
||||
class NPC;
|
||||
@ -34,19 +34,19 @@ namespace EQ
|
||||
class QuestInterface {
|
||||
public:
|
||||
virtual int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventGlobalNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventGlobalPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
|
||||
virtual bool HasQuestSub(uint32 npcid, QuestEventID evt) { return false; }
|
||||
virtual bool HasGlobalQuestSub(QuestEventID evt) { return false; }
|
||||
@ -65,13 +65,13 @@ public:
|
||||
virtual void LoadEncounterScript(std::string filename, std::string encounter_name) { }
|
||||
|
||||
virtual int DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int DispatchEventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
virtual int DispatchEventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) { return 0; }
|
||||
std::vector<std::any> *extra_pointers) { return 0; }
|
||||
|
||||
virtual void AddVar(std::string name, std::string val) { }
|
||||
virtual std::string GetVar(std::string name) { return std::string(); }
|
||||
|
||||
@ -246,7 +246,7 @@ bool QuestParserCollection::ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventNPC(QuestEventID evt, NPC *npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int rd = DispatchEventNPC(evt, npc, init, data, extra_data, extra_pointers);
|
||||
int rl = EventNPCLocal(evt, npc, init, data, extra_data, extra_pointers);
|
||||
int rg = EventNPCGlobal(evt, npc, init, data, extra_data, extra_pointers);
|
||||
@ -264,7 +264,7 @@ int QuestParserCollection::EventNPC(QuestEventID evt, NPC *npc, Mob *init, std::
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
auto iter = _npc_quest_status.find(npc->GetNPCTypeID());
|
||||
if(iter != _npc_quest_status.end()) {
|
||||
//loaded or failed to load
|
||||
@ -287,7 +287,7 @@ int QuestParserCollection::EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init,
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if(_global_npc_quest_status != QuestUnloaded && _global_npc_quest_status != QuestFailedToLoad) {
|
||||
auto qiter = _interfaces.find(_global_npc_quest_status);
|
||||
return qiter->second->EventGlobalNPC(evt, npc, init, data, extra_data, extra_pointers);
|
||||
@ -307,7 +307,7 @@ int QuestParserCollection::EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init,
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int rd = DispatchEventPlayer(evt, client, data, extra_data, extra_pointers);
|
||||
int rl = EventPlayerLocal(evt, client, data, extra_data, extra_pointers);
|
||||
int rg = EventPlayerGlobal(evt, client, data, extra_data, extra_pointers);
|
||||
@ -325,7 +325,7 @@ int QuestParserCollection::EventPlayer(QuestEventID evt, Client *client, std::st
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventPlayerLocal(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if(_player_quest_status == QuestUnloaded) {
|
||||
std::string filename;
|
||||
QuestInterface *qi = GetQIByPlayerQuest(filename);
|
||||
@ -344,7 +344,7 @@ int QuestParserCollection::EventPlayerLocal(QuestEventID evt, Client *client, st
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventPlayerGlobal(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
if(_global_player_quest_status == QuestUnloaded) {
|
||||
std::string filename;
|
||||
QuestInterface *qi = GetQIByGlobalPlayerQuest(filename);
|
||||
@ -363,7 +363,7 @@ int QuestParserCollection::EventPlayerGlobal(QuestEventID evt, Client *client, s
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
// needs pointer validation check on 'item' argument
|
||||
|
||||
std::string item_script;
|
||||
@ -411,7 +411,7 @@ int QuestParserCollection::EventItem(QuestEventID evt, Client *client, EQ::ItemI
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
auto iter = _spell_quest_status.find(spell_id);
|
||||
if(iter != _spell_quest_status.end()) {
|
||||
//loaded or failed to load
|
||||
@ -448,7 +448,7 @@ int QuestParserCollection::EventSpell(QuestEventID evt, NPC* npc, Client *client
|
||||
}
|
||||
|
||||
int QuestParserCollection::EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
auto iter = _encounter_quest_status.find(encounter_name);
|
||||
if(iter != _encounter_quest_status.end()) {
|
||||
//loaded or failed to load
|
||||
@ -1001,7 +1001,7 @@ void QuestParserCollection::GetErrors(std::list<std::string> &quest_errors) {
|
||||
}
|
||||
|
||||
int QuestParserCollection::DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int ret = 0;
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@ -1015,7 +1015,7 @@ int QuestParserCollection::DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *ini
|
||||
}
|
||||
|
||||
int QuestParserCollection::DispatchEventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int ret = 0;
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@ -1029,7 +1029,7 @@ int QuestParserCollection::DispatchEventPlayer(QuestEventID evt, Client *client,
|
||||
}
|
||||
|
||||
int QuestParserCollection::DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data,
|
||||
uint32 extra_data, std::vector<EQ::Any> *extra_pointers) {
|
||||
uint32 extra_data, std::vector<std::any> *extra_pointers) {
|
||||
int ret = 0;
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
@ -1043,7 +1043,7 @@ int QuestParserCollection::DispatchEventItem(QuestEventID evt, Client *client, E
|
||||
}
|
||||
|
||||
int QuestParserCollection::DispatchEventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers) {
|
||||
std::vector<std::any> *extra_pointers) {
|
||||
int ret = 0;
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
|
||||
@ -73,15 +73,15 @@ public:
|
||||
bool ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID evt);
|
||||
|
||||
int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers = nullptr);
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
int EventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers = nullptr);
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
int EventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers = nullptr);
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
int EventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers = nullptr);
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
int EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers = nullptr);
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
|
||||
void GetErrors(std::list<std::string> &quest_errors);
|
||||
|
||||
@ -112,10 +112,10 @@ private:
|
||||
bool PlayerHasQuestSubLocal(QuestEventID evt);
|
||||
bool PlayerHasQuestSubGlobal(QuestEventID evt);
|
||||
|
||||
int EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers);
|
||||
int EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers);
|
||||
int EventPlayerLocal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers);
|
||||
int EventPlayerGlobal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<EQ::Any> *extra_pointers);
|
||||
int EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventPlayerLocal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventPlayerGlobal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
|
||||
QuestInterface *GetQIByNPCQuest(uint32 npcid, std::string &filename);
|
||||
QuestInterface *GetQIByGlobalNPCQuest(std::string &filename);
|
||||
@ -126,13 +126,13 @@ private:
|
||||
QuestInterface *GetQIByEncounterQuest(std::string encounter_name, std::string &filename);
|
||||
|
||||
int DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
int DispatchEventPlayer(QuestEventID evt, Client *client, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
int DispatchEventItem(QuestEventID evt, Client *client, EQ::ItemInstance *item, Mob *mob, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
int DispatchEventSpell(QuestEventID evt, NPC* npc, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<EQ::Any> *extra_pointers);
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
std::map<uint32, QuestInterface*> _interfaces;
|
||||
std::map<uint32, std::string> _extensions;
|
||||
|
||||
@ -134,7 +134,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
|
||||
EQ::ItemInstance *aug = tobe_auged->GetAugment(slot);
|
||||
if(aug) {
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
parse->EventItem(EVENT_AUGMENT_ITEM, user, tobe_auged, nullptr, "", slot, &args);
|
||||
|
||||
@ -164,7 +164,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
user->Message(Chat::Red, "Error: Wrong augmentation distiller for safely removing this augment.");
|
||||
return;
|
||||
}
|
||||
std::vector<EQ::Any> args;
|
||||
std::vector<std::any> args;
|
||||
args.push_back(aug);
|
||||
parse->EventItem(EVENT_UNAUGMENT_ITEM, user, tobe_auged, nullptr, "", slot, &args);
|
||||
|
||||
|
||||
@ -876,7 +876,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
|
||||
quest_npc = true;
|
||||
}
|
||||
|
||||
std::vector<EQ::Any> item_list;
|
||||
std::vector<std::any> item_list;
|
||||
std::list<EQ::ItemInstance*> items;
|
||||
for (int i = EQ::invslot::TRADE_BEGIN; i <= EQ::invslot::TRADE_NPC_END; ++i) {
|
||||
EQ::ItemInstance *inst = m_inv.GetItem(i);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user