649 Commits

Author SHA1 Message Date
Paul Coene
c7ad873581 Rule to dictate if you can teach yourself lang. 2017-09-24 16:33:08 -04:00
Michael Cook (mackal)
8c9b852586 Fix food/drink to match live 2017-09-19 02:01:06 -04:00
Akkadius
e88cd61097 Fix 95% of food/water consumption issues, if there are additional modifiers for race/class combos - those will need to be applied
Mods properly calculated

Stages should be put in place if not already:
https://wiki.project1999.com/Food_and_drink#Stages_of_Hunger_and_Thirst

Values stored in the database are 0-6000, previously we capped it at 6000 but previous math would have normal values in the 60k+ range in order for food to be consumed at a reasonable rate. We are now using more native logic where 1 = 1 minute, following logic:

(Minutes)
0 -  5	- This is a snack.
6 -  20	- This is a meal.
21 - 30	- This is a hearty meal.
31 - 40	- This is a banquet size meal.
41 - 50	- This meal is a feast!
51 - 60	- This is an enduring meal!
61 - X	- This is a miraculous meal!
2017-09-17 09:48:10 -05:00
Michael Cook (mackal)
ec77e3a6fd Add show_name and untargetable to npc_types fixes #637
Note the bodytype hack is still there since I was having issues with
some npcs still showing names
2017-07-19 02:17:08 -04:00
Akkadius
f9480f2518 Taper down on non-moving client update spam 2017-07-15 17:05:28 -05:00
Akkadius
43204e52f8 Client position updates should be smoother (granted the client has a good connection)
Clients should also no longer randomly disappear
2017-07-14 20:49:57 -05:00
Akkadius
5c75a68715 HP Update tuning - HP Updates are now forced when a client is targeted 2017-07-14 14:23:35 -05:00
Akkadius
855796448c Raid/Group/XTarget HP/Mana/Endurance updates now only send when percentage changes
Raid/Group Mana/Endurance updates should now update real-time once again
Fixed an issue with clients looking like they are 'skipping' when they are moving in view of another client
Fixed an issue with NPC's who are ghosted in plain view of a client when they are not really there
2017-07-11 17:54:46 -05:00
Akkadius
59a2f0cdde Refactor close_npcs to close_mobs for future implementations 2017-07-11 01:58:47 -05:00
Akkadius
dceb79ad69 Only send mana/endurance updates to self when they actually change 2017-07-10 22:57:58 -05:00
Akkadius
ccdeb4d385 Fix HP update issues, rework logic for more accurate and responsive HP updates 2017-07-09 17:35:08 -05:00
Akkadius
127f51e758 Massive reductions in unnecessary network traffic especially during high spam combat fights
- HP Updates now only send to others when HP percentage changes (0-100%)
		- HP Updates were sending excessively even during idle zones when HP wasn't changing at all
	- Attack animations now only send once per second versus up to a hundred times a second per Mob/Client
	- 17,000 OP_ClientUpdate packets per second have been observed in combat scenarios, some of the major culprits have been
		throttled without affecting what the client should see
	- Before and After packet differences under similar load/tests (Packets per second)
		- 7,000 - 8,000 	OP_Animation pps	After: 600-800 pps
		- 13,0000 - 17,000 	OP_MobHealth pps	After: 1-10 pps
		- 15,0000 - 20,000 	OP_ClientUpdate pps	After: 500-1,000 pps
	- Packet reports from a 46 client test here:
		https://gist.github.com/Akkadius/28b7ad2fdd82bdd15ea737c68f404346
	- Servers who use Marquee HP updates will also recieve far less packet spam as they will only be sent when HP changes
2017-07-09 02:51:01 -05:00
Michael Cook (mackal)
21ef83bcbe Fix /invite xtarget raid issue 2017-06-30 13:50:43 -04:00
KimLS
0a8b21d4ab Merge branch 'luamod' 2017-06-19 14:45:08 -07:00
Kinglykrab
d64f2e40c5 Implement EVENT_USE_SKILL in Perl/Lua.
- Exports skill_id and skill_level in Perl/Lua whenever a skill is used (bash, kick, taunt, etc.)
2017-06-10 22:20:45 -04:00
KimLS
4d8f5df261 Merge branch 'master' into luamod 2017-06-08 19:55:48 -07:00
Natedog2012
decaa1f7b6 Fix mismatch on Popup2 for Buttons / Duration (oops)
$client->Popup2("Title", "Text", YesID, NoID, Buttons, Duration, Button0, Button1);

