mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-04 00:02:24 +00:00
[Bug Fix] quest::MovePCInstance() Arguments Fix. (#2020)
- Logic made the method return an "error" when not using last parameter.
This commit is contained in:
parent
9f0989ee2d
commit
58fafd0f9c
@ -3350,19 +3350,19 @@ XS(XS__MovePCInstance) {
|
|||||||
if (items != 5 && items != 6)
|
if (items != 5 && items != 6)
|
||||||
Perl_croak(aTHX_ "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])");
|
Perl_croak(aTHX_ "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])");
|
||||||
|
|
||||||
int zone_id = (int) SvIV(ST(0));
|
int zone_id = (int) SvIV(ST(0));
|
||||||
int instanceid = (int) SvIV(ST(1));
|
int instance_id = (int) SvIV(ST(1));
|
||||||
float x = (float) SvNV(ST(2));
|
float x = (float) SvNV(ST(2));
|
||||||
float y = (float) SvNV(ST(3));
|
float y = (float) SvNV(ST(3));
|
||||||
float z = (float) SvNV(ST(4));
|
float z = (float) SvNV(ST(4));
|
||||||
|
float heading = 0.0f;
|
||||||
|
|
||||||
if (items == 4) {
|
if (items == 6) {
|
||||||
quest_manager.MovePCInstance(zone_id, instanceid, glm::vec4(x, y, z, 0.0f));
|
heading = (float) SvNV(ST(5));
|
||||||
} else {
|
|
||||||
float heading = (float) SvNV(ST(5));
|
|
||||||
quest_manager.MovePCInstance(zone_id, instanceid, glm::vec4(x, y, z, heading));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quest_manager.MovePCInstance(zone_id, instance_id, glm::vec4(x, y, z, heading));
|
||||||
|
|
||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user