mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-12 00:18:37 +00:00
[Quest API] Add Fling Overloads to Perl/Lua. (#2622)
* [Quest API] Add Fling Overload to Perl/Lua. # Perl - Add `$client->Fling(target_x, target_y, target_z)`. - Add `$client->Fling(target_x, target_y, target_z, ignore_los)`. - Add `$client->Fling(target_x, target_y, target_z, ignore_los, clipping)`. # Lua - Add `client:Fling(target_x, target_y, target_z)`. - Add `client:Fling(target_x, target_y, target_z, ignore_los)`. - Add `client:Fling(target_x, target_y, target_z, ignore_los, clipping)`. # Notes - These overloads calculate the speed based on the distance automatically. * Update client.cpp * Update client.cpp * Update client.cpp * clip_through_walls
This commit is contained in:
+20
-2
@@ -1931,6 +1931,21 @@ void Perl_Client_MovePCDynamicZone(Client* self, perl::scalar zone, int zone_ver
|
||||
self->MovePCDynamicZone(zone_id, zone_version, msg_if_invalid);
|
||||
}
|
||||
|
||||
void Perl_Client_Fling(Client* self, float target_x, float target_y, float target_z)
|
||||
{
|
||||
self->Fling(0, target_x, target_y, target_z, false, false, true);
|
||||
}
|
||||
|
||||
void Perl_Client_Fling(Client* self, float target_x, float target_y, float target_z, bool ignore_los)
|
||||
{
|
||||
self->Fling(0, target_x, target_y, target_z, ignore_los, false, true);
|
||||
}
|
||||
|
||||
void Perl_Client_Fling(Client* self, float target_x, float target_y, float target_z, bool ignore_los, bool clip_through_walls)
|
||||
{
|
||||
self->Fling(0, target_x, target_y, target_z, ignore_los, clip_through_walls, true);
|
||||
}
|
||||
|
||||
void Perl_Client_Fling(Client* self, float value, float target_x, float target_y, float target_z)
|
||||
{
|
||||
self->Fling(value, target_x, target_y, target_z);
|
||||
@@ -1941,9 +1956,9 @@ void Perl_Client_Fling(Client* self, float value, float target_x, float target_y
|
||||
self->Fling(value, target_x, target_y, target_z, ignore_los);
|
||||
}
|
||||
|
||||
void Perl_Client_Fling(Client* self, float value, float target_x, float target_y, float target_z, bool ignore_los, bool clipping)
|
||||
void Perl_Client_Fling(Client* self, float value, float target_x, float target_y, float target_z, bool ignore_los, bool clip_through_walls)
|
||||
{
|
||||
self->Fling(value, target_x, target_y, target_z, ignore_los, clipping);
|
||||
self->Fling(value, target_x, target_y, target_z, ignore_los, clip_through_walls);
|
||||
}
|
||||
|
||||
bool Perl_Client_HasDisciplineLearned(Client* self, uint16 spell_id)
|
||||
@@ -2914,6 +2929,9 @@ void perl_register_client()
|
||||
package.add("FindEmptyMemSlot", &Perl_Client_FindEmptyMemSlot);
|
||||
package.add("FindMemmedSpellBySlot", &Perl_Client_FindMemmedSpellBySlot);
|
||||
package.add("FindMemmedSpellBySpellID", &Perl_Client_FindMemmedSpellBySpellID);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float))&Perl_Client_Fling);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float, bool))&Perl_Client_Fling);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float, bool, bool))&Perl_Client_Fling);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float, float))&Perl_Client_Fling);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float, float, bool))&Perl_Client_Fling);
|
||||
package.add("Fling", (void(*)(Client*, float, float, float, float, bool, bool))&Perl_Client_Fling);
|
||||
|
||||
Reference in New Issue
Block a user