YesID / NoID are the "popupid" for EVENT_POPUPRESPONSE depending on the players choice
2017-06-03 16:41:34 -07:00
Natedog2012
daced25101 Add Popup2 .. allows for more customization of the popup window. Using PlayMp3 with the SoundControl option for Popup2 enabled will allow you to adjust sound volume as well. 2017-06-03 16:17:50 -07:00
KimLS
7189994b78 Many lua things many many things 2017-05-19 22:50:08 -07:00
Michael Cook (mackal)
9277665f5f Fix consumption
Ahh not too sure why this is needed. We used the other field before
and the client is still displaying correct item clicky cast times
as well as food duration string ... Oh well
2017-05-17 15:03:14 -04:00
Michael Cook (mackal)
21f02f4ce4 Move pet command/button defines to common.h
I didn't want to include pets.h everywhere
2017-05-04 13:36:08 -04:00
Michael Cook (mackal)
8435fa269d Pet Command hack for UF+ 2017-05-04 01:39:24 -04:00
Michael Cook (mackal)
9229ca4f79 Add OP_PetCommandState for ghold/hold 2017-05-04 00:27:42 -04:00
Michael Cook (mackal)
34549a4bdb Change clientpackets to std::deque from LinkedList
This should be better performance, but I couldn't really
push local testing to hit the performance issues ...
2017-04-25 02:13:31 -04:00
KimLS
004c0f7858 Merge fix 2017-04-15 12:18:50 -07:00
E Spause
cb8c3595b7 SoF-era con system. New rule, UseOldConSystem to disable this functionality. 2017-04-15 13:06:46 -04:00
KimLS
1d1ee1ccbf Merge fix 2017-04-11 21:48:01 -07:00
KimLS
281483efc1 Merge of a monster 2017-04-02 20:03:51 -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)
de52d2f64a You can skill yourself up in languages
This is very easy to test with mercs now
2017-04-01 14:26:35 -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)
9f199100e5 Initialize Client::Haste
Apparently it was possible to get this value referenced before CalcBonuses was
called leading to bad values being used.
2017-03-31 13:13:28 -04:00
Akkadius
a06d5fab89 [Performance] Adjust HP marquee call checks 2017-03-28 15:49:13 -05:00
Akkadius
47691c2102 [Performance] Removed a timer where clients would constantly calculate light amount on equipment every 600ms, instead clients will update light when changing equipment or entering a zone 2017-03-28 02:36:51 -05: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
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
KimLS
de777fc90f Merge fix 2017-03-26 17:25:01 -07:00
Akkadius
aa25946dc2 [Performance] Reduced CPU footprint in cases where a client is checking for aggro excessively every 750 millseconds. This has
been adjusted to 6 seconds per new rule RULE_INT(Aggro, ClientAggroCheckInterval)
	- When zones have many players, with many NPC's, this adds up quickly
2017-03-26 00:03:51 -05:00
Uleat
f77f996c3f Pass through zone code to fix uninitialized pointer declarations 2017-03-23 04:35:36 -04:00
KimLS
cfdbca6f12 Fix for unreliable packets (kind of a hack but it works) being flagged as corrupt 2017-03-20 00:22:50 -07:00
Uleat
d882c5fbf6 Fix for glitchy mercenary unsuspend button behavior (report any abnormalities) 2017-03-18 16:11:07 -04:00
Michael Cook (mackal)
1ae66ce955 Fix uninit jump in Client::Process 2017-03-18 00:59:13 -04:00
KimLS
159706efa9 Merge branch 'master' into eqstream 2017-03-12 18:39:15 -07:00
Akkadius
14d09485eb Implement new rule based ranges for various range based packet operations (performance)
- the defaults are set in the code and can be tweaked by sourcing utils/sql/git/optional/rule_values_range_update.sql
- Thanks to mackal for gathering live ranges, thanks to takp for initial numbers
- We would send 200 for combat updates and the client will only display <= range 54 anyways, these should help a lot in spammy combat

RULE_CATEGORY( Range )
RULE_INT ( Range, Say, 135 )
RULE_INT ( Range, Emote, 135 )
RULE_INT ( Range, BeginCast, 200)
RULE_INT ( Range, Anims, 135)
RULE_INT ( Range, DamageMessages, 50)
RULE_INT ( Range, SpellMessages, 75)
RULE_INT ( Range, SongMessages, 75)
RULE_CATEGORY_END()
2017-03-12 14:38:14 -05:00
KimLS
25cbdf5f2c Merge branch 'master' into eqstream 2017-02-28 23:18:35 -08:00
Michael Cook (mackal)
666513c4ab Better comment SendGroupCreatePacket 2017-02-27 15:21:50 -05:00
Michael Cook (mackal)
91ae6a6613 Secondary aggro meter fix 2017-02-26 19:13:47 -05:00
KimLS
0d1e63c92a Merge remote-tracking branch 'origin/master' into eqstream 2017-02-25 15:31:40 -08:00
Michael Cook (mackal)
602381ebec copy paste fail 2017-02-23 12:27:44 -05:00
KimLS
d402b25d69 Merge fix 2017-02-21 21:20:33 -08:00