17 Commits

Author SHA1 Message Date
hg
55155ff800
[Expeditions] Move expedition code into DynamicZone (#4672)
This removes the separate Expedition class and moves lockout code and
/dz command handlers into DynamicZone classes. It also refactors some
code to reduce bloat and some database usage.

This completes the effort of moving everything to DynamicZone that
started when implementing shared tasks. It also makes sense to do this
since expeditions are just dynamic zones internally despite dzs being
used for other types. Expedition specific things are just handled with
dz type checks.

Functionally nothing should change. This is mainly internal refactoring
and moving code around along with some bug fixes and reduced database
usage.

Main changes:

 - The `expeditions` database table has been removed

 - Expeditions no longer use a separate id, the expedition id is just the dz id

 - Expedition lock state and replay timer option were moved to the
   `dynamic_zones` table

 - Expeditions no longer have a separate cache from dynamic zones

 - Expedition creation no longer has every zone query the database to cache it

 - Expedition internal lockouts are now stored on DynamicZone

 - The `expedition_lockouts` table has been renamed to `dynamic_zone_lockouts`

 - Fixed a small bug with the UpdateLockoutDuration api where the
   internal lockout would get the time added twice in memory in the
   initiating zone (this api is likely rarely used)

 - Fixed an issue where use of the group/raid DoesAnyMemberHaveExpeditionLockout
   api would query once for every out of zone character.

   - This api now checks all members in the current zone first and only
     performs a single bulk query for out of zone members if that check
     is exhausted

 - Deprecated the max_check_count param of DoesAnyMemberHaveExpeditionLockout,
   the quest api still exists to avoid api break but a passed arg has no effect
2025-02-15 18:40:35 -06:00
Xackery
758859eea6
[Experience] Add SetExp/SetAAExp lua mods (#4292) 2024-05-04 18:10:27 -05:00
Aeadoin
7f7ba2e6c2
[Cleanup] Remove unused Includes under zone files (#3162) 2023-04-01 22:55:28 -04:00
Aeadoin
d6b954a4b9
[Cleanup] Cleaning up Raid.cpp (#3125)
* [Cleanup] Cleanup Raid.cpp

* cleanup

* fix is_bot instances

* bracket cleanup

* bracket cleanup

* rename variables in struct

* fix for merge
2023-03-20 11:39:14 -04:00
Vayle
6e1c4b768f
[Quest API] Add GetLeader() and GetLeaderName() to Perl/Lua. (#2701)
* [Quest API] Add $raid->GetLeader() and $raid->GetLeaderName()

* Remove semicolon

* Tweaks

* Remove inline

* Add LUA compatibility

* Add GetLeaderName() to LUA

* Cast leadername to string

* Fix GetLeaderName return type

* Tweak
2023-01-03 20:17:19 -05:00
Aeadoin
9c3c5b5230
[Experience] Change Exp Calculations to be 64 bit where needed. (#2677)
* [Experience] Change Exp Calculations to be 64 bit where needed.

* Fix lua values

* Formatting
2022-12-30 22:03:30 -05:00
Alex King
d0e7e8c4c4
[Quest API] Add Group/Raid Overloads to Perl/Lua. (#2587)
# Perl
- Add `$group->IsGroupMember(name)`.
- Add `$group->IsLeader(name)`.
- Add `$raid->IsRaidMember(c)`.
- Add `$raid->IsGroupLeader(c)`.

# Lua
- Add `group:IsGroupMember(name)`.
- Add `group:IsLeader(name)`.
- Add `raid:IsGroupLeader(client)`.
- Add `raid:IsLeader(client)`.
- Add `raid:IsRaidMember(client)`.

# Notes
- Adds overloads to these methods allowing operators to get by name or reference.
2022-11-27 15:57:01 -05:00
Kinglykrab
c5c57b7541
[Quest API] Add Group/Raid overloads to Perl/Lua. (#2526)
# Perl
- Add `$raid->GetGroup(client)` to Perl.
- Add `$raid->GetGroupMember(member_index)` to Perl.
- Add `$raid->IsLeader(client)` to Perl.

# Lua
- Add `group:GroupMessage(sender, message)` to Lua.
2022-11-14 14:04:38 -05:00
hg
3c87480553
[Quest API] Add back removed lua class properties (#1742)
Fixes regression from 7b6decae
2021-11-12 21:16:39 -05:00
Kinglykrab
7b6decaef3
[Quest API] Alphabetize Lua method exports. (#1673)
- Keeps things tidier.
- Removes unnecessary/outdated comments at the top of files.
2021-11-06 17:36:00 -04:00
Michael Cook (mackal)
8b4a886d01 Remove unused files
idk where these came from, NUKE EM!
2021-02-12 02:42:03 -05:00
hg
ea34aa2030 Add group and raid api to check for lockout
Add Group and Raid method DoesAnyMemberHaveExpeditionLockout

This is required by some expeditions that perform a manual check for
custom dialogue (Ikkinz group expeditions)
2020-12-30 18:47:11 -05:00
Michael Cook (mackal)
a3eb74b855 Fix /split while in a raid
This still doesn't add support for /autosplit in a raid, how should that
work?

This changes the Raid::SplitMoney to take a group ID and fails when
provided with RAID_GROUPLESS. This does change behavior, but I'm not
sure if it was ever used so ...
2020-03-05 14:37:43 -05:00
Michael Cook (mackal)
7cc5b143fc Make lua raid GetGroup functions signed
The server code is unsigned for bad reasons :P
2018-08-16 22:33:07 -04:00
Michael Cook (mackal)
585ef81fde Fix lua raid GetGroup(client) and add lua raid GetGroupNumber(index)
This number will return group number and not let us iterate a bunch of
times to verify group numbers
2018-08-15 21:35:19 -04:00
KimLS
55a964267e Raid/Group lua stuff, renamed corpses 2013-06-02 13:47:52 -07:00
KimLS
d14608356d Added all lua objects i need for now, a ton of API too 2013-06-02 00:15:26 -07:00