58 Commits

Author SHA1 Message Date
Alex King
76b9ce0ac1
[Cleanup] Cleanup Special Ability Code (#4365)
* [Cleanup] Cleanup Special Ability-based Code

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update special_ability.cpp

* Cleanup

* Update emu_constants.cpp
2024-06-01 18:20:43 -05:00
Alex King
9a09d820a5
[Quest API] Add GetConsiderColor() to Perl/Lua (#4253) 2024-04-15 04:53:48 -05:00
Fryguy
23de0119ff
[Bug Fix] Undead Should Never Flee (#3926)
* [Bug Fix] Undead Should Never Flee

Added a hard return on Undead Body Types. They should never flee under any circumstance.

* space
2024-01-08 22:24:57 -06:00
Akkadius
662048cedc Make the logs even better! [skip ci] 2020-01-03 17:25:53 -06:00
Akkadius
9dda9098a0 Add logging for flee 2020-01-03 17:23:51 -06:00
Michael Cook (mackal)
3a10131a00 Add missing currently_fleeing flag to sanity check 2020-01-03 15:50:10 -05:00
Michael Cook (mackal)
a94072e3ea Fix CheckFlee logic
This /should/ be correct. But it doesn't explain other issues we've seen
on some servers
2020-01-03 15:49:20 -05:00
KimLS
0662e3c780 Merge fix with sql 2018-11-25 15:35:52 -08:00
Michael Cook (mackal)
8302f7cc26 Add a level cap to gray con flee 2018-11-14 22:59:07 -05:00
E Spause
706ae291d8 Remove errant Stun call, fix up logging notification for fear 2018-10-31 11:08:50 -04:00
E Spause
e466f9b3f9 Fear pathing fixups, random path rewrite, and nektulos / general roambox fixups where best Z axis is below the ground 2018-10-19 22:35:38 -04:00
Akkadius
8a28e8500d Make fear and fleeing respect navmesh for both clients and NPCs 2018-09-03 03:06:23 -05:00
Michael Cook (mackal)
766dcc464e Fix crash 2018-08-27 12:56:46 -04:00
Trust
6b02d50a8c Allow Separate GrayCon Flee rate.
Added following Rules:

Combat:FleeGray - If true FleeGrayHPRatio will be used.
Combat:FleeGrayHPRatio - HP % when a Gray NPC begins to flee.
2018-07-22 18:22:07 -04:00
KimLS
fc7623b690 Merge fix 2017-09-17 13:20:48 -07:00
Paul Coene
59152a9d77 Fix some constants. 2017-09-17 12:11:02 -04:00
KimLS
ffbee0ad1a Merge 2017-08-09 10:42:07 -07:00
KimLS
575ba28b62 Bug fixes with fear points and teleport jumps 2017-08-06 20:48:39 -07:00
Paul Coene
03399fe3fd Repair so that mobs that are fleeing or feared use FixZ. 2017-07-22 17:57:23 -04:00
KimLS
69c6879ac9 Merge fix 2017-07-22 14:20:40 -07:00
Paul Coene
e84799e15b Went back to older fearpath, only kept change where pathing issues can't
cause the fear spell to be dropped.
2017-07-22 12:45:21 -04:00
KimLS
bdc90ac3a7 Command changes and code cleanup 2017-07-21 20:22:33 -07:00
Paul Coene
aa8a2ea41b Repair fear pathing to ignore Z aspects and allow FixZ and pathing to handle
it.

Added the true flag for ResistCheck.Charisma so the proper Charisma bonuses
are applied.
2017-07-21 14:56:51 -04:00
KimLS
5f1063acb9 Add pathfinding interfaces, still heavily wip 2017-07-18 00:01:59 -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
Michael Cook (mackal)
cdbeb24a05 Change emptiness checks to empty() from size() [clang-tidy]
This has two benefits, it's clear what we are checking and
size() isn't always constant time, where empty is (performance!)
2016-05-25 14:57:47 -04:00
Akkadius
624c7341c5 Refactor cfp to currently_fleeing for readability 2015-11-01 16:02:41 -06: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
KimLS
17af9e3808 Merge fixes, hopefully didn't break anything. 2015-01-23 13:36:27 -08:00
KimLS
269d56e1d0 Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types 2015-01-23 00:01:10 -08:00
Akkadius
c5447778a6 Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts:
	world/client.cpp
	world/worlddb.cpp
	zone/aggro.cpp
	zone/bot.cpp
	zone/client.cpp
	zone/client_packet.cpp
	zone/client_process.cpp
	zone/doors.cpp
	zone/entity.cpp
	zone/inventory.cpp
	zone/mob_ai.cpp
	zone/perl_client.cpp
	zone/spells.cpp
	zone/waypoints.cpp
	zone/zone.cpp
	zone/zonedb.cpp
	zone/zoning.cpp
2015-01-21 17:29:30 -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
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
d459c144fe replace mlog with logger.LogDebug 2015-01-10 18:38:04 -06:00
Arthur Ice
f409d39f1a merge upstream 2014-12-21 13:57:20 -08:00
Michael Cook (mackal)
ce9bcef620 std::deque is a much better fit, should have bit better performance 2014-12-18 02:20:03 -05:00
Michael Cook (mackal)
a14f8058da Switch path stuff to vectors
This should be more CPU cache friendly compared to lists so should
be faster. (profiling looked promising)
2014-12-17 01:52:00 -05:00
Akkadius
494e250514 fearpath.cpp header cleanup 2014-12-15 17:23:13 -06:00
Arthur Ice
2aa287fe3c Merge 2014-12-05 20:16:13 -08:00
Michael Cook (mackal)
395be050a3 Switch random function to std::mt19937
Added class EQEmu::Random
Functions:
EQEmu::Random::Int(int low, int high)
EQEmu::Random::Real(double low, double high)
EQEmu::Random::Roll(int required)
EQEmu::Random::Roll(double required)
EQEmu::Random::Reseed()

For zone, you will access the random object through the zone object
ex.
	zone->random.Int(0, 100);

Int returns a random int between low and high
Real returns a random double between low and high
Roll(int) returns true if Int(0, 99) < required is true
Roll(double) returns true if Real(0.0, 1.0) <= required is true
2014-12-01 18:13:12 -05:00
Arthur Ice
a6177859ff fear_walkto_x, fear_walkto_y, fear_walkto_z replaced with m_FearWalkTarget converted to xyz_location 2014-11-26 14:57:12 -08:00
Michael Cook (mackal)
5ffb6bdee7 Reworked blind running around
This should be more in line with how we do current fearpath stuff
and with live.
2014-09-29 16:32:48 -04:00
Paul Coene
73a23e9f9d Changes so that blind effects like those in Flash of Light work. 2014-09-27 13:00:07 -04:00
KimLS
7fc21b9e3a Tons of renames 2014-08-21 19:33:02 -07:00
KimLS
629f9863ae Merge branch 'master' into raycast 2014-03-01 17:49:21 -08:00
cavedude00
1d6bd3cc5e Better flee runspeed calculation.
Added two new NPC special_abilities, ALWAYS_FLEE and FLEE_PERCENT.
Fixed an issue where a NPC could get stuck on a single coord in a rectangular roambox.
Added mindelay to spawngroup to allow for greater control of the roambox delay. SQL is required.
2014-02-26 18:06:16 -08:00