mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 19:32:24 +00:00
[Quest API] Add Adventure methods to Perl and Lua.
This commit is contained in:
parent
5e45bf262d
commit
74fde3972b
@ -434,5 +434,4 @@ int Adventure::GetAverageLevel() const
|
|||||||
void Adventure::SetAverageLevel(int average_level)
|
void Adventure::SetAverageLevel(int average_level)
|
||||||
{
|
{
|
||||||
Adventure::average_level = average_level;
|
Adventure::average_level = average_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,6 @@ protected:
|
|||||||
Timer *current_timer;
|
Timer *current_timer;
|
||||||
int instance_id;
|
int instance_id;
|
||||||
int average_level;
|
int average_level;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -334,13 +334,11 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
|||||||
ServerAdventureRequestAccept_Struct *sra = (ServerAdventureRequestAccept_Struct*)pack->pBuffer;
|
ServerAdventureRequestAccept_Struct *sra = (ServerAdventureRequestAccept_Struct*)pack->pBuffer;
|
||||||
strcpy(sra->leader, sar->leader);
|
strcpy(sra->leader, sar->leader);
|
||||||
strcpy(sra->text, (*ea_iter)->text);
|
strcpy(sra->text, (*ea_iter)->text);
|
||||||
|
uint32 iter_id = (*ea_iter)->id;
|
||||||
sra->theme = sar->template_id;
|
sra->theme = sar->template_id;
|
||||||
sra->id = (*ea_iter)->id;
|
sra->id = iter_id;
|
||||||
sra->member_count = sar->member_count;
|
sra->member_count = sar->member_count;
|
||||||
sra->average_level = avg_level;
|
sra->average_level = avg_level;
|
||||||
|
|
||||||
LogAdventure("[AdventureManager::CalculateAdventureRequestReply] Adventure average level [{}]", avg_level);
|
|
||||||
|
|
||||||
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestAccept_Struct)), (data + sizeof(ServerAdventureRequest_Struct)), (sar->member_count * 64));
|
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestAccept_Struct)), (data + sizeof(ServerAdventureRequest_Struct)), (sar->member_count * 64));
|
||||||
zoneserver_list.SendPacket(leader->zone(), leader->instance(), pack);
|
zoneserver_list.SendPacket(leader->zone(), leader->instance(), pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
@ -447,7 +445,6 @@ void AdventureManager::TryAdventureCreate(const char *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
adv->SetAverageLevel(src->average_level);
|
adv->SetAverageLevel(src->average_level);
|
||||||
|
|
||||||
adventure_list.push_back(adv);
|
adventure_list.push_back(adv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -943,9 +940,6 @@ void AdventureManager::GetZoneData(uint16 instance_id)
|
|||||||
zd->dest_z = temp->dest_z;
|
zd->dest_z = temp->dest_z;
|
||||||
zd->dest_h = temp->dest_h;
|
zd->dest_h = temp->dest_h;
|
||||||
zd->average_level = current->GetAverageLevel();
|
zd->average_level = current->GetAverageLevel();
|
||||||
|
|
||||||
LogAdventure("[AdventureManager::GetZoneData] Adventure average level [{}]", zd->average_level);
|
|
||||||
|
|
||||||
zoneserver_list.SendPacket(0, instance_id, pack);
|
zoneserver_list.SendPacket(0, instance_id, pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -325,7 +325,7 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
adv_requested_theme = 0;
|
adv_requested_theme = 0;
|
||||||
adv_requested_id = 0;
|
adv_requested_id = 0;
|
||||||
adv_requested_member_count = 0;
|
adv_requested_member_count = 0;
|
||||||
adv_requested_avg_lvl = 0;
|
adv_requested_average_lvl = 0;
|
||||||
|
|
||||||
for(int i = 0; i < XTARGET_HARDCAP; ++i)
|
for(int i = 0; i < XTARGET_HARDCAP; ++i)
|
||||||
{
|
{
|
||||||
@ -5993,17 +5993,14 @@ void Client::NewAdventure(int id, int theme, const char *text, int member_count,
|
|||||||
strn0cpy((char*)outapp->pBuffer, text, text_size);
|
strn0cpy((char*)outapp->pBuffer, text, text_size);
|
||||||
FastQueuePacket(&outapp);
|
FastQueuePacket(&outapp);
|
||||||
|
|
||||||
adv_requested_id = id;
|
adv_requested_id = id;
|
||||||
adv_requested_theme = theme;
|
adv_requested_theme = theme;
|
||||||
|
|
||||||
safe_delete_array(adv_requested_data);
|
safe_delete_array(adv_requested_data);
|
||||||
|
|
||||||
adv_requested_member_count = member_count;
|
adv_requested_member_count = member_count;
|
||||||
adv_requested_avg_lvl = avg_level;
|
adv_requested_average_lvl = avg_level;
|
||||||
adv_requested_data = new char[64 * member_count];
|
adv_requested_data = new char[64 * member_count];
|
||||||
|
|
||||||
LogAdventure("[Client::NewAdventure] Adventure average level [{}]", adv_requested_avg_lvl);
|
|
||||||
|
|
||||||
memcpy(adv_requested_data, members, (64 * member_count));
|
memcpy(adv_requested_data, members, (64 * member_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6013,6 +6010,7 @@ void Client::ClearPendingAdventureData()
|
|||||||
adv_requested_theme = 0;
|
adv_requested_theme = 0;
|
||||||
safe_delete_array(adv_requested_data);
|
safe_delete_array(adv_requested_data);
|
||||||
adv_requested_member_count = 0;
|
adv_requested_member_count = 0;
|
||||||
|
adv_requested_average_lvl = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Client::IsOnAdventure()
|
bool Client::IsOnAdventure()
|
||||||
|
|||||||
@ -1613,7 +1613,7 @@ protected:
|
|||||||
int adv_requested_theme;
|
int adv_requested_theme;
|
||||||
int adv_requested_id;
|
int adv_requested_id;
|
||||||
char *adv_requested_data;
|
char *adv_requested_data;
|
||||||
uint32 adv_requested_avg_lvl;
|
uint32 adv_requested_average_lvl;
|
||||||
int adv_requested_member_count;
|
int adv_requested_member_count;
|
||||||
char *adv_data;
|
char *adv_data;
|
||||||
|
|
||||||
|
|||||||
@ -9045,13 +9045,10 @@ void Client::Handle_OP_LDoNButton(const EQApplicationPacket *app)
|
|||||||
ServerAdventureRequestCreate_Struct *sac = (ServerAdventureRequestCreate_Struct *) pack->pBuffer;
|
ServerAdventureRequestCreate_Struct *sac = (ServerAdventureRequestCreate_Struct *) pack->pBuffer;
|
||||||
|
|
||||||
strcpy(sac->leader, GetName());
|
strcpy(sac->leader, GetName());
|
||||||
sac->id = adv_requested_id;
|
sac->id = adv_requested_id;
|
||||||
sac->theme = adv_requested_theme;
|
sac->theme = adv_requested_theme;
|
||||||
sac->member_count = adv_requested_member_count;
|
sac->member_count = adv_requested_member_count;
|
||||||
sac->average_level = adv_requested_avg_lvl;
|
sac->average_level = adv_requested_average_lvl;
|
||||||
|
|
||||||
LogAdventure("[Client::Handle_OP_LDoNButton] Adventure average level [{}]", sac->average_level);
|
|
||||||
|
|
||||||
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestCreate_Struct)), adv_requested_data, (64 * adv_requested_member_count));
|
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestCreate_Struct)), adv_requested_data, (64 * adv_requested_member_count));
|
||||||
worldserver.SendPacket(pack);
|
worldserver.SendPacket(pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
|
|||||||
@ -6404,6 +6404,188 @@ XS(XS__createitem) {
|
|||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_assassination_count);
|
||||||
|
XS(XS__get_adventure_assassination_count) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_assassination_count()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int assassination_count = quest_manager.GetAdventureAssassinationCount();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)assassination_count);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_assassination_x);
|
||||||
|
XS(XS__get_adventure_assassination_x) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_assassination_x()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int assassination_x = quest_manager.GetAdventureAssassinationX();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)assassination_x);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_assassination_y);
|
||||||
|
XS(XS__get_adventure_assassination_y) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_assassination_y()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int assassination_y = quest_manager.GetAdventureAssassinationY();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)assassination_y);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_assassination_z);
|
||||||
|
XS(XS__get_adventure_assassination_z) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_assassination_z()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int assassination_z = quest_manager.GetAdventureAssassinationZ();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)assassination_z);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_assassination_h);
|
||||||
|
XS(XS__get_adventure_assassination_h) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_assassination_h()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int assassination_h = quest_manager.GetAdventureAssassinationH();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)assassination_h);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_average_level);
|
||||||
|
XS(XS__get_adventure_average_level) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_average_level()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int average_level = quest_manager.GetAdventureAverageLevel();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)average_level);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_count);
|
||||||
|
XS(XS__get_adventure_count) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_count()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int count = quest_manager.GetAdventureCount();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)count);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_data_id);
|
||||||
|
XS(XS__get_adventure_data_id) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_data_id()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int data_id = quest_manager.GetAdventureDataID();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)data_id);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_destination_x);
|
||||||
|
XS(XS__get_adventure_destination_x) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_destination_x()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int destination_x = quest_manager.GetAdventureDestinationX();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)destination_x);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_destination_y);
|
||||||
|
XS(XS__get_adventure_destination_y) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_destination_y()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int destination_y = quest_manager.GetAdventureDestinationY();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)destination_y);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_destination_z);
|
||||||
|
XS(XS__get_adventure_destination_z) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_destination_z()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int destination_z = quest_manager.GetAdventureDestinationZ();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)destination_z);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_destination_h);
|
||||||
|
XS(XS__get_adventure_destination_h) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_destination_h()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int destination_h = quest_manager.GetAdventureDestinationH();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)destination_h);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_total);
|
||||||
|
XS(XS__get_adventure_total) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_total()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int total = quest_manager.GetAdventureTotal();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)total);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
XS(XS__get_adventure_type);
|
||||||
|
XS(XS__get_adventure_type) {
|
||||||
|
dXSARGS;
|
||||||
|
if (items >= 1) {
|
||||||
|
Perl_croak(aTHX_ "Usage: quest::get_adventure_type()");
|
||||||
|
}
|
||||||
|
dXSTARG;
|
||||||
|
int type = quest_manager.GetAdventureType();
|
||||||
|
XSprePUSH;
|
||||||
|
PUSHi((IV)type);
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is the callback perl will look for to setup the
|
This is the callback perl will look for to setup the
|
||||||
quest package's XSUBs
|
quest package's XSUBs
|
||||||
@ -6608,6 +6790,20 @@ EXTERN_C XS(boot_quest) {
|
|||||||
newXS(strcpy(buf, "follow"), XS__follow, file);
|
newXS(strcpy(buf, "follow"), XS__follow, file);
|
||||||
newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file);
|
newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file);
|
||||||
newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file);
|
newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_assassination_count"), XS__get_adventure_assassination_count, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_assassination_x"), XS__get_adventure_assassination_x, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_assassination_y"), XS__get_adventure_assassination_y, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_assassination_z"), XS__get_adventure_assassination_z, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_assassination_h"), XS__get_adventure_assassination_h, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_average_level"), XS__get_adventure_average_level, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_count"), XS__get_adventure_count, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_data_id"), XS__get_adventure_data_id, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_destination_x"), XS__get_adventure_destination_x, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_destination_y"), XS__get_adventure_destination_y, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_destination_z"), XS__get_adventure_destination_z, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_destination_h"), XS__get_adventure_destination_h, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_total"), XS__get_adventure_total, file);
|
||||||
|
newXS(strcpy(buf, "get_adventure_type"), XS__get_adventure_type, file);
|
||||||
newXS(strcpy(buf, "getcharidbyname"), XS__getcharidbyname, file);
|
newXS(strcpy(buf, "getcharidbyname"), XS__getcharidbyname, file);
|
||||||
newXS(strcpy(buf, "getclassname"), XS__getclassname, file);
|
newXS(strcpy(buf, "getclassname"), XS__getclassname, file);
|
||||||
newXS(strcpy(buf, "getcurrencyid"), XS__getcurrencyid, file);
|
newXS(strcpy(buf, "getcurrencyid"), XS__getcurrencyid, file);
|
||||||
|
|||||||
@ -2300,6 +2300,62 @@ void lua_remove_all_expedition_lockouts_by_char_id(uint32 char_id, std::string e
|
|||||||
Expedition::RemoveLockoutsByCharacterID(char_id, expedition_name);
|
Expedition::RemoveLockoutsByCharacterID(char_id, expedition_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_assassination_count() {
|
||||||
|
return quest_manager.GetAdventureAssassinationCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_assassination_x() {
|
||||||
|
return quest_manager.GetAdventureAssassinationX();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_assassination_y() {
|
||||||
|
return quest_manager.GetAdventureAssassinationY();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_assassination_z() {
|
||||||
|
return quest_manager.GetAdventureAssassinationZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_assassination_h() {
|
||||||
|
return quest_manager.GetAdventureAssassinationH();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_average_level() {
|
||||||
|
return quest_manager.GetAdventureAverageLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_count() {
|
||||||
|
return quest_manager.GetAdventureCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_data_id() {
|
||||||
|
return quest_manager.GetAdventureDataID();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_destination_x() {
|
||||||
|
return quest_manager.GetAdventureDestinationX();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_destination_y() {
|
||||||
|
return quest_manager.GetAdventureDestinationY();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_destination_z() {
|
||||||
|
return quest_manager.GetAdventureDestinationZ();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_destination_h() {
|
||||||
|
return quest_manager.GetAdventureDestinationH();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_total() {
|
||||||
|
return quest_manager.GetAdventureTotal();
|
||||||
|
}
|
||||||
|
|
||||||
|
int lua_get_adventure_type() {
|
||||||
|
return quest_manager.GetAdventureType();
|
||||||
|
}
|
||||||
|
|
||||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||||
cur = table[#name]; \
|
cur = table[#name]; \
|
||||||
if(luabind::type(cur) != LUA_TNIL) { \
|
if(luabind::type(cur) != LUA_TNIL) { \
|
||||||
@ -2914,7 +2970,22 @@ luabind::scope lua_register_general() {
|
|||||||
luabind::def("add_expedition_lockout_by_char_id", (void(*)(uint32, std::string, std::string, uint32, std::string))&lua_add_expedition_lockout_by_char_id),
|
luabind::def("add_expedition_lockout_by_char_id", (void(*)(uint32, std::string, std::string, uint32, std::string))&lua_add_expedition_lockout_by_char_id),
|
||||||
luabind::def("remove_expedition_lockout_by_char_id", &lua_remove_expedition_lockout_by_char_id),
|
luabind::def("remove_expedition_lockout_by_char_id", &lua_remove_expedition_lockout_by_char_id),
|
||||||
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32))&lua_remove_all_expedition_lockouts_by_char_id),
|
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32))&lua_remove_all_expedition_lockouts_by_char_id),
|
||||||
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32, std::string))&lua_remove_all_expedition_lockouts_by_char_id)
|
luabind::def("remove_all_expedition_lockouts_by_char_id", (void(*)(uint32, std::string))&lua_remove_all_expedition_lockouts_by_char_id),
|
||||||
|
|
||||||
|
luabind::def("get_adventure_assassination_count", &lua_get_adventure_assassination_count),
|
||||||
|
luabind::def("get_adventure_assassination_x", &lua_get_adventure_assassination_x),
|
||||||
|
luabind::def("get_adventure_assassination_y", &lua_get_adventure_assassination_y),
|
||||||
|
luabind::def("get_adventure_assassination_z", &lua_get_adventure_assassination_z),
|
||||||
|
luabind::def("get_adventure_assassination_h", &lua_get_adventure_assassination_h),
|
||||||
|
luabind::def("get_adventure_average_level", &lua_get_adventure_average_level),
|
||||||
|
luabind::def("get_adventure_count", &lua_get_adventure_count),
|
||||||
|
luabind::def("get_adventure_data_id", &lua_get_adventure_data_id),
|
||||||
|
luabind::def("get_adventure_destination_x", &lua_get_adventure_destination_x),
|
||||||
|
luabind::def("get_adventure_destination_y", &lua_get_adventure_destination_y),
|
||||||
|
luabind::def("get_adventure_destination_z", &lua_get_adventure_destination_z),
|
||||||
|
luabind::def("get_adventure_destination_h", &lua_get_adventure_destination_h),
|
||||||
|
luabind::def("get_adventure_total", &lua_get_adventure_total),
|
||||||
|
luabind::def("get_adventure_type", &lua_get_adventure_type)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4234,3 +4234,115 @@ EQ::ItemInstance *QuestManager::CreateItem(uint32 item_id, int16 charges, uint32
|
|||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAssassinationCount() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->assa_count;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAssassinationX() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->assa_x;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAssassinationY() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->assa_y;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAssassinationZ() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->assa_z;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAssassinationH() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->assa_h;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureAverageLevel() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->average_level;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureCount() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->count;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureDataID() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->data_id;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureDestinationX() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->dest_x;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureDestinationY() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->dest_y;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureDestinationZ() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->dest_z;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureDestinationH() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->dest_h;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureTotal() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->total;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QuestManager::GetAdventureType() {
|
||||||
|
if (zone->adv_data) {
|
||||||
|
ServerZoneAdventureDataReply_Struct *adventure_data = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
return adventure_data->type;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -370,6 +370,21 @@ public:
|
|||||||
void ClearNPCTypeCache(int npctype_id);
|
void ClearNPCTypeCache(int npctype_id);
|
||||||
void ReloadZoneStaticData();
|
void ReloadZoneStaticData();
|
||||||
|
|
||||||
|
int GetAdventureAssassinationCount();
|
||||||
|
int GetAdventureAssassinationX();
|
||||||
|
int GetAdventureAssassinationY();
|
||||||
|
int GetAdventureAssassinationZ();
|
||||||
|
int GetAdventureAssassinationH();
|
||||||
|
int GetAdventureAverageLevel();
|
||||||
|
int GetAdventureCount();
|
||||||
|
int GetAdventureDataID();
|
||||||
|
int GetAdventureDestinationX();
|
||||||
|
int GetAdventureDestinationY();
|
||||||
|
int GetAdventureDestinationZ();
|
||||||
|
int GetAdventureDestinationH();
|
||||||
|
int GetAdventureTotal();
|
||||||
|
int GetAdventureType();
|
||||||
|
|
||||||
Client *GetInitiator() const;
|
Client *GetInitiator() const;
|
||||||
NPC *GetNPC() const;
|
NPC *GetNPC() const;
|
||||||
Mob *GetOwner() const;
|
Mob *GetOwner() const;
|
||||||
|
|||||||
@ -1688,8 +1688,6 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
Client *c = entity_list.GetClientByName(ars->leader);
|
Client *c = entity_list.GetClientByName(ars->leader);
|
||||||
if (c)
|
if (c)
|
||||||
{
|
{
|
||||||
LogAdventure("[ServerOP_AdventureRequestAccept] Adventure average level [{}]", ars->average_level);
|
|
||||||
|
|
||||||
c->NewAdventure(
|
c->NewAdventure(
|
||||||
ars->id,
|
ars->id,
|
||||||
ars->theme,
|
ars->theme,
|
||||||
@ -1820,8 +1818,6 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
zone->adv_data = new char[pack->size];
|
zone->adv_data = new char[pack->size];
|
||||||
memcpy(zone->adv_data, pack->pBuffer, pack->size);
|
memcpy(zone->adv_data, pack->pBuffer, pack->size);
|
||||||
ServerZoneAdventureDataReply_Struct* ds = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
ServerZoneAdventureDataReply_Struct* ds = (ServerZoneAdventureDataReply_Struct*)zone->adv_data;
|
||||||
|
|
||||||
LogAdventure("[ServerOP_AdventureZoneData] Adventure average level [{}]", ds->average_level);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user