90 Commits

Author SHA1 Message Date
Akkadius
ab8075d629 Cleanup eqemu_logsys code and automatically inject new logging categories into the database if they do not exist 2018-10-20 22:29:59 -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
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
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
Akkadius
7cda4aaa2c Fix some pathing logic that is using Z to match a node reach when it is error prone in certain scenarios
Fixed a decent amount of path logging
2017-07-18 19:09:28 -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
KimLS
281483efc1 Merge of a monster 2017-04-02 20:03:51 -07:00
Michael Cook (mackal)
484e60f142 Use do-while(0) trick for function like macros 2017-04-01 16:46:23 -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
KimLS
84367e1f77 Added headless connection stuff, fixing connecting with daybreakconnections 2016-11-13 23:28:25 -08:00
KimLS
5cad3f62d0 EQStream abstraction layer 2016-09-25 15:10:34 -07:00
Kinglykrab
ed9b6db369 Added optional IP-based account exemptions. 2016-08-27 17:49:04 -04:00
Akkadius
75cddbea71 Loginserver conversion to new Logging system 2015-12-09 20:30:47 -06:00
Akkadius
f2667cee23 Implement Packet logs with dumps
- Category: 41: Packet: Server -> Client With Dump
	- Category: 42: Packet: Server -> Client With Dump
	See: http://wiki.eqemulator.org/p?Logging_System_Overhaul#packet-logging-levels
2015-02-02 00:10:22 -06:00
Akkadius
75c48e5800 Add category prefix in file based log messages 2015-02-01 21:42:43 -06:00
Akkadius
f9ba99e99f Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	common/eqemu_logsys.h
2015-02-01 15:56:05 -06:00
Akkadius
b3ea1a9da7 Some changes 2015-02-01 04:05:32 -06:00
Akkadius
081a61a948 Add Packet :: Server -> Client category 2015-02-01 02:11:58 -06:00
Akkadius
46ac254b3a Add struct member LogSettings::is_category_enabled so that it can be used for fast checking in intense portions of code 2015-02-01 01:58:10 -06:00
Akkadius
5f64b1e1c8 Modify category descriptor Packet :: Client -> Server 2015-02-01 01:06:19 -06:00
JJ
96925f0dde Some minor cleanup. [skip ci] 2015-01-31 17:03:44 -05:00
Akkadius
a6b95aeceb At point in which Client -> Server packet logging is working, will do more prechecking to declare that anything actually is subscribed to this category before outputting 2015-01-31 02:23:58 -06:00
Akkadius
0c934272c0 Added Logs::DebugQuest category per request from Trevius (Great idea)
- Exported quest::debug(log_message, [debug_level = 1)
	- Example:
		quest::debug("This is a test debug message, level 1 (default)");
		quest::debug("This is a test debug message, level 1", 1);
		quest::debug("This is a test debug message, level 2", 2);
		quest::debug("This is a test debug message, level 3", 3);

		Result: http://i.imgur.com/6VoafGE.png
	- Uses traditional logging system to output this category
	- Required MySQL Source in Database version 9070
2015-01-28 20:00:03 -06:00
Trevius
fc5266e115 Added Logs::Mercenaries to the new Logging System. Logging of Mercenary information is off by default with the required SQL. 2015-01-25 12:31:07 -06:00
Michael Cook (mackal)
06ff4823d3 Minor tweaking to new logsys 2015-01-23 15:48:20 -05:00
Akkadius
90653a9d17 Comment up EQEmuLogSys class header. Change some string copys to rather pass by reference because its not necessary 2015-01-22 01:44:52 -06:00
Akkadius
d8926861b6 My GCC built fine, but lets make Travis happy 2015-01-22 00:46:45 -06:00
Akkadius
ce3d4e678f Push something that apparently didn't make its way through before 2015-01-20 19:19:57 -06:00
Akkadius
e4829225f6 Add file log handling in every process 2015-01-20 06:15:56 -06:00
Akkadius
ad5d1e4814 Some EQEmuLogSys changes regarding class variables 2015-01-20 05:36:15 -06:00
Akkadius
cdde408602 Some adjustments to file writing routines 2015-01-20 04:10:39 -06:00
Akkadius
42dffec4ae Various logging adjustments 2015-01-20 03:20:40 -06:00
Akkadius
e79c1c1a5a Fix Linux compiles 2015-01-20 03:07:33 -06:00
Akkadius
39626159a5 Implement Linux ANSI colors 2015-01-20 02:53:10 -06:00
Akkadius
951f98a63e Re-Implement GMSay colors: http://i.imgur.com/tQbuKUM.jpg 2015-01-20 00:53:52 -06:00
Akkadius
f239b113b9 Add MySQL query category 2015-01-19 23:52:11 -06:00
Akkadius
99dc83a9fd Convert MySQL Error logging to EQEmuLogSys and create MySQL Error category 2015-01-19 05:58:03 -06:00
Akkadius
56a4459aa8 More stuff 2015-01-19 04:27:22 -06:00
Akkadius
e428b373ac Adjust category names 2015-01-19 03:02:00 -06:00
Akkadius
2f74f07be7 Add EQEmuLogSys::GetConsoleColorFromCategory(uint16 log_category) to replace the static map 2015-01-19 02:47:51 -06:00
Akkadius
bf62d1fd26 Sort header functions 2015-01-19 02:32:46 -06:00
Akkadius
83906af9b6 Buildable state with converting hex packet dumps 2015-01-18 03:53:35 -06:00
Akkadius
b3bedef7af Bunch of crazy changes to remove logsys 2015-01-18 03:23:36 -06:00
Akkadius
1ae69aa180 Update debug levels 2015-01-18 02:35:15 -06: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
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
Akkadius
40d12d952e Refactor ProcessConsoleMessage to no longer use type 2015-01-18 01:45:58 -06:00
Akkadius
564bff07fe Refactor ProcessLogWrite to no longer use type 2015-01-18 01:42:23 -06:00
Akkadius
0926a5ded3 Refactor ProcessGMSay to no longer use type 2015-01-18 01:41:11 -06:00