214 Commits

Author SHA1 Message Date
KimLS
c445f63186 Okay timers now work right, for real this time 2015-06-16 23:41:46 -07:00
regneq
be210950d7 readded previous commit smoother pathing. 2015-05-28 15:05:45 -07:00
SecretsOTheP
76d7fe1586 Fixes for mobs on pause waypoints dancing around.
Fixes for runspeed <= 0 as reported by demonstar55
2015-05-26 02:27:48 -04: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
Michael Cook (mackal)
ea5a1dd6f1 Bard instrument mods should be more consistent with live
Changes:
	Mods are now saved for in the DB so they are loaded on zone
	This allows long duration buffs from bards that get mods to keep their mods
	Ex. Selo's, Symphony of Battle

	Instrument mods are applied to basically anything that is an instrument skill
	The only exception to this is discs (ex. Puretone is Singing but always 10)

	Singing spells from procs (Ex. Storm Blade) that are instrument skills should
	inherit their buffs instrument mod. Doom effects should also. This isn't
	implemented yet.
2015-05-20 02:01:43 -04:00
Michael Cook (mackal)
553b7c9f8c Move the extra appearance packet guard to SetAppearance 2015-05-18 00:04:55 -04:00
regneq
052f343e4d smoother NPC pathing. (credit to Haynar from EQMacEmu) 2015-05-11 21:42:48 -07:00
Michael Cook (mackal)
c360aa9b0f Make use of Aggressive/Weapon PlayerStates
I HAVE NO IDEA WHAT THIS DOES, BUT LIVE DOES IT

Something to do with the animation system, all I know
2015-05-08 22:42:45 -04:00
KayenEQ
bc6199a86f Implemented a better method for developers who want to have additivie
worn bonuses than what was prior implemented.

Removed old rule RuleB(Spells, AdditiveBonusValues)

Replaced with new rule RuleI(AdditiveBonusWornType)

The rule value denotes a specific 'worntype' that is to be
checked on items. If the items 'worntype' matches the rules worntype
then any worn effect on that item will be cacluated additively
instead of taking the highest value. This will also stack with
regular worn effects that take highest value. Unless the value
is set to (2) which is what all live items use. If set to 2 then
all worn effects will be calculated additively (same as what the old
rule did).

In laymans terms. You can take 3 Cleave I items and put them on a character
and they will all add together if you set the worn type = 3 and the rule = 3.
Which would also add to any regular cleave set to worn type = 2.

Hope you enjoyed the novel.
2015-02-06 02:49:42 -05:00
Michael Cook (mackal)
99164fe3f9 Switch AI timers to smart pointers 2015-01-27 21:28:38 -05:00
Michael Cook (mackal)
a12011ca1e Fix some bugs with starting AI in mercs
The vtable ptr is that of the current constructor the code is in ...
2015-01-27 19:53:13 -05:00
Michael Cook (mackal)
7dcd12fb9d clang-modernize use-nullptr on zone/mob_ai.cpp 2015-01-27 19:32:49 -05: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
Michael Cook (mackal)
f702e953e7 Some std::abs usage and a bit of clang-formatting 2015-01-22 22:59:52 -05: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
22feb20def Remove Duplicative MySQL Error: Error in GetMaxNPCSpellsEffectsID query ' 2015-01-20 01:41:47 -06:00
Akkadius
0313ab2ac2 Remove Duplicative MySQL Error: Error in AddNPCSpells query1 ' 2015-01-20 01:41:45 -06:00
Akkadius
0e229895ec Remove Duplicative MySQL Error: Error in GetMaxNPCSpellsID query ' 2015-01-20 01:41:35 -06:00
Akkadius
611e6e7d4e Remove Duplicative MySQL Error: Error in Database::AddBannedIP query ' 2015-01-20 01:41:34 -06:00
Akkadius
fb03e8c67d Remove Duplicative MySQL Error: Error querying database for monster summoning pet in zone %s (%s) 2015-01-20 01:37:58 -06:00
Akkadius
0d9b6703a6 Rename debug.h to global_define.h, update cmakelists and such 2015-01-19 04:12:09 -06:00
Arthur Ice
97d7d69623 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:49:40 -08:00
Arthur Ice
8619a0b518 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:38:30 -08:00
Arthur Ice
d9b3d59729 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:33:54 -08:00
Arthur Ice
a0d012a6d6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:48:51 -08: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
Arthur Ice
37e4829ac4 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:55:16 -08: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
Arthur Ice
864e9ba8ef Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:48:44 -08:00
Arthur Ice
fccd767330 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:37:00 -08:00
Arthur Ice
f047ed232d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:33:34 -08: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
648494ec16 port mlog '*PATHING*' category to new log system 2015-01-17 02:33:48 -06:00
Akkadius
d4f2e0ce5f port mlog 'AI' category to new log system 2015-01-17 02:20:01 -06:00
Akkadius
7e7c59967c _log error convert to logger.Log(EQEmuLogSys::Error 2015-01-10 19:05:46 -06:00
Arthur Ice
cd9ca65587 merge upstream 2015-01-08 19:40:00 -08:00
Akkadius
18f9a06f06 Re-Push Refactoring changes before without broken functionality 2014-12-27 23:44:15 -06:00
Akkadius
3a488e3a61 Changed hate counter to uint32 to prevent negative rollback, this most likely can will be an issue but more uncommon
Renamed and refactored most functions and variables in hate_list.h/cpp for readability
Refactored how hate works in some local functions mixing the use of hate variable and split it out into different status variables
hate_list.cpp/.h style cleanup
hate_list.h header function sort, comment erase
functions should clearly state their function
2014-12-27 18:24:42 -06:00
Michael Cook (mackal)
8522542ae2 Use lambdas in sort functions (for zone at least) 2014-12-24 18:29:23 -05:00
Arthur Ice
f409d39f1a merge upstream 2014-12-21 13:57:20 -08:00
KayenEQ
ab5d0ad43f Fix for NPC ranged procs 2014-12-16 20:20:22 -05:00
Akkadius
ec43a9248b mob_ai.cpp header cleanup 2014-12-15 17:57:03 -06:00
Michael Cook (mackal)
118d587064 Implement IGNORE_ROOT_AGGRO_RULES (special attack 42)
This allows you to have a mob be rooted but still try to attack the
target with the most amount of hate instead of attacking the closest
2014-12-12 18:55:43 -05: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
69dbdb2485 GetSpawnPointX(). GetSpawnPointY(), GetSpawnPointZ(), and GetSpawnPointH() replaced with GetSpawnPoint() 2014-11-30 15:29:13 -08:00
Arthur Ice
4b71d28747 guard_x, guard_y, guard_z, guard_heading converted to xyz_heading as m_GuardPoint 2014-11-30 14:17:14 -08:00