207 Commits

Author SHA1 Message Date
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
KimLS
7189994b78 Many lua things many many things 2017-05-19 22:50:08 -07:00
Akkadius
b5b6145786 Fix initialization issues with loading 'disable_timer' from the database for doors 2017-04-10 19:55:17 -05: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
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)
f64e1644b1 Take 2 at fixing encounters 2017-03-18 14:11:30 -04:00
Michael Cook (mackal)
bafb199d24 Fix encounters leaking?
I didn't actually test this ...
2017-03-18 01:30:59 -04:00
Michael Cook (mackal)
94d8db4691 clang-tidy said this was a use-after-free
Also, what is this code doing?
2017-03-16 14:10:36 -04:00
Michael Cook (mackal)
7d13475bac Fix ClearAggro xtarget issue 2017-03-02 14:31:48 -05:00
Michael Cook (mackal)
9f4604ec3e Rework how XTarget auto haters work
This should cause the auto haters to be shared with other toons who might be
interested (group/raid) like live.

There maybe some bugs since there is a lot of complex interactions here.
2017-02-17 21:04:48 -05:00
Michael Cook (mackal)
286bfa7af6 Implement the PC/NPC only flag 2016-11-30 20:53:39 -05:00
Uleat
8b5dd58e96 Renamed struct EQEmu::ItemBase to EQEmu::ItemData and class ItemInst to EQEmu::ItemInstance 2016-10-16 05:10:54 -04:00
Akkadius
db380944ac Prevent horses (player mounts) from being depopped during a #repop 2016-08-27 00:46:45 -05:00
Paul Coene
8048239a81 Merge remote-tracking branch 'upstream/master' 2016-08-23 13:55:52 -04:00
Paul Coene
ecdc0f7096 Fixed so mobs that depop at end of pathgrid still path and depop
whiel zones are empty.  This makes these mobs no longer always appear
at start locations for the 1st person in a zone after long idle.
2016-08-23 13:54:51 -04:00
Michael Cook (mackal)
e90e141a79 std::unordered_map::count is much slower than find 2016-08-10 23:51:06 -04:00
Uleat
7c9bd80c1e Changed SendZoneSpawnsBulk to a more like-like behavior 2016-08-02 17:49:08 -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
Michael Cook (mackal)
60da544d3a clang-tidy modernize-use-auto 2016-05-25 16:10:28 -04: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
Uleat
3031365e1f Moved struct Item_Struct into namespace EQEmu 2016-05-21 04:54:18 -04:00
Michael Cook (mackal)
47c9182ba3 Fix potential memory leaks (clang-tidy) 2016-05-06 22:58:45 -04:00
Uleat
b3475d7b50 Reworked ClientVersion into EQEmu::versions; Added EQEmu::versions::InventoryVersion 2016-04-22 03:49:17 -04:00
ngdeao
fb23d961c1 Changed where queued packets are sent while zoning. Moved where zoneinpacket_timer is started to assist in not dropping needed packets.
Added better netcode support for handling out of order acks, to preclude excessive resending of same packets.

Changed how timeout checks are performing on individual packets, for re-sends, so they do not happen more often than the client can respond.

Improved how the data rate limit for throttling packets for compressed stream, so the size reduction in packets are accounted for better.
2016-04-07 20:26:47 -06:00
Akkadius
c4cdf811e3 Fix for zone controller spawn events where npc isn't inserted into entity list yet 2016-01-22 13:42:14 -06:00
Akkadius
8425607460 Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
	- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
	- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
	- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
		- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
			$spawned_entity_id
			$spawned_npc_id
		- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
			$killer_id
			$killer_damage
			$killer_spell
			$killer_skill
			$killed_npc_id
