38 Commits

Author SHA1 Message Date
Paul Coene
59152a9d77 Fix some constants. 2017-09-17 12:11:02 -04:00
Paul Coene
03399fe3fd Repair so that mobs that are fleeing or feared use FixZ. 2017-07-22 17:57:23 -04: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
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
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
KimLS
951c321ba6 Partial port of der's map rewrite, no new azone format yet but it's coming. Will convert legacy map formats on the fly atm. 2014-02-23 21:17:28 -08:00
KimLS
fcd9b525a8 Removed Common Profiler and Zone Profiler. They're well past outdated status and are just code bloat. 2013-08-29 15:46:40 -07:00
KimLS
63d678ce29 Replaced npcspecialatk with special_attacks, needs more testing also gotta export new api for it as I can't remove the legacy one. Too many quests rely on the legacy functionality. 2013-07-06 03:45:06 -07:00
Michael Cook
0fdfe025cb Remove 'using namespaces std' fixes #61 2013-05-22 16:17:19 -04:00
j883376
4bdd8b2502 Change space indentation to tabs 2013-05-09 11:37:51 -04:00
j883376
ffcff4aea1 Remove trailing whitespace 2013-05-09 11:13:16 -04:00
Arthur Ice
7560b6b0a7 NULL to nullptr 2013-05-04 18:06:58 -07:00
KimLS
da7347f76f svn -> git Migration 2013-02-16 16:14:39 -08:00