78 Commits

Author SHA1 Message Date
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
Uleat
18005ac7a9 Fix for random SoF client crashes (possibly Titanium too) 2018-07-14 18:41:47 -04:00
Uleat
c435a77813 Reintegration of inventory-based EQDictionary references 2018-07-05 21:05:26 -04:00
KimLS
a53f65d86b Merge and compile fixes (non-bot, will do bots later) 2018-04-16 14:15:08 -07: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
regneq
cd748e7d8b Fixed an issue that would cause traps to not function correctly if skill is 0 in the database.
Added undetectable column, to allow content developers to make a trap undetectable and not able to be disarmed.

Pets will no longer try to aggro traps its owner triggers.

Traps will now use the radius column to determine disarm range, instead of using a hardcoded value which may not be appropriate in all cases.

Decreased the scan range for traps to disarm.

Fixed some typos, and removed some unused code.
2017-10-28 10:02:31 -07:00
regneq
ed98aa45d2 Traps overhaul. New functionality has been added, while preserving the old functionality. Numerous bug fixes occurred as well.
Added column triggered_number. If this is set, then the trap will despawn after it has been triggered this number of times. If 0, the trap will never despawn on its own.

Added group column. This allows developers to group traps together in a similar way as spawngroups for NPCs. When a trap that is grouped is despawned in anyway, a random trap in the group will take its place. Grouped traps do not have to be at the same coords or have the same type. This can allow for some spawning diversity if so required. If set to 0, the trap is not grouped and will always respawn.

Added column despawn_when_triggered. If set to 1, then a trap will despawn when a player triggers it. If 0, then there will be a 5 second reset time and then the same trap will again be active. (Assuming triggered_number has not been reached.) The player that triggered the trap will not re-trigger it until they have left and re-enetered the trap's radius.

Traps will no longer trigger on players that are currently zoning. This fixes some weirdness and at least one crash. The trap can trigger however after the connection is been completed. If a player camped out in a trap radius they can potentially still be hit.

Alarm type traps were not using effectvalue2 to determine who should be aggroed. This is now fixed.

Traps will no longer be broken by #repop, #depopzone, or #reloadworld. All 3 commands will now have the same effect on traps as they do for NPCs.

Added command #reloadtraps. This reloads all of the traps in the zone.

Added command #trapinfo. This gives some information about the traps currently spawned in the zone.

Added Traps logsys category

Required SQL:
utils/sql/git/required/2017_10_26_traps.sql
2017-10-27 21:24:24 -07:00
KimLS
ffbee0ad1a Merge 2017-08-09 10:42:07 -07:00
KimLS
5f1063acb9 Add pathfinding interfaces, still heavily wip 2017-07-18 00:01:59 -07: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
Akkadius
59a2f0cdde Refactor close_npcs to close_mobs for future implementations 2017-07-11 01:58:47 -05:00
Akkadius
ec00daa5be Mob position updates now completely only send to 600 units range defined by Range:MobPositionUpdates
Client updates nearby clients more often because they will disappear after 10 seconds without a position update to the client
This results in a massive reduction in unnecessary traffic as we only update clients of their relevance around them
This also resembles live-like packet sending behavior of positions
2017-07-10 23:03:40 -05:00
Akkadius
aed1959dbe Fix issues with underground NPC corpses - add command #fixcorpses to fix nearby NPC corpses of the player (this should be a seldom need) 2017-07-03 01:53:41 -05:00
Michael Cook (mackal)
3e1b75b814 Fix Rain target limit (massive nerf)
Added rule Spells:OldRainTargets, set to true if you don't want the nerf
2017-06-25 18:18:27 -04:00
KimLS
7189994b78 Many lua things many many things 2017-05-19 22:50:08 -07:00
Akkadius
d7dfc18c54 Cleaned up some of the NPC to NPC aggro code, only do aggro checks to other NPC's when the NPC is flagged for it 2017-04-01 23:16:27 -05:00
Michael Cook (mackal)
138ad99eea Make lua Get*List entity_list functions less silly 2017-03-28 14:31:10 -04:00
Michael Cook (mackal)
eee8b0bf23 Add some const & GetList entity functions 2017-03-28 13:45:20 -04:00
Akkadius
4b6ce1c19e [Performance] Reworked how client to NPC aggro checks are made
- Before when reverse aggro checks were done (client to NPC), checks would happen every 750 millseconds where a client would
		check an entire entity list with distance calcs and other checks for aggro, with many clients in a zone and many NPC's this would
		add a lot of unecessary overhead. A temporary adjustment on 3/25 was made and upped the check to 6 seconds.
	- Now, there is a new methodology to scanning. The client will build a cache list of NPC's within close range as defined in new rule:
		RULE_INT(Range, ClientNPCScan, 300) and will also get any NPC that has an aggro range beyond that defined range to use in
		the frequent checks for aggro, the result is far less overhead
	- Client scanning changes when moving versus not moving, the client will scan aggro every 500 milliseconds while moving, and
		3000 millseconds aggro check when not moving, with a 6000ms re-fetch for close NPC's
	- A demo of these changes can be found here:
		https://youtu.be/aGroiwLSTVU
