79 Commits

Author SHA1 Message Date
Chris Miles
5b4aeaa457
[Code Cleanup] Remove this-> in code where its implied (#2088) 2022-05-01 10:22:09 -04:00
Kinglykrab
293361a1f7
[Cleanup] Make use of AccountStatus constants wherever status is checked or used. (#1764)
* [Cleanup] Make use of AccountStatus constants wherever status is checked or used.
- Cleanup all instances of SendEmoteMessage.
- Cleanup all instances of SendEmoteMessageRaw.
- Cleanup all instances of MessageStatus.
- Convert Quest API method defaults to use constants.

* Cleanup constant names.
2021-11-14 21:01:13 -06:00
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
bf3593a60d
[Experience] Add exp mod to npc types to let a server op change the exp modifier (#1252)
* Add exp mod to npc types to let a server op change the exp modifier a npc gives (useful for custom content)

* Updated version.h
2021-02-23 11:50:38 -06:00
Kinglykrab
1c00edb458 Add AA gain messages. 2021-01-15 19:54:44 -05:00
Michael Cook (mackal)
32f4722c0f Only UF and earlier have the CORPSE_ITEM_LOST string
Let's not confuse players with missing messages I guess
2020-09-20 13:55:45 -04:00
Akkadius
32407dbb56 Add rule Character:FinalExpMultiplier - Added on top of everything else, easy for setting EXP events 2020-08-21 01:04:18 -05:00
Noudess
db4f113129 Added rule to allow the Ding sound when AA is earned. 2020-07-13 08:12:02 -04:00
Kinglykrab
15609ab1e8 Added optional 'ignore_mods' parameter to AddLevelBasedExp() in Perl and Lua. 2019-10-31 23:38:09 -04:00
Akkadius
31cebb5793 Logs::Normal to LogInfo 2019-09-02 02:18:54 -05:00
Akkadius
bfd0752c4d Logs::None added to LogDebug 2019-09-01 23:54:24 -05:00
Akkadius
678c25e02c Simplify error logging 2019-09-01 22:05:44 -05:00
Akkadius
9f25c9070c Refactor message functions 2019-08-11 00:14:02 -05:00
Akkadius
57354579aa Unify chat constants usage 2019-08-11 00:00:55 -05:00
=
31b33ba72c Properly escape key in SQL queries 2019-01-08 06:16:57 +00:00
Kinglykrab
3a757a7a85 Resolved a possible scaling issue with the way CharMaxLevel works with quest globals and data buckets. 2018-12-15 01:37:13 -05:00
Kinglykrab
8ae9c99f3d Added new data bucket and quest functionality.
Added multiple new instance related quest functions.
	1. quest::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id)
		- Allows you to pull the instance ID of a client by character ID.
	2. quest::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id)
		- Allows you to assign an instance to a client by character ID.
	3. quest::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id)
		- Allows you to remove a client from an instance by character ID.

Added spell buckets, similar to spell globals.
	- Uses a new spell_buckets table and the Spells:EnableSpellBuckets rule.

Added max level by data bucket.
	- Uses data bucket char_id-CharMaxLevel and Character:PerCharacterBucketMaxLevel rule.
