10919 Commits

Author SHA1 Message Date
Alex King
f2ff4245c0
[Commands] Consolidate #merchant_close_shop and #merchant_open_shop to #merchantshop (#3433)
* [Commands] Consolidate #merchant_close_shop and #merchant_open_shop to #merchantshop

# Notes
- `#merchant_close_shop` and `#merchant_open_shop` are now consolidated into `#merchantshop`.
- Command now works on any type of merchant instead of just regular merchants.
- Can be used on Merchants, Discord Merchants, Adventure Merchants, Norrath's Keepers Merchants, Dark Reign Merchants, and Alternate Currency Merchants.

* Update merchantshop.cpp

* Update merchantshop.cpp

* Update merchantshop.cpp
2023-06-24 13:14:19 -05:00
Alex King
3ceb743195
[Commands] Add #showspells Command (#3429)
* [Commands] Add #showspells Command

# Notes
- Add `#showspells` command to show your or your target's memorized spells or learned disciplines.

* Update client.cpp
2023-06-24 13:13:02 -05:00
Alex King
021f04c17d
[Cleanup] Remove command_unlock from zone/command.h (#3431)
# Notes
- This is unused.
2023-06-24 13:10:19 -05:00
Alex King
f7e2dbdce6
[Cleanup] Remove command_packetprofile from zone/command.h (#3432)
* [Cleanup] Remove command_packetprofile from zone/command.h

# Notes
- This is unused.

* Update command.h
2023-06-24 13:10:05 -05:00
Alex King
2a679f1002
[Cleanup] Remove command_showpetspell in zone/command.h (#3430)
# Notes
- This is unused.
2023-06-24 13:09:51 -05:00
Alex King
8c9849ec73
[Commands] Delete #showbonusstats Command (#3437)
# Notes
- Never seen this used, also missing 99% of the bonuses data.
2023-06-24 13:09:39 -05:00
Alex King
10086ce97c
[Commands] Delete #spellinfo Command (#3438)
# Notes
- Never seen this used, also missing 99% of the spell data.
2023-06-24 13:09:23 -05:00
Alex King
223ae22f73
[Cleanup] Delete common/worldconn.cpp (#3436)
# Notes
- This is unused.
2023-06-24 13:05:45 -05:00
Alex King
4330494f57
[Commands] Cleanup #shownpcgloballoot and #showzonegloballoot Commands (#3440)
# Notes
- Cleanup messages and logic.
- Utilize Dialogue Window tables.
2023-06-24 13:03:37 -05:00
Alex King
64ae7e4529
[Cleanup] Remove _ClearWaypints() from zone/npc.h (#3445)
# Notes
- This is unused.
2023-06-24 12:58:28 -05:00
Alex King
58c3e267e1
[Cleanup] Remove GetACMit() from zone/merc.h (#3446)
# Notes
- This is unused.
2023-06-24 12:58:13 -05:00
Alex King
598483a1a4
[Cleanup] Remove acmod() from zone/merc.h (#3448)
# Notes
- This is unused.
2023-06-24 12:57:43 -05:00
Alex King
c1122022b9
[Cleanup] Remove DatabaseCastAccepted() from zone/npc.cpp and zone/npc.h (#3449)
* [Cleanup] Remove DatabaseCastAccepted() from zone/npc.cpp and zone/npc.h

# Notes
- This is unused.

* Update npc.h
2023-06-24 12:57:21 -05:00
Chris Miles
f2c4babd8d
[Database] Fix database version checking edge case issue (#3428) 2023-06-22 18:00:23 -05:00
Akkadius
5249b065d3 [Release] 22.15.3 v22.15.3 2023-06-19 19:15:42 -05:00
Alex King
9312261444
[Bug Fix] Fix improper condition in Water LOS checks (#3426)
# Notes
- Oversight on my part, should've been `==`, not `&&`.
2023-06-19 18:53:19 -04:00
Akkadius
85054fedf8 [Release] 22.15.2 (Hotfix) v22.15.2 2023-06-19 12:00:41 -05:00
Chris Miles
6d7beb1796
[Database] Fix multi-statement error reporting (#3425) 2023-06-19 11:55:32 -05:00
JJ
66e377fd4a
[Readme] Update new location of database updates (#3424) 2023-06-19 12:12:59 -04:00
Akkadius
67c4c26f70 [Release] 22.15.1 v22.15.1 2023-06-19 02:21:09 -05:00
Akkadius
b1c8e3890a [Release] 22.15.0 v22.15.0 2023-06-19 01:41:55 -05:00
Alex King
d6e06a19a7
[Commands] Add missing subcommands to #npcedit (#3423)
# Notes
- Add `#npcedit model [Race ID]` to edit an NPC's race model.
- Add `#npcedit heroic_strikethrough [Heroic Strikethrough]` to edit an NPC's heroic strikethrough.
- Add `#npcedit faction_amount [Faction Amount]` to edit an NPC's faction amount.
2023-06-19 01:40:27 -05:00
Akkadius
4092b3a2cb [Release] 22.15.0 2023-06-19 01:38:12 -05:00
Alex King
f4f0619618
[Bug Fix] Fix possible crash with #npcedit weapon (#3421)
# Notes
- Using `#npcedit weapon` without the secondary model had a chance to crash the zone you were in, i.e `#npcedit weapon 1`.

# Crash Logs
```txt
[06-18-2023 16:26:55] [Zone] [Crash] [New LWP 802548]
[06-18-2023 16:26:55] [Zone] [Crash] [New LWP 802549]
[06-18-2023 16:26:55] [Zone] [Crash] [New LWP 802550]
[06-18-2023 16:26:55] [Zone] [Crash] [New LWP 802551]
[06-18-2023 16:26:55] [Zone] [Crash] [Thread debugging using libthread_db enabled]
[06-18-2023 16:26:55] [Zone] [Crash] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[06-18-2023 16:26:55] [Zone] [Crash] 0x00007f22b2b14207 in __GI___wait4 (pid=819104, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
[06-18-2023 16:26:55] [Zone] [Crash] [Current thread is 1 (Thread 0x7f22b29eab00 (LWP 802540))]
[06-18-2023 16:26:55] [Zone] [Crash] #0  0x00007f22b2b14207 in __GI___wait4 (pid=819104, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
[06-18-2023 16:26:55] [Zone] [Crash] #1  0x000055e4451b6b6e in print_trace () at /home/eqemu/code/common/crash.cpp:281
[06-18-2023 16:26:55] [Zone] [Crash] #2  <signal handler called>
[06-18-2023 16:26:55] [Zone] [Crash] #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[06-18-2023 16:26:55] [Zone] [Crash] #4  0x00007f22b2a6e537 in __GI_abort () at abort.c:79
[06-18-2023 16:26:55] [Zone] [Crash] #5  0x00007f22b2e067ec in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:26:55] [Zone] [Crash] #6  0x00007f22b2e11966 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:26:55] [Zone] [Crash] #7  0x00007f22b2e119d1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:26:55] [Zone] [Crash] #8  0x00007f22b2e11c65 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:26:55] [Zone] [Crash] #9  0x00007f22b2e08faa in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:26:55] [Zone] [Crash] #10 0x000055e444216b48 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (this=0x7fff9bd06620, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.tcc:212
[06-18-2023 16:26:55] [Zone] [Crash] #11 0x000055e44420dd09 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char const*> (this=0x7fff9bd06620, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.h:247
[06-18-2023 16:26:55] [Zone] [Crash] #12 0x000055e444203977 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (this=0x7fff9bd06620, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.h:266
[06-18-2023 16:26:55] [Zone] [Crash] #13 0x000055e4441f93ef in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> > (this=0x7fff9bd06620, __s=0x0, __a=...) at /usr/include/c++/10/bits/basic_string.h:527
[06-18-2023 16:26:55] [Zone] [Crash] #14 0x000055e4445469df in command_npcedit (c=0x55e448292480, sep=0x7fff9bd09a20) at /home/eqemu/code/zone/gm_commands/npcedit.cpp:540
[06-18-2023 16:26:55] [Zone] [Crash] #15 0x000055e4444e2039 in command_realdispatch (c=0x55e448292480, message="#npcedit weapon 1", ignore_status=false) at /home/eqemu/code/zone/command.cpp:602
[06-18-2023 16:26:55] [Zone] [Crash] #16 0x000055e4443b03d3 in Client::ChannelMessageReceived (this=0x55e448292480, chan_num=8 '\b', language=0 '\000', lang_skill=100 'd', orig_message=0x55e44a69e314 "#npcedit weapon 1", targetname=0x55e44a69e280 "a_willowisp000", is_silent=false) at /home/eqemu/code/zone/client.cpp:1122
[06-18-2023 16:26:55] [Zone] [Crash] #17 0x000055e444454597 in Client::Handle_OP_ChannelMessage (this=0x55e448292480, app=0x55e449156a70) at /home/eqemu/code/zone/client_packet.cpp:4478
[06-18-2023 16:26:55] [Zone] [Crash] #18 0x000055e44443c5d2 in Client::HandlePacket (this=0x55e448292480, app=0x55e449156a70) at /home/eqemu/code/zone/client_packet.cpp:495
[06-18-2023 16:26:55] [Zone] [Crash] #19 0x000055e4444b7add in Client::Process (this=0x55e448292480) at /home/eqemu/code/zone/client_process.cpp:587
[06-18-2023 16:26:55] [Zone] [Crash] #20 0x000055e44472df12 in EntityList::MobProcess (this=0x55e445df07c0 <entity_list>) at /home/eqemu/code/zone/entity.cpp:510
[06-18-2023 16:26:55] [Zone] [Crash] #21 0x000055e444c149b0 in operator() (__closure=0x55e448dc9170, t=0x7fff9bd0c4a0) at /home/eqemu/code/zone/main.cpp:562
[06-18-2023 16:26:55] [Zone] [Crash] #22 0x000055e444c19fd2 in std::__invoke_impl<void, main(int, char**)::<lambda(EQ::Timer*)>&, EQ::Timer*>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
[06-18-2023 16:26:55] [Zone] [Crash] #23 0x000055e444c19da1 in std::__invoke_r<void, main(int, char**)::<lambda(EQ::Timer*)>&, EQ::Timer*>(struct {...} &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:110
[06-18-2023 16:26:55] [Zone] [Crash] #24 0x000055e444c19ac8 in std::_Function_handler<void(EQ::Timer*), main(int, char**)::<lambda(EQ::Timer*)> >::_M_invoke(const std::_Any_data &, EQ::Timer *&&) (__functor=..., __args#0=@0x7fff9bd0bea0: 0x7fff9bd0c4a0) at /usr/include/c++/10/bits/std_function.h:291
[06-18-2023 16:26:55] [Zone] [Crash] #25 0x000055e444c1f4c5 in std::function<void (EQ::Timer*)>::operator()(EQ::Timer*) const (this=0x7fff9bd0c4a8, __args#0=0x7fff9bd0c4a0) at /usr/include/c++/10/bits/std_function.h:622
[06-18-2023 16:26:55] [Zone] [Crash] #26 0x000055e444c1d265 in EQ::Timer::Execute (this=0x7fff9bd0c4a0) at /home/eqemu/code/zone/../common/net/../event/timer.h:61
[06-18-2023 16:26:55] [Zone] [Crash] #27 0x000055e444c1d023 in EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::operator()(uv_timer_s*) const (__closure=0x0, handle=0x55e44832b570) at /home/eqemu/code/zone/../common/net/../event/timer.h:38
[06-18-2023 16:26:55] [Zone] [Crash] #28 0x000055e444c1d043 in EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::_FUN(uv_timer_s*) () at /home/eqemu/code/zone/../common/net/../event/timer.h:39
[06-18-2023 16:26:55] [Zone] [Crash] #29 0x000055e4454afb5d in uv__run_timers (loop=loop@entry=0x7f22b29ea7a8) at /home/eqemu/code/submodules/libuv/src/timer.c:178
[06-18-2023 16:26:55] [Zone] [Crash] #30 0x000055e4454b3182 in uv_run (loop=0x7f22b29ea7a8, mode=UV_RUN_DEFAULT) at /home/eqemu/code/submodules/libuv/src/unix/core.c:393
[06-18-2023 16:26:55] [Zone] [Crash] #31 0x000055e444c1ceeb in EQ::EventLoop::Run (this=0x7f22b29ea7a8) at /home/eqemu/code/zone/../common/net/../event/event_loop.h:25
[06-18-2023 16:26:55] [Zone] [Crash] #32 0x000055e444c18b6e in main (argc=1, argv=0x7fff9bd0d568) at /home/eqemu/code/zone/main.cpp:591
[06-18-2023 16:26:55] [Zone] [Crash] [Inferior 1 (process 802540) detached]
```

```txt
[06-18-2023 16:29:51] [Zone] [Crash] [New LWP 819434]
[06-18-2023 16:29:51] [Zone] [Crash] [New LWP 819436]
[06-18-2023 16:29:51] [Zone] [Crash] [New LWP 819438]
[06-18-2023 16:29:51] [Zone] [Crash] [New LWP 819440]
[06-18-2023 16:29:51] [Zone] [Crash] [Thread debugging using libthread_db enabled]
[06-18-2023 16:29:51] [Zone] [Crash] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[06-18-2023 16:29:51] [Zone] [Crash] 0x00007f489d185207 in __GI___wait4 (pid=819646, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
[06-18-2023 16:29:51] [Zone] [Crash] [Current thread is 1 (Thread 0x7f489d05bb00 (LWP 819417))]
[06-18-2023 16:29:51] [Zone] [Crash] #0  0x00007f489d185207 in __GI___wait4 (pid=819646, stat_loc=0x0, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
[06-18-2023 16:29:51] [Zone] [Crash] #1  0x000055d58e442b6e in print_trace () at /home/eqemu/code/common/crash.cpp:281
[06-18-2023 16:29:51] [Zone] [Crash] #2  <signal handler called>
[06-18-2023 16:29:51] [Zone] [Crash] #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[06-18-2023 16:29:51] [Zone] [Crash] #4  0x00007f489d0df537 in __GI_abort () at abort.c:79
[06-18-2023 16:29:51] [Zone] [Crash] #5  0x00007f489d4777ec in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:29:51] [Zone] [Crash] #6  0x00007f489d482966 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:29:51] [Zone] [Crash] #7  0x00007f489d4829d1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:29:51] [Zone] [Crash] #8  0x00007f489d482c65 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:29:51] [Zone] [Crash] #9  0x00007f489d479faa in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[06-18-2023 16:29:51] [Zone] [Crash] #10 0x000055d58d4a2b48 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (this=0x7ffdbbca2500, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.tcc:212
[06-18-2023 16:29:51] [Zone] [Crash] #11 0x000055d58d499d09 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char const*> (this=0x7ffdbbca2500, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.h:247
[06-18-2023 16:29:51] [Zone] [Crash] #12 0x000055d58d48f977 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*> (this=0x7ffdbbca2500, __beg=0x0, __end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at /usr/include/c++/10/bits/basic_string.h:266
[06-18-2023 16:29:51] [Zone] [Crash] #13 0x000055d58d4853ef in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> > (this=0x7ffdbbca2500, __s=0x0, __a=...) at /usr/include/c++/10/bits/basic_string.h:527
[06-18-2023 16:29:51] [Zone] [Crash] #14 0x000055d58d7d29df in command_npcedit (c=0x55d59219f080, sep=0x7ffdbbca5900) at /home/eqemu/code/zone/gm_commands/npcedit.cpp:540
[06-18-2023 16:29:51] [Zone] [Crash] #15 0x000055d58d76e039 in command_realdispatch (c=0x55d59219f080, message="#npcedit weapon 1", ignore_status=false) at /home/eqemu/code/zone/command.cpp:602
[06-18-2023 16:29:51] [Zone] [Crash] #16 0x000055d58d63c3d3 in Client::ChannelMessageReceived (this=0x55d59219f080, chan_num=8 '\b', language=0 '\000', lang_skill=100 'd', orig_message=0x55d591b59b44 "#npcedit weapon 1", targetname=0x55d591b59ab0 "a_whiskered_bat002", is_silent=false) at /home/eqemu/code/zone/client.cpp:1122
[06-18-2023 16:29:51] [Zone] [Crash] #17 0x000055d58d6e0597 in Client::Handle_OP_ChannelMessage (this=0x55d59219f080, app=0x55d592711c60) at /home/eqemu/code/zone/client_packet.cpp:4478
[06-18-2023 16:29:51] [Zone] [Crash] #18 0x000055d58d6c85d2 in Client::HandlePacket (this=0x55d59219f080, app=0x55d592711c60) at /home/eqemu/code/zone/client_packet.cpp:495
[06-18-2023 16:29:51] [Zone] [Crash] #19 0x000055d58d743add in Client::Process (this=0x55d59219f080) at /home/eqemu/code/zone/client_process.cpp:587
[06-18-2023 16:29:51] [Zone] [Crash] #20 0x000055d58d9b9f12 in EntityList::MobProcess (this=0x55d58f07c7c0 <entity_list>) at /home/eqemu/code/zone/entity.cpp:510
[06-18-2023 16:29:51] [Zone] [Crash] #21 0x000055d58dea09b0 in operator() (__closure=0x55d591a07f10, t=0x7ffdbbca8380) at /home/eqemu/code/zone/main.cpp:562
[06-18-2023 16:29:51] [Zone] [Crash] #22 0x000055d58dea5fd2 in std::__invoke_impl<void, main(int, char**)::<lambda(EQ::Timer*)>&, EQ::Timer*>(std::__invoke_other, struct {...} &) (__f=...) at /usr/include/c++/10/bits/invoke.h:60
[06-18-2023 16:29:51] [Zone] [Crash] #23 0x000055d58dea5da1 in std::__invoke_r<void, main(int, char**)::<lambda(EQ::Timer*)>&, EQ::Timer*>(struct {...} &) (__fn=...) at /usr/include/c++/10/bits/invoke.h:110
[06-18-2023 16:29:51] [Zone] [Crash] #24 0x000055d58dea5ac8 in std::_Function_handler<void(EQ::Timer*), main(int, char**)::<lambda(EQ::Timer*)> >::_M_invoke(const std::_Any_data &, EQ::Timer *&&) (__functor=..., __args#0=@0x7ffdbbca7d80: 0x7ffdbbca8380) at /usr/include/c++/10/bits/std_function.h:291
[06-18-2023 16:29:51] [Zone] [Crash] #25 0x000055d58deab4c5 in std::function<void (EQ::Timer*)>::operator()(EQ::Timer*) const (this=0x7ffdbbca8388, __args#0=0x7ffdbbca8380) at /usr/include/c++/10/bits/std_function.h:622
[06-18-2023 16:29:51] [Zone] [Crash] #26 0x000055d58dea9265 in EQ::Timer::Execute (this=0x7ffdbbca8380) at /home/eqemu/code/zone/../common/net/../event/timer.h:61
[06-18-2023 16:29:51] [Zone] [Crash] #27 0x000055d58dea9023 in EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::operator()(uv_timer_s*) const (__closure=0x0, handle=0x55d590f6a610) at /home/eqemu/code/zone/../common/net/../event/timer.h:38
[06-18-2023 16:29:51] [Zone] [Crash] #28 0x000055d58dea9043 in EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::_FUN(uv_timer_s*) () at /home/eqemu/code/zone/../common/net/../event/timer.h:39
[06-18-2023 16:29:51] [Zone] [Crash] #29 0x000055d58e73bb5d in uv__run_timers (loop=loop@entry=0x7f489d05b7a8) at /home/eqemu/code/submodules/libuv/src/timer.c:178
[06-18-2023 16:29:51] [Zone] [Crash] #30 0x000055d58e73f182 in uv_run (loop=0x7f489d05b7a8, mode=UV_RUN_DEFAULT) at /home/eqemu/code/submodules/libuv/src/unix/core.c:393
[06-18-2023 16:29:51] [Zone] [Crash] #31 0x000055d58dea8eeb in EQ::EventLoop::Run (this=0x7f489d05b7a8) at /home/eqemu/code/zone/../common/net/../event/event_loop.h:25
[06-18-2023 16:29:51] [Zone] [Crash] #32 0x000055d58dea4b6e in main (argc=1, argv=0x7ffdbbca9448) at /home/eqemu/code/zone/main.cpp:591
[06-18-2023 16:29:51] [Zone] [Crash] [Inferior 1 (process 819417) detached]
```
2023-06-19 01:32:36 -05:00
Alex King
71ca7f9b39
[Cleanup] Default skill type to Hand to Hand in #npcedit meleetype (#3422)
# Notes
- We default to `28` in the database, so we need to default to this in `#npcedit meleetype` in case the operator only sets the first melee type this avoids the NPC hitting with `1H Blunt (Skill ID 0)`.
2023-06-19 01:32:13 -05:00
Chris Miles
5fcc83b4b6
[Database] Implement native database migrations in server (#2857)
* [Database] Implement native database updates in server

* Cleanup

* Delete db_update_manifest.txt

* Bots updates

* Final tweaks

* Revert manifest

* Tweaks

* Remove code from eqemu_server.pl

* Update database_update.cpp

* Add user prompt update skipping with timeouts

* Add termcolor IS_TTY is check

* Update database_conversions.cpp

* Remove large migrations

* Push

* fix headers.

* Remove last of non-bot large migrations

* Update database_update_manifest.cpp

* More purging

* Tweaks

* Bot migrations

* More work

* Tweaks

* Implement multi-statement query execution only for migrations

* Add CLI database:updates

* Add bootstrap commands

* Upload bootstrap sql's

* Update bot_tables_bootstrap.sql

* Update bot_tables_bootstrap.sql

* Add mercs:bootstrap and bots:bootstrap

* Update bot_tables_bootstrap.sql

* Update database.cpp

* Update bot_tables_bootstrap.sql

* More cleanup

* Add mercs:disable and bots:disable

* Update eqemu_server.pl

* Update eqemu_server.pl

* Update eqemu_server.pl

* Test cases

* Update eqemu_server.pl

* Delete 2023_05_08_character_tribute_primary_key.sql

* Post rebase fixes

* Post rebase tweaks

* Delete errant files

* Rebase files from master

* More adjustments

* Delete files no longer used

* Add missing migrations

* bots:bootstrap is now bots:enable

---------

Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
2023-06-19 01:31:07 -05:00
Chris Miles
1f25639dd3
[Release] 22.14.1 (#3420) v22.14.1 2023-06-18 15:38:50 -05:00
Chris Miles
2a176835b1
[CI] Build static linux binaries (#3419)
* [CI] Build static linux binaries

* Fix tests

* Update linux-build.sh
2023-06-18 15:19:25 -05:00
Chris Miles
fff3e77a6e
[Binaries] Add support for static linking (portable) binaries (#3417)
* [Binaries] Add support for static linking (portable) binaries

* Update CMakeLists.txt
2023-06-18 14:41:39 -05:00
Alex King
6efb9ec228
[Quest API] Add convert_money_to_string() to Perl/Lua (#3418)
* [Quest API] Add convert_money_to_string() to Perl/Lua

# Perl
- Add `quest::convert_money_to_string(money_hash)`.

# Lua
- Add `eq.convert_money_to_string(money_table)`.

# Notes
- Allows operators to convert money in to a readable string using `Strings::Money`.

# Examples

## Perl
```pl
sub EVENT_SAY {
	if ($text=~/#a/i) {
		my %money_data = (
			"platinum" => 3123,
			"gold" => 5692,
			"copper" => 9
		);
		quest::message(315, quest::convert_money_to_string(%money_data));
	}
}
```

## Lua
```lua
function event_say(e)
	if e.message:find("#a") then
		local money_data = {
			gold = 12,
			silver = 523904,
			copper = 3
		}
		eq.message(315, "Lua: " .. eq.convert_money_to_string(money_data))
	end
end```

* Update lua_general.cpp
2023-06-18 15:29:14 -04:00
Chris Miles
a663c822e8
[CLI] Add mercs:enable and mercs:disable commands (#3416)
* [CLI] Add `mercs:enable` and `mercs:disable` commands

* Update descriptions
2023-06-17 19:30:36 -05:00
Chris Miles
cf49b2fe49
[CLI] Add bots:enable and bots:disable commands (#3415)
* [CLI] Add `bots:enable` and `bots:disable` commands

* Add input warning
2023-06-17 18:48:47 -05:00
Chris Miles
b45e0e80b5
[Database] Add query multi statement execution support (#3414) 2023-06-17 18:20:13 -05:00
Chris Miles
3200145d01
[CLI] Console menu validation fixes (#3413) 2023-06-17 18:19:55 -05:00
Chris Miles
53563b9720
[Backups] Move world database:dump to use MySQL credentials file (#3410) 2023-06-17 18:16:29 -05:00
Chris Miles
1e22baf267
[Logging] Logging improvements, console silencing, terminal coloring (#3412) 2023-06-17 18:16:21 -05:00
Chris Miles
d99c3145ad
[Strings] Add more test cases for string utils (#3411) 2023-06-17 18:16:14 -05:00
Alex King
57243c6799
[Telnet] Add cross zone/world wide cast and move functionality to Telnet (#3409)
* [Telnet] Add cross zone/world wide cast and move functionality to Telnet

# Notes
- Add `czcast`, `czmove`, `wwcast`, and `wwmove` to Telnet functionality.
- Allows operators to cast spells across zone/world-wide and move players across zone/world-wide from telnet.

* Update console.cpp

* Update console.cpp

* Validation

* Update console.cpp
2023-06-17 17:50:37 -05:00
Paul Coene
1100668f21
[Targeting] Fix bug when using /tar on invalid target (#3407)
* [Targetting] Fix bug when using /tar on invalid target

* Removed instrumentation.
2023-06-17 16:53:59 -05:00
nytmyr
0cf454dc29
[Feature] Add Water Line of Sight Checks (#3408)
* [Feature] Add Water Line of Sight Checks

This adds rules to enable or disable checks for spells and autofire to prevent casting or autofire from landing if the player or bot do not match their targets plane in regards to water.

Currently players and bots can cast or autofire if they are not in the water but their target is and vice versa, this should not be possible.

RuleB(Combat, WaterMatchRequiredForAutoFireLoS) set to True (default) checks that both parties are in or out of the water for AutoFire to work.

RuleB(Spells, WaterMatchRequiredForLoS) set to True (default) checks that both parties are in or out of the water for spells to land.

* Cleanup.

* Cleanup.

* Cleanup.

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2023-06-17 12:32:15 -05:00
Paul Coene
75391d96f4
[Release] 22.13.1 (#3406)
* Update version.h for /target Emergency release 22.13.1

* Update CHANGELOG.md for 22.13.1 release

* Update package.json for 22.13.1 emergency patch release

* Update CHANGELOG.md using tool as instructed
v22.13.1
2023-06-13 17:50:33 -04:00
Paul Coene
81b07a5aa0
[Targeting] Revert #3383 (#3405) 2023-06-13 15:48:35 -05:00
Alex King
774aa99b29
[Release] 22.13.0 (#3404)
* [Release] 22.13.0

* Update CHANGELOG.md
v22.13.0
2023-06-12 20:56:43 -04:00
Alex King
756e835144
[Quest API/Cleanup] Add several spell methods to Perl/Lua (#3379)
* [Quest API/Cleanup] Add several spell methods to Perl/Lua

- Add `quest::CalculateCorruptionCounters(spell_id)`.
- Add `quest::CalculateCounters(spell_id)`.
- Add `quest::CalculateCurseCounters(spell_id)`.
- Add `quest::CalculateDiseaseCounters(spell_id)`.
- Add `quest::CalculatePoisonCounters(spell_id)`.
- Add `quest::GetSpellEffectDescriptionNumber(spell_id)`.
- Add `quest::GetSpellEffectIndex(spell_id, effect_id)`.
- Add `quest::GetSpellFuriousBash(spell_id)`.
- Add `quest::GetSpellMinimumLevel(spell_id)`.
- Add `quest::GetSpellNimbusEffect(spell_id)`.
- Add `quest::GetSpellPartialMagicRuneAmount(spell_id)`.
- Add `quest::GetSpellPartialMagicRuneReduction(spell_id)`.
- Add `quest::GetSpellPartialMeleeRuneAmount(spell_id)`.
- Add `quest::GetSpellPartialMeleeRuneReduction(spell_id)`.
- Add `quest::GetSpellProcLimitTimer(spell_id)`.
- Add `quest::GetSpellResistType(spell_id)`.
- Add `quest::GetSpellResurrectionSicknessCheck(spell_id_one, spell_id_two)`.
- Add `quest::GetSpellTargetType(spell_id)`.
- Add `quest::GetSpellTriggerSpellID(spell_id)`.
- Add `quest::GetSpellViralMaximumSpreadTime(spell_id)`.
- Add `quest::GetSpellViralMinimumSpreadTime(spell_id)`.
- Add `quest::GetSpellViralSpreadRange(spell_id)`.
- Add `quest::IsAEDurationSpell(spell_id)`.
- Add `quest::IsAENukeSpell(spell_id)`.
- Add `quest::IsAERainNukeSpell(spell_id)`.
- Add `quest::IsAllianceSpell(spell_id)`.
- Add `quest::IsBardOnlyStackEffect(effect_id)`.
- Add `quest::IsBardSong(spell_id)`.
- Add `quest::IsBlankSpellEffect(spell_id, effect_index)`.
- Add `quest::IsBlindSpell(spell_id)`.
- Add `quest::IsBuffSpell(spell_id)`.
- Add `quest::IsCastNotStandingSpell(spell_id)`.
- Add `quest::IsCastOnFadeDurationSpell(spell_id)`.
- Add `quest::IsCastRestrictedSpell(spell_id)`.
- Add `quest::IsCastTimeReductionSpell(spell_id)`.
- Add `quest::IsCastWhileInvisibleSpell(spell_id)`.
- Add `quest::IsCharmSpell(spell_id)`.
- Add `quest::IsCombatSkill(spell_id)`.
- Add `quest::IsCompleteHealDurationSpell(spell_id)`.
- Add `quest::IsCompleteHealSpell(spell_id)`.
- Add `quest::IsCureSpell(spell_id)`.
- Add `quest::IsDamageSpell(spell_id)`.
- Add `quest::IsDeathSaveSpell(spell_id)`.
- Add `quest::IsDebuffSpell(spell_id)`.
- Add `quest::IsDetrimentalSpell(spell_id)`.
- Add `quest::IsDiscipline(spell_id)`.
- Add `quest::IsDisciplineBuff(spell_id)`.
- Add `quest::IsDiseaseCounterSpell(spell_id)`.
- Add `quest::IsDistanceModifierSpell(spell_id)`.
- Add `quest::IsEffectIgnoredInStacking(effect_id)`.
- Add `quest::IsFastHealSpell(spell_id)`.
- Add `quest::IsFearSpell(spell_id)`.
- Add `quest::IsFocusLimit(effect_id)`.
- Add `quest::IsFullDeathSaveSpell(spell_id)`.
- Add `quest::IsGateSpell(spell_id)`.
- Add `quest::IsImprovedDamageSpell(spell_id)`.
- Add `quest::IsImprovedHealingSpell(spell_id)`.
- Add `quest::IsIncreaseDurationSpell(spell_id)`.
- Add `quest::IsIncreaseRangeSpell(spell_id)`.
- Add `quest::IsInstrumentModifierAppliedToSpellEffect(spell_id, effect_id)`.
- Add `quest::IsInvisibleSpell(spell_id)`.
- Add `quest::IsInvulnerabilitySpell(spell_id)`.
- Add `quest::IsLDoNObjectSpell(spell_id)`.
- Add `quest::IsLifetapSpell(spell_id)`.
- Add `quest::IsMagicRuneSpell(spell_id)`.
- Add `quest::IsManaCostReductionSpell(spell_id)`.
- Add `quest::IsManaTapSpell(spell_id)`.
- Add `quest::IsMesmerizeSpell(spell_id)`.
- Add `quest::IsNoDetrimentalSpellAggroSpell(spell_id)`.
- Add `quest::IsPBAENukeSpell(spell_id)`.
- Add `quest::IsPartialDeathSaveSpell(spell_id)`.
- Add `quest::IsPartialResistableSpell(spell_id)`.
- Add `quest::IsPercentalHealSpell(spell_id)`.
- Add `quest::IsPersistDeathSpell(spell_id)`.
- Add `quest::IsPetSpell(spell_id)`.
- Add `quest::IsPoisonCounterSpell(spell_id)`.
- Add `quest::IsPulsingBardSong(spell_id)`.
- Add `quest::IsPureNukeSpell(spell_id)`.
- Add `quest::IsRegularGroupHealSpell(spell_id)`.
- Add `quest::IsRegularSingleTargetHealSpell(spell_id)`.
- Add `quest::IsResistDebuffSpell(spell_id)`.
- Add `quest::IsResistableSpell(spell_id)`.
- Add `quest::IsRestAllowedSpell(spell_id)`.
- Add `quest::IsResurrectionEffects(spell_id)`.
- Add `quest::IsRuneSpell(spell_id)`.
- Add `quest::IsRunning(spell_id)`.
- Add `quest::IsSacrificeSpell(spell_id)`.
- Add `quest::IsSelfConversionSpell(spell_id)`.
- Add `quest::IsShadowStepSpell(spell_id)`.
- Add `quest::IsShortDurationBuff(spell_id)`.
- Add `quest::IsSpellUsableInThisZoneType(spell_id)`.
- Add `quest::IsSpellUsableInThisZoneType(spell_id, zone_type)`.
- Add `quest::IsStackableDOT(spell_id)`.
- Add `quest::IsStunSpell(spell_id)`.
- Add `quest::IsSuccorSpell(spell_id)`.
- Add `quest::IsSummonItemSpell(spell_id)`.
- Add `quest::IsSummonPCSpell(spell_id)`.
- Add `quest::IsSummonPetSpell(spell_id)`.
- Add `quest::IsSummonSkeletonSpell(spell_id)`.
- Add `quest::IsSummonSpell(spell_id)`.
- Add `quest::IsSuspendableSpell(spell_id)`.
- Add `quest::IsTargetRequiredForSpell(spell_id)`.
- Add `quest::IsTargetableAESpell(spell_id)`.
- Add `quest::IsTeleportSpell(spell_id)`.
- Add `quest::IsTranslocateSpell(spell_id)`.
- Add `quest::IsValidSpell(spell_id)`.
- Add `quest::IsVeryFastHealSpell(spell_id)`.
- Add `quest::IsVirusSpell(spell_id)`.

- Add `eq.calculate_corruption_counters(spell_id)`.
- Add `eq.calculate_counters(spell_id)`.
- Add `eq.calculate_curse_counters(spell_id)`.
- Add `eq.calculate_disease_counters(spell_id)`.
- Add `eq.calculate_poison_counters(spell_id)`.
- Add `eq.get_spell_effect_description_number(spell_id)`.
- Add `eq.get_spell_effect_index(spell_id, effect_id)`.
- Add `eq.get_spell_furious_bash(spell_id)`.
- Add `eq.get_spell_level(spell_id, class_id)`.
- Add `eq.get_spell_minimum_level(spell_id)`.
- Add `eq.get_spell_nimbus_effect(spell_id)`.
- Add `eq.get_spell_partial_magic_rune_amount(spell_id)`.
- Add `eq.get_spell_partial_magic_rune_reduction(spell_id)`.
- Add `eq.get_spell_partial_melee_rune_amount(spell_id)`.
- Add `eq.get_spell_partial_melee_rune_reduction(spell_id)`.
- Add `eq.get_spell_proc_limit_timer(spell_id)`.
- Add `eq.get_spell_resist_type(spell_id)`.
- Add `eq.get_spell_resurrection_sickness_check(spell_id_one, spell_id_two)`.
- Add `eq.get_spell_target_type(spell_id)`.
- Add `eq.get_spell_trigger_spell_id(spell_id)`.
- Add `eq.get_spell_viral_maximum_spread_time(spell_id)`.
- Add `eq.get_spell_viral_minimum_spread_time(spell_id)`.
- Add `eq.get_spell_viral_spread_range(spell_id)`.
- Add `eq.is_ae_duration_spell(spell_id)`.
- Add `eq.is_ae_nuke_spell(spell_id)`.
- Add `eq.is_ae_rain_nuke_spell(spell_id)`.
- Add `eq.is_alliance_spell(spell_id)`.
- Add `eq.is_bard_only_stack_effect(spell_id)`.
- Add `eq.is_bard_song(spell_id)`.
- Add `eq.is_beneficial_spell(spell_id)`.
- Add `eq.is_blank_spell_effect(spell_id)`.
- Add `eq.is_blind_spell(spell_id)`.
- Add `eq.is_buff_spell(spell_id)`.
- Add `eq.is_cast_not_standing_spell(spell_id)`.
- Add `eq.is_cast_on_fade_duration_spell(spell_id)`.
- Add `eq.is_cast_restricted_spell(spell_id)`.
- Add `eq.is_cast_time_reduction_spell(spell_id)`.
- Add `eq.is_cast_while_invisible_spell(spell_id)`.
- Add `eq.is_charm_spell(spell_id)`.
- Add `eq.is_combat_skill(spell_id)`.
- Add `eq.is_complete_heal_duration_spell(spell_id)`.
- Add `eq.is_complete_heal_spell(spell_id)`.
- Add `eq.is_cure_spell(spell_id)`.
- Add `eq.is_damage_spell(spell_id)`.
- Add `eq.is_death_save_spell(spell_id)`.
- Add `eq.is_debuff_spell(spell_id)`.
- Add `eq.is_detrimental_spell(spell_id)`.
- Add `eq.is_discipline(spell_id)`.
- Add `eq.is_discipline_buff(spell_id)`.
- Add `eq.is_disease_counter_spell(spell_id)`.
- Add `eq.is_distance_modifier_spell(spell_id)`.
- Add `eq.is_effect_ignored_in_stacking(effect_id)`.
- Add `eq.is_effect_in_spell(spell_id, effect_id)`.
- Add `eq.is_fast_heal_spell(spell_id)`.
- Add `eq.is_fear_spell(spell_id)`.
- Add `eq.is_focus_limit(effect_id)`.
- Add `eq.is_full_death_save_spell(spell_id)`.
- Add `eq.is_gate_spell(spell_id)`.
- Add `eq.is_group_complete_heal_spell(spell_id)`.
- Add `eq.is_group_heal_over_time_spell(spell_id)`.
- Add `eq.is_group_only_spell(spell_id)`.
- Add `eq.is_group_spell(spell_id)`.
- Add `eq.is_harmony_spell(spell_id)`.
- Add `eq.is_haste_spell(spell_id)`.
- Add `eq.is_heal_over_time_spell(spell_id)`.
- Add `eq.is_health_spell(spell_id)`.
- Add `eq.is_illusion_spell(spell_id)`.
- Add `eq.is_improved_damage_spell(spell_id)`.
- Add `eq.is_improved_healing_spell(spell_id)`.
- Add `eq.is_increase_duration_spell(spell_id)`.
- Add `eq.is_increase_range_spell(spell_id)`.
- Add `eq.is_instrument_modifier_applied_to_spell_effect(spell_id, effect_id)`.
- Add `eq.is_invisible_spell(spell_id)`.
- Add `eq.is_invulnerability_spell(spell_id)`.
- Add `eq.is_ldon_object_spell(spell_id)`.
- Add `eq.is_lifetap_spell(spell_id)`.
- Add `eq.is_magic_rune_spell(spell_id)`.
- Add `eq.is_mana_cost_reduction_spell(spell_id)`.
- Add `eq.is_mana_tap_spell(spell_id)`.
- Add `eq.is_mesmerize_spell(spell_id)`.
- Add `eq.is_no_detrimental_spell_aggro_spell(spell_id)`.
- Add `eq.is_partial_death_save_spell(spell_id)`.
- Add `eq.is_partial_resistable_spell(spell_id)`.
- Add `eq.is_pbae_nuke_spell(spell_id)`.
- Add `eq.is_percental_heal_spell(spell_id)`.
- Add `eq.is_persist_death_spell(spell_id)`.
- Add `eq.is_pet_spell(spell_id)`.
- Add `eq.is_poison_counter_spell(spell_id)`.
- Add `eq.is_pulsing_bard_song(spell_id)`.
- Add `eq.is_pure_nuke_spell(spell_id)`.
- Add `eq.is_regular_group_heal_spell(spell_id)`.
- Add `eq.is_regular_single_target_heal_spell(spell_id)`.
- Add `eq.is_resist_debuff_spell(spell_id)`.
- Add `eq.is_resistable_spell(spell_id)`.
- Add `eq.is_rest_allowed_spell(spell_id)`.
- Add `eq.is_resurrection_effects(spell_id)`.
- Add `eq.is_rune_spell(spell_id)`.
- Add `eq.is_sacrifice_spell(spell_id)`.
- Add `eq.is_self_conversion_spell(spell_id)`.
- Add `eq.is_shadow_step_spell(spell_id)`.
- Add `eq.is_short_duration_buff(spell_id)`.
- Add `eq.is_spell_usable_in_this_zone_type(spell_id)`.
- Add `eq.is_spell_usable_in_this_zone_type(spell_id, zone_type)`.
- Add `eq.is_stackable_dot(spell_id)`.
- Add `eq.is_stun_spell(spell_id)`.
- Add `eq.is_succor_spell(spell_id)`.
- Add `eq.is_summon_item_spell(spell_id)`.
- Add `eq.is_summon_pc_spell(spell_id)`.
- Add `eq.is_summon_pet_spell(spell_id)`.
- Add `eq.is_summon_skeleton_spell(spell_id)`.
- Add `eq.is_summon_spell(spell_id)`.
- Add `eq.is_suspendable_spell(spell_id)`.
- Add `eq.is_target_required_for_spell(spell_id)`.
- Add `eq.is_targetable_ae_spell(spell_id)`.
- Add `eq.is_teleport_spell(spell_id)`.
- Add `eq.is_tgb_compatible_spell(spell_id)`.
- Add `eq.is_translocate_spell(spell_id)`.
- Add `eq.is_valid_spell(spell_id)`.
- Add `eq.is_very_fast_heal_spell(spell_id)`.
- Add `eq.is_virus_spell(spell_id)`.

- A lot of cleanup in the logic and naming of these methods was done.
- Missing GM restricted spells like Guide spells and GM Health buffs were added as defines.
- Good effect values were added as defines.
- Resurrection effects non-stacking value was added as a define.
- Max fast heal casting time and max very fast heal casting time were added as defines.
- `SE_Display` was uncommented so we could use it instead of the magic number `425`.
- `IsEvacSpell(spell_id)` was removed as it was unnecessary since `IsSuccorSpell(spell_id)` checks for `SE_Succor` as well.
- `GetMorphTrigger(spell_id)` was removed as it was unused.
- `GroupOnlySpell(spell_id)` was removed as it was unnecessary since `IsGroupOnlySpell(spell_id)` exists.
- `CanUseSpell(spell_id)` was removed as it was unnecessary since `GetSpellLevel(spell_id, class_id)` exists.
- `BeneficialSpell(spell_id)` was removed as it was unnecessary since `IsBeneficialSpell(spell_id)` exists.

* Update spell_effects.cpp

* Update spdat.cpp
2023-06-12 20:27:22 -04:00
Alex King
c5c575b028
[Quest API] Add GetEXPForLevel() to Perl/Lua (#3403)
# Perl
- Add `$client->GetEXPForLevel(check_level)`.

# Lua
- Add `client:GetEXPForLevel(check_level)`.

# Notes
- This allows operators to see the required experience for a level based on the client provided, this takes race/class modifiers into account as well if enabled.
2023-06-12 19:18:39 -05:00
Alex King
152e99444c
[Cleanup] Remove GetClientCount() from zone/entity.cpp and zone/entity.h (#3392)
* [Cleanup] Remove GetClientCount() from zone/entity.cpp and zone/entity.h

# Notes
- This is unused.

* Update entity.cpp
2023-06-12 19:18:17 -05:00
Alex King
795df5c597
[Cleanup] Remove CountTempPets() from zone/entity.cpp and zone/entity.h (#3390)
* [Cleanup] Remove CountTempPets() from zone/entity.cpp and zone/entity.h

# Notes
- This is unused.

* Update entity.h
2023-06-12 19:17:53 -05:00
Alex King
18eff726d0
[Commands] Assign #opcode to a #reload alias (#3401)
* [Commands] Assign #opcode to a #reload alias

# Notes
- Can use `#reload opcodes

* Add ServerOP_ReloadOpcodes
2023-06-12 18:42:39 -04:00
Alex King
f06a37a009
[Cleanup] Add GMFind_Struct to packet structures (#3402)
* [Cleanup] Add GMFind_Struct to packet structures

# Notes
- X and Y were swapped in GMSummon_Struct so it displayed XYZ incorrectly in /find, adding its own struct fixes this.

* Update eq_packet_structs.h

* Update eq_packet_structs.h
2023-06-12 18:35:04 -04:00
Paul Coene
ae53efc52c
[Targeting] /tar <bad target> should not untarget existing target (#3383)
* [Targeting] /tar <bad target> should not untarget existing target

* Forgot string Id file.

* removed unneeded this->
2023-06-12 16:40:09 -05:00