2017-03-28 01:30:42 -05:00
Michael Cook (mackal)
bafb199d24 Fix encounters leaking?
I didn't actually test this ...
2017-03-18 01:30:59 -04:00
Uleat
38651258fc Updated npc spell types to 32-bit mask 2017-02-09 17:57:55 -05:00
Michael Cook (mackal)
286bfa7af6 Implement the PC/NPC only flag 2016-11-30 20:53:39 -05:00
Uleat
bfd07b1010 Added class EQEmu::InventorySlot 2016-10-16 21:36:39 -04:00
Michael Cook (mackal)
e90e141a79 std::unordered_map::count is much slower than find 2016-08-10 23:51:06 -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
e75a53b775 Rework of eq_dictionary 2016-04-07 17:21:55 -04:00
Uleat
b327da7092 Activation of the new 'Bots' command system 2016-03-24 18:50:31 -04:00
KayenEQ
fc5d6bd792 Fix for AE taunt to use correct range and hate modifier.
Fix for spell effect version of taunt to use correct range.
2016-03-24 16:26:29 -04:00
Michael Cook (mackal)
a52ab7ae48 Rework spell aggro based on http://www.eqemulator.org/forums/showthread.php?t=39819<F37> 2015-07-16 22:38:32 -04:00
KimLS
d5098a56e0 Timers and some more loading stuff 2015-06-20 19:44:00 -07:00
Russell Kinasz
2c6fd44811 Implemented encounter timers - no spawn required 2015-06-02 12:25:09 -07: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
3d74035e24 Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts:
	zone/command.cpp
	zone/command.h
	zone/inventory.cpp
2015-01-21 16:40:46 -06:00
Michael Cook (mackal)
fd77fbf163 Merge pull request #313 from addtheice/data_bundling
Data bundling
2015-01-17 17:30:14 -05:00
Akkadius
d21466566e Remove some mlog related functions in Mob:: 2015-01-16 21:53:56 -06:00
Michael Cook (mackal)
5b78acc45e Make the AI stopping a little less silly on zone shutdown 2015-01-10 02:34:38 -05:00
Arthur Ice
cd9ca65587 merge upstream 2015-01-08 19:40:00 -08:00
Akkadius
73fe229e25 More hate changes 2014-12-27 20:23:49 -06:00
Arthur Ice
f409d39f1a merge upstream 2014-12-21 13:57:20 -08:00
Akkadius
9cbaedc64f entity.cpp & .h header cleanup & forward declare 2014-12-15 17:19:49 -06:00
Arthur Ice
e31c95670a EntityList::ProcessMove converted to xyz_location 2014-11-30 23:50:24 -08:00
Arthur Ice
54f3f7f343 EntityList::GetRandomClient converted to xyz_location 2014-11-30 22:28:17 -08:00
Arthur Ice
c3471ed88e EntityList::CreateGroundObject converted to xyz_heading 2014-11-30 21:30:16 -08:00
Arthur Ice
d54215ea18 EntityList::CreateGroundObjectFromModel converted to to xyz_heading 2014-11-30 21:20:46 -08:00
Arthur Ice
4f03ebb3af EntityList::CreateDoor converted to xyz_heading 2014-11-30 21:04:39 -08:00
KayenEQ
94231b62a3 Updated swarm pet AI to be consistent with live.
*OLD AI: Swarm pet would lock on to target until target died, then depop as soon as target died.

*NEW AI: Swarm pet will attack cast on target, NOT perma locked it can change targets if attacked
by something else that generate more hate. When target dies swarm pet will follow owner, if owner is
attacked by something else the swarm pet will attack it (until duration timer despawns the pet).

Updated perl quest function: MakeTempPet(Tspell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)
Implemented perl quest function:  Mob::TypesTempPet(npctypesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0)
Note: 'sticktarg' field will cause the swarm pet to use the OLD AI

Rule to use OLD AI only - default is disabled.
Optional SQL: utils/sql/git/optional/2014_11_15_SwarmPetTargetLock.sql
2014-11-15 23:01:26 -05:00
Michael Cook (mackal)
7476ae2a82 Tracking default order should now be correct
Reworked the tracking packet creation, should be better
2014-11-06 21:48:42 -05:00
KayenEQ
adb8175654 Support for spells_new field 'viral_range' 2014-10-26 02:05:36 -04:00