2018-12-13 19:42:31 -05:00
Trust
2f40e5da98 Fixing incorrect operator so Appveyor will pass. 2018-07-21 16:10:55 -04:00
Trust
f51396aa70 [Exploit Fix] AA Below Level Fix - When you are below level 52 with AA set above 0% it will revert the aa % to 0% 2018-07-21 00:01:36 -04:00
Xackery
008b17aaf2 added minimum level to pvp flag. 2018-02-26 09:33:15 -08:00
Daerath
d90982e63b * Merge from master and removal of commented code. 2018-01-06 11:01:41 -05:00
Daerath
b25c5d509d * Refactored how XP is calculated
* Added ability to use normalized XP per AA (based on # of kills per AA per white con NPC -- TSS era change)
* Added ability to use accelerated AA gain between a defined range (based on live, 0 - 4000 AA, linearly decreasing)
2018-01-06 10:22:26 -05:00
Daerath
feafd43fdf * Renamed rule to enable modern AA scaling to be consistent with the other related rules. 2018-01-03 06:19:48 -05:00
Daerath
7d7b9d0238 * Added rules for managing AA scaling. 2018-01-02 17:27:59 -05:00
Daerath
c2b5820153 * Implementing live-like AA scaling rules based on a window where accelerated AA XP is earned.
* TODO: Add scaling rules to database and rules engine and remove hardcoding
2018-01-01 14:23:24 -05:00
Michael Cook (mackal)
477ba3f4b9 Apply HotZone for AAs
Ahh is this the right spot? No idea :P
2017-12-15 01:47:45 -05:00
KimLS
8df8d7c3f6 Bugs in mod return values fixed 2017-06-16 23:12:54 -07:00
KimLS
31d8336b4b Fix acceptmessages, added exp hooks to luamods 2017-06-10 15:12:31 -07:00
E Spause
cb8c3595b7 SoF-era con system. New rule, UseOldConSystem to disable this functionality. 2017-04-15 13:06:46 -04:00
Akkadius
7aa1d243b0 [Performance] Reworked how all log calls are made in the source, see changelog.txt for more details 2017-04-01 03:51:46 -05:00
Xackery
19b6a96063 Changed lost exp message to all be 15. 2016-09-26 02:11:50 -07:00
Xackery
6079b34a2a Added Ruleset AA:ShowExpValues. 2016-09-26 02:09:39 -07:00
Paul Coene
56d355935b Fix task experience by level % to take into account hell level rule. 2016-09-10 14:21:19 -04:00
Michael Cook (mackal)
60da544d3a clang-tidy modernize-use-auto 2016-05-25 16:10:28 -04:00
Cilraaz
e2f1456624 Allow For Old Race/Class Experience Modifiers
Add new ruletypes 'Character:UseOldRaceExpPenalties' and 'Character:UseOldClassExpPenalties'

When set to true, adds in bonuses/penalties that existed in Classic

Class-based penalties were disabled during Velious, while race-based penalties were not removed until TSS

This method uses the original SOE method of increase exp needed to level, rather than decreasing exp gained
2015-10-14 22:57:17 -04:00
KimLS
1589169200 AAs should load from character data now, though will be fucked up if you already had stacked aas. 2015-06-10 22:46:57 -07:00
Russell Kinasz
f35594947c Full group was being excluded from group exp bonus 2015-06-07 16:53:38 -07:00
SecretsOTheP
788959a5e2 Haynar's movement fixes.
Changes Speed from float to int. EQ client deals with int step locs better than it does floats according to Haynar's testing.

This also contains mob runspeed changes. I recommend you set runspeeds to start in the DB 1.25 for NPCs below 1.25 which will match player runspeeds almost equally. Existing DBs will need to be updated.

General Cleanup of MobAI functions. Mobs now change their heading on AIMovement timers if their targets' heading has changed since that time. This prevents players from being able to land backstabs inbetween mob swings.

Charmed/feared players now send the appropriate packet, there was a missing CastToClient() in spells that was missing.

Mob runspeed can no longer be snared to 0%, instead, 1% of their base runspeed is the maximum. Roots apply as roots instead of a modifier under this code.

There is going to be bugs with this code. It's better we push through it than revert it. Sanctuary has been running this for a good week and we've worked through the issues.

Misc updates:
Exported some variables to perl, including:

EVENT_ITE_CLICK_CAST:
EVENT_ITEM_CLICK:
spell_id - returns the spell_id of the click effect.
return value - cancels the cast.

EVENT_DROP_ITEM:
quantity - returns the # of items dropped in the packet. If the item has charges, charges are returned here instead.
itemname - name of the item being dropped
itemid - id of the item being droppped
spell_id - spell_id associated with the item's click effect.
slotid - the inventory slot id of the item being dropped.
return value - cancels the item from being dropped.

Added Perl function: CalcEXP. Calculates the experience you would gain for an NPC that cons a specific con value to you.

Fixed a bug where you would receive the group experience bonus and group experience messages for simply being in a group, regardless of the player being in the same zone as you.
2015-05-25 12:35:53 -04:00
regneq
cc2a60feb2 * change the kill faction hits display before the xp message not after.
* removed the double level gain messages to display once either the level gained or the level.
* implement the message "You will now lose experience when you die" and "Your items will no longer stay with you..." when reach a certain level already sets in the rule table.
2015-05-11 16:34:46 -07:00
Trevius
0aba2d578a Added more information to Mercenary Logging.
Added potential fix for Mercenaries that fail to unsuspend.
Added a new "statscale" field to the merc_stats table that can be used to quickly balance Mercenary Stats based on Level.
The new "statscale" field now combines with the Mercs::ScaleRate rule value (default 100 percent for both).
2015-01-29 23:04:41 -06:00
Akkadius
0d9b6703a6 Rename debug.h to global_define.h, update cmakelists and such 2015-01-19 04:12:09 -06:00
Akkadius
467b359d0c Moved all EQEmuLogSys:: enum references used in Log.Out to a namespace 'Logs' for shortening of syntax 2015-01-18 02:20:16 -06:00
Akkadius
c025765283 Renamed DoLog to Out as the aggregate logging function for simplicity of use and shortened syntax of Log.Out 2015-01-18 02:00:15 -06:00
Akkadius
1c048cb1d1 Renamed DebugCategory to DoLog as the aggregate logging function for simplicity of use and shortened syntax of Log.DoLog 2015-01-18 01:54:09 -06:00
Akkadius
ec7fd9b4e7 Consolidate 'LogType' Normal logs over to 'LogCategory' 2015-01-18 01:32:18 -06:00
Akkadius
e691735a2d Consolidate 'LogType' Error logs over to 'LogCategory' 2015-01-18 01:30:25 -06:00
Akkadius
7dbde36b03 Rename reference logger to Log 2015-01-18 00:41:18 -06:00
Akkadius
d45ed9befa Consolidate EQEmuLogsys::Debug calls into DebugCategory 2015-01-17 23:59:06 -06:00
Akkadius
b219d73163 _log replacements in various spots 2015-01-12 23:08:35 -06:00
Akkadius
18c837c398 Replaced various other log calls in zone 2015-01-10 15:59:32 -06:00