2015-12-29 04:08:10 -06:00
Paul Coene
0c56660692 Merge remote-tracking branch 'upstream/master' 2015-11-20 12:04:11 -05:00
Paul Coene
f3120f26ee Fix issue with mobs no depopping (due to spawn_events) while zone is idle. 2015-11-20 12:03:43 -05:00
Akkadius
f884d8d738 Fix an issue where during a depop cycle and NPC's are engaged by wiping hatelist before issuing NPC depop 2015-11-02 21:33:36 -06:00
Akkadius
33917fe2a9 - Add Zone Process ID (OS PID) as information passed back to world, ultimately with the ability to display it in the telnet console under 'zonestatus'
- Refactored some zoneserver/worldserver code for readability
2015-10-31 20:19:57 -05:00
Michael Cook (mackal)
4ae02e5efe XTargets will move auto entries up on removal like live
This also makes use of the bulk packet so not a crap ton of packets
generated.
2015-09-03 02:58:04 -04:00
Michael Cook (mackal)
7cef9a05dd Bump witness fail chance to 50 2015-07-18 00:57:10 -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
KimLS
6515879c14 Merge branch 'master' into aa 2015-06-07 19:42:57 -07:00
KimLS
3d1dc6314d New style AA data loading, still rudimentary 2015-06-07 19:42:12 -07:00
Michael Cook (mackal)
f198ab714f Make inspect buffs LAA optional for target buffs 2015-06-07 22:31:21 -04:00
Russell Kinasz
2c6fd44811 Implemented encounter timers - no spawn required 2015-06-02 12:25:09 -07:00
Uleat
2308d3e880 Fix for EntityList::CheckSpawnQueue() debug assertion failure crash 2015-05-15 22:49:59 -04:00
Paul Coene
77dca484fe The mob AT_Anim (as set in spawn2) was not correctly displaying in
various situations.

First, the set function for mob _appearance optimized sending a message
if the new appearance was equal to the old.  This cann't be done, as
the 1st time the zone runs there is no client when the set function is
called.  If we're combining set/send, as we are, better to always do both.  This fixes several of the cases.

Repop also did not work, as no code was being called reliably to set
appearance and update the client based on code path and various flags.  This is also fixed.
2015-05-06 15:39:36 -04:00
Paul Coene
bf93d72a43 Added more changes so mobs armor will appear correctly (pc races only)
when the spawn vie gm command or normally with loot tables that equip.

Refined previous changes that fixed the issue with zoning in and not seeing
previosuly spawned armor by sharing the same module.
2015-04-02 13:25:12 -04:00
Paul Coene
a5872b165f Zoning into a new zone did not properly display PCs with tree/object illusions
and NPCs wearing gear in non-weapon slots.

The illusion thing: Not sure why, but te opcode for BulkZoneSpawn doesn't
display the tree/object illusions.  I did notice that even OP_Illusion gets
rejected by the client if sent before Client_Ready.  Maybe that is why.  The
BULKSpawns cannot be sent that late, I tried moving it in the sequence but
it never did the illusions correctly, at any point.  So, we new new the
single spawn OP code for PCs with those illusions.  This works.

The NPC gear thing.  Same story with BulkZoneSpawn,  Not sure why.  The data
is sent correctly.  So now we update the client zoning in (only them) with
what the NPCs are wearing.  Every othe client already is up to date.
2015-04-01 13:00:38 -04:00
Uleat
c96ee79b1e Added ';' to safe_delete_array(data) in ~BulkZoneSpawnPacket() 2015-03-06 04:26:26 -05:00
Akkadius
1d462bfd0f Revert some entity related CastTo changes 2015-01-25 01:42:46 -06:00
Akkadius
609cad72d9 Convert Entity::CastToNPC to Log.Out with EQDEBUG remove 2015-01-24 22:22:30 -06:00
Akkadius
a31ad485e4 Convert Entity::CastToClient to Log.Out 2015-01-24 22:20:58 -06:00
Uleat
cc1d7d54c2 Implemented mob equipment light sources 2015-01-24 22:00:06 -05:00
KimLS
17af9e3808 Merge fixes, hopefully didn't break anything. 2015-01-23 13:36:27 -08:00