mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 02:31:03 +00:00
Require zone id to get expedition by instance id
This is a breaking api change eq.get_expedition_by_instance_id(instance_id) is replaced with eq.get_expedition_by_zone_instance(zone_id, instance_id) This replaces the FindCachedExpeditionByInstanceID method of obtaining expeditions via instance id with a new method that requires the dz zone id as well
This commit is contained in:
@@ -6070,7 +6070,7 @@ XS(XS__get_expedition) {
|
||||
Expedition* RETVAL = nullptr;
|
||||
if (zone && zone->GetInstanceID() != 0)
|
||||
{
|
||||
RETVAL = Expedition::FindCachedExpeditionByInstanceID(zone->GetInstanceID());
|
||||
RETVAL = Expedition::FindCachedExpeditionByZoneInstance(zone->GetZoneID(), zone->GetInstanceID());
|
||||
}
|
||||
|
||||
EXTEND(sp, 1); // grow stack, function had 0 arguments
|
||||
@@ -6101,16 +6101,17 @@ XS(XS__get_expedition_by_char_id) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS__get_expedition_by_instance_id);
|
||||
XS(XS__get_expedition_by_instance_id) {
|
||||
XS(XS__get_expedition_by_zone_instance);
|
||||
XS(XS__get_expedition_by_zone_instance) {
|
||||
dXSARGS;
|
||||
if (items != 1) {
|
||||
Perl_croak(aTHX_ "Usage: quest::GetExpeditionByInstanceID(uint16 instance_id)");
|
||||
if (items != 2) {
|
||||
Perl_croak(aTHX_ "Usage: quest::GetExpeditionByZoneInstance(uint16 zone_id, uint16 instance_id)");
|
||||
}
|
||||
|
||||
uint16 instance_id = (uint16)SvUV(ST(0));
|
||||
uint16 zone_id = (uint16)SvUV(ST(0));
|
||||
uint16 instance_id = (uint16)SvUV(ST(1));
|
||||
|
||||
Expedition* RETVAL = Expedition::FindCachedExpeditionByInstanceID(instance_id);
|
||||
Expedition* RETVAL = Expedition::FindCachedExpeditionByZoneInstance(zone_id, instance_id);
|
||||
|
||||
ST(0) = sv_newmortal();
|
||||
if (RETVAL) {
|
||||
@@ -6512,7 +6513,7 @@ EXTERN_C XS(boot_quest) {
|
||||
newXS(strcpy(buf, "getcurrencyid"), XS__getcurrencyid, file);
|
||||
newXS(strcpy(buf, "get_expedition"), XS__get_expedition, file);
|
||||
newXS(strcpy(buf, "get_expedition_by_char_id"), XS__get_expedition_by_char_id, file);
|
||||
newXS(strcpy(buf, "get_expedition_by_instance_id"), XS__get_expedition_by_instance_id, file);
|
||||
newXS(strcpy(buf, "get_expedition_by_zone_instance"), XS__get_expedition_by_zone_instance, file);
|
||||
newXS(strcpy(buf, "get_expedition_lockout_by_char_id"), XS__get_expedition_lockout_by_char_id, file);
|
||||
newXS(strcpy(buf, "get_expedition_lockouts_by_char_id"), XS__get_expedition_lockouts_by_char_id, file);
|
||||
newXS(strcpy(buf, "getinventoryslotid"), XS__getinventoryslotid, file);
|
||||
|
||||
Reference in New Issue
Block a user