107 Commits

Author SHA1 Message Date
Akkadius
3eee699a89 Calculate roambox destination z once and let navmesh pathfinding calculate it the rest of the time 2018-09-03 04:07:13 -05:00
Akkadius
4b6ab34fd9 Fix, cleanup and simplify the roambox logic and cleanup a bunch of other related code 2018-08-18 18:12:18 -05:00
Akkadius
1e0ec048af HP update adjustment that should cover a scenario when mob is feared 2018-08-11 00:12:09 -05:00
Trust
9251e6efd2 Disarm Support 2018-07-21 19:16:19 -04:00
Akkadius
0d094754db Add #grid show comand to display a targeted NPCs grid points visually 2018-07-09 01:15:57 -05:00
Uleat
c435a77813 Reintegration of inventory-based EQDictionary references 2018-07-05 21:05:26 -04:00
Michael Cook (mackal)
c5e4bb08f4 Implement global loot system Fixes #619
This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
2018-02-10 22:15:21 -05:00
Michael Cook (mackal)
f720e51585 Implement NPC Charm Stats
These combat stats an NPC will change to while charmed
2018-02-04 16:30:16 -05:00
Michael Cook (mackal)
3c794cfc07 Add Support to define a valid HP range for NPC casting
These will allow us to define a valid HP range (HP of the caster) that
an NPC will cast a spell. For example NPC casting a defensive spell at
2018-02-01 18:34:07 -05:00
Michael Cook (mackal)
f8ce10472b Rework some Spell AI so NPCs can have spammy spells
Lots of encounters in EQ will spam spells, like dragon fear is on a very
tight timer etc. In order to eliminate the need to script all of these
encounters AI spells with a priority of '0' will be treated as "innate
spells." Devs have used this term and it is what I believe they mean by
it.

You can run update npc_spells_entries set priority = priority + 1 where priority >= 0;
to disable the behavior.
2018-01-28 18:06:54 -05:00
Kinglykrab
ceb2b287bb Fixed merchantlist probability.
NPCs were setting a singular chance value and each item was checking based on this value, making the probability field not a random chance per item.
This removes the probability field from NPCs, SetMerchantProbability() and GetMerchantProbability() and makes the probability field truly random chance.

Special thanks to ChaosSlayerZ for noticing the issue here: http://www.eqemulator.org/forums/showthread.php?t=41731
2018-01-27 19:08:15 -05:00
Akkadius
40ebee9ff4 Noudess: This makes newly spawned NPCs have a chance to cast 2018-01-13 22:14:21 -06:00
Michael Cook (mackal)
94038ebb75 WIP on auras
Lots to do still

Normal buffing auras currently work for the most part
2017-07-14 02:05:35 -04:00
regneq
4600844336 Added ignore_despawn column to npc_types to have NPCs ignore the despawn column in spawngroup. 2017-04-07 19:45:26 -07:00
Akkadius
bf45a5a44f [Performance] Fixed a large overhead issue where every single NPC in a zone was checking to depop themselves
as a swarm pet every 3ms regardless of being a swarm pet or not. Swarm pets now check to depop only when their timer is up
2017-03-28 02:30:06 -05:00
Uleat
d62a449f9c Missed an npc spells type (or two..) 2017-02-15 07:03:43 -05:00
Uleat
38651258fc Updated npc spell types to 32-bit mask 2017-02-09 17:57:55 -05:00
Michael Cook (mackal)
9e824876ba Combat Revamp - MAJOR BREAKING CHANGE
This commit makes combat much more live like. This is based on a lot of parses
done by TAKP and myself. There are numerous things based on dev quotes and
hints. Pretty much all combat has changed, spell effects correct, stacking
correct, etc.

This is the fist stage of the revamp, I will be trying to remove some code
duplication and make things generally cleaner.

Server ops will have to rebalance their NPCs. AC actually means something now.
Rough recommendations?
Level 50 "classic" trash should be no more than 115.
Classic raid mobs should be more 200+ etc
Other "classic" NPCs should be a lot lower as well.
PoP trash probably shouldn't exceed 120 AC
PoP raids should be higher
Devs have said the vast majority of NPCs didn't exceed 600 AC until very
recently. The exceptions were mostly raid encounters.

