-
Notifications
You must be signed in to change notification settings - Fork 402
/
embparser_api.cpp
6956 lines (5868 loc) · 236 KB
/
embparser_api.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/features.h"
#include "../common/content/world_content_service.h"
#include "../common/zone_store.h"
#ifdef EMBPERL
#ifdef EMBPERL_XS
#include "../common/global_define.h"
#include "../common/misc_functions.h"
#include "dialogue_window.h"
#include "embperl.h"
#include "entity.h"
#include "expedition.h"
#include "queryserv.h"
#include "questmgr.h"
#include "zone.h"
#include "data_bucket.h"
#include <cctype>
extern Zone *zone;
extern QueryServ *QServ;
#ifdef EMBPERL_XS_CLASSES
//Any creation of new Client objects gets the current quest Client
Client* Perl__Client_new()
{
return quest_manager.GetInitiator();
}
//Any creation of new NPC objects gets the current quest NPC
NPC* Perl__NPC_new()
{
return quest_manager.GetNPC();
}
//Any creation of new NPC objects gets the current quest NPC
EntityList* Perl__EntityList_new()
{
return &entity_list;
}
//Any creation of new inventory gets the curreny inventory
EQ::InventoryProfile* Perl__Inventory_new()
{
return quest_manager.GetInventory();
}
//Any creation of new quest items gets the current quest item
EQ::ItemInstance* Perl__QuestItem_new()
{
return quest_manager.GetQuestItem();
}
//Any creation of new Spells gets the current Spell
SPDat_Spell_Struct* Perl__Spell_new()
{
// should be safe, it's read only in perl (could also use proxy lika lua)
return const_cast<SPDat_Spell_Struct*>(quest_manager.GetQuestSpell());
}
#endif //EMBPERL_XS_CLASSES
void Perl__echo(int emote_color_id, const char* message)
{
quest_manager.echo(emote_color_id, message);
}
void Perl__say(const char* message)
{
Journal::Options opts;
// we currently default to these
opts.speak_mode = Journal::SpeakMode::Say;
opts.journal_mode = Journal::Mode::Log2;
opts.language = Language::CommonTongue;
opts.message_type = Chat::NPCQuestSay;
quest_manager.say(message, opts);
}
void Perl__say(const char* message, uint8 language_id)
{
Journal::Options opts;
opts.speak_mode = Journal::SpeakMode::Say;
opts.journal_mode = Journal::Mode::Log2;
opts.language = language_id;
opts.message_type = Chat::NPCQuestSay;
quest_manager.say(message, opts);
}
void Perl__say(const char* message, uint8 language_id, int message_type)
{
Journal::Options opts;
opts.speak_mode = Journal::SpeakMode::Say;
opts.journal_mode = Journal::Mode::Log2;
opts.language = language_id;
opts.message_type = message_type;
quest_manager.say(message, opts);
}
void Perl__say(const char* message, uint8 language_id, int message_type, int speak_mode)
{
Journal::Options opts;
opts.speak_mode = static_cast<Journal::SpeakMode>(speak_mode);
opts.journal_mode = Journal::Mode::Log2;
opts.language = language_id;
opts.message_type = message_type;
quest_manager.say(message, opts);
}
void Perl__say(const char* message, uint8 language_id, int message_type, int speak_mode, int journal_mode)
{
Journal::Options opts;
opts.speak_mode = static_cast<Journal::SpeakMode>(speak_mode);
opts.journal_mode = static_cast<Journal::Mode>(journal_mode);
opts.language = language_id;
opts.message_type = message_type;
quest_manager.say(message, opts);
}
void Perl__me(const char* message)
{
quest_manager.me(message);
}
void Perl__summonitem(int item_id)
{
quest_manager.summonitem(item_id);
}
void Perl__summonitem(int item_id, int charges)
{
quest_manager.summonitem(item_id, charges);
}
void Perl__write(const char* file, const char* message)
{
quest_manager.write(file, message);
}
int Perl__spawn(int npc_type_id, int grid_id, int unused, float x, float y, float z)
{
auto position = glm::vec4(x, y, z, 0.0f);
Mob* mob = quest_manager.spawn2(npc_type_id, grid_id, unused, position);
return mob ? mob->GetID() : 0;
}
int Perl__spawn2(int npc_type_id, int grid_id, int unused, float x, float y, float z, float heading)
{
auto position = glm::vec4(x, y, z, heading);
Mob* mob = quest_manager.spawn2(npc_type_id, grid_id, unused, position);
return mob ? mob->GetID() : 0;
}
int Perl__unique_spawn(int npc_type_id, int grid_id, int unused, float x, float y, float z)
{
auto position = glm::vec4(x, y, z, 0.0f);
Mob* mob = quest_manager.unique_spawn(npc_type_id, grid_id, unused, position);
return mob ? mob->GetID() : 0;
}
int Perl__unique_spawn(int npc_type_id, int grid_id, int unused, float x, float y, float z, float heading)
{
auto position = glm::vec4(x, y, z, heading);
Mob* mob = quest_manager.unique_spawn(npc_type_id, grid_id, unused, position);
return mob ? mob->GetID() : 0;
}
int Perl__spawn_from_spawn2(uint32_t spawn2_id)
{
Mob* mob = quest_manager.spawn_from_spawn2(spawn2_id);
return mob ? mob->GetID() : 0;
}
void Perl__enable_spawn2(uint32_t spawn2_id)
{
quest_manager.enable_spawn2(spawn2_id);
}
void Perl__disable_spawn2(uint32_t spawn2_id)
{
quest_manager.disable_spawn2(spawn2_id);
}
void Perl__setstat(int stat_id, int int_value)
{
quest_manager.setstat(stat_id, int_value);
}
void Perl__incstat(int stat_id, int int_value)
{
quest_manager.incstat(stat_id, int_value);
}
int Perl__getinventoryslotid(std::string identifier)
{
int result = EQ::invslot::SLOT_INVALID;
for (std::string::size_type i = 0; i < identifier.size(); ++i)
identifier[i] = std::tolower(identifier[i]);
if (identifier.find('.') == std::string::npos) {
if (identifier == "invalid") result = EQ::invslot::SLOT_INVALID;
else if (identifier == "charm") result = EQ::invslot::slotCharm;
else if (identifier == "ear1") result = EQ::invslot::slotEar1;
else if (identifier == "head") result = EQ::invslot::slotHead;
else if (identifier == "face") result = EQ::invslot::slotFace;
else if (identifier == "ear2") result = EQ::invslot::slotEar2;
else if (identifier == "neck") result = EQ::invslot::slotNeck;
else if (identifier == "shoulders") result = EQ::invslot::slotShoulders;
else if (identifier == "arms") result = EQ::invslot::slotArms;
else if (identifier == "back") result = EQ::invslot::slotBack;
else if (identifier == "wrist1") result = EQ::invslot::slotWrist1;
else if (identifier == "wrist2") result = EQ::invslot::slotWrist2;
else if (identifier == "range") result = EQ::invslot::slotRange;
else if (identifier == "hands") result = EQ::invslot::slotHands;
else if (identifier == "primary") result = EQ::invslot::slotPrimary;
else if (identifier == "secondary") result = EQ::invslot::slotSecondary;
else if (identifier == "finger1") result = EQ::invslot::slotFinger1;
else if (identifier == "finger2") result = EQ::invslot::slotFinger2;
else if (identifier == "chest") result = EQ::invslot::slotChest;
else if (identifier == "legs") result = EQ::invslot::slotLegs;
else if (identifier == "feet") result = EQ::invslot::slotFeet;
else if (identifier == "waist") result = EQ::invslot::slotWaist;
else if (identifier == "powersource") result = EQ::invslot::slotPowerSource;
else if (identifier == "ammo") result = EQ::invslot::slotAmmo;
else if (identifier == "general1") result = EQ::invslot::slotGeneral1;
else if (identifier == "general2") result = EQ::invslot::slotGeneral2;
else if (identifier == "general3") result = EQ::invslot::slotGeneral3;
else if (identifier == "general4") result = EQ::invslot::slotGeneral4;
else if (identifier == "general5") result = EQ::invslot::slotGeneral5;
else if (identifier == "general6") result = EQ::invslot::slotGeneral6;
else if (identifier == "general7") result = EQ::invslot::slotGeneral7;
else if (identifier == "general8") result = EQ::invslot::slotGeneral8;
else if (identifier == "general9") result = EQ::invslot::slotGeneral9;
else if (identifier == "general10") result = EQ::invslot::slotGeneral10;
else if (identifier == "cursor") result = EQ::invslot::slotCursor;
else if (identifier == "tradeskill") result = EQ::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE;
else if (identifier == "augment") result = EQ::invslot::SLOT_AUGMENT_GENERIC_RETURN;
}
else {
if (identifier == "possessions.begin") result = EQ::invslot::POSSESSIONS_BEGIN;
else if (identifier == "possessions.end") result = EQ::invslot::POSSESSIONS_END;
else if (identifier == "equipment.begin") result = EQ::invslot::EQUIPMENT_BEGIN;
else if (identifier == "equipment.end") result = EQ::invslot::EQUIPMENT_END;
else if (identifier == "general.begin") result = EQ::invslot::GENERAL_BEGIN;
else if (identifier == "general.end") result = EQ::invslot::GENERAL_END;
else if (identifier == "possessionsbags.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN;
else if (identifier == "possessionsbags.end") result = EQ::invbag::CURSOR_BAG_END;
else if (identifier == "generalbags.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN;
else if (identifier == "generalbags.end") result = EQ::invbag::GENERAL_BAGS_END;
else if (identifier == "general1bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN;
else if (identifier == "general1bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 9;
else if (identifier == "general2bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 10;
else if (identifier == "general2bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 19;
else if (identifier == "general3bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 20;
else if (identifier == "general3bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 29;
else if (identifier == "general4bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 30;
else if (identifier == "general4bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 39;
else if (identifier == "general5bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 40;
else if (identifier == "general5bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 49;
else if (identifier == "general6bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 50;
else if (identifier == "general6bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 59;
else if (identifier == "general7bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 60;
else if (identifier == "general7bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 69;
else if (identifier == "general8bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 70;
else if (identifier == "general8bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 79;
else if (identifier == "general9bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 80;
else if (identifier == "general9bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 89;
else if (identifier == "general10bag.begin") result = EQ::invbag::GENERAL_BAGS_BEGIN + 90;
else if (identifier == "general10bag.end") result = EQ::invbag::GENERAL_BAGS_BEGIN + 99;
else if (identifier == "cursorbag.begin") result = EQ::invbag::CURSOR_BAG_BEGIN;
else if (identifier == "cursorbag.end") result = EQ::invbag::CURSOR_BAG_END;
else if (identifier == "bank.begin") result = EQ::invslot::BANK_BEGIN;
else if (identifier == "bank.end") result = EQ::invslot::BANK_END;
else if (identifier == "bankbags.begin") result = EQ::invbag::BANK_BAGS_BEGIN;
else if (identifier == "bankbags.end") result = EQ::invbag::BANK_BAGS_END;
else if (identifier == "sharedbank.begin") result = EQ::invslot::SHARED_BANK_BEGIN;
else if (identifier == "sharedbank.end") result = EQ::invslot::SHARED_BANK_END;
else if (identifier == "sharedbankbags.begin") result = EQ::invbag::SHARED_BANK_BAGS_BEGIN;
else if (identifier == "sharedbankbags.end") result = EQ::invbag::SHARED_BANK_BAGS_END;
else if (identifier == "bagslot.begin") result = EQ::invbag::SLOT_BEGIN;
else if (identifier == "bagslot.end") result = EQ::invbag::SLOT_END;
else if (identifier == "augsocket.begin") result = EQ::invaug::SOCKET_BEGIN;
else if (identifier == "augsocket.end") result = EQ::invaug::SOCKET_END;
}
return result;
}
void Perl__castspell(uint16 spell_id, uint16 target_id)
{
quest_manager.castspell(spell_id, target_id);
}
void Perl__selfcast(uint16 spell_id)
{
quest_manager.selfcast(spell_id);
}
void Perl__addloot(int item_id)
{
quest_manager.addloot(item_id);
}
void Perl__addloot(int item_id, int charges)
{
quest_manager.addloot(item_id, charges);
}
void Perl__addloot(int item_id, int charges, bool equip_item)
{
quest_manager.addloot(item_id, charges, equip_item);
}
void Perl__zone(const char* zone_name)
{
quest_manager.Zone(zone_name);
}
void Perl__zonegroup(const char* zone_name)
{
quest_manager.ZoneGroup(zone_name);
}
void Perl__zoneraid(const char* zone_name)
{
quest_manager.ZoneRaid(zone_name);
}
bool Perl__hastimer(std::string timer_name)
{
return quest_manager.hastimer(timer_name);
}
bool Perl__ispausedtimer(std::string timer_name)
{
return quest_manager.ispausedtimer(timer_name);
}
uint32_t Perl__getremainingtimeMS(std::string timer_name)
{
return quest_manager.getremainingtimeMS(timer_name);
}
uint32_t Perl__gettimerdurationMS(std::string timer_name)
{
return quest_manager.gettimerdurationMS(timer_name);
}
void Perl__settimer(std::string timer_name, uint32 seconds)
{
quest_manager.settimer(timer_name, seconds);
}
void Perl__settimer(std::string timer_name, uint32 seconds, Mob* m)
{
quest_manager.settimer(timer_name, seconds, m);
}
void Perl__settimer(std::string timer_name, uint32 seconds, EQ::ItemInstance* inst)
{
quest_manager.settimerMS(timer_name, seconds * 1000, inst);
}
void Perl__settimerMS(std::string timer_name, uint32 milliseconds)
{
quest_manager.settimerMS(timer_name, milliseconds);
}
void Perl__settimerMS(std::string timer_name, uint32 milliseconds, Mob* m)
{
quest_manager.settimerMS(timer_name, milliseconds, m);
}
void Perl__settimerMS(std::string timer_name, uint32 milliseconds, EQ::ItemInstance* inst)
{
quest_manager.settimerMS(timer_name, milliseconds, inst);
}
void Perl__pausetimer(std::string timer_name)
{
quest_manager.pausetimer(timer_name);
}
void Perl__resumetimer(std::string timer_name)
{
quest_manager.resumetimer(timer_name);
}
void Perl__stoptimer(std::string timer_name)
{
quest_manager.stoptimer(timer_name);
}
void Perl__stopalltimers()
{
quest_manager.stopalltimers();
}
void Perl__emote(const char* message)
{
quest_manager.emote(message);
}
void Perl__shout(const char* message)
{
quest_manager.shout(message);
}
void Perl__shout2(const char* message)
{
quest_manager.shout2(message);
}
void Perl__gmsay(const char* message)
{
quest_manager.gmsay(message, Chat::LightGray, false, 0, AccountStatus::QuestTroupe);
}
void Perl__gmsay(const char* message, int color_id)
{
quest_manager.gmsay(message, color_id, false, 0, AccountStatus::QuestTroupe);
}
void Perl__gmsay(const char* message, int color_id, bool send_to_world)
{
quest_manager.gmsay(message, color_id, send_to_world, 0, AccountStatus::QuestTroupe);
}
void Perl__gmsay(const char* message, int color_id, bool send_to_world, int to_guilddbid)
{
quest_manager.gmsay(message, color_id, send_to_world, to_guilddbid, AccountStatus::QuestTroupe);
}
void Perl__gmsay(const char* message, int color_id, bool send_to_world, int to_guilddbid, int to_minstatus)
{
quest_manager.gmsay(message, color_id, send_to_world, to_guilddbid, to_minstatus);
}
void Perl__depop()
{
quest_manager.depop();
}
void Perl__depop(int npc_type_id)
{
quest_manager.depop(npc_type_id);
}
void Perl__depop_withtimer()
{
quest_manager.depop_withtimer();
}
void Perl__depop_withtimer(int npc_type_id)
{
quest_manager.depop_withtimer(npc_type_id);
}
void Perl__depopall()
{
quest_manager.depopall();
}
void Perl__depopall(int npc_type_id)
{
quest_manager.depopall(npc_type_id);
}
void Perl__settarget(const char* target_enum, int target_id)
{
quest_manager.settarget(target_enum, target_id);
}
void Perl__follow(int entity_id)
{
quest_manager.follow(entity_id, 10);
}
void Perl__follow(int entity_id, int distance)
{
quest_manager.follow(entity_id, distance);
}
void Perl__sfollow()
{
quest_manager.sfollow();
}
void Perl__changedeity(uint32 deity_id)
{
quest_manager.changedeity(deity_id);
}
void Perl__exp(int amount)
{
quest_manager.exp(amount);
}
void Perl__level(int new_level)
{
quest_manager.level(new_level);
}
void Perl__traindisc(int tome_item_id)
{
quest_manager.traindisc(tome_item_id);
}
bool Perl__isdisctome(int item_id)
{
return quest_manager.isdisctome(item_id);
}
std::string Perl__getracename(uint16 race_id)
{
return quest_manager.getracename(race_id);
}
std::string Perl__getspellname(uint32 spell_id)
{
return quest_manager.getspellname(spell_id);
}
uint8 Perl__get_spell_level(uint16 spell_id, uint8 class_id)
{
const auto spell_level = GetSpellLevel(spell_id, class_id);
return spell_level > RuleI(Character, MaxLevel) ? UINT8_MAX : spell_level;
}
std::string Perl__getskillname(int skill_id)
{
return quest_manager.getskillname(skill_id);
}
void Perl__safemove()
{
quest_manager.safemove();
}
void Perl__rain(int weather)
{
quest_manager.rain(weather);
}
void Perl__snow(int weather)
{
quest_manager.snow(weather);
}
void Perl__surname(std::string last_name)
{
quest_manager.surname(last_name);
}
void Perl__permaclass(int class_id)
{
quest_manager.permaclass(class_id);
}
void Perl__permarace(int race_id)
{
quest_manager.permarace(race_id);
}
void Perl__permagender(int gender_id)
{
quest_manager.permagender(gender_id);
}
int Perl__scribespells(int max_level)
{
return quest_manager.scribespells(max_level);
}
int Perl__scribespells(int max_level, int min_level)
{
return quest_manager.scribespells(max_level, min_level);
}
int Perl__traindiscs(int max_level)
{
return quest_manager.traindiscs(max_level);
}
int Perl__traindiscs(int max_level, int min_level)
{
return quest_manager.traindiscs(max_level, min_level);
}
void Perl__unscribespells()
{
quest_manager.unscribespells();
}
void Perl__untraindiscs()
{
quest_manager.untraindiscs();
}
void Perl__givecash(uint32 copper)
{
quest_manager.givecash(copper);
}
void Perl__givecash(uint32 copper, uint32 silver)
{
quest_manager.givecash(copper, silver);
}
void Perl__givecash(uint32 copper, uint32 silver, uint32 gold)
{
quest_manager.givecash(copper, silver, gold);
}
void Perl__givecash(uint32 copper, uint32 silver, uint32 gold, uint32 platinum)
{
quest_manager.givecash(copper, silver, gold, platinum);
}
void Perl__pvp(const char* mode)
{
quest_manager.pvp(mode);
}
void Perl__movepc(int zone_id, float x, float y, float z)
{
quest_manager.movepc(zone_id, x, y, z, 0.0f);
}
void Perl__movepc(int zone_id, float x, float y, float z, float heading)
{
quest_manager.movepc(zone_id, x, y, z, heading);
}
void Perl__gmmove(float x, float y, float z)
{
quest_manager.gmmove(x, y, z);
}
void Perl__movegrp(int zone_id, float x, float y, float z)
{
quest_manager.movegrp(zone_id, x, y, z);
}
void Perl__doanim(int animation_id)
{
quest_manager.doanim(animation_id);
}
void Perl__doanim(int animation_id, int animation_speed)
{
quest_manager.doanim(animation_id, animation_speed);
}
void Perl__doanim(int animation_id, int animation_speed, bool ackreq)
{
quest_manager.doanim(animation_id, animation_speed, ackreq);
}
void Perl__doanim(int animation_id, int animation_speed, bool ackreq, int filter)
{
quest_manager.doanim(animation_id, animation_speed, ackreq, static_cast<eqFilterType>(filter));
}
void Perl__addskill(int skill_id, int value)
{
quest_manager.addskill(skill_id, value);
}
void Perl__setlanguage(uint8 language_id, uint8 language_skill)
{
quest_manager.setlanguage(language_id, language_skill);
}
void Perl__setskill(int skill_id, int value)
{
quest_manager.setskill(skill_id, value);
}
void Perl__setallskill(int value)
{
quest_manager.setallskill(value);
}
void Perl__attack(const char* client_name)
{
quest_manager.attack(client_name);
}
void Perl__attacknpc(int npc_entity_id)
{
quest_manager.attacknpc(npc_entity_id);
}
void Perl__attacknpctype(int npc_type_id)
{
quest_manager.attacknpctype(npc_type_id);
}
void Perl__save()
{
quest_manager.save();
}
void Perl__faction(int faction_id, int value)
{
quest_manager.faction(faction_id, value, 0);
}
void Perl__faction(int faction_id, int value, int temp)
{
quest_manager.faction(faction_id, value, temp);
}
void Perl__rewardfaction(int faction_id, int value)
{
quest_manager.rewardfaction(faction_id, value);
}
void Perl__setsky(uint8 new_sky)
{
quest_manager.setsky(new_sky);
}
void Perl__setguild(uint32_t guild_id, uint8_t guild_rank_id)
{
quest_manager.setguild(guild_id, guild_rank_id);
}
void Perl__createguild(const char* guild_name, const char* leader_name)
{
quest_manager.CreateGuild(guild_name, leader_name);
}
void Perl__settime(int new_hour, int new_min)
{
quest_manager.settime(new_hour, new_min);
}
void Perl__settime(int new_hour, int new_min, bool update_world)
{
quest_manager.settime(new_hour, new_min, update_world);
}
void Perl__itemlink(int item_id)
{
quest_manager.itemlink(item_id);
}
void Perl__signalwith(int npc_id, int signal_id)
{
quest_manager.signalwith(npc_id, signal_id);
}
void Perl__signalwith(int npc_id, int signal_id, int wait_ms)
{
quest_manager.signalwith(npc_id, signal_id, wait_ms);
}
void Perl__signal(int npc_id)
{
quest_manager.signal(npc_id);
}
void Perl__signal(int npc_id, int wait_ms)
{
quest_manager.signal(npc_id, wait_ms);
}
void Perl__setglobal(const char* key, const char* value, int options, const char* duration)
{
quest_manager.setglobal(key, value, options, duration);
}
void Perl__targlobal(const char* key, const char* value, const char* duration, int npc_id, int char_id, int zone_id)
{
quest_manager.targlobal(key, value, duration, npc_id, char_id, zone_id);
}
void Perl__delglobal(const char* key)
{
quest_manager.delglobal(key);
}
void Perl__ding()
{
quest_manager.ding();
}
void Perl__rebind(int zone_id, float x, float y, float z)
{
quest_manager.rebind(zone_id, glm::vec3(x, y, z));
}
void Perl__rebind(int zone_id, float x, float y, float z, float heading)
{
quest_manager.rebind(zone_id, glm::vec4(x, y, z, heading));
}
void Perl__start(int waypoint)
{
quest_manager.start(waypoint);
}
void Perl__stop()
{
quest_manager.stop();
}
void Perl__pause(int duration_ms)
{
quest_manager.pause(duration_ms);
}
void Perl__moveto(float x, float y, float z)
{
quest_manager.moveto(glm::vec4(x, y, z, 0.0f), false);
}
void Perl__moveto(float x, float y, float z, float h)
{
quest_manager.moveto(glm::vec4(x, y, z, h), false);
}
void Perl__moveto(float x, float y, float z, float h, bool save_guard_location)
{
quest_manager.moveto(glm::vec4(x, y, z, h), save_guard_location);
}
void Perl__resume()
{
quest_manager.resume();
}
void Perl__addldonpoints(uint32 theme_id, int points)
{
quest_manager.addldonpoints(theme_id, points);
}
void Perl__addldonwin(uint32 theme_id)
{
quest_manager.addldonwin(theme_id);
}
void Perl__removeldonwin(uint32 theme_id)
{
quest_manager.removeldonwin(theme_id);
}
void Perl__addldonloss(uint32 theme_id)
{
quest_manager.addldonloss(theme_id);
}
void Perl__removeldonloss(uint32 theme_id)
{
quest_manager.removeldonloss(theme_id);
}
void Perl__setnexthpevent(int at_mob_percentage)
{
quest_manager.setnexthpevent(at_mob_percentage);
}
void Perl__setnextinchpevent(int at_mob_percentage)
{
quest_manager.setnextinchpevent(at_mob_percentage);
}
void Perl__sethp(int mob_health_percentage)
{
quest_manager.sethp(mob_health_percentage);
}
void Perl__respawn(int npc_type_id, int grid_id)
{
quest_manager.respawn(npc_type_id, grid_id);
}
perl::scalar Perl__ChooseRandom(perl::array options)
{
int index = zone->random.Int(0, static_cast<int>(options.size()) - 1);
return options[index];
}
void Perl__set_proximity(float min_x, float max_x, float min_y, float max_y)
{
quest_manager.set_proximity(min_x, max_x, min_y, max_y);
}
void Perl__set_proximity(float min_x, float max_x, float min_y, float max_y, float min_z, float max_z)
{
quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z);
}
void Perl__set_proximity(float min_x, float max_x, float min_y, float max_y, float min_z, float max_z, bool enable_say)
{
quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z, enable_say);
}
void Perl__clear_proximity()
{
quest_manager.clear_proximity();
}
void Perl__enable_proximity_say()
{
quest_manager.enable_proximity_say();
}
void Perl__disable_proximity_say()
{
quest_manager.disable_proximity_say();
}
void Perl__setanim(int npc_type_id, int appearance_number)
{
quest_manager.setanim(npc_type_id, appearance_number);
}
void Perl__showgrid(int grid_id)
{
quest_manager.showgrid(grid_id);
}
void Perl__spawn_condition(const char* zone_short, uint16 condition_id, int16 value)
{
quest_manager.spawn_condition(zone_short, zone->GetInstanceID(), condition_id, value);
}
void Perl__spawn_condition(const char* zone_short, uint32_t instance_id, uint16 condition_id, int16 value)
{
quest_manager.spawn_condition(zone_short, instance_id, condition_id, value);
}
int Perl__get_spawn_condition(const char* zone_short, uint16 condition_id)
{
return quest_manager.get_spawn_condition(zone_short, zone->GetInstanceID(), condition_id);
}
int Perl__get_spawn_condition(const char* zone_short, uint32 instance_id, uint16 condition_id)
{
return quest_manager.get_spawn_condition(zone_short, instance_id, condition_id);
}
void Perl__toggle_spawn_event(int event_id, bool is_enabled, bool is_strict, bool reset_base)
{
quest_manager.toggle_spawn_event(event_id, is_enabled, is_strict, reset_base);
}
bool Perl__has_zone_flag(int zone_id)
{
return quest_manager.has_zone_flag(zone_id);
}
void Perl__set_zone_flag(int zone_id)
{
quest_manager.set_zone_flag(zone_id);
}
void Perl__clear_zone_flag(int zone_id)
{
quest_manager.clear_zone_flag(zone_id);
}
bool Perl__summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)
{
auto position = glm::vec4(dest_x, dest_y, dest_z, dest_heading);
return quest_manager.summonburiedplayercorpse(char_id, position);
}
bool Perl__summonallplayercorpses(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)
{