35 Commits

Author SHA1 Message Date
Alex King
25f8ee2084
[Hotfix] Instances Repository Fix (#2576)
Need to use `this` pointer.
2022-11-26 12:31:51 -05:00
Alex King
b91d879662
[Quest API] Add Instance Methods to Perl/Lua. (#2573)
* [Quest API] Add Instance Methods to Perl/Lua.

# Perl
- Add `quest::GetInstanceIDs(zone_name)`.
- Add `quest::GetInstanceIDsByCharID(zone_name, character_id)`.
- Add `quest::GetInstanceVersionByID(instance_id)`.
- Add `quest::GetInstanceZoneIDByID(instance_id)`.

# Lua
- Add `eq.get_instance_ids(zone_name)`.
- Add `eq.get_instance_ids_by_char_id(zone_name, character_id)`.
- Add `eq.get_instance_version_by_id(instance_id)`.
- Add `eq.get_instance_zone_id_by_id(instance_id)`.

# Notes
- The instance IDs methods return arrays of IDs for looping so you can check on mass the instances a player has for a zone.
- Keeps operators from having to guess which possible versions of a zone a player has an instance for or loop through them all to find out.
- Cleanup `common/database_instances.cpp` to mostly use repositories where possible.

* Update database.h

* Update character_corpses_repository.h
2022-11-26 10:43:29 -05:00
Chris Miles
dfd8f84cac
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint

* More functions converted

* Commify

* More functions

* Fin

* Sort declarations

* Split functions between files

* Bots

* Update strings.h

* Split

* Revert find replaces

* Repository template

* Money

* Misc function

* Update CMakeLists.txt

* Saylink

* Update strings.cpp

* Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database

* API casings
2022-07-14 02:10:52 -05:00
hg
15328196e2
[Expeditions] Store members on dynamic zone (#1358)
This moves members from expeditions so other systems can use them

Replace expedition_members table with dynamic_zone_members

Move 'EnableInDynamicZoneStatus' rule to DynamicZone namespace

Modify #dz list to show dz members (not instance players) and type name

Move various queries to repository methods
2021-05-24 21:14:32 -05:00
Michael Cook (mackal)
c45395be95 Fix strcpy-param-overlap with GetGroupLeadershipInfo calls
==1810==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffef04baf90,0x7ffef04baf98) and [0x7ffef04baf90, 0x7ffef04baf98) overlap
    #0 0x7f163bb9509e  (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
    #1 0x5652caed27b3 in Client::Handle_Connect_OP_ZoneEntry(EQApplicationPacket const*) ../zone/client_packet.cpp:1535

==1918==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7ffddc8057c0,0x7ffddc8057c8) and [0x7ffddc8057c0, 0x7ffddc8057c8) overlap
    #0 0x7fc61ee0e09e  (/lib/x86_64-linux-gnu/libasan.so.5+0x4f09e)
    #1 0x56023c149698 in WorldServer::HandleMessage(unsigned short, EQ::Net::Packet const&) ../zone/worldserver.cpp:1055
2021-02-28 21:42:51 -05:00
hg
b46eca4ec6 Store expeditions with dz id not instance id
This exposes dynamic zone ids for any future changes and will make it
easier to preserve historic dz and expedition data. This also cleans up
some dynamic zone creation for expedition requests

When purging instances the expedition table is no longer updated
since dynamic zone ids are not re-used like instance ids are

Update #dz list commands to show dz id

Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
2020-12-30 18:47:32 -05:00
hg
579c300cbc Rename expeditions table 2020-12-30 18:47:31 -05:00
hg
15235d77f7 Fix regression deleting expedition from db
Set expedition's instance id NULL instead of deleting it from the
database when instances are deleted. Only expedition functions
should delete expeditions

This fixes a regression caused by removing foreign key constraints

The expedition_details row was being deleted and not the corresponding
expedition_members and expedition_lockouts rows. Any characters inside
the members table could no longer join expeditions
2020-12-30 18:47:10 -05:00
hg
70161aecc4 Remove fk constraints in expedition tables
Add expedition tables to database schema lists
2020-12-30 18:47:09 -05:00
Akkadius
905baa71b2 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 04:24:01 -05:00
Akkadius
db072e767a Bulk instance deletion instead of tons of individual statements [skip ci] 2020-05-24 04:23:52 -05:00
Akkadius
02fa823736 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 04:07:38 -05:00
Akkadius
0d2d6a2c6b More resilient fix to killing instances for now [skip ci] 2020-05-24 04:07:29 -05:00
Akkadius
d98e69ae5d Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 02:56:13 -05:00
Chris Miles
26831d5ad4
Fix a copy paste error 2020-05-24 02:56:04 -05:00
Akkadius
630ab5e69d Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-24 01:37:10 -05:00
Chris Miles
e8a05ec680
Fixes instance deletion issue https://github.com/EQEmu/Server/issues/1069 2020-05-24 01:32:50 -05:00
Akkadius
22180d4bac Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-24 02:11:44 -05:00
Akkadius
954247956e Adjust syntax 2020-04-24 02:11:06 -05:00
Akkadius
43ff59d7db Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-24 01:27:17 -05:00
Akkadius
387e1668a5 Remove hard delete from DeleteInstance so that the purge timer can pick it up later 2020-04-24 01:25:09 -05:00
Akkadius
373fb3f0e7 Decouple zone calls, cleanup logic 2020-04-19 04:36:39 -05:00
Akkadius
caa0ffda00 Add Truncate repository method and purge player sold items on world bootup 2020-04-18 23:53:52 -05:00
Akkadius
093509baa9 Few adjustments [skip ci[ 2020-04-18 19:46:19 -05:00
Akkadius
a0f8bbb3b9 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-18 02:31:43 -05:00
Akkadius
b41f2dac66 Clamp value for max reserved instance id [skip ci] 2020-04-10 03:26:09 -05:00
Akkadius
0dc3e5ba35 Add jank permanent reference pass back in [skip ci] 2020-04-10 03:20:41 -05:00
Akkadius
d1349e5ac9 Oops, math 2020-04-10 02:30:46 -05:00
Akkadius
88ff56b2f2 Add client->SendToGuildHall - have instances properly cycle out IDs 2020-04-10 01:43:00 -05:00
Akkadius
79dbddd56e Decouple temporary merchant list call [skip ci] 2020-03-30 21:32:59 -05:00
Akkadius
286c08b8d5 Migrate spawn tables [skip ci] 2020-03-12 00:00:39 -05:00
Akkadius
40b2366346 Implement and extended #goto via #goto <player_name> - this will work cross zone, cross instance, in zone etc. It works on top of the original #goto (target) and #goto x y z 2019-01-20 21:33:56 -06:00
Akkadius
26a766335f Fix for GetCharactersInInstance post-cleanup 2015-01-26 01:51:29 -06:00
Akkadius
4f19fe9f91 Travis compile fix for real? 2015-01-25 02:27:30 -06:00
Akkadius
6212045dcd Add database_instances.cpp 2015-01-25 02:16:11 -06:00