There really isn't a good "default" for every server, so this will be up to
the devs to find where they want their server stats to be.
2017-01-15 00:03:02 -05:00
Kinglykrab
6abed18eb9 Added augment support for NPC AddItem() and quest::addloot in Perl/Lua. This will allow you to add items to NPCs with scripts that already have augments in them. 2016-10-20 21:12:47 -04:00
Uleat
bfd07b1010 Added class EQEmu::InventorySlot 2016-10-16 21:36:39 -04:00
Uleat
8b5dd58e96 Renamed struct EQEmu::ItemBase to EQEmu::ItemData and class ItemInst to EQEmu::ItemInstance 2016-10-16 05:10:54 -04:00
Michael Cook (mackal)
039e0fbb83 NPC innate procs overwrite TargetType to ST_Target 2016-08-12 21:53:14 -04:00
Uleat
579efe83af Renamed EQEmu::Item_Struct to EQEmu::ItemBase to coincide with new inventory naming conventions (re-run shared_memory.exe) 2016-05-27 22:22:19 -04:00
Uleat
71f128731f Renamed and moved SkillUseTypes enumeration to EQEmu::skills::SkillType; eq_dictionary work 2016-05-25 18:50:26 -04:00
Uleat
3031365e1f Moved struct Item_Struct into namespace EQEmu 2016-05-21 04:54:18 -04:00
Uleat
1890d006a2 Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition 2016-04-22 07:34:55 -04:00
Uleat
8edb6e9595 Eliminated the nested class design of recent EQEmu work; Some more inv2 convergence work 2016-04-19 04:02:53 -04:00
Uleat
e75a53b775 Rework of eq_dictionary 2016-04-07 17:21:55 -04:00
Michael Cook (mackal)
9599501ace Implement extra bind points (secondary recall)
For SE_Gate, base2 is which bind to use (starting at 1)
For SE_BindAffinity, base1 is which bind to set (starting at 1)
For SE_GateCastersBindpoint, base1 is which bind to use (starting at 1)
    here was actually no spells that don't send to the main bind,
    but it uses a base1 of 1 which matches with SE_Gate
    This also doesn't break anything

The quest stuff for now hasn't been updated to be able to make use of the extra binds

There are a total of 5 bind points, with the 5th being your starting city
2016-03-05 16:28:53 -05:00
Akkadius
9757c38017 Adjust manifest [skip ci] 2015-12-29 01:30:20 -06:00
Michael Cook (mackal)
a4d0db8e0a Implement the extra Wild Rampage/Rampage message (SoD+) 2015-08-15 00:34:10 -04:00
Michael Cook (mackal)
42a5ddcf77 Cut down on some HP update spam
This increases the timer that mobs will send out updates
(It could probably be increased more)
This will also reset the timer every time SendHPUpdate is called
to prevent sending like 3+ completely useless updates at once
Also skip sending the update to the client if we're sending an
OP_Damage with the damage since the client will apply this number
2015-06-06 17:46:53 -04:00
regneq
be210950d7 readded previous commit smoother pathing. 2015-05-28 15:05:45 -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
052f343e4d smoother NPC pathing. (credit to Haynar from EQMacEmu) 2015-05-11 21:42:48 -07:00
Uleat
1f0b86a0d5 Changes to how valid light sources are critiqued 2015-02-26 18:46:12 -05:00
KayenEQ
9d866c1889 perl $npc->ChangeLastName(name)
perl $npc->ClearLastName()
Modifies NPC last names.
2015-02-23 03:52:43 -05:00
KimLS
ecd05d821e Merge and fix the loot update branch, ready for merge I think 2015-02-04 23:13:02 -08:00
Michael Cook (mackal)
99164fe3f9 Switch AI timers to smart pointers 2015-01-27 21:28:38 -05:00
Uleat
cc1d7d54c2 Implemented mob equipment light sources 2015-01-24 22:00:06 -05: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
Arthur Ice
cd9ca65587 merge upstream 2015-01-08 19:40:00 -08:00
Trevius
f1a73d4da2 Changed the pet command #defines to be based on RoF2 list of pet commands and added decodes to Titanium, SoF and SoD.
(RoF+) The /pet focus on/off and /pet hold on/off commands are now functional.
Added more toggle and on/off support for pet commands.
2015-01-06 01:19:33 -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
Trevius
c48d2d9888 (RoF+) Added herosforgemodel field to the npc_types table. Not fully functional yet for NPCs (currently only displays helm correctly).
(RoF2) Updated item links from #npcstat command output.
2014-12-24 02:31:37 -06:00
Kinglykrab
1329a2f9ba Update npc_types table.
- d_meele_texture1 -> d_melee_texture1
- d_meele_texture2 -> d_melee_texture2
- Required SQL: 2014_12_24_npc_types_update.sql
2014-12-24 01:26:07 -05:00
Arthur Ice
f409d39f1a merge upstream 2014-12-21 13:57:20 -08:00
KayenEQ
cd33307975 NPC ranged attack projectiles will now do damage on impact.
Uses same rule as the client version.
2014-12-17 10:59:23 -05:00
KayenEQ
fc306bbc1d Fix for special attack NPC_CHASE_DISTANCE to now work correctly
Perl export: NPC GetAttackDelay
Perl export: NPC GetAvoidanceRating
Perl export: NPC AddMeleeProc
Special Attacks will no longer be able to hit immune to melee / bane only flagged NPCs.
2014-12-16 18:53:15 -05:00
Michael Cook (mackal)
820f99067d Make use of the targetable_with_hotkey flag for SoF+ 2014-12-10 01:19:44 -05:00