mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 74fde3972b | |||
| 5e45bf262d | |||
| e4dc304b5a | |||
| aff1223181 |
@@ -121,6 +121,7 @@ namespace Logs {
|
||||
Expeditions,
|
||||
DynamicZones,
|
||||
Group,
|
||||
Adventure,
|
||||
MaxCategoryID /* Don't Remove this */
|
||||
};
|
||||
|
||||
@@ -201,6 +202,7 @@ namespace Logs {
|
||||
"Expeditions",
|
||||
"DynamicZones",
|
||||
"Group",
|
||||
"Adventure",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -636,6 +636,16 @@
|
||||
OutF(LogSys, Logs::Detail, Logs::DynamicZones, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAdventure(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Adventure].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Adventure, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAdventureDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Adventure].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Adventure, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
|
||||
@@ -1162,6 +1162,7 @@ struct ServerAdventureRequestAccept_Struct
|
||||
uint32 theme;
|
||||
uint32 id;
|
||||
uint32 member_count;
|
||||
uint32 average_level;
|
||||
};
|
||||
|
||||
struct ServerAdventureRequestCreate_Struct
|
||||
@@ -1170,6 +1171,7 @@ struct ServerAdventureRequestCreate_Struct
|
||||
uint32 theme;
|
||||
uint32 id;
|
||||
uint32 member_count;
|
||||
uint32 average_level;
|
||||
};
|
||||
|
||||
struct ServerSendAdventureData_Struct
|
||||
@@ -1241,6 +1243,7 @@ struct ServerZoneAdventureDataReply_Struct
|
||||
int dest_y;
|
||||
int dest_z;
|
||||
int dest_h;
|
||||
int average_level;
|
||||
};
|
||||
|
||||
struct ServerAdventureFinish_Struct
|
||||
|
||||
@@ -26,6 +26,7 @@ Adventure::Adventure(AdventureTemplate *t)
|
||||
count = 0;
|
||||
assassination_count = 0;
|
||||
instance_id = 0;
|
||||
|
||||
}
|
||||
|
||||
Adventure::Adventure(AdventureTemplate *t, int count, int assassination_count, AdventureStatus status, uint16 instance_id, uint32 time_left)
|
||||
@@ -425,3 +426,12 @@ void Adventure::MoveCorpsesToGraveyard()
|
||||
}
|
||||
}
|
||||
|
||||
int Adventure::GetAverageLevel() const
|
||||
{
|
||||
return average_level;
|
||||
}
|
||||
|
||||
void Adventure::SetAverageLevel(int average_level)
|
||||
{
|
||||
Adventure::average_level = average_level;
|
||||
}
|
||||
@@ -87,6 +87,8 @@ public:
|
||||
int GetCount() const { return count; }
|
||||
int GetAssassinationCount() const { return assassination_count; }
|
||||
uint32 GetRemainingTime() const { if(current_timer) { return (current_timer->GetRemainingTime() / 1000); } else { return 0; } }
|
||||
int GetAverageLevel() const;
|
||||
void SetAverageLevel(int average_level);
|
||||
protected:
|
||||
int id;
|
||||
int count;
|
||||
@@ -96,6 +98,7 @@ protected:
|
||||
std::list<std::string> players;
|
||||
Timer *current_timer;
|
||||
int instance_id;
|
||||
int average_level;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -334,9 +334,11 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
ServerAdventureRequestAccept_Struct *sra = (ServerAdventureRequestAccept_Struct*)pack->pBuffer;
|
||||
strcpy(sra->leader, sar->leader);
|
||||
strcpy(sra->text, (*ea_iter)->text);
|
||||
uint32 iter_id = (*ea_iter)->id;
|
||||
sra->theme = sar->template_id;
|
||||
sra->id = (*ea_iter)->id;
|
||||
sra->id = iter_id;
|
||||
sra->member_count = sar->member_count;
|
||||
sra->average_level = avg_level;
|
||||
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestAccept_Struct)), (data + sizeof(ServerAdventureRequest_Struct)), (sar->member_count * 64));
|
||||
zoneserver_list.SendPacket(leader->zone(), leader->instance(), pack);
|
||||
delete pack;
|
||||
@@ -442,6 +444,7 @@ void AdventureManager::TryAdventureCreate(const char *data)
|
||||
}
|
||||
}
|
||||
|
||||
adv->SetAverageLevel(src->average_level);
|
||||
adventure_list.push_back(adv);
|
||||
}
|
||||
|
||||
@@ -936,6 +939,7 @@ void AdventureManager::GetZoneData(uint16 instance_id)
|
||||
zd->dest_y = temp->dest_y;
|
||||
zd->dest_z = temp->dest_z;
|
||||
zd->dest_h = temp->dest_h;
|
||||
zd->average_level = current->GetAverageLevel();
|
||||
zoneserver_list.SendPacket(0, instance_id, pack);
|
||||
delete pack;
|
||||
}
|
||||
|
||||
+6
-1
@@ -325,6 +325,7 @@ Client::Client(EQStreamInterface* ieqs)
|
||||
adv_requested_theme = 0;
|
||||
adv_requested_id = 0;
|
||||
adv_requested_member_count = 0;
|
||||
adv_requested_average_lvl = 0;
|
||||
|
||||
for(int i = 0; i < XTARGET_HARDCAP; ++i)
|
||||
{
|
||||
@@ -5985,7 +5986,7 @@ void Client::SendAdventureCount(uint32 count, uint32 total)
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
|
||||
void Client::NewAdventure(int id, int theme, const char *text, int member_count, const char *members)
|
||||
void Client::NewAdventure(int id, int theme, const char *text, int member_count, const char *members, uint32 avg_level)
|
||||
{
|
||||
size_t text_size = strlen(text);
|
||||
auto outapp = new EQApplicationPacket(OP_AdventureDetails, text_size + 2);
|
||||
@@ -5994,8 +5995,11 @@ void Client::NewAdventure(int id, int theme, const char *text, int member_count,
|
||||
|
||||
adv_requested_id = id;
|
||||
adv_requested_theme = theme;
|
||||
|
||||
safe_delete_array(adv_requested_data);
|
||||
|
||||
adv_requested_member_count = member_count;
|
||||
adv_requested_average_lvl = avg_level;
|
||||
adv_requested_data = new char[64 * member_count];
|
||||
memcpy(adv_requested_data, members, (64 * member_count));
|
||||
}
|
||||
@@ -6006,6 +6010,7 @@ void Client::ClearPendingAdventureData()
|
||||
adv_requested_theme = 0;
|
||||
safe_delete_array(adv_requested_data);
|
||||
adv_requested_member_count = 0;
|
||||
adv_requested_average_lvl = 0;
|
||||
}
|
||||
|
||||
bool Client::IsOnAdventure()
|
||||
|
||||
+2
-1
@@ -1270,7 +1270,7 @@ public:
|
||||
void SendAdventureError(const char *error);
|
||||
void SendAdventureDetails();
|
||||
void SendAdventureCount(uint32 count, uint32 total);
|
||||
void NewAdventure(int id, int theme, const char *text, int member_count, const char *members);
|
||||
void NewAdventure(int id, int theme, const char *text, int member_count, const char *members, uint32 avg_level);
|
||||
bool IsOnAdventure();
|
||||
void LeaveAdventure();
|
||||
void AdventureFinish(bool win, int theme, int points);
|
||||
@@ -1613,6 +1613,7 @@ protected:
|
||||
int adv_requested_theme;
|
||||
int adv_requested_id;
|
||||
char *adv_requested_data;
|
||||
uint32 adv_requested_average_lvl;
|
||||
int adv_requested_member_count;
|
||||
char *adv_data;
|
||||
|
||||
|
||||
@@ -9037,14 +9037,18 @@ void Client::Handle_OP_LDoNButton(const EQApplicationPacket *app)
|
||||
bool* p = (bool*)app->pBuffer;
|
||||
if (*p == true)
|
||||
{
|
||||
auto pack =
|
||||
new ServerPacket(ServerOP_AdventureRequestCreate,
|
||||
sizeof(ServerAdventureRequestCreate_Struct) + (64 * adv_requested_member_count));
|
||||
ServerAdventureRequestCreate_Struct *sac = (ServerAdventureRequestCreate_Struct*)pack->pBuffer;
|
||||
auto pack = new ServerPacket(
|
||||
ServerOP_AdventureRequestCreate,
|
||||
sizeof(ServerAdventureRequestCreate_Struct) +
|
||||
(64 * adv_requested_member_count));
|
||||
|
||||
ServerAdventureRequestCreate_Struct *sac = (ServerAdventureRequestCreate_Struct *) pack->pBuffer;
|
||||
|
||||
strcpy(sac->leader, GetName());
|
||||
sac->id = adv_requested_id;
|
||||
sac->theme = adv_requested_theme;
|
||||
sac->member_count = adv_requested_member_count;
|
||||
sac->average_level = adv_requested_average_lvl;
|
||||
memcpy((pack->pBuffer + sizeof(ServerAdventureRequestCreate_Struct)), adv_requested_data, (64 * adv_requested_member_count));
|
||||
worldserver.SendPacket(pack);
|
||||
delete pack;
|
||||
|
||||
@@ -6404,6 +6404,188 @@ XS(XS__createitem) {
|
||||
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
|
||||
quest package's XSUBs
|
||||
@@ -6608,6 +6790,20 @@ EXTERN_C XS(boot_quest) {
|
||||
newXS(strcpy(buf, "follow"), XS__follow, file);
|
||||
newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, 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, "getclassname"), XS__getclassname, file);
|
||||
newXS(strcpy(buf, "getcurrencyid"), XS__getcurrencyid, file);
|
||||
|
||||
+72
-1
@@ -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);
|
||||
}
|
||||
|
||||
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 { \
|
||||
cur = table[#name]; \
|
||||
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("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, 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;
|
||||
}
|
||||
|
||||
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 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;
|
||||
NPC *GetNPC() const;
|
||||
Mob *GetOwner() const;
|
||||
|
||||
@@ -1688,7 +1688,14 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
Client *c = entity_list.GetClientByName(ars->leader);
|
||||
if (c)
|
||||
{
|
||||
c->NewAdventure(ars->id, ars->theme, ars->text, ars->member_count, (const char*)(pack->pBuffer + sizeof(ServerAdventureRequestAccept_Struct)));
|
||||
c->NewAdventure(
|
||||
ars->id,
|
||||
ars->theme,
|
||||
ars->text,
|
||||
ars->member_count,
|
||||
(const char *) (pack->pBuffer + sizeof(ServerAdventureRequestAccept_Struct)),
|
||||
ars->average_level
|
||||
);
|
||||
c->ClearPendingAdventureRequest();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user