265 Commits

Author SHA1 Message Date
Alex
dd06033a58
Add character-specific zone-based experience modifiers. (#1326)
* Add character-specific zone-based experience modifiers.

This will allow server operators to give players individual experience modifiers (regular and AA).

Zone ID 0 will server as a global modifier for players, if no rows are found the modifier defaults to 1.0 so experience is neither increased nor decreased.

Setting a zone-specific modifier will override the zone ID 0 global modifier.

Requires a SQL update: sql/git/required/2021_04_11_character_exp_modifiers.sql

- Add quest::getaaexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_aa_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::getexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::setaaexpmodifierbycharid(character_id, zone_id, aa_modifier) to Perl.
- Add eq.set_aa_exp_modifier_by_char_id(character_id, zone_id, aa_modifier) to Lua.
- Add quest::setexpmodifierbycharid(character_id, zone_id, exp_modifier) to Perl.
- Add eq.set_exp_modifier_by_char_id(character_id, zone_id, exp_modifier) to Lua.
- Add $client->GetAAEXPModifier(character_id, zone_id) to Perl.
- Add client:GetAAEXPModifier(character_id, zone_id) to Lua.
- Add $client->GetEXPModifier(character_id, zone_id) to Perl.
- Add client:GetEXPModifier(character_id, zone_id) to Lua.
- Add $client->SetAAEXPModifier(zone_id, aa_modifier) to Perl.
- Add client:SetAAEXPModifier(zone_id, aa_modifier) to Lua.
- Add $client->SetEXPModifier(zone_id, exp_modifier) to Perl.
- Add client:SetEXPModifier(zone_id, exp_modifier) to Lua.

* Removed unneeded [].

* Fix variable name,

* Fix variable name.

* Fix version.h.

* Rename 2021_04_11_character_exp_modifiers.sql to 2021_04_23_character_exp_modifiers.sql

* Update db_update_manifest.txt
2021-04-23 08:47:39 -04:00
Alex
13a50f7806
[Quest API] Add HTML color tag method to Perl and Lua. (#1324)
* Add HTML color tag method to Perl and Lua.
- Add quest::gethexcolorcode(color_name) to Perl.
- Add eq.get_hex_color_code(color_name) to Lua.

Full color list here: https://pastebin.com/rUYKr1ye

* Convert to static and use strcasecmp over strcmp.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-04-22 23:52:00 -05:00
Alex
00fb9bc9f9
[Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.

With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.

This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.

The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()

Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()

SetStartZone parameter list was fixed also.

This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.

This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.

* Removed possible memory leaks.

* Fix SQL.

* Fix client message.

* Fix debug log.

* Fix log message.

* Fix call in rebind overload.

* Fix floats.

* Add default to column.
2021-04-22 22:49:44 -05:00
Akkadius
d117ce0bf2 [Hotfix] Incorrect Perl usage method (docs) 2021-03-31 00:18:43 -05:00
Alex
97c11a1199
[Quest API] Add new zone name methods to Perl and Lua. (#1309)
- Add quest::GetZoneShortName(zone_id) to Perl.
- Add quest::GetZoneLongNameByID(zone_id) to Perl.
- Add eq.get_zone_id_by_name(zone_name) to Lua.
- Add eq.get_zone_short_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_name(zone_name) to Lua.
2021-03-28 20:25:50 -05:00
splose
b3fbe1b015
add quest::get_spell_level(uint16 spell_id, uint8 class_id) (#1295) 2021-03-15 23:59:09 -05:00
Alex
cd08c96fa4
[Quest API] Add secondstotime(duration) to Perl and Lua. (#1281)
- Add quest::converttime(duration) to Perl.
- Add eq.convert_time(duration) to Lua.
2021-03-11 21:38:47 -05:00
Kinglykrab
36bfebfe6a Add Inventory methods to Perl.
- Add $client->GetInventory() to Perl.
- Export Lua Inventory methods to Perl.
 - Add quest::createitem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned) to Perl so you can return a ItemInstance for testing purposes.
2021-02-01 21:07:07 -05:00
Kinglykrab
19ae461e36 Add message(color, message) and whisper(message) to Perl/Lua.
- Add quest::message(color, message) to Perl.
- Add eq.message(color, message) to Lua.
- Add quest::whisper(message) to Perl.
- Add eq.whisper(message) to Lua.

These methods allow you to use implied client references. The whisper method also converts a widely used plugin in Perl to a Perl and Lua method that works on both Clients and NPCs.
2021-01-23 10:47:44 -05:00
hg
4ae9904822 Use strlen for perl hash key size 2020-12-30 18:47:32 -05:00
hg
c0b8bfde03 Fix invalid return in perl expedition api
This was returning an invalid (garbage) hash reference for
empty results when filtering on expedition name
2020-12-30 18:47:32 -05:00
hg
cc5dd4cd82 Add missing expedition perl api declaration 2020-12-30 18:47:32 -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
ad51de052c Cleanup expedition perl api croak messages 2020-12-30 18:47:31 -05:00
hg
79287fc507 Require zone id to get expedition by instance id
This is a breaking api change
eq.get_expedition_by_instance_id(instance_id) is replaced with
eq.get_expedition_by_zone_instance(zone_id, instance_id)

This replaces the FindCachedExpeditionByInstanceID method of
obtaining expeditions via instance id with a new method that
requires the dz zone id as well
2020-12-30 18:47:31 -05:00
hg
6266aa86a4 Add perl expedition api 2020-12-30 18:47:31 -05:00
Alex
a920d449ff
Add removeitem(item_id, quantity) to Perl/Lua. (#1156)
- Perl: quest::removeitem(item_id, quantity);
- Lua: eq.remove_item(item_id, quantity);
2020-12-29 18:21:47 -06:00
Chris Miles
be12cad7bd
Fix for quest::GetZoneLongName(zone_short_name) garbled output (#1134) 2020-10-31 18:47:43 -05:00
Chris Miles
24a8ca39d3
Merge pull request #1100 from noudess/empty_processing
Allow quests to turn on mob processing in empty zones
2020-08-16 02:03:22 -05:00
Akkadius
bda13383ef Revert "Merge pull request #1101 from KinglyKrab/custom"
This reverts commit 43108acae1ef5eb5d127226c3fc0659dbdc10b9d, reversing
changes made to daa1db65b92cb9403c48071a044cb62b458c9afd.
2020-08-03 22:21:51 -05:00
Alex
43108acae1
Merge pull request #1101 from KinglyKrab/custom
Custom changes.
2020-08-03 23:17:37 -04:00
Alex
ff7c3aff92 Custom changes. 2020-08-03 23:14:39 -04:00
Noudess
8e7591cd4b Added support for quests to enable and then redisable processing of movement. 2020-07-27 10:43:24 -04:00
Akkadius
8647bd73ce Merge remote-tracking branch 'origin' into integration/multi-tenancy-expansions-repository 2020-07-12 16:51:36 -05:00
Alex
c8389bc674 Completely overhaul cross zone and world wide methods in quest API. 2020-07-07 08:02:56 -04:00
Akkadius
b7e2261e16 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-07-07 01:32:17 -05:00
Alex
f514dd5b55 Optimize cross-zone utilities and add cross-zone player move utilities to Perl/Lua. 2020-06-29 17:54:30 -04:00
Akkadius
e03ca7f65e Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-06-29 00:40:27 -05:00
Chris Miles
f6d415410d
Merge pull request #1080 from KinglyKrab/assign_tasks
Add cross-zone task assign methods to Perl/Lua.
2020-06-28 21:54:52 -05:00
Alex
25c3d3803f Add cross-zone task assign methods to Perl/Lua. 2020-06-27 20:03:06 -04:00
Alex
1ae077ea8f Add new zone methods to Perl/Lua. 2020-06-21 01:15:29 -04:00
KimLS
8a0d4e37bd Remove optimization off of quest::ChooseRandom on msvc to solve a crash on x64 in release mode 2020-05-26 22:30:19 -07:00
Akkadius
01d326ef83 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-25 23:06:14 -05:00
KimLS
5e9bf3b044 Make ChooseRandom more idiomatic, the fact that the code can return a SV of anytype makes it a bit dangerous, good canidate for rewriting as a plugin 2020-05-25 20:56:49 -07:00
Akkadius
a4b027db58 Export quest::is_content_flag_enabled and quest::set_content_flag 2020-05-24 20:45:44 -05:00
Akkadius
3f62da4573 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-23 22:33:34 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Alex
5f0d3e9026 Add several cross zone methods to Perl/Lua. 2020-05-11 20:10:52 -04:00
Chris Miles
e64526920c
Merge pull request #1053 from KinglyKrab/crosszonesignalplayerbygroupid
Add CrossZoneSignalPlayerByGroupID() to Perl/Lua.
2020-05-10 20:01:51 -05:00
Alex
dc9bd031ff
Merge branch 'master' into crosszonesignalplayerbygroupid 2020-05-10 21:00:43 -04:00
Chris Miles
7113c9236e
Merge pull request #1057 from KinglyKrab/crosszonesignalclientbyname
Fix typo in crosszonesignalclientbyname Perl_croak.
2020-05-10 20:00:42 -05:00
Alex
857b24727c Add CrossZoneMessagePlayerByGuildID() to Perl/Lua. 2020-05-10 16:52:33 -04:00
Alex
4d93406176 Fix typo in crosszonesignalclientbyname Perl_croak. 2020-05-10 09:16:58 -04:00
Alex
12c4b20169 Add CrossZoneSignalPlayerByGroupID() to Perl/Lua. 2020-05-09 21:15:34 -04: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
47b8aa3f18 Export quest calls 2020-04-11 04:38:42 -05:00
Alex
cbd1f42a08 Merge conflict fixes... 2020-04-06 18:57:13 -04:00
Alex
c6e4b5647f
Merge branch 'master' into getclassname 2020-04-06 16:25:29 -04:00
Alex
40ef4c799b
Update embparser_api.cpp 2020-04-06 16:22:08 -04:00
Alex
8ba7ddd054
Merge branch 'master' into getcurrencyitemid 2020-04-06 16:21:29 -04:00