Compare commits

...

3222 Commits

Author SHA1 Message Date
KimLS b26d9c07f1 Some of these really slow down profiling without adding much (short functions) 2015-02-13 00:38:28 -08:00
KimLS 8e45fd2253 Added profiling to a lot of /common, though not all some misc or small functions were purposely skipped 2015-02-12 13:32:58 -08:00
KimLS 76cdedccb8 Fix for not writing logs, added profiling to a bunch of common lib stuff. 2015-02-11 21:48:57 -08:00
KimLS d39e886459 Merge branch 'master' into profiler 2015-02-10 22:27:26 -08:00
KayenEQ 7f65080c45 Merge pull request #373 from KayenEQ/Development
numhits issue fix
2015-02-10 23:25:16 -05:00
KayenEQ c8acb7bd43 numhits issue fix 2015-02-10 23:24:41 -05:00
Trevius 69d727cbe5 (SoF+) Removed duplicate packets being sent to client on zone (Take #2)! 2015-02-10 19:22:42 -06:00
KimLS 9daf572ea7 Fix for no factions in database crashing the server and shared memory 2015-02-10 11:53:39 -08:00
Michael Cook (mackal) f613d12c61 Revert "(SoF+) Removed duplicate packets being sent to client on zone."
This reverts commit e6eb4e16d1.
2015-02-10 12:49:32 -05:00
Trevius 927e4f83ff (RoF2) Updated Expedition Opcodes 2015-02-09 20:07:04 -06:00
Trevius 82b9af3956 (RoF+) Guild Invites between RoF+ and previous Clients is now functional. 2015-02-09 19:54:14 -06:00
KimLS 82933a80d1 Merge branch 'master' of github.com:EQEmu/Server 2015-02-09 17:48:20 -08:00
KimLS 543e265b0a Adjustments to OP_SpawnAppearance, as well as updating import client files to handle newer spell files 2015-02-09 17:48:07 -08:00
Trevius c4eb6e2881 (RoF+) Setting Alt flag on characters in the Guild Management Window is now saved and functional for filtering. 2015-02-09 18:52:17 -06:00
Trevius e6eb4e16d1 (SoF+) Removed duplicate packets being sent to client on zone. 2015-02-09 17:23:43 -06:00
Michael Cook (mackal) 95b66583b3 Merge pull request #367 from JohnsonAskot/master
Sanity checking
2015-02-09 17:54:08 -05:00
Michael Cook (mackal) 45e7ff9193 Fix RoF2 item hotkeys
This string thing needs to be longer! Still no idea what it is
2015-02-09 03:02:25 -05:00
KayenEQ 48c65628d8 Merge pull request #371 from KayenEQ/Development
npc special ability (44) COUNTER_AVOID_DAMAGE
2015-02-08 20:30:41 -05:00
KayenEQ 0521cae8d0 Implemented npc specialability (44) COUNTER_AVOID_DAMAGE which when applied to the ATTACKING NPC will make their attacks more difficult to be avoided by riposte/dodge/parry/block.
Parama0: Negative modifer value that affects ALL avoid damage types dodge/parry/riposte/block) chance on defender. Ie (44,50 = 50 pct reduction to ALL)
Parama1: Negative modifer value that affects RIPOSTE chance on defender. Ie (44,1,0,50 = 50 pct reduction to riposte chance)
Parama2: Negative modifer value that affects PARRY chance on defender.  Ie (44,1,0,0,50 = 50 pct reduction to parry chance)
Parama3: Negative modifer value that affects BLOCK chance on defender.  Ie (44,1,0,0,0,50 = 50 pct reduction to block chance)
Parama4: Negative modifer value that affects DODGE chance on defender.  e (44,1,0,0,0,0,50 = 50 pct reduction to dodge chance)
Example of usage: Player has Improved Dodge V (+50 pct dodge chance), you want to negate this bonus you would set 44,1,0,0,0,0,50 on your NPC.

Clean up and minor fixes to AvoidDamage function.
Added support to a few AA bonuses there.
2015-02-08 20:17:51 -05:00
KayenEQ 4629c7c8c4 Merge git://github.com/EQEmu/Server into Development 2015-02-08 19:04:06 -05:00
Akkadius 8b925f549b derp [skip ci] 2015-02-08 06:19:14 -06:00
Akkadius cb81d956f6 Reduced #repop time dramatically by taking down hundreds of individual SELECT/DELETE/INSERT queries in routines and bringing it down to very few
See: https://www.youtube.com/watch?v=9kSFbyTBuAk
2015-02-08 05:01:58 -06:00
KayenEQ 1149f04389 Merge pull request #370 from KayenEQ/Development
bonus fix
2015-02-07 20:20:48 -05:00
KayenEQ 9aac1b0081 Merge git://github.com/EQEmu/Server into Development 2015-02-07 20:19:58 -05:00
KayenEQ 3392f4b1c3 bonus fix 2015-02-07 20:16:27 -05:00
KayenEQ 20712ce0e6 Merge pull request #369 from KayenEQ/Development
Should fix spell bonuses not being applied properly
2015-02-07 20:08:27 -05:00
KayenEQ 9a15361e93 Should fix spell bonuses not being applied properly 2015-02-07 20:07:46 -05:00
KimLS 452b1a1eae Added throttling to some appearance packets, also removed responding to client light packets. With the new light code we'll tell the client when the light has changed not the other way around. 2015-02-07 15:55:01 -08:00
JJ edbd055277 Revert b96e5a7f4d to search for better fix. 2015-02-07 17:27:48 -05:00
KimLS 00eb526876 Changed how i dump to file. 2015-02-07 12:51:54 -08:00
JohnsonAskot 7bf054bd58 Name removed from comments 2015-02-07 14:35:43 -05:00
Michael Cook (mackal) 67ee327f5b Better sanity checking in Client::BuyTraderItem to prevent potential exploits 2015-02-07 12:39:46 -05:00
JohnsonAskot 63810d5c1b Exploit fixes
Bind Wound was spammable via packet sending. You could buy a larger
stack than the max StackSize of an item from merchants that had
unlimited of those stackable items.
2015-02-07 12:34:50 -05:00
Akkadius d5047da637 Fix an issue that is slowing repops down and unecessarily causing more work for respawn timer code 2015-02-06 19:55:00 -06:00
Uleat 9446d75444 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2015-02-06 13:20:32 -05:00
Uleat c9cd733d9a Updated command #iteminfo 2015-02-06 12:09:26 -05:00
Uleat 5a619bddaf Excluded limbo (cursor buffer) from HasItem checks 2015-02-06 09:58:57 -05:00
Uleat 5d64012d74 Removed iter_inst and iter_contents typedefs 2015-02-06 08:52:41 -05:00
Uleat 2bf2485b4c Enforced const_interator returns on const_iterator return types in Inventory and ItemInst 2015-02-06 07:57:15 -05:00
KimLS b5d33c7cbe Extended to shared database 2015-02-06 00:17:12 -08:00
KayenEQ 8acaa47b8f Merge pull request #366 from KayenEQ/Development
Optional additive worn effect bonus rule
2015-02-06 03:06:04 -05:00
KayenEQ bc6199a86f Implemented a better method for developers who want to have additivie
worn bonuses than what was prior implemented.

Removed old rule RuleB(Spells, AdditiveBonusValues)

Replaced with new rule RuleI(AdditiveBonusWornType)

The rule value denotes a specific 'worntype' that is to be
checked on items. If the items 'worntype' matches the rules worntype
then any worn effect on that item will be cacluated additively
instead of taking the highest value. This will also stack with
regular worn effects that take highest value. Unless the value
is set to (2) which is what all live items use. If set to 2 then
all worn effects will be calculated additively (same as what the old
rule did).

In laymans terms. You can take 3 Cleave I items and put them on a character
and they will all add together if you set the worn type = 3 and the rule = 3.
Which would also add to any regular cleave set to worn type = 2.

Hope you enjoyed the novel.
2015-02-06 02:49:42 -05:00
KimLS 05df5c3e74 Fixed linking 2015-02-05 23:36:35 -08:00
KimLS ac1a3d0743 Shared memory profiling 2015-02-05 23:31:39 -08:00
KimLS 7fd3cc3483 Merge from master 2015-02-05 23:24:51 -08:00
Trevius f26d303ee1 Fixed Environmental Damage for RoF2. 2015-02-05 22:34:55 -06:00
JJ b96e5a7f4d Group leader is not always member 0. 2015-02-05 19:18:51 -05:00
Michael Cook (mackal) 36d53f69d6 Fix query in Database::SetRaidGroupLeaderInfo 2015-02-05 18:11:38 -05:00
Akkadius ef5d475978 Correct db manifest [skip ci] 2015-02-05 06:05:49 -06:00
Akkadius dce6ccf4de GetTaskActivityDoneCountFromTaskID crash fix 2015-02-05 05:43:36 -06:00
KayenEQ b169544711 Merge pull request #365 from KayenEQ/Development
Calc focus effects from worn slots, for an additive foci bonus [NOT LIVE LIKE]
2015-02-05 06:24:43 -05:00
KayenEQ 1495eb42a3 sql 2015-02-05 04:27:52 -05:00
KayenEQ dd17597c92 Implemented non-live like feature to allow focus effects to be placed in worn slot
to provide an additive focus bonus that stacks with regular focus effects.
This is opposed to how regular focus effects work in which the highest
value is always taken. Please note, focus calculated from worn slot
will only use only the focuses base value (ie ignores all limit checks).

Example (Hypothetical).
Improved Heal I (10 pct focus) in Helm Worn Slot
Improved Heal I (10 pct focus) in Glove Worn Slot
Improved Heal V (50 pct focus) in Glove Focus Slot
Total Heal Focus would be 50 + 10 + 10

Added optional rule which is OFF by default.
UseAdditiveFocusFromWornSlot
2015-02-05 04:27:33 -05:00
Alex 54c3f9ab94 Merge pull request #364 from EQEmu/loot
Loot Upgrade
2015-02-05 00:06:38 -08:00
KimLS ecd05d821e Merge and fix the loot update branch, ready for merge I think 2015-02-04 23:13:02 -08:00
KayenEQ 4bd2e04482 Merge pull request #363 from KayenEQ/Development
Added perl function function: CanClassEquipItem(item_id)
2015-02-04 22:46:47 -05:00
KayenEQ cafd0eaba1 Added perl function function: CanClassEquipItem(item_id)
Returns a bool if can equip or not.
2015-02-04 22:46:02 -05:00
Uleat facd7d357d Light source exclusion tweak (helps with strobing effects) 2015-02-03 22:43:03 -05:00
Trevius 8bc5e5eee1 Crashfix for TempName() when numbers are passed at the end of the name. 2015-02-03 17:23:29 -06:00
KayenEQ bfa6bd3458 Merge pull request #362 from KayenEQ/Development
Improvements to the pet type (5) code.
2015-02-03 08:01:15 -05:00
KayenEQ 33767aeb91 Improvements to the pet type (5) code. 2015-02-03 07:59:29 -05:00
KayenEQ ff8a19b1cb Merge pull request #361 from KayenEQ/Development
Implemented pet type 5 (petTargetLock)
2015-02-03 07:10:41 -05:00
KayenEQ 356316db84 Optional SQL to convert all(?) live pets that should use the new pet type (5). 2015-02-03 07:09:24 -05:00
KayenEQ 379219aff1 Implemented new pet type (5) which summons a regular pet that locks onto
the casters target exclusively until the target dies, when target dies
the pet is killed. (Pets don't respond to commands except get lost).
This does not stack with regular pets.

Note: On live these pets cast an actual spell (Unsummon) that kills them for 20k damage,
due to how limiting that is to be hard coded, the pets will simply just
kill themselves instead.

Pending, will needd to add an optional SQL to update pet tables to convert
known live spells that use this.
2015-02-03 06:40:51 -05:00
KimLS 5747b3460f More perf work, need to switch branches. 2015-02-02 23:10:03 -08:00
KayenEQ a677d40f6d Merge pull request #360 from KayenEQ/Development
Fix to allow for PBAE/Targeted AE spells to check the 'npc_no_los' field...
2015-02-02 03:02:14 -05:00
KayenEQ aed3d9ef85 Fix to allow for PBAE/Targeted AE spells to check the 'npc_no_los' field in spell file
to disable LOS checks.
2015-02-02 03:01:37 -05: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
Michael Cook (mackal) e1c49f93e2 Out of bounds bandoleer fix 2015-02-02 00:18:29 -05:00
Akkadius d2b9d4ab20 find_replace fix for real 2015-02-01 22:40:56 -06:00
Akkadius 20c99e36d8 find_replace fix 2015-02-01 22:29:04 -06:00
Akkadius 3ec39ce06b Changelog 2015-02-01 22:00:21 -06:00
Akkadius 10e3c31ad6 Packet Logging database version update 2015-02-01 21:56:45 -06:00
Akkadius 4b08c75527 Add some 'is_category_enabled' before some more core logging function calls 2015-02-01 21:47:41 -06:00
Akkadius 8aa8982b66 Add File 2015_02_01_logsys_packet_logs.sql 2015-02-01 21:43:50 -06:00
Akkadius 5daa29aa3f Merge branch 'master' of https://github.com/EQEmu/Server 2015-02-01 21:42:53 -06:00
Akkadius 75c48e5800 Add category prefix in file based log messages 2015-02-01 21:42:43 -06:00
JJ 6c982179bc Merge pull request #358 from noudess/master
Repair min/max faction issues.
2015-02-01 20:59:23 -05:00
Akkadius 02e56331ec Have is_category_enabled update appropriately when settings are set via #logs 2015-02-01 19:57:02 -06:00
Akkadius 774e429d87 Get Logs::Client_Server_Packet_Unhandled to show raw opcodes 2015-02-01 19:56:32 -06:00
Michael Cook (mackal) 3340d01902 Merge pull request #359 from KinglyKrab/master
Added new rule to make the UnmemSpellAll on death optional.
2015-02-01 19:40:15 -05:00
Kinglykrab 180612bb21 Added new rule to make the UnmemSpellAll on death optional.
- New Rule: Character:UnmemSpellsOnDeath (default true)
2015-02-01 18:57:26 -05:00
Michael Cook (mackal) 8649ed1dcb Add quest debugging to lua 2015-02-01 17:25:16 -05: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
Paul Coene 1d40f20da0 Remove incorrect use of before_hit 2015-02-01 16:14:05 -05:00
Michael Cook (mackal) cced57f56a Fix lua events 2015-02-01 15:11:27 -05:00
Paul Coene 614014a238 Faction update 2015-02-01 15:02:14 -05:00
Paul Coene 1ff2a043f4 Merge branch 'master' of https://github.com/EQEmu/Server 2015-02-01 09:34:04 -05:00
Paul Coene 115d0d14ac Fix issues with faction where chars were not allowed to earn faction to
offset starting faction values.
2015-02-01 09:31:07 -05:00
KayenEQ 7df541ea1c Merge pull request #357 from KayenEQ/Development
Pets can now cast group spells on self will now affect group.
2015-02-01 06:35:08 -05:00
KayenEQ 73ac566c17 remove debug... 2015-02-01 06:32:56 -05:00
KayenEQ cc4c6b6339 Fix/Implemented - Pets who cast group spells (Target Type 43) will now have the spell
affect entire group instead of just the pet.

This used to work at some point, no clue when it broke...
2015-02-01 06:31:53 -05:00
KimLS b6a2ac05bf UCS Profiling 2015-02-01 02:25:07 -08:00
Akkadius b3ea1a9da7 Some changes 2015-02-01 04:05:32 -06:00
Akkadius 5fcd3eb38e Implement stable Server -> Client packet logging 2015-02-01 03:25:16 -06:00
Akkadius e35205eaf4 Add Packet :: Server -> Client logging 2015-02-01 02:13:47 -06:00
Akkadius 081a61a948 Add Packet :: Server -> Client category 2015-02-01 02:11:58 -06:00
Akkadius d75c632d73 Chnage netcode logging check to use is_category_enabled instead of just checking for console 2015-02-01 02:10:18 -06:00
Akkadius d9c47fcd41 Add a category check pre Logs::Client_Server_Packet trigger 2015-02-01 02:09:24 -06:00
Akkadius 387b445685 Fix the 'is_category_enabled' in each of the database loaders 2015-02-01 02:08:46 -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
Akkadius 5c729e65c9 Add sanity checks to GMSayHookCallBackProcess 2015-02-01 01:05:39 -06:00
Akkadius 4f4eee2b16 Re-Order string_util.h 2015-02-01 01:03:30 -06:00
Akkadius ed9bdaf60c Add to string_util.h void find_replace(std::string& string_subject, std::string& search_string, std::string& replace_string) { 2015-02-01 01:00:05 -06:00
KimLS 2c6eba93ae Back to ST profiling, wont bother profiling the common library for now. 2015-01-31 22:21:52 -08:00
KimLS 444b652c4f Working working working on adding profiling, also switched to multi-threaded profiler (slower but need it). 2015-01-31 19:06:14 -08:00
Michael Cook (mackal) b590eb2dc4 Send item recast timestamps picking up ground spawns 2015-01-31 20:54:56 -05:00
KimLS 2acf84ce4a Merge branch 'master' into profiler 2015-01-31 14:54:10 -08:00
Michael Cook (mackal) 5be1bd2ffb Make items with long reuse timers show the timer after zone
This adds a new table to store the timers in. This may seem
odd but the timers are associated with the player, not the
item, they're just included in the item header in the packet

Currently trading still needs to be handled
2015-01-31 17:53:50 -05:00
KimLS e135f46711 Added profiler to loginserver as initial work cause it's the smallest service or one of the smallest 2015-01-31 14:52:27 -08:00
Michael Cook (mackal) b5d45effec Fix some zone/npc.cpp functions 2015-01-31 17:33:41 -05:00
JJ 96925f0dde Some minor cleanup. [skip ci] 2015-01-31 17:03:44 -05:00
Michael Cook (mackal) c06c69c420 Merge pull request #356 from clucksoft/rof_merchantlist
Rof merchantlist
2015-01-31 16:22:39 -05:00
JJ 17d276cd4e Finish proper SQL. [skip ci] 2015-01-31 15:22:03 -05:00
Russell Kinasz 2763fe36a3 RoF+ can send 200 items in merchantlist 2015-01-31 11:17:28 -08:00
Russell Kinasz 1e8916ee98 RoF+ can send 200 items in merchantlist 2015-01-31 11:11:06 -08:00
Trevius fe6fa75385 Fixed FindGroundZ() and GetGroundZ() to once again utilize the X and Y arguments that are passed to them. 2015-01-31 11:44:25 -06:00
Michael Cook (mackal) eb7d77bcac Shared Bank bug fix? 2015-01-31 03:48:59 -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
Michael Cook (mackal) 0bdbc5f5c9 More clang-formatting 2015-01-31 01:22:40 -05:00
Akkadius 3c08af5ca1 (Bobaski) Add PoK New Merchant sql/git/optional/2015_01_30_poknowledge_spell_vendors.sql 2015-01-30 23:43:35 -06:00
Akkadius 7a3399e510 WOOPS! (That's what he said) 2015-01-30 23:17:11 -06:00
Akkadius 877d2cab4e Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-30 23:16:08 -06:00
Akkadius 39a47ceb93 Implemented LUA counterpart of EVENT_ENVIRONMENTAL_DAMAGE 2015-01-30 23:15:48 -06:00
Akkadius 8229a578ee Implemented event type "EVENT_ENVIRONMENTAL_DAMAGE"
- This event triggers when taking any sort of environmental damage. Example use:
	sub EVENT_ENVIRONMENTAL_DAMAGE{
		quest::debug("EVENT_ENVIRONMENTAL_DAMAGE");
		quest::debug("env_damage is " . $env_damage);
		quest::debug("env_damage_type is " . $env_damage_type);
		quest::debug("env_final_damage is " . $env_final_damage);
	}
	Result: (Test falling in Velks): http://i.imgur.com/tPRL7yL.png
2015-01-30 23:01:31 -06:00
Michael Cook (mackal) 0f1b504ed6 Some clang-formatting 2015-01-31 00:00:02 -05:00
Akkadius 62197d7d33 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-30 22:58:52 -06:00
Michael Cook (mackal) a18cb6f61e Another tell_queue leak fix 2015-01-30 22:00:39 -05:00
Michael Cook (mackal) 18fb507f24 Tell queue memleak fix 2015-01-30 20:23:17 -05:00
KayenEQ db948b3653 Merge pull request #355 from KayenEQ/Development
remove debug
2015-01-30 19:32:17 -05:00
KayenEQ e8553576f7 remove debug 2015-01-30 19:28:16 -05:00
KayenEQ 867b57bcf6 removed debug msg 2015-01-30 19:21:24 -05:00
Akkadius ee57568c5d Implement Rule Based Environment damage multiplier 2015-01-30 18:12:00 -06:00
KayenEQ d93f3bdd9e Merge pull request #354 from KayenEQ/Development
Charm/Paci fixes
2015-01-30 18:48:38 -05:00
KayenEQ ccbaf337f4 Fix for minimum charm and root resist chances (was always returning 0).
Fix for pacification not doing a proper second resist check upon resisting intial pacification.
2015-01-30 18:47:27 -05:00
Michael Cook (mackal) b592d2e786 clang format some stuff in zone/command.cpp 2015-01-30 18:32:28 -05:00
KimLS 9a664476b0 Merge branch 'eqstream_ptr' 2015-01-30 15:03:40 -08:00
KimLS f388a605dd Spelling errors and revised my cle change to put it much lower so it shouldn't have any side effects other than avoiding the crash 2015-01-30 15:03:02 -08:00
Alex 01c0a87cee Merge pull request #353 from EQEmu/eqstream_ptr
Change EQStream raw pointers to be std::shared_ptr
2015-01-30 13:41:49 -08:00
KimLS faaa98d3f0 Crash fix for crash we saw on peq 2015-01-30 13:04:51 -08:00
Michael Cook (mackal) 769987ca33 unique_ptr is a better fit here 2015-01-30 02:34:33 -05:00
Michael Cook (mackal) 8086eecfe2 Fix db manifest 2015-01-30 01:38:26 -05:00
Michael Cook (mackal) 8ec1cb949a Fix merc attack delay 2015-01-30 01:33:55 -05:00
KimLS 5e1a886e8f Merge branch 'master' into eqstream_ptr 2015-01-29 22:13:41 -08:00
Trevius 0aba2d578a Added more information to Mercenary Logging.
Added potential fix for Mercenaries that fail to unsuspend.
Added a new "statscale" field to the merc_stats table that can be used to quickly balance Mercenary Stats based on Level.
The new "statscale" field now combines with the Mercs::ScaleRate rule value (default 100 percent for both).
2015-01-29 23:04:41 -06:00
KayenEQ dd980ab8ad Merge pull request #352 from KayenEQ/Development
Fix for range procs
2015-01-28 23:54:38 -05:00
KayenEQ 30dbe34f78 Fix for range procs 2015-01-28 23:53:52 -05:00
Akkadius 5d465a4d49 UCS Crash Fix 2015-01-28 22:47:43 -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
Akkadius 61e9160d47 Update eqemu_update.pl to download patch_UF.conf instead of patch_Underfoot.conf 2015-01-28 00:05:29 -06:00
KimLS 7dbe6a7426 Many tweaks to stream memory allocation, including but not limited to streams now are shared_ptrs. 2015-01-27 21:12:44 -08:00
Michael Cook (mackal) 5f545df312 Remove const 2015-01-27 21:48:11 -05:00
Michael Cook (mackal) 99164fe3f9 Switch AI timers to smart pointers 2015-01-27 21:28:38 -05:00
Akkadius 2211a63fe7 Some minor format changes to SaveCharacterCorpse 2015-01-27 20:24:43 -06:00
Akkadius 0f196cc995 Fix for ZoneDatabase::SaveCharacterCorpse where a corpse was empty and two individual corpses would be created 2015-01-27 19:46:31 -06:00
Michael Cook (mackal) a12011ca1e Fix some bugs with starting AI in mercs
The vtable ptr is that of the current constructor the code is in ...
2015-01-27 19:53:13 -05:00
Michael Cook (mackal) 7dcd12fb9d clang-modernize use-nullptr on zone/mob_ai.cpp 2015-01-27 19:32:49 -05:00
Uleat d037bc9dcc Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-27 18:40:04 -05:00
Uleat dd9f419735 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2015-01-27 18:34:43 -05:00
Michael Cook (mackal) 62d1b0c2bd Merc NPCType memleak fix 2015-01-27 18:32:32 -05:00
Uleat 4832acde0b Finished ClientVersion naming conventions (don't forget to copy the renamed patch_UF.conf file) 2015-01-27 05:09:35 -05:00
Trevius f17fb2a8e1 Removed "Mercenary Debug:" from the Mercenary Log entries.
Resolved duplicate "You have no Mercenaries" messages when zoning without owning a Mercenary.
Mercenaries should now always be able to unsuspend if the timer is up.
More work on Mercenaries and Grouping to reduce bugs and redundant queries.
2015-01-27 00:35:39 -06:00
JJ fab3a988ae Remove specified user/database. [skip ci] 2015-01-26 21:26:01 -05:00
JJ 6a43fd3b45 Merge pull request #351 from noudess/master
Repair Faction System Messaging
2015-01-26 20:55:17 -05:00
Uleat 64c302b07a Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-26 19:44:50 -05:00
Uleat 89f8006f11 Changed the return type of Corpse::MoveItemToCorpse() to void and added a 'by address' parameter to replace it -- Fixed a bug that would 'unattune' soulbound items inside of bags 2015-01-26 19:44:33 -05:00
Paul Coene 5f3baf3649 Merge remote-tracking branch 'upstream/master' 2015-01-26 14:30:21 -05:00
Natedog2012 f67382c024 Allow ranged procs to work again 2015-01-26 13:58:54 -05:00
Akkadius e1e53b926f Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-26 01:53:37 -06:00
Akkadius 26a766335f Fix for GetCharactersInInstance post-cleanup 2015-01-26 01:51:29 -06:00
Michael Cook (mackal) 03a27ca9ed Merge pull request #350 from addtheice/dead_code_removal
Dead code removal
2015-01-26 01:13:25 -05:00
Michael Cook (mackal) 6e295a1102 Rewrite StringFormat to take advantage of RVO
The standard stipulates that if RVO doesn't take place, that it should
return an rvalue anyways, so move semantics should take place without
the std::move, which were just forcing RVO to not be attempted.

Also removed duplicate code

The only thing that /might/ be slower is the output.clear() but that's
an edge case anyways.
2015-01-26 00:31:50 -05:00
Akkadius a698eff106 Natedog: Fix #gassign to work more appropriately and simplify the function 2015-01-25 23:27:44 -06:00
Akkadius d63f137a9f Now that versioning works, set script back to V 2 [skip ci] 2015-01-25 21:26:25 -06:00
Akkadius a5b77981b7 Rename db_update.pl to eqemu_update.pl so that the script is more of a generic upgrade script for future add-ons as well as implementing versioning without waiting for everyone to download the copy of the script that successfully self-updates. [skip ci] 2015-01-25 21:23:50 -06:00
Akkadius 38aa7134ad Update db_update.pl verbiage [ci skip] 2015-01-25 20:54:45 -06:00
Akkadius 9d9df6931e Re-Implement file check for db_update.pl in Database::CheckDatabaseConversions() so when the file exists it isn't re-downloaded
Increment db_update.pl current version to version 2
Update Database::CheckDatabaseConversions() to check for version 2 of db_update.pl
2015-01-25 20:48:30 -06:00
Akkadius d51271dc6d Fail safe for db_update.pl so that the menu loop does not loop forever, it will exit after 50 loops
Add --no-check-certificate to Linux wget for method GetRemoteFile in db_update.pl
Add a case where if the actual database version is greater than what world reports as the binary_database_version that it will simply continue booting up
2015-01-25 20:39:54 -06:00
Akkadius 58b5f6b88f Update db_dumper.pl to allow remote host backups 2015-01-25 16:51:58 -06:00
KimLS 0c7a861caf Fix for spell target det crash. Also added a command line arg to world ignore_db that lets you ignore the db conversion process for servers that dont need it. 2015-01-25 14:18:30 -08: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
Paul Coene cad4ebc6f3 Procedure for peqdb users to see all faction information for their character. 2015-01-25 12:42:19 -05:00
Trevius 966acb25b3 Fixed an issue where Mercenaries were causing several DB queries per second while suspended. 2015-01-25 11:28:34 -06:00
Paul Coene 60412276da Report repair as well as change from Update Personal Faction. 2015-01-25 09:55:41 -05:00
Paul Coene 22de30bab3 Repair faction messaging code.
The messages were being based on total faction rather than personal faction.
The personal faction range is all that is needed to detremine which message.

There were several bugs as well.  Fixed several edge conditions
2015-01-25 09:46:00 -05:00
Akkadius 5266d7b25c Add extra checking at the root of Log.Out to check if the category is subscribed to any of the output methods before trying to parse message strings and then pass them to the sub output functions and THEN perform log_setting checks and debug_level checks.
I performed a unit test of 1,000,000 log writes, there is hardly any difference.

#::: Before Checks
[01-25-2015 :: 03:15:35] [999999] Test #2... Took 17.940001 seconds

#::: With Checks
[01-25-2015 :: 04:10:55] [999999] Test #2... Took 18.018000 seconds
2015-01-25 04:24:05 -06:00
Akkadius 4f19fe9f91 Travis compile fix for real? 2015-01-25 02:27:30 -06:00
Akkadius 5e107a9936 Help Travis figure out what time of day it is 2015-01-25 02:23:05 -06:00
Akkadius 6212045dcd Add database_instances.cpp 2015-01-25 02:16:11 -06:00
Akkadius 1d462bfd0f Revert some entity related CastTo changes 2015-01-25 01:42:46 -06:00
Akkadius daa3b5d257 DeleteCharacter remove whitespaces in line endings 2015-01-24 23:55:01 -06:00
Akkadius 7b3d1c3252 DeleteCharacter formatting changes 2015-01-24 23:52:48 -06:00
Akkadius 60e17bbeaa Misc formatting changes 2015-01-24 23:49:29 -06:00
Akkadius 06b8ce6017 Cleanup database.h header and add database_conversions.cpp file 2015-01-24 23:43:00 -06:00
Akkadius 968e936114 Create database_conversions.cpp and move all of the conversion code to it 2015-01-24 23:34:14 -06:00
Akkadius 0af719e3a2 Cleanup Database::GetMiniLoginAccount 2015-01-24 23:10:55 -06:00
Akkadius 0ae5784c99 Cleanup Database::AddClientToInstance 2015-01-24 23:08:40 -06:00
Akkadius 00ae27136c Cleanup Database::CheckInstanceExists 2015-01-24 23:05:41 -06:00
Akkadius e5f22f1f00 Cleanup Database::BuryCorpsesInInstance 2015-01-24 23:04:55 -06:00
Akkadius 3b7ea7fe24 Cleanup Database::CheckInstanceExists, use just one column instead of * as storing more results than you need to is generally slower 2015-01-24 23:02:51 -06:00
Akkadius f4a25b0331 Cleanup Database::GetAdventureStats 2015-01-24 22:59:52 -06:00
Akkadius 00d3939ece Cleanup Database::GlobalInstance 2015-01-24 22:58:14 -06:00
Akkadius 5aadfc5577 Cleanup Database::AssignRaidToInstance 2015-01-24 22:56:18 -06:00
Akkadius 003b56bc39 Cleanup Database::AssignGroupToInstance 2015-01-24 22:55:51 -06:00
Akkadius 64192fa1d7 Cleanup Database::GetCharactersInInstance 2015-01-24 22:55:15 -06:00
Akkadius 3428540d01 Cleanup Database::GetInstanceID, the 2nd version 2015-01-24 22:54:16 -06:00
Akkadius 10ab806859 Cleanup Database::GetInstanceID 2015-01-24 22:51:49 -06:00
Akkadius 13af3e35e2 Removed COMMANDS_LOGGING ifdef 2015-01-24 22:48:06 -06:00
Akkadius 36e01cb9f1 Adjust some commands that default to 0, change Log commands to Commands category instead of Error 2015-01-24 22:46:40 -06:00
Akkadius 9c92cbb780 Remove redundant MySQL error message in ClearRaidLeader 2015-01-24 22:42:51 -06:00
Akkadius e7b4a38e69 Remove redundant MySQL error message in ClearAllRaidLeaders 2015-01-24 22:40:58 -06:00
Akkadius 5585b50601 Remove redundant MySQL error message in SetRaidGroupLeaderInfo 2015-01-24 22:38:35 -06:00
Akkadius 8d30ca51ca Cleanup Database::GetRaidLeaderName log Messages 2015-01-24 22:37:40 -06:00
Akkadius f39afc51c7 Suppress Error message for GetRaidID (Unable to get raid id, char not found) because it will happen for any player who is not in a raid anyways which makes it pointless 2015-01-24 22:29:23 -06:00
Akkadius 8ed1d5042a Suppress Error message for GetRaidID (Unable to get raid id, char not found) because it will happen for any player who is not in a raid anyways which makes it pointless 2015-01-24 22:29:15 -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
Akkadius 1b1c82a3e7 Doors::HandleClick and remove #EQDEBUG check, convert log 2015-01-24 22:09:58 -06:00
Akkadius ecf354e2c9 Update database table to the real defaults that it was intended to have 2015-01-24 22:05:29 -06:00
Akkadius 62d9de3074 Cleanup logging in Client::Handle_OP_CastSpell as well as some more conversions 2015-01-24 22:01:37 -06:00
Akkadius d3fb59b3e5 Cleanup logging in Client::Handle_OP_CastSpell 2015-01-24 22:00:20 -06:00
Uleat 1a5b211d07 Added more to changelog notes for equipment light source commit 2015-01-24 22:10:17 -05:00
Uleat cc1d7d54c2 Implemented mob equipment light sources 2015-01-24 22:00:06 -05:00
Uleat 7e980e1e7c Added 'NoDrop Hack' check log message to Client::SwapItem() 2015-01-24 20:46:48 -05:00
Arthur Ice c16ad9e111 removed unused code win_getopt.cpp/h 2015-01-24 14:03:31 -08:00
Arthur Ice 7e9d9b87b7 removed unused code seperator-2.h 2015-01-24 14:00:30 -08:00
Arthur Ice 21c6688f0d removed unused code queues.h 2015-01-24 13:58:03 -08:00
Arthur Ice a3536ec7f7 removed unused code dbmemshare.cpp 2015-01-24 13:53:13 -08:00
Arthur Ice 04dadbf56e removed unused code breakdowns.h 2015-01-24 13:48:57 -08:00
Alex 262ccf3d06 Merge pull request #349 from EQEmu/db_types
Merge of db_types branch.
2015-01-24 12:24:07 -08:00
KimLS 73c6a0bb1d Fix for bug with usage of IsOrigin, bug from when i was just doing glm::dot(pos, pos) == 0 2015-01-24 12:01:42 -08:00
KimLS 8d30e4b8a6 Merge branch 'master' into db_types 2015-01-24 11:50:20 -08:00
Alex 854f7d6575 Merge pull request #348 from addtheice/moremath
removed moremath.cpp/h
2015-01-24 11:50:09 -08:00
KimLS 34bec5913b Merge plus changed getposition to return a reference 2015-01-24 11:48:06 -08:00
Natedog2012 069572fe15 Fix for CastSpell if the spellID is invalid thus not having a name 2015-01-24 14:08:56 -05:00
Akkadius 26018ec898 astyle client_mods.cpp 2015-01-24 05:11:19 -06:00
Akkadius 6300cbb6b8 Client::CalcMaxMana Log adjust 2015-01-24 05:03:27 -06:00
Akkadius 91fe63537b Client::ACMod Log adjust 2015-01-24 05:01:23 -06:00
Akkadius 7b6b3c8094 Removed EQDEBUG preprocessor check in TextLink::GenerateLink 2015-01-24 04:58:16 -06:00
Akkadius dfeb6e62a4 Changed a log entry to use Trade category instead of none 2015-01-24 04:55:03 -06:00
Akkadius e24b67cbb4 Fixed DumpTrade to filter through trading Debug level 3 logs. Removed preprocessor checks 2015-01-24 04:54:02 -06:00
Akkadius dbabd06ce5 Remove EQDEBUG preprocessor from PersistentTimer::Load 2015-01-24 04:40:45 -06:00
Akkadius d0595e3794 Remove log junk from command_spawn 2015-01-24 04:38:22 -06:00
Akkadius 04623b2c0c Remove preprocessor and convert log message 2015-01-24 04:31:09 -06:00
Akkadius e18a49a974 Cleanup in command_guild 2015-01-24 04:28:41 -06:00
Akkadius 50ccb52465 Adjust logging in command_time 2015-01-24 04:27:32 -06:00
Akkadius d7a2387f3d Sort command_init alphabetically and cleanup 2015-01-24 04:22:33 -06:00
Akkadius 734a2c42b2 Remove some processor and cleanup logging around Commands 2015-01-24 04:17:58 -06:00
Akkadius b2dbc3923c Remove occurence of ChangeSQLLog 2015-01-24 03:59:52 -06:00
Akkadius 5cb0fe0a6f Remove Client::ChangeSQLLog 2015-01-24 03:51:48 -06:00
Akkadius d5714cdcb0 Remove Client::LogSQL 2015-01-24 03:51:19 -06:00
Akkadius ce161c2583 Some fixes from replace removal of LogSQL 2015-01-24 03:50:33 -06:00
Akkadius e1747c43b9 Remove occurrences of LogSQL 2015-01-24 03:49:20 -06:00
Akkadius 8ba8a1e6fa Remove occurrences of LogSQL 2015-01-24 03:49:14 -06:00
Akkadius 4e9cfa7c30 Remove occurrences of LogSQL 2015-01-24 03:49:13 -06:00
Akkadius 2d24b1f37e Remove occurrences of LogSQL 2015-01-24 03:49:12 -06:00
Akkadius c218419ecc Remove occurrences of LogSQL 2015-01-24 03:49:12 -06:00
Akkadius c88bf64bd5 Remove occurrences of LogSQL 2015-01-24 03:49:11 -06:00
Akkadius 377c071918 Remove occurrences of LogSQL 2015-01-24 03:49:10 -06:00
Akkadius d2011e58b4 Remove occurrences of LogSQL 2015-01-24 03:49:09 -06:00
Akkadius 384c041ea9 Remove occurrences of LogSQL 2015-01-24 03:49:09 -06:00
Akkadius d78b9ff2a1 Remove occurrences of LogSQL 2015-01-24 03:49:08 -06:00
Akkadius c28570f92e Remove occurrences of LogSQL 2015-01-24 03:49:07 -06:00
Akkadius 71f0d86767 Remove occurrences of LogSQL 2015-01-24 03:49:06 -06:00
Akkadius fcd4923938 Remove occurrences of LogSQL 2015-01-24 03:49:05 -06:00
Akkadius f18b9d79da Remove occurrences of LogSQL 2015-01-24 03:49:05 -06:00
Akkadius 2457f5f455 Remove occurrences of LogSQL 2015-01-24 03:49:03 -06:00
Akkadius acb78cec17 Remove command_logsql as it is completely unecessary now 2015-01-24 03:40:11 -06:00
Akkadius 443e3bf8a7 Fix Database::ReserveName so that it no longer relies on a failed insert into the character_data table to return false; on character creation. Log message for Logs::World_Server added for the same 2015-01-24 01:20:04 -06:00
Akkadius 66008f4475 Fix situation where someone will add a player to an instance for sanity sake (twice) and INSERT will fail, this is merely suppressing logsby doing a REPLACE INTO via Database::AddClientToInstance 2015-01-24 00:57:36 -06:00
Arthur Ice 010778f937 removed moremath.cpp/h 2015-01-23 21:13:20 -08:00
Natedog2012 057f4ed1f4 Fix for incorrect formatting type 2015-01-23 23:17:23 -05:00
KimLS 669bca8da8 Fix for bots compile 2015-01-23 18:24:53 -08:00
KimLS a7710c027b Fix for polluted headers that were messing with glm 2015-01-23 17:58:03 -08:00
Trevius c822990213 Reverting last push due to zone crash from double deletes. 2015-01-23 17:13:21 -06:00
Trevius bfca9c0383 Added deletes to RoF2 Patch file for potential mem-leaks. 2015-01-23 16:43:35 -06:00
KimLS 17af9e3808 Merge fixes, hopefully didn't break anything. 2015-01-23 13:36:27 -08:00
Michael Cook (mackal) 06ff4823d3 Minor tweaking to new logsys 2015-01-23 15:48:20 -05:00
KimLS 143c0cf0f9 Fix for x and y swapped on water maps 2015-01-23 12:23:24 -08:00
Natedog2012 451983ffc9 Fix formatting on this.. which caused major zone crashes 2015-01-23 14:16:16 -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
Michael Cook (mackal) f702e953e7 Some std::abs usage and a bit of clang-formatting 2015-01-22 22:59:52 -05:00
KimLS 03286f540a Updated version of glm 2015-01-22 16:52:50 -08:00
Alex 45ca5520fe Merge pull request #332 from addtheice/range_based_for_prepared
modified mysql results/row to be ready for range based for
2015-01-22 16:50:52 -08:00
Alex 7bfc3a48a8 Merge pull request #343 from noudess/master
Made familiars persistent.
2015-01-22 16:48:38 -08:00
Akkadius 65397cf03e Compile fix for Loginserver 2015-01-22 16:48:10 -06:00
Akkadius 908c7b1464 Re-Fix Skills log message print types 2015-01-22 15:56:03 -06:00
Akkadius ec121e5ec8 Re-Fix db_update_manifest.txt and Binary Database Version 2015-01-22 15:53:30 -06:00
Akkadius 78a1926d72 Fix .SQL file for logsys categories so that the manifest does not have issues (Again) 2015-01-22 15:47:47 -06:00
Akkadius 82fb69eed4 Changelog entry 2015-01-22 02:54:53 -06:00
Akkadius 570bd1bd00 Change .txt file write extension to .log more appropriately 2015-01-22 02:40:35 -06:00
Akkadius 7d70afd4c9 Change crash location to logs/crashes/<> 2015-01-22 02:36:55 -06:00
Akkadius 4f931c45fb Adjusting #logs verbiage 2015-01-22 02:21:41 -06: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 83e90ddc6d Merge remote-tracking branch 'remotes/origin/logging_changes' 2015-01-22 00:34:58 -06:00
Akkadius 50b3c2e39f Re-add 2015_01_21_npc_types_update.sql because Git was being weird 2015-01-22 00:15:47 -06:00
Akkadius 49409810df Update manifest, delete SQL File 2015-01-22 00:15:14 -06:00
Uleat ca3502758e Added script for non-existent light column 2015-01-21 23:07:29 -05:00
KayenEQ 26b91a0a97 Merge pull request #346 from KayenEQ/Development
removed extra semi colon..
2015-01-21 22:03:03 -05:00
KayenEQ d25b750c2c removed extra semi colon.. 2015-01-21 22:02:05 -05:00
Akkadius b93bbc64fd Merge remote-tracking branch 'remotes/origin/master' into logging_changes 2015-01-21 20:04:17 -06:00
Akkadius b4ff915cbb Change zone file log name format once it boots up 2015-01-21 19:39:51 -06:00
Akkadius 376bba5156 Some log changes 2015-01-21 19:37:54 -06:00
Akkadius e1bfbfa30c Change some world server Logging to General (Level 1) debugging 2015-01-21 19:15:36 -06:00
Akkadius 9f25b52f9a Change some zone server Logging to General (Level 1) debugging 2015-01-21 19:08:43 -06:00
Akkadius 46010fbfdf Rename LoadLogSysSettings to LoadLogSettings 2015-01-21 19:04:13 -06:00
Uleat b186b0538a Activated light field load from npctypes table 2015-01-21 20:01:59 -05:00
Akkadius 43a9a4742c Add proper file log closing to export 2015-01-21 18:54:40 -06:00
Akkadius ae5887b915 Add proper file log closing to shared_memory 2015-01-21 18:54:12 -06:00
Akkadius 0cab51b68b Add proper file log closing to eq_launch 2015-01-21 18:53:39 -06:00
Akkadius cb99f92287 Add properl file log closing to import and UCS 2015-01-21 18:52:59 -06:00
Akkadius ab82fc1702 Add properl file log closing to queryserv 2015-01-21 18:51:26 -06:00
Akkadius 37b5442028 Cleanup some log entries in world 2015-01-21 18:47:36 -06:00
Akkadius 92737339b3 Properly close process files in zone and world 2015-01-21 18:46:56 -06:00
Akkadius 7ce5acf701 Cleanup CloseFileLogs() 2015-01-21 18:43:47 -06:00
Akkadius 683a81a6c8 Post merge fixes 2015-01-21 18:39:36 -06: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 51b3ae9e0a Add shownumhits command back in from merge 2015-01-21 16:55:56 -06:00
Akkadius 1e59416f33 Post merge manual fixes 2015-01-21 16:49:25 -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
Akkadius a59138d2d9 Implement #logs reload_all - To reload world and zone their log settings from the database 2015-01-21 03:01:21 -06:00
Akkadius ef0d383de9 Adjust #logs set 2015-01-21 02:12:22 -06:00
Akkadius 47bb4c0b2b Implement #logs set [console|file|gmsay] <category_id> <debug_level (1-3)> 2015-01-21 01:26:33 -06:00
Akkadius 6cfe9e301b Preliminary log setting commands 2015-01-21 00:01:28 -06:00
Akkadius d4460b94be Rename #log to #logs after thinking deeply about it 2015-01-20 23:21:32 -06:00
Akkadius 1871c3f24f Implement first pieces of #log 2015-01-20 23:18:23 -06:00
Akkadius 7101d84b27 Remove garbage in commit 2015-01-20 20:01:44 -06:00
Akkadius 38c94f6dda Push table update 2015-01-20 20:00:48 -06:00
Akkadius c202b9e7b6 Linux fix in worldserver.cpp with __FUNCTION__ 2015-01-20 19:54:08 -06:00
Akkadius 013216ff2b Remove Unneeded DebugBreak 2015-01-20 19:41:30 -06:00
Akkadius a6a86f030c Remove Unneeded DebugBreak 2015-01-20 19:41:29 -06:00
Akkadius 56b0a2aa4f Remove Unneeded DebugBreak 2015-01-20 19:41:28 -06:00
Akkadius 07d2eab183 Remove Unneeded DebugBreak 2015-01-20 19:41:27 -06:00
Akkadius 90dd9f8aeb Remove Unneeded DebugBreak 2015-01-20 19:41:26 -06:00
Akkadius 32cba9083c Remove Unneeded DebugBreak 2015-01-20 19:41:25 -06:00
Akkadius 26b65a05a9 Remove Unneeded DebugBreak 2015-01-20 19:41:24 -06:00
Akkadius 0db638c8c0 Remove Unneeded DebugBreak 2015-01-20 19:41:23 -06:00
Akkadius 456356d626 Remove Unneeded DebugBreak 2015-01-20 19:41:22 -06:00
Akkadius 29fe791ad0 Remove Unneeded DebugBreak 2015-01-20 19:41:21 -06:00
Akkadius 6c545a144c Remove Unneeded DebugBreak 2015-01-20 19:41:20 -06:00
Akkadius 6e582fb68f Remove Unneeded DebugBreak 2015-01-20 19:41:19 -06:00
Akkadius a19f7f702c Remove Unneeded DebugBreak 2015-01-20 19:41:18 -06:00
Akkadius f44155a317 Remove Unneeded DebugBreak 2015-01-20 19:41:17 -06:00
Akkadius 7fef8de50a Remove Unneeded DebugBreak 2015-01-20 19:41:14 -06:00
Akkadius 440ca97a79 Remove Unneeded DebugBreak: 2015-01-20 19:40:55 -06:00
Akkadius 98f0d4df49 UpdateAdmin Linux build fix 2015-01-20 19:22:28 -06:00
Akkadius ce3d4e678f Push something that apparently didn't make its way through before 2015-01-20 19:19:57 -06:00
Akkadius bd757417d5 Platform changes for getpid() 2015-01-20 19:05:11 -06:00
Akkadius f7ca12f7cc Changed defaults to use enum 2015-01-20 18:47:20 -06:00
KayenEQ a71690b725 Merge pull request #344 from KayenEQ/Development
Fix for compile issue with vs2012
2015-01-20 17:36:49 -05:00
KayenEQ ad711b0b5a Fix for compile issue with vs2012 2015-01-20 17:35:39 -05:00
Uleat 1b91750902 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-20 17:08:21 -05:00
JJ a84f480ffc ... and lang. 2015-01-20 15:51:00 -05:00
JJ ee108b5b74 Skill gain logging fix. (iluvseq) 2015-01-20 15:33:26 -05:00
Akkadius 8ae2d86962 rename process_file_name to platform_file_name for consistency 2015-01-20 06:49:31 -06:00
Akkadius f4847607fd More work on process logging 2015-01-20 06:26:12 -06:00
Akkadius e4829225f6 Add file log handling in every process 2015-01-20 06:15:56 -06:00
Akkadius 9ae28d7619 More process based logging work 2015-01-20 06:13:12 -06:00
Akkadius 01940ee5ed Implement crash logging, 'crash_processname_pid.log' at the root of logs/ 2015-01-20 05:52:50 -06:00
Akkadius ad5d1e4814 Some EQEmuLogSys changes regarding class variables 2015-01-20 05:36:15 -06:00
Akkadius a64c21eb96 Undo Queryserv refactoring because our database class stuff is stupid 2015-01-20 05:30:19 -06:00
Akkadius 7f2f6a8612 Placing Log defaults after RegisterExecutablePlatform and installing database log setting loads right after database connection for all processes 2015-01-20 05:22:15 -06:00
Akkadius 931134688a Add a copy of load log settings to UCS because of how split Database classes are laid out 2015-01-20 05:18:44 -06:00
Akkadius e4797d04f0 Change some defaults for logs 2015-01-20 05:18:21 -06:00
Akkadius c730519e27 Fix some categories from before convert 2015-01-20 05:07:22 -06:00
Akkadius 9bfe45ddbd QueryServ adjustments 2015-01-20 05:04:16 -06:00
Akkadius 0110755c47 Adjust defaults for LoadLogSettingsDefault 2015-01-20 04:56:13 -06:00
Akkadius d5018029a4 Add LoadLogSysSettings to client export utility 2015-01-20 04:45:44 -06:00
Akkadius d191086d3e Add LoadLogSysSettings to other processes 2015-01-20 04:45:14 -06:00
Akkadius 1bbbb28218 Refactor some of the database stuff for QueryServ for uniformity, should probably be done right later 2015-01-20 04:30:27 -06:00
Akkadius cdde408602 Some adjustments to file writing routines 2015-01-20 04:10:39 -06:00
Akkadius 8b096e65af logtest adjustments 2015-01-20 03:46:27 -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 b2ffcf1cf6 Implement debug_level checking for ProcessGMSay 2015-01-20 03:02:41 -06:00
Akkadius aeff650649 Implement debug_level checking for ProcessLogWrite 2015-01-20 03:02:15 -06:00
Akkadius f09e1d037f Implement debug_level checking for ProcessConsoleMessage 2015-01-20 03:01:41 -06:00
Akkadius f5b1f678a1 Pass debug_level to subprocess commands 2015-01-20 03:00:00 -06:00
Akkadius cc1735bc39 Add uint16 debug_level to ProcessGMSay 2015-01-20 02:59:32 -06:00
Akkadius 9faa2117d5 Add uint16 debug_level to ProcessLogWrite 2015-01-20 02:59:06 -06:00
Akkadius e48234b2af Add uint16 debug_level to ProcessConsoleMessage 2015-01-20 02:58:33 -06:00
Akkadius ff5e82c50f Fix some indents 2015-01-20 02:57:31 -06:00
Akkadius 39626159a5 Implement Linux ANSI colors 2015-01-20 02:53:10 -06:00
Akkadius 32437a21eb Add ANSI color defines for Linux 2015-01-20 02:45:38 -06:00
Akkadius 0bb013bafb Convert DeleteCharacter to Log.Out 2015-01-20 02:36:47 -06:00
Akkadius fc0e760b02 Convert DeleteAccount to Log.Out 2015-01-20 02:33:55 -06:00
Akkadius ec2a8c4a1b Convert CreateAccount to Log.Out 2015-01-20 02:33:15 -06:00
Akkadius 29774d9765 Database:;ClearMerchantTemp cleanup 2015-01-20 02:16:53 -06:00
Akkadius 3fbac46ee6 Remove Duplicative MySQL Error: 2015-01-20 02:14:36 -06:00
Akkadius 5ec3d58e32 Remove Duplicative MySQL Error: Error updating LFP for character %i : %s 2015-01-20 02:13:25 -06:00
Akkadius c5dbbd1f07 Remove Duplicative MySQL Error: Error updating LFP for character %i : %s 2015-01-20 02:12:59 -06:00
Akkadius 8ede80b69d Remove Duplicative MySQL Error: Error updating LFP for character %i : %s 2015-01-20 02:12:01 -06:00
Akkadius d3fdacf548 Remove Duplicative MySQL Error: Error updating firstlogon for character %i : %s 2015-01-20 02:11:31 -06:00
Akkadius e626bb527f Remove Duplicative MySQL Error: Error adding a report for %s: %s 2015-01-20 02:10:54 -06:00
Akkadius 40d23ab35a Remove Duplicative MySQL Error: Error adding character to group id: %s 2015-01-20 02:10:16 -06:00
Akkadius f4c8eb6d88 Remove Duplicative MySQL Error: Unable to clear groups: 2015-01-20 02:09:36 -06:00
Akkadius 5a8e45faab Remove Duplicative MySQL Error: Unable to clear groups: 2015-01-20 02:09:23 -06:00
Akkadius b14c3c8674 Remove Duplicative MySQL Error: Log.Out(Logs::General, Logs::Error, Error 2015-01-20 02:08:25 -06:00
Akkadius 2b091206bd Remove Duplicative MySQL Error: Unable to clear groups: 2015-01-20 02:07:39 -06:00
Akkadius c9fd7e45e8 Remove excess MySQL error message in GetSafePoints 2015-01-20 02:03:45 -06:00
Akkadius 0092d0c894 Fix ClearMerchantTemp from error message removal 2015-01-20 01:50:35 -06:00
Akkadius b77a586d14 Fix RemoveTempFactions from error message removal 2015-01-20 01:49:38 -06:00
Akkadius 1530bd7937 Fix InsertDoor from error message removal 2015-01-20 01:49:20 -06:00
Akkadius 54868922ef Fix UpdateKarma from error message removal 2015-01-20 01:49:03 -06:00
Akkadius 00db3d270c Fix DeleteMerchantTemp from error message removal 2015-01-20 01:48:39 -06:00
Akkadius 4efa8a18eb Fix SaveMerchantTemp from error message removal 2015-01-20 01:48:06 -06:00
Akkadius b800dd04c6 Fix UpdateBug from error message removal 2015-01-20 01:47:41 -06:00
Akkadius 1c6a0f054a Fix UpdateBug from error message removal 2015-01-20 01:47:24 -06:00
Akkadius c86fc62132 Fix SetBotInspectMesssage from error message removal 2015-01-20 01:46:50 -06:00
Akkadius 5fa42ce90f Fix LoginIP from erorr message removal 2015-01-20 01:46:06 -06:00
Akkadius 48caf1e413 Remove Duplicative MySQL Error: Error in GetGuildIDByChar query ' 2015-01-20 01:42:43 -06:00
Akkadius 3156efae63 Remove Duplicative MySQL Error: Error in GetLiveChar query ' 2015-01-20 01:42:42 -06:00
Akkadius 3473e11376 Remove Duplicative MySQL Error: Error in UpdateLiveChar query ' 2015-01-20 01:42:40 -06:00
Akkadius 78746a40fa Remove Duplicative MySQL Error: Error in GetCharacterInfo query ' 2015-01-20 01:42:39 -06:00
Akkadius 9cbe0d4b34 Remove Duplicative MySQL Error: Error in SetMQDetectionFlag query ' 2015-01-20 01:42:36 -06:00
Akkadius 032de7f6ce Remove Duplicative MySQL Error: Error in SetHackerFlag query ' 2015-01-20 01:42:35 -06:00
Akkadius de531af354 Remove Duplicative MySQL Error: Error in MoveCharacterToZone(id) query ' 2015-01-20 01:42:34 -06:00
Akkadius c892bc4e2b Remove Duplicative MySQL Error: Error in MoveCharacterToZone(name) query ' 2015-01-20 01:42:33 -06:00
Akkadius 835c7d0fce Remove Duplicative MySQL Error: Error in GetServerType query ' 2015-01-20 01:42:32 -06:00
Akkadius 11357f7e91 Remove Duplicative MySQL Error: Error in CheckUsedName query ' 2015-01-20 01:42:31 -06:00
Akkadius 7b7ddb25fa Remove Duplicative MySQL Error: Error in ClearMerchantTemp query ' 2015-01-20 01:42:30 -06:00
Akkadius a1895b9cb3 Remove Duplicative MySQL Error: Error in GetAccountFromID query ' 2015-01-20 01:42:28 -06:00
Akkadius a269aa4409 Remove Duplicative MySQL Error: Error in GetAccountIDFromLSID query ' 2015-01-20 01:42:26 -06:00
Akkadius 8186d43cad Remove Duplicative MySQL Error: Error in LoadFactionData ' 2015-01-20 01:42:25 -06:00
Akkadius 8d7de051c5 Remove Duplicative MySQL Error: Error in AddToNameFilter query ' 2015-01-20 01:42:25 -06:00
Akkadius c9ece3480c Remove Duplicative MySQL Error: Error in LoadFactionData ' 2015-01-20 01:42:24 -06:00
Akkadius a3dc49c504 Remove Duplicative MySQL Error: Error in CheckNameFilter query ' 2015-01-20 01:42:24 -06:00
Akkadius b4a6184c88 Remove Duplicative MySQL Error: Error in SetCharacterFactionLevel query ' 2015-01-20 01:42:23 -06:00
Akkadius 78bbb9b03d Remove Duplicative MySQL Error: Error in GetPEQZone query ' 2015-01-20 01:42:22 -06:00
Akkadius f4fad223d0 Remove Duplicative MySQL Error: Error in SetCharacterFactionLevel query ' 2015-01-20 01:42:22 -06:00
Akkadius e127b01640 Remove Duplicative MySQL Error: Error in LoadZoneNames query ' 2015-01-20 01:42:21 -06:00
Akkadius 2c36b9070e Remove Duplicative MySQL Error: Error in RemoveTempFactions query ' 2015-01-20 01:42:20 -06:00
Akkadius 8e64a8b1c5 Remove Duplicative MySQL Error: Error in GetZoneGraveyard query ' 2015-01-20 01:42:20 -06:00
Akkadius dbeef12a4f Remove Duplicative MySQL Error: Error in InsertDoor 2015-01-20 01:42:19 -06:00
Akkadius cb18d3d1b5 Remove Duplicative MySQL Error: Error in GetZoneGraveyardID query ' 2015-01-20 01:42:19 -06:00
Akkadius 8f96f52c04 Remove Duplicative MySQL Error: Error in UpdateKarma query ' 2015-01-20 01:42:18 -06:00
Akkadius 245db04c4c Remove Duplicative MySQL Error: Error in GetZoneLongName query ' 2015-01-20 01:42:18 -06:00
Akkadius 56dfc97517 Remove Duplicative MySQL Error: Error in getZoneShutDownDelay query ' 2015-01-20 01:42:16 -06:00
Akkadius d3f265116e Remove Duplicative MySQL Error: Error in GetSafePoint query ' 2015-01-20 01:42:15 -06:00
Akkadius 5aba5c8473 Remove Duplicative MySQL Error: Error in LoadBlockedSpells query ' 2015-01-20 01:42:14 -06:00
Akkadius 4c3058b0d9 Remove Duplicative MySQL Error: Error in GetMiniLoginAccount query ' 2015-01-20 01:42:14 -06:00
Akkadius 94e63885fb Remove Duplicative MySQL Error: Error in GetBlockedSpellsCount query ' 2015-01-20 01:42:12 -06:00
Akkadius edbed7184f Remove Duplicative MySQL Error: Error in SetVariable query ' 2015-01-20 01:42:12 -06:00
Akkadius 77a2737ad0 Remove Duplicative MySQL Error: Error in group update query: %s\n 2015-01-20 01:42:11 -06:00
Akkadius 8160768fcc Remove Duplicative MySQL Error: Error in LoadVariables query ' 2015-01-20 01:42:11 -06:00
Akkadius 992f99303e Remove Duplicative MySQL Error: Error in SetZoneTZ query ' 2015-01-20 01:42:09 -06:00
Akkadius 63682510a8 Remove Duplicative MySQL Error: Error in GetCharName query ' 2015-01-20 01:42:09 -06:00
Akkadius 9574e91669 Remove Duplicative MySQL Error: Error in GetZoneTZ query ' 2015-01-20 01:42:08 -06:00
Akkadius c3233c02db Remove Duplicative MySQL Error: Error in GetAccountName query ' 2015-01-20 01:42:08 -06:00
Akkadius d46ede8db1 Remove Duplicative MySQL Error: Error in GetUseCFGSafeCoords query ' 2015-01-20 01:42:07 -06:00
Akkadius 9f9253220c Remove Duplicative MySQL Error: Error in GetAccountIDByAcc query ' 2015-01-20 01:42:07 -06:00
Akkadius ffed0514d2 Remove Duplicative MySQL Error: Error in DeleteMerchantTemp query ' 2015-01-20 01:42:06 -06:00
Akkadius 28506839c0 Remove Duplicative MySQL Error: Error in GetAccountIDByChar query ' 2015-01-20 01:42:05 -06:00
Akkadius 04754c67a7 Remove Duplicative MySQL Error: Error in SaveMerchantTemp query ' 2015-01-20 01:42:04 -06:00
Akkadius 590fa78539 Remove Duplicative MySQL Error: Error in SetBotInspectMessage query ' 2015-01-20 01:42:04 -06:00
Akkadius efaff32153 Remove Duplicative MySQL Error: Error in SetLocalPassword query ' 2015-01-20 01:42:04 -06:00
Akkadius 396621e32e Remove Duplicative MySQL Error: Error in GetGridType query ' 2015-01-20 01:42:02 -06:00
Akkadius abab487d7e Remove Duplicative MySQL Error: Error in GetBotInspectMessage query ' 2015-01-20 01:42:02 -06:00
Akkadius 539f216ca6 Remove Duplicative MySQL Error: Error in DeleteAccount query ' 2015-01-20 01:42:02 -06:00
Akkadius ca21aa70cf Remove Duplicative MySQL Error: Error loading Mercenaries from database. Bad query: 2015-01-20 01:41:58 -06:00
Akkadius 8697b9a630 Remove Duplicative MySQL Error: Error in SetDynamicCount query: %s 2015-01-20 01:41:58 -06:00
Akkadius a2514c9d64 Remove Duplicative MySQL Error: Error in GetCommands query ' 2015-01-20 01:41:58 -06:00
Akkadius e2bc4ec647 Remove Duplicative MySQL Error: Error in CreateAccount query ' 2015-01-20 01:41:58 -06:00
Akkadius c765003ef2 Remove Duplicative MySQL Error: Error loading NPCs from database. Bad query: 2015-01-20 01:41:54 -06:00
Akkadius 00cfd77c26 Remove Duplicative MySQL Error: Error in DeleteStaticZone query: %s 2015-01-20 01:41:54 -06:00
Akkadius 5f34f7e1a2 Remove Duplicative MySQL Error: Error in GetBook query ' 2015-01-20 01:41:54 -06:00
Akkadius 9dd35679e5 Remove Duplicative MySQL Error: Error in CreateAccount query ' 2015-01-20 01:41:54 -06:00
Akkadius f1fd957e90 Remove Duplicative MySQL Error: ERROR Potionbelt Save: 2015-01-20 01:41:47 -06:00
Akkadius 22feb20def Remove Duplicative MySQL Error: Error in GetMaxNPCSpellsEffectsID query ' 2015-01-20 01:41:47 -06:00
Akkadius 04ed14f424 Remove Duplicative MySQL Error: Error in SetAccountFlags query ' 2015-01-20 01:41:47 -06:00
Akkadius 9d89ad53de Remove Duplicative MySQL Error: Error in ChangeStaticZone query: %s 2015-01-20 01:41:47 -06:00
Akkadius f15221784c Remove Duplicative MySQL Error: Error in SetSharedPlatinum query ' 2015-01-20 01:41:47 -06:00
Akkadius 3a3cc8a8f6 Remove Duplicative MySQL Error: Error in CheckStatus query ' 2015-01-20 01:41:46 -06:00
Akkadius 6dcbccc0b6 Remove Duplicative MySQL Error: ERROR Bandolier Save: 2015-01-20 01:41:45 -06:00
Akkadius 0313ab2ac2 Remove Duplicative MySQL Error: Error in AddNPCSpells query1 ' 2015-01-20 01:41:45 -06:00
Akkadius be4f8196c6 Remove Duplicative MySQL Error: Error in DBLoadDoors query ' 2015-01-20 01:41:45 -06:00
Akkadius 7f76ee04b0 Remove Duplicative MySQL Error: Error in LoadAccountFlags query ' 2015-01-20 01:41:44 -06:00
Akkadius bdc3834f5a Remove Duplicative MySQL Error: Error in BootStaticZone query: %s 2015-01-20 01:41:44 -06:00
Akkadius 487c53794c Remove Duplicative MySQL Error: Error in GetSharedPlatinum query ' 2015-01-20 01:41:44 -06:00
Akkadius f0197219ab Remove Duplicative MySQL Error: Error in Log IP query ' 2015-01-20 01:41:44 -06:00
Akkadius 38723fc4bf Remove Duplicative MySQL Error: Error in UpdateBug ' 2015-01-20 01:41:35 -06:00
Akkadius 0e229895ec Remove Duplicative MySQL Error: Error in GetMaxNPCSpellsID query ' 2015-01-20 01:41:35 -06:00
Akkadius 71fee1ddb6 Remove Duplicative MySQL Error: Error in GetDoorsCountPlusOne query ' 2015-01-20 01:41:35 -06:00
Akkadius 6decdb6788 Remove Duplicative MySQL Error: Error in IsDiscovered query ' 2015-01-20 01:41:35 -06:00
Akkadius cb78ee6ccd Remove Duplicative MySQL Error: Error in DeleteLauncher 2nd query: %s 2015-01-20 01:41:34 -06:00
Akkadius 7a90d52e62 Remove Duplicative MySQL Error: Error in SetGMSpeed query ' 2015-01-20 01:41:34 -06:00
Akkadius 611e6e7d4e Remove Duplicative MySQL Error: Error in Database::AddBannedIP query ' 2015-01-20 01:41:34 -06:00
Akkadius c82ada6dc4 Remove Duplicative MySQL Error: 2015-01-20 01:38:43 -06:00
Akkadius ef312b7b48 Remove Duplicative MySQL Error: 2015-01-20 01:38:43 -06:00
Akkadius fb03e8c67d Remove Duplicative MySQL Error: Error querying database for monster summoning pet in zone %s (%s) 2015-01-20 01:37:58 -06:00
Akkadius 60d7b59ac8 Remove Duplicative MySQL Error: Unable to query zone flags: %s 2015-01-20 01:37:58 -06:00
Akkadius 8ecbf7c4dc Remove Duplicative MySQL Error: Query failed: %s. 2015-01-20 01:37:58 -06:00
Akkadius e271049fad Remove Duplicative MySQL Error: Error in CreateLauncher query: %s 2015-01-20 01:37:57 -06:00
Akkadius d566bb4728 Remove commented printf : Used up to slot %d of %d in links\n 2015-01-20 01:35:04 -06:00
Akkadius 9ed412e056 Remove commented printf : \tLinkTo %d: dest %d, reach %d\n 2015-01-20 01:35:03 -06:00
Akkadius 5dfb66bd63 Remove commented printf : \tLinkFrom %d: dest %d, reach %d\n 2015-01-20 01:35:02 -06:00
Akkadius dc44c1c361 Remove commented printf : Node %d: (%.2f,%.2f,%.2f) LO %d, D %d\n 2015-01-20 01:35:01 -06:00
Akkadius 2ccfc5b52d Remove commented printf : Filling node %d/%d n=0x%x, lb=0x%x, curl=0x%x/0x%x\n 2015-01-20 01:34:59 -06:00
Akkadius 33a840a0e7 Remove commented printf : Started With node index %d (0x%x)\n 2015-01-20 01:34:58 -06:00
Akkadius 6243a53e5c Remove commented printf : Edge crosses %d edges.\n 2015-01-20 01:34:53 -06:00
Akkadius e4025545fe Remove commented printf : Checking combine LOS on %d, with %d edges.\n 2015-01-20 01:34:51 -06:00
Akkadius f8300693b4 Remove commented printf : Adding item2: %i 2015-01-20 01:34:50 -06:00
Akkadius ed4f2c7e14 Remove commented printf : Distbbb %f, ce2 %f, (%f,%f), (%f,%f)\n 2015-01-20 01:34:49 -06:00
Akkadius 69c4bc0dbd Remove commented printf : Client Spell casted on %s\n 2015-01-20 01:34:48 -06:00
Akkadius bc84e4e80e Remove commented printf : Dist %f, ce2 %f\n 2015-01-20 01:34:48 -06:00
Akkadius 146d7d46a9 Remove commented printf : NPC AE, fall thru. spell_id:%i, Target type:%x\n 2015-01-20 01:34:46 -06:00
Akkadius 725a2d29a2 Remove commented printf : Starting clean at pos %d with %d nodes\n 2015-01-20 01:34:46 -06:00
Akkadius d5cdfdc33c Remove commented printf : IPC mgb/aebard spell casted on %s\n 2015-01-20 01:34:44 -06:00
Akkadius 40453f605d Remove commented printf : (%.3f,%.3f,%.3f) -> (%.3f,%.3f,%.3f) d2=%.3f\n 2015-01-20 01:34:44 -06:00
Akkadius bbbb63ecf5 Remove commented printf : IPC Spell casted on %s\n 2015-01-20 01:34:43 -06:00
Akkadius e7cfaf8bae Remove commented printf : IIN: (%.3f,%.3f) in (%.3f -> %.3f, %.3f -> %.3f)\n 2015-01-20 01:34:42 -06:00
Akkadius d5401b41de Remove commented printf : Cut (%.3f,%.3f,%.3f) -> (%.3f,%.3f,%.3f) d2=%.3f\n 2015-01-20 01:34:42 -06:00
Akkadius 29a19b8f9e Remove commented printf : Closed packet file.\n 2015-01-20 01:34:42 -06:00
Akkadius 138436f46d Remove commented printf : NPC AE, fall thru. spell_id:%i, Target type:%x\n 2015-01-20 01:34:40 -06:00
Akkadius 04bd05162c Remove commented printf : Got to node index %d (0x%x)\n 2015-01-20 01:34:40 -06:00
Akkadius 236e3e0d72 Remove commented printf : Node %d's distance from root is %d\n 2015-01-20 01:34:40 -06:00
Akkadius 767781bd0a Remove commented printf : trail = 0x%x(0x%x) (%.3f, %.3f, %.3f)\n 2015-01-20 01:34:40 -06:00
Akkadius b746385e45 Remove commented printf : Opening packet file: %s\n 2015-01-20 01:34:40 -06:00
Akkadius 245351e351 Remove commented printf : NPC mgb/aebard spell casted on %s\n 2015-01-20 01:34:38 -06:00
Akkadius b31c8c7a8f Remove commented printf : Proc %s(%d): %p\n 2015-01-20 01:34:38 -06:00
Akkadius 63496fd33c Remove commented printf : ;\n 2015-01-20 01:34:38 -06:00
Akkadius 5553c874ec Remove commented printf : ;\n 2015-01-20 01:34:37 -06:00
Akkadius 53b866d35c Remove commented printf : Frag 36 reference?: %ld\n 2015-01-20 01:34:37 -06:00
Akkadius 965f8bbbba Remove commented printf : Final node with %u faces, list offset %lu.\n 2015-01-20 01:34:37 -06:00
Akkadius db4426c435 Remove commented printf : Find Region %ld in node %ld\n 2015-01-20 01:34:37 -06:00
Akkadius 6ba30c3fb2 Remove commented printf : Look for %s: got %s\n 2015-01-20 01:34:37 -06:00
Akkadius 562f7c1360 Remove commented printf : Final node with %u faces, list offset %lu.\n 2015-01-20 01:34:37 -06:00
Akkadius 8594d3d550 Remove commented printf : Find Region %ld in node %ld\n 2015-01-20 01:34:37 -06:00
Akkadius 34f1df1163 Remove commented printf : Final node with %u nodes, list offset %lu.\n 2015-01-20 01:34:37 -06:00
Akkadius 880b1e7a0d Remove commented printf : Node %d's longest path is %d\n 2015-01-20 01:34:36 -06:00
Akkadius b1497cac56 Remove commented printf : pos=%d/%d\n 2015-01-20 01:34:36 -06:00
Akkadius 4c1227165c Remove commented printf : Write @ %d(%d). %d bytes.\n 2015-01-20 01:34:36 -06:00
Akkadius f73f764f2a Remove commented printf : Closed packet file.\n 2015-01-20 01:34:36 -06:00
Akkadius ff9bc4e953 Remove commented printf : NPC Spell casted on %s\n 2015-01-20 01:33:31 -06:00
Akkadius afbc8b0765 Remove commented printf : Spawning object %s at %f,%f,%f\n 2015-01-20 01:33:31 -06:00
Akkadius ce517f3bdc Remove commented printf : Spawned Merc with ID %i\n 2015-01-20 01:33:31 -06:00
Akkadius 2e763a77f7 Remove commented printf : ProcP %d: %p\n 2015-01-20 01:33:31 -06:00
Akkadius 7c3502d5f2 Remove commented printf : 2015-01-20 01:33:31 -06:00
Akkadius 6bf8c217ad Remove commented printf : 2015-01-20 01:33:31 -06:00
Akkadius 072339d24c Remove commented printf : Opening %s.mod\n 2015-01-20 01:33:31 -06:00
Akkadius 0fc5247279 Remove commented printf : fnlen is %d, %s\n 2015-01-20 01:33:30 -06:00
Akkadius 2e4fd5f983 Remove commented printf : Returning %s\n 2015-01-20 01:33:30 -06:00
Akkadius 55cb66762c Remove commented printf : Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n 2015-01-20 01:33:30 -06:00
Akkadius 9c6ba3164d Remove commented printf : Find Region %ld in node %ld\n 2015-01-20 01:33:30 -06:00
Akkadius c1dca8f6a9 Remove commented printf : v1=%d, v2=%d, v3=%d, g=%d, unk=%d\n 2015-01-20 01:33:30 -06:00
Akkadius 63ab54bf1f Remove commented printf : Look for %s: got %s\n 2015-01-20 01:33:30 -06:00
Akkadius 36dda4ee0a Remove commented printf : Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n 2015-01-20 01:33:30 -06:00
Akkadius 467272c334 Remove commented printf : Find Region %ld in node %ld\n 2015-01-20 01:33:29 -06:00
Akkadius cc9b0ff089 Remove commented printf : Node %u: (%.2f -> %.2f, %.2f -> %.2f)\n 2015-01-20 01:33:29 -06:00
Akkadius afdaba60fe Remove commented printf : New Color at: (%.3f,%.3f,%.3f)\n 2015-01-20 01:33:29 -06:00
Akkadius db5778916e Remove commented printf : Missed: (%.3f, %.3f, %.3f)\n 2015-01-20 01:33:29 -06:00
Akkadius cfe4aeb289 Remove commented printf : ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n 2015-01-20 01:33:29 -06:00
Akkadius b15656b32b Remove commented printf : Read @ %d(%d). %d bytes. (%c)\n 2015-01-20 01:33:29 -06:00
Akkadius 4e19cf0b5d Remove commented printf : Got %d bytes: %.*s\n 2015-01-20 01:33:29 -06:00
Akkadius 82c898f6bf Remove commented printf : Opening packet file: %s\n 2015-01-20 01:33:29 -06:00
Akkadius 84be3458b1 Remove commented printf : Named: %s\n 2015-01-20 01:33:21 -06:00
Akkadius 76586b5dbb Remove commented printf : %i: Basetex: %s\n 2015-01-20 01:33:19 -06:00
Akkadius 3138f0f9bc Remove commented printf : %s %s\n 2015-01-20 01:33:17 -06:00
Akkadius f29ca568df Remove commented printf : %s ID: %i profile mismatch, not converting. PP %u - Profile Length %u \n 2015-01-20 01:33:17 -06:00
Akkadius c33ac2981b Remove commented std::cout : \n 2015-01-20 01:32:27 -06:00
Akkadius 96a06f1cee Remove commented std::cout : Awake from condition, must have a stream now 2015-01-20 01:31:06 -06:00
Akkadius 1a2b3b50ce Remove commented std::cout : No streams, waiting on condition 2015-01-20 01:31:05 -06:00
Akkadius 421ecf6fce Remove commented std::cout : Removing connection 2015-01-20 01:31:04 -06:00
Akkadius 91e9163602 Remove commented std::cout : Push(): Unlocking MNewStreams 2015-01-20 01:31:03 -06:00
Akkadius 2c191fce7c Remove commented std::cout : Push():Locking MNewStreams 2015-01-20 01:31:02 -06:00
Akkadius f6e2829892 Remove commented std::cout : Pop(): Unlocking MNewStreams 2015-01-20 01:31:00 -06:00
Akkadius dacad2e154 Remove commented std::cout : Pop():Locking MNewStreams 2015-01-20 01:30:58 -06:00
Akkadius fb5e988ed8 Remove commented std::cout : Tlevel: 2015-01-20 01:30:56 -06:00
Akkadius b5fe23a4c3 Remove commented std::cout : CastToTrap error 2015-01-20 01:30:56 -06:00
Akkadius 4ffc09b306 Remove commented std::cout : Starting factory Writer 2015-01-20 01:30:56 -06:00
Akkadius 47b0f6ca9e Remove commented std::cout : Gender in: 2015-01-20 01:30:53 -06:00
Akkadius 849ec2850f Remove commented std::cout : CastToTrap error 2015-01-20 01:30:53 -06:00
Akkadius b2e4c98848 Remove commented std::cout : Sending mana update: 2015-01-20 01:30:53 -06:00
Akkadius 716b377378 Remove commented std::cout : Starting factory Reader 2015-01-20 01:30:53 -06:00
Akkadius 35fcc69639 Remove commented std::cout : Got OP_SessionRequest 2015-01-20 01:30:53 -06:00
Akkadius 951f98a63e Re-Implement GMSay colors: http://i.imgur.com/tQbuKUM.jpg 2015-01-20 00:53:52 -06:00
Akkadius 4c18b96aa5 Remove some old MySQL debugging 2015-01-20 00:25:14 -06:00
Akkadius 4a6305f8cb MySQL Query Logging add rows returned 2015-01-20 00:21:00 -06:00
Uleat 4b0f5064f6 Fix for Inventory::_HasItemByUse(bucket) using the parent container when searching for bag container items 2015-01-20 01:19:08 -05:00
Akkadius 1ad210ff29 Add MySQL Query logging at root 2015-01-20 00:14:18 -06:00
Akkadius 1928be9dd3 Remove some old MySQL logging for errors 2015-01-19 23:59:59 -06:00
Akkadius f239b113b9 Add MySQL query category 2015-01-19 23:52:11 -06:00
Akkadius 45560f6654 Remove some old MySQL logging for errors 2015-01-19 23:48:30 -06:00
Michael Cook (mackal) 5c56929a23 Fix compile error with GCC 2015-01-20 00:04:22 -05:00
Uleat e70e443950 Implemented 'enum class ClientVersion' -- added 'RoF2' to lua client version enumeration 2015-01-19 23:32:57 -05:00
Paul Coene b96be9d5b8 Made familiars persistent. 2015-01-19 13:07:37 -05:00
JJ 52eb287082 Update to 6535690a69 to make explicit #include rather than implicit. 2015-01-19 11:00:05 -05:00
Akkadius 9546023101 Add console color for MySQL Error logging 2015-01-19 05:58:59 -06:00
Akkadius 99dc83a9fd Convert MySQL Error logging to EQEmuLogSys and create MySQL Error category 2015-01-19 05:58:03 -06:00
Akkadius acb677a4ba More cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:40:27 -06:00
Akkadius 98a49ad086 More cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:39:51 -06:00
Akkadius 99baba4762 More cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:38:23 -06:00
Akkadius 5ab131dcd6 More cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:35:28 -06:00
Akkadius f20ff5c6e3 Cleanup of some QueryDatabase references that no longer need auto results 2015-01-19 05:32:34 -06:00
Akkadius e4200abc4f Remove Duplicative MySQL Error: Error executing query '%s': %s 2015-01-19 05:26:19 -06:00
Akkadius d608b5afd6 Remove Duplicative MySQL Error: Error getting loot drop info from database: %s, %s 2015-01-19 05:26:18 -06:00
Akkadius 7c52755eac Remove Duplicative MySQL Error: Error loading guild member '%s': %s 2015-01-19 05:26:18 -06:00
Akkadius 5930510274 Remove Duplicative MySQL Error: Error getting loot table info from database: %s, %s 2015-01-19 05:26:17 -06:00
Akkadius 28285d6c59 Remove Duplicative MySQL Error: Error loading guild member '%s': %s 2015-01-19 05:26:16 -06:00
Akkadius f4e74705cf Remove Duplicative MySQL Error: Error getting loot table info from database: %s, %s 2015-01-19 05:26:15 -06:00
Akkadius 417777a6f1 Remove Duplicative MySQL Error: Error loading guild member list '%s': %s 2015-01-19 05:26:15 -06:00
Akkadius 9ad299fa68 Remove Duplicative MySQL Error: Error getting loot table info from database: %s, %s 2015-01-19 05:26:13 -06:00
Akkadius 315f5e0ca4 Remove Duplicative MySQL Error: Error %s: '%s': %s 2015-01-19 05:26:13 -06:00
Akkadius cacf9df269 Remove Duplicative MySQL Error: Error in GetHighestWaypoint query '%s': %s 2015-01-19 05:26:10 -06:00
Akkadius 1e30a75cdc Remove Duplicative MySQL Error: Error in LoadBaseData query '%s' %s 2015-01-19 05:26:10 -06:00
Akkadius 85659dd200 Remove Duplicative MySQL Error: Error setting public note for char %d '%s': %s 2015-01-19 05:26:10 -06:00
Akkadius 499364e9fe Remove Duplicative MySQL Error: Error in GetFreeGrid query '%s': %s 2015-01-19 05:26:09 -06:00
Akkadius b603344ecd Remove Duplicative MySQL Error: Error in GetMaxBaseDataLevel query '%s' %s 2015-01-19 05:26:09 -06:00
Akkadius 3f3368e60c Remove Duplicative MySQL Error: Error retrieving alt flag '%s': %s 2015-01-19 05:26:08 -06:00
Akkadius 2ef8f79338 Remove Duplicative MySQL Error: Error adding grid entry '%s': '%s' 2015-01-19 05:26:08 -06:00
Akkadius 27d16a0a3e Remove Duplicative MySQL Error: Error in LoadSpells query '%s' %s 2015-01-19 05:26:07 -06:00
Akkadius bf7c40d7a5 Remove Duplicative MySQL Error: Error retrieving banker flag '%s': %s 2015-01-19 05:26:07 -06:00
Akkadius 6cde969780 Remove Duplicative MySQL Error: Error in LoadPetInfo query '%s': %s 2015-01-19 05:26:06 -06:00
Akkadius ca53c40899 Remove Duplicative MySQL Error: Error getting next waypoint id '%s': '%s' 2015-01-19 05:26:06 -06:00
Akkadius 626aa140da Remove Duplicative MySQL Error: Error in GetMaxSpellID query '%s' %s 2015-01-19 05:26:06 -06:00
Akkadius 6ae05eef38 Remove Duplicative MySQL Error: Error removing char %d from guild '%s': %s 2015-01-19 05:26:06 -06:00
Akkadius f7f34d8d30 Remove Duplicative MySQL Error: Error in LoadPetInfo query '%s': %s 2015-01-19 05:26:05 -06:00
Akkadius 05aba517c2 Remove Duplicative MySQL Error: Error updating spawn2 pathing '%s': '%s' 2015-01-19 05:26:05 -06:00
Akkadius b8f7d88219 Remove Duplicative MySQL Error: Error in LoadDamageShieldTypes: %s %s 2015-01-19 05:26:05 -06:00
Akkadius 5df58973a8 Remove Duplicative MySQL Error: Error Changing char %d to guild %d '%s': %s 2015-01-19 05:26:05 -06:00
Akkadius 02d034b046 Remove Duplicative MySQL Error: Error in LoadPetInfo query '%s': %s 2015-01-19 05:26:04 -06:00
Akkadius 9003276f23 Remove Duplicative MySQL Error: Error adding grid '%s': '%s' 2015-01-19 05:26:04 -06:00
Akkadius 056b172d7d Remove Duplicative MySQL Error: GetFriendsAndIgnore query error %s, %s 2015-01-19 05:26:03 -06:00
Akkadius f43211afad Remove Duplicative MySQL Error: Error getting npc faction info from database: %s, %s 2015-01-19 05:26:03 -06:00
Akkadius 6753517bb1 Remove Duplicative MySQL Error: Error setting Channel for guild %d '%s': %s 2015-01-19 05:26:03 -06:00
Akkadius 4de2c0e99b Remove Duplicative MySQL Error: Error in LoadBuffs query '%s': %s 2015-01-19 05:26:02 -06:00
Akkadius e5dd2634f9 Remove Duplicative MySQL Error: Error setting pathgrid '%s': '%s' 2015-01-19 05:26:02 -06:00
Akkadius 6f48d84b82 Remove Duplicative MySQL Error: Error adding friend/ignore, query was %s : %s 2015-01-19 05:26:02 -06:00
Akkadius beeba6c8be Remove Duplicative MySQL Error: Error getting npc faction info from database: %s, %s 2015-01-19 05:26:02 -06:00
Akkadius e726c7356a Remove Duplicative MySQL Error: Error setting URL for guild %d '%s': %s 2015-01-19 05:26:02 -06:00
Akkadius fac715012b Remove Duplicative MySQL Error: Error in SaveBuffs query '%s': %s 2015-01-19 05:26:01 -06:00
Akkadius 1595395f69 Remove Duplicative MySQL Error: Error deleting waypoint '%s': '%s' 2015-01-19 05:26:01 -06:00
Akkadius 729283ad01 Remove Duplicative MySQL Error: Error expiring unread messages, %s %s 2015-01-19 05:26:00 -06:00
Akkadius d4c0947280 Remove Duplicative MySQL Error: LoadItems '%s', %s 2015-01-19 05:26:00 -06:00
Akkadius 30b87fb2ea Remove Duplicative MySQL Error: Error setting MOTD for guild %d '%s': %s 2015-01-19 05:26:00 -06:00
Akkadius e15b551164 Remove Duplicative MySQL Error: Error in LoadAltCurrencyValues query '%s': %s 2015-01-19 05:25:59 -06:00
Akkadius 3f75eba5e0 Remove Duplicative MySQL Error: Error adding waypoint '%s': '%s' 2015-01-19 05:25:59 -06:00
Akkadius 75ea162c2b Remove Duplicative MySQL Error: Error in DisableRecipe query '%s': %s 2015-01-19 05:25:59 -06:00
Akkadius 363a4b95c1 Remove Duplicative MySQL Error: Error in LoadSpawnConditions events query '%s': %s 2015-01-19 05:25:58 -06:00
Akkadius af0e80fbf3 Remove Duplicative MySQL Error: Error expiring read messages, %s %s 2015-01-19 05:25:58 -06:00
Akkadius 9d1da53d97 Remove Duplicative MySQL Error: Error in GetItemsCount '%s': '%s' 2015-01-19 05:25:58 -06:00
Akkadius ad70e4f051 Remove Duplicative MySQL Error: Error changing leader on guild %d '%s': %s 2015-01-19 05:25:58 -06:00
Akkadius 06bef2fc6d Remove Duplicative MySQL Error: Error in ZoneDatabase::RaidGroupCount query '%s': %s 2015-01-19 05:25:56 -06:00
Akkadius a04aecae0e Remove Duplicative MySQL Error: Error in Zone::LoadTickItems: %s (%s) 2015-01-19 05:25:56 -06:00
Akkadius 99dd77cff0 Remove Duplicative MySQL Error: Error deleting grid entries '%s': '%s' 2015-01-19 05:25:56 -06:00
Akkadius dfec624b8d Remove Duplicative MySQL Error: Error in EnableRecipe query '%s': %s 2015-01-19 05:25:56 -06:00
Akkadius 2a3b9b65fc Remove Duplicative MySQL Error: Error in LoadSpawnConditions query '%s': %s 2015-01-19 05:25:56 -06:00
Akkadius 8c629529d7 Remove Duplicative MySQL Error: Error in GetAASkillVars '%s': %s 2015-01-19 05:25:56 -06:00
Akkadius b866b98989 Remove Duplicative MySQL Error: Error expiring trash messages, %s %s 2015-01-19 05:25:55 -06:00
Akkadius a128c74090 Remove Duplicative MySQL Error: GetInventory query '%s' %s 2015-01-19 05:25:55 -06:00
Akkadius fa1e73fa03 Remove Duplicative MySQL Error: Error in _GetFreeGuildID query '%s': %s 2015-01-19 05:25:55 -06:00
Akkadius 102c0416f8 Remove Duplicative MySQL Error: Error in ZoneDatabase::GroupCount query '%s': %s 2015-01-19 05:25:54 -06:00
Akkadius 800378d944 Remove Duplicative MySQL Error: Error in Zone::LoadNPCEmotes: %s (%s) 2015-01-19 05:25:53 -06:00
Akkadius 430263de9c Remove Duplicative MySQL Error: Error deleting grid '%s': '%s' 2015-01-19 05:25:53 -06:00
Akkadius c4ebfa8890 Remove Duplicative MySQL Error: Error in LearnRecipe query '%s': %s 2015-01-19 05:25:53 -06:00
Akkadius 82951fb82d Remove Duplicative MySQL Error: Error in LoadSpawnConditions query '%s': %s 2015-01-19 05:25:53 -06:00
Akkadius 5bce113bd7 Remove Duplicative MySQL Error: CreateNewNPCSpawnGroupCommand Error: %s %s 2015-01-19 05:25:53 -06:00
Akkadius 4ecbc5d2db Remove Duplicative MySQL Error: Error in GetAASkillVars '%s': %s 2015-01-19 05:25:53 -06:00
Akkadius 5faeecd82b Remove Duplicative MySQL Error: Unable to get message count from database. %s %s 2015-01-19 05:25:53 -06:00
Akkadius 756e90b683 Remove Duplicative MySQL Error: GetInventory query '%s' %s 2015-01-19 05:25:52 -06:00
Akkadius ddae2f3d16 Remove Duplicative MySQL Error: Error inserting new guild rank record when storing %d for %d. Giving up. '%s': %s 2015-01-19 05:25:52 -06:00
Akkadius 2ad99b8c23 Remove Duplicative MySQL Error: ERROR Bind Home Save: %s. %s 2015-01-19 05:25:44 -06:00
Akkadius e74666fa3b Remove Duplicative MySQL Error: Error in Zone::LoadAdventureFlavor: %s (%s) 2015-01-19 05:25:44 -06:00
Akkadius e549ae11f2 Remove Duplicative MySQL Error: Error creating grid entry '%s': '%s' 2015-01-19 05:25:44 -06:00
Akkadius 50fd74a2d2 Remove Duplicative MySQL Error: Error in Client::LearnRecipe query '%s': %s 2015-01-19 05:25:44 -06:00
Akkadius 04ae8b1707 Remove Duplicative MySQL Error: Error in LoadDBEvent query '%s': %s 2015-01-19 05:25:44 -06:00
Akkadius 405d025322 Remove Duplicative MySQL Error: CreateNewNPCSpawnGroupCommand Error: %s %s 2015-01-19 05:25:44 -06:00
Akkadius 39c7d30e46 Remove Duplicative MySQL Error: Update item quantity failed. %s : %s 2015-01-19 05:25:44 -06:00
Akkadius 882e7a9802 Remove Duplicative MySQL Error: Error in ZoneDatabase::LoadAAs query '%s': %s 2015-01-19 05:25:43 -06:00
Akkadius d800bd87c4 Remove Duplicative MySQL Error: Error updating status %s, %s 2015-01-19 05:25:43 -06:00
Akkadius 633b953fd3 Remove Duplicative MySQL Error: Error removing guild LFGuild entry, query was %s, %s 2015-01-19 05:25:43 -06:00
Akkadius 912de7704d Remove Duplicative MySQL Error: DeleteSharedBankSlot, bags query '%s': %s 2015-01-19 05:25:43 -06:00
Akkadius 233320330f Remove Duplicative MySQL Error: Error inserting new guild record when storing %d. Giving up. '%s': %s 2015-01-19 05:25:43 -06:00
Akkadius a992ece323 Remove Duplicative MySQL Error: Error in UpdateSpawn2Status query %s: %s 2015-01-19 05:25:37 -06:00
Akkadius 17d51b3ff4 Remove Duplicative MySQL Error: Error in Zone::LoadAlternateCurrencies: %s (%s) 2015-01-19 05:25:37 -06:00
Akkadius 526075a767 Remove Duplicative MySQL Error: Error updating spawn2 '%s': '%s' 2015-01-19 05:25:37 -06:00
Akkadius 590634ebef Remove Duplicative MySQL Error: Error in UpdateRecipeMadecount query '%s': %s 2015-01-19 05:25:37 -06:00
Akkadius 1661691bc9 Remove Duplicative MySQL Error: Error in TaskProximityManager::LoadProximities %s %s 2015-01-19 05:25:37 -06:00
Akkadius db65661a10 Remove Duplicative MySQL Error: Unable to update spawn condition '%s': %s\n 2015-01-19 05:25:37 -06:00
Akkadius 9561634ed8 Remove Duplicative MySQL Error: CreateNewNPCSpawnGroupCommand Error: %s %s 2015-01-19 05:25:36 -06:00
Akkadius e406d1e20c Remove Duplicative MySQL Error: Update item failed. %s : %s 2015-01-19 05:25:36 -06:00
Akkadius e88d0a8a2d Remove Duplicative MySQL Error: Error in ZoneDatabase::LoadAAs query '%s': %s 2015-01-19 05:25:36 -06:00
Akkadius 3a91ae92ab Remove Duplicative MySQL Error: SendMail: Query %s failed with error %s 2015-01-19 05:25:36 -06:00
Akkadius 7cceee14a1 Remove Duplicative MySQL Error: Error expiring player LFGuild entry, query was %s, %s 2015-01-19 05:25:36 -06:00
Akkadius 51fc8d61cc Remove Duplicative MySQL Error: DeleteSharedBankSlot query '%s': %s 2015-01-19 05:25:36 -06:00
Akkadius 30a351a3b8 Remove Duplicative MySQL Error: Error in ListRulesets query %s: %s 2015-01-19 05:25:36 -06:00
Akkadius 7e4eedbebc Remove Duplicative MySQL Error: Error clearing old guild_ranks records when storing %d '%s': %s 2015-01-19 05:25:35 -06:00
Akkadius 63b2f706e4 Remove Duplicative MySQL Error: Error in GetSpawnTimeLeft query '%s': %s 2015-01-19 05:25:33 -06:00
Akkadius 6bf5b5a7fb Remove Duplicative MySQL Error: Error in Zone::LoadVeteranRewards: %s (%s) 2015-01-19 05:25:33 -06:00
Akkadius 598848f4fc Remove Duplicative MySQL Error: Error querying fuzzy spawn2 '%s': '%s' 2015-01-19 05:25:33 -06:00
Akkadius 21ad8e1e7c Remove Duplicative MySQL Error: Error in GetTradeRecept success query '%s': %s 2015-01-19 05:25:33 -06:00
Akkadius be3acf583f Remove Duplicative MySQL Error: Error in RemoveTitle query '%s': %s 2015-01-19 05:25:33 -06:00
Akkadius 2196053f8a Remove Duplicative MySQL Error: 2015-01-19 05:25:32 -06:00
Akkadius 650f7366ab Remove Duplicative MySQL Error: Unable to update spawn event '%s': %s\n 2015-01-19 05:25:32 -06:00
Akkadius 69bb54fd9c Remove Duplicative MySQL Error: NPCSpawnDB Error: %s %s 2015-01-19 05:25:32 -06:00
Akkadius 4fadff785c Remove Duplicative MySQL Error: Delete item failed. %s : %s 2015-01-19 05:25:32 -06:00
Akkadius 9d7b3d0c08 Remove Duplicative MySQL Error: Error in ZoneDatabase::CountAALevels query '%s': %s 2015-01-19 05:25:32 -06:00
Akkadius 86c82718ec Remove Duplicative MySQL Error: Error updating Owner in database: %s, %s 2015-01-19 05:25:32 -06:00
Akkadius aae4691a6e Remove Duplicative MySQL Error: Error inserting guild into LFGuild table, query was %s, %s 2015-01-19 05:25:32 -06:00
Akkadius 4c804e8515 Remove Duplicative MySQL Error: DeleteInventorySlot, bags query '%s': %s 2015-01-19 05:25:31 -06:00
Akkadius 154bd186b1 Remove Duplicative MySQL Error: Error in LoadRules query %s: %s 2015-01-19 05:25:31 -06:00
Akkadius 48a43b0555 Remove Duplicative MySQL Error: Error clearing old guild record when storing %d '%s': %s 2015-01-19 05:25:31 -06:00
Akkadius 22fa5b6ce9 Remove Duplicative MySQL Error: Error in UpdateTimeLeft query %s: %s 2015-01-19 05:25:27 -06:00
Akkadius 8e5541acce Remove Duplicative MySQL Error: Error in Zone::LoadLDoNTrapEntries: %s (%s) 2015-01-19 05:25:26 -06:00
Akkadius 1b99e3e4d1 Remove Duplicative MySQL Error: Error querying spawn2 '%s': '%s' 2015-01-19 05:25:26 -06:00
Akkadius 636f090ce3 Remove Duplicative MySQL Error: Error in tradeskill verify query: '%s': %s 2015-01-19 05:25:26 -06:00
Akkadius d9f492f4e2 Remove Duplicative MySQL Error: Error in CheckTitle query '%s': %s 2015-01-19 05:25:26 -06:00
Akkadius 9cb3762102 Remove Duplicative MySQL Error: 2015-01-19 05:25:26 -06:00
Akkadius 9d23f69a10 Remove Duplicative MySQL Error: Error in CreateSpawn2 query '%s': %s 2015-01-19 05:25:26 -06:00
Akkadius 2ef9e342f7 Remove Duplicative MySQL Error: Error in RefreshPetitionsFromDB query '%s': %s 2015-01-19 05:25:26 -06:00
Akkadius 7bf57fca87 Remove Duplicative MySQL Error: NPCSpawnDB Error: %s %s 2015-01-19 05:25:25 -06:00
Akkadius 6e5b8170c5 Remove Duplicative MySQL Error: error changing permissions: %s : %s 2015-01-19 05:25:25 -06:00
Akkadius bd6f6579ef Remove Duplicative MySQL Error: Error in Client::TryReward(): %s (%s) 2015-01-19 05:25:25 -06:00
Akkadius b312663fd1 Remove Duplicative MySQL Error: Error in ZoneDatabase::CountAAs query '%s': %s 2015-01-19 05:25:25 -06:00
Akkadius 7d27d1ccb1 Remove Duplicative MySQL Error: Error updating password in database: %s, %s 2015-01-19 05:25:25 -06:00
Akkadius 4820288633 Remove Duplicative MySQL Error: Error removing guild from LFGuild table, query was %s, %s 2015-01-19 05:25:25 -06:00
Akkadius 3040a8b1a1 Remove Duplicative MySQL Error: DeleteInventorySlot query '%s': %s 2015-01-19 05:25:25 -06:00
Akkadius 65e9f571af Remove Duplicative MySQL Error: Fauled to create rule set in the database: %s: %s 2015-01-19 05:25:24 -06:00
Akkadius adf3a7ea0e Remove Duplicative MySQL Error: Error reloading guild ranks '%s': %s 2015-01-19 05:25:24 -06:00
Akkadius 09d32d92af Remove Duplicative MySQL Error: Error in UpdateTimeLeft query %s: %s 2015-01-19 05:25:23 -06:00
Akkadius 5645d21082 Remove Duplicative MySQL Error: Error in Zone::LoadLDoNTraps: %s (%s) 2015-01-19 05:25:23 -06:00
Akkadius cec0b5760d Remove Duplicative MySQL Error: Error in GetWaypoints query '%s': %s 2015-01-19 05:25:22 -06:00
Akkadius 6d3b9ae40b Remove Duplicative MySQL Error: 2015-01-19 05:25:22 -06:00
Akkadius 71497f0674 Remove Duplicative MySQL Error: Error in SendTradeskillDetails query '%s': %s 2015-01-19 05:25:22 -06:00
Akkadius 4bcfe5444b Remove Duplicative MySQL Error: Error adding title suffix: %s %s 2015-01-19 05:25:22 -06:00
Akkadius 8756b976bb Remove Duplicative MySQL Error: 2015-01-19 05:25:22 -06:00
Akkadius d4b35740be Remove Duplicative MySQL Error: Error in LoadSpawn2 query '%s': %s 2015-01-19 05:25:21 -06:00
Akkadius 2ae6050a77 Remove Duplicative MySQL Error: Error in GetBasePetItems query '%s': %s 2015-01-19 05:25:21 -06:00
Akkadius cdc449eb7c Remove Duplicative MySQL Error: Error in InsertPetitionToDB query '%s': %s 2015-01-19 05:25:21 -06:00
Akkadius 47752634c0 Remove Duplicative MySQL Error: NPCSpawnDB Error: %s %s 2015-01-19 05:25:21 -06:00
Akkadius e8824e5d14 Remove Duplicative MySQL Error: error promoting item: %s : %s 2015-01-19 05:25:21 -06:00
Akkadius 71842c62de Remove Duplicative MySQL Error: Error in Client::TryReward(): %s (%s) 2015-01-19 05:25:21 -06:00
Akkadius d6ba9d7108 Remove Duplicative MySQL Error: Error in GetTotalAALevels '%s: %s 2015-01-19 05:25:21 -06:00
Akkadius 7878755831 Remove Duplicative MySQL Error: Error in AdventureManager:::GetLeaderboardInfo: %s (%s) 2015-01-19 05:25:20 -06:00
Akkadius 8b5a623c75 Remove Duplicative MySQL Error: Failed to load channels. %s %s 2015-01-19 05:25:20 -06:00
Akkadius 72359b54f0 Remove Duplicative MySQL Error: Error inserting player into LFGuild table, query was %s, %s 2015-01-19 05:25:20 -06:00
Akkadius 807dd5198c Remove Duplicative MySQL Error: UpdateSharedBankSlot query '%s': %s 2015-01-19 05:25:20 -06:00
Akkadius 220daed2c8 Remove Duplicative MySQL Error: Error in LoadRules query %s: %s 2015-01-19 05:25:20 -06:00
Akkadius 5443e879a5 Remove Duplicative MySQL Error: Error reloading guilds '%s': %s 2015-01-19 05:25:20 -06:00
Akkadius 34269c5b69 Remove Duplicative MySQL Error: Error in GetCharactersInInstace query '%s': %s 2015-01-19 05:25:20 -06:00
Akkadius cf655a2907 Remove Duplicative MySQL Error: Error in GetZoneCFG query %s: %s 2015-01-19 05:25:18 -06:00
Akkadius ca27159223 Remove Duplicative MySQL Error: Error in LoadNewMerchantData query '%s' %s 2015-01-19 05:25:18 -06:00
Akkadius 8ac846e32e Remove Duplicative MySQL Error: Error in GetGridType2 query '%s': %s 2015-01-19 05:25:17 -06:00
Akkadius f57509113b Remove Duplicative MySQL Error: Error in LoadTributes level query '%s': %s 2015-01-19 05:25:17 -06:00
Akkadius 8ccb1ca3e7 Remove Duplicative MySQL Error: 2015-01-19 05:25:17 -06:00
Akkadius 0133dd5688 Remove Duplicative MySQL Error: Error in TradeskillSearchResults query '%s': %s 2015-01-19 05:25:17 -06:00
Akkadius d3b00c142d Remove Duplicative MySQL Error: Error adding title: %s %s 2015-01-19 05:25:17 -06:00
Akkadius 380510ff44 Remove Duplicative MySQL Error: 2015-01-19 05:25:17 -06:00
Akkadius 0917eb00b1 Remove Duplicative MySQL Error: Error in LoadSpawn2 query '%s': %s 2015-01-19 05:25:17 -06:00
Akkadius 52553e507f Remove Duplicative MySQL Error: Error in GetBasePetItems query '%s': %s 2015-01-19 05:25:16 -06:00
Akkadius 8cb8aed9b4 Remove Duplicative MySQL Error: Error in UpdatePetitionToDB query '%s': %s 2015-01-19 05:25:16 -06:00
Akkadius 525a513871 Remove Duplicative MySQL Error: NPCSpawnDB Error: %s %s 2015-01-19 05:25:16 -06:00
Akkadius 1f8d483bad Remove Duplicative MySQL Error: Insert Error: %s : %s 2015-01-19 05:25:16 -06:00
Akkadius 0b330b7312 Remove Duplicative MySQL Error: Error in SetGuildDoor query '%s': %s 2015-01-19 05:25:16 -06:00
Akkadius 19dfc9e92d Remove Duplicative MySQL Error: Error in Client::TryReward(): %s (%s) 2015-01-19 05:25:16 -06:00
Akkadius ee0a68fed2 Remove Duplicative MySQL Error: Error in LoadAAEffects query '%s': %s 2015-01-19 05:25:15 -06:00
Akkadius 2b3d14f0ba Remove Duplicative MySQL Error: SoF Start zone query failed: %s : %s\n 2015-01-19 05:25:15 -06:00
Akkadius 03b0fac838 Remove Duplicative MySQL Error: Error in AdventureManager:::LoadAdventureEntries: %s (%s) 2015-01-19 05:25:15 -06:00
Akkadius 50d0bb0d03 Remove Duplicative MySQL Error: Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s) 2015-01-19 05:25:15 -06:00
Akkadius 61a6edc1d0 Remove Duplicative MySQL Error: Unable to get message count from database. %s %s 2015-01-19 05:25:15 -06:00
Akkadius 384d9a4748 Remove Duplicative MySQL Error: Error removing player from LFGuild table, query was %s, %s 2015-01-19 05:25:15 -06:00
Akkadius 4d15ddfc8a Remove Duplicative MySQL Error: UpdateInventorySlot query '%s': %s 2015-01-19 05:25:15 -06:00
Akkadius d8510e7876 Remove Duplicative MySQL Error: Fauled to set rule in the database: %s: %s 2015-01-19 05:25:15 -06:00
Akkadius 382fdc5d18 Remove Duplicative MySQL Error: Error loading guild ranks '%s': %s 2015-01-19 05:25:14 -06:00
Akkadius 9749d7c3af Remove Duplicative MySQL Error: Error in GetAccountIDByChar query '%s': %s 2015-01-19 05:25:14 -06:00
Akkadius 3f0fcefdb4 Remove Duplicative MySQL Error: Error in SaveZoneCFG query %s: %s 2015-01-19 05:25:09 -06:00
Akkadius c81eb674bb Remove Duplicative MySQL Error: Error in LoadTempMerchantData query '%s' %s 2015-01-19 05:25:09 -06:00
Akkadius fa4fb72263 Remove Duplicative MySQL Error: Error in GetHighestGrid query '%s': %s 2015-01-19 05:25:09 -06:00
Akkadius df9f031536 Remove Duplicative MySQL Error: Error in LoadTributes first query '%s': %s 2015-01-19 05:25:09 -06:00
Akkadius e81b03917a Remove Duplicative MySQL Error: Error in LoadTraps query '%s': %s 2015-01-19 05:25:08 -06:00
Akkadius 9fdc22f78b Remove Duplicative MySQL Error: 2015-01-19 05:25:08 -06:00
Akkadius 0c5a902032 Remove Duplicative MySQL Error: Error in HandleAutoCombine query '%s': %s 2015-01-19 05:25:08 -06:00
Akkadius 82af0550df Remove Duplicative MySQL Error: Unable to load titles: %s : %s 2015-01-19 05:25:08 -06:00
Akkadius 346a1b2bb7 Remove Duplicative MySQL Error: 2015-01-19 05:25:08 -06:00
Akkadius ac2b53c94b Remove Duplicative MySQL Error: Error while querying Spell ID %i spell_globals table query '%s': %s 2015-01-19 05:25:08 -06:00
Akkadius 9837e172ac Remove Duplicative MySQL Error: Error in PopulateZoneLists query '%s': %s 2015-01-19 05:25:08 -06:00
Akkadius 41fc0f7f02 Remove Duplicative MySQL Error: Error in GetPoweredPetEntry query '%s': %s 2015-01-19 05:25:07 -06:00
Akkadius 8df0ec05e1 Remove Duplicative MySQL Error: Error in DeletePetitionFromDB query '%s': %s 2015-01-19 05:25:07 -06:00
Akkadius 6cd08b8f27 Remove Duplicative MySQL Error: NPCSpawnDB Error: %s %s 2015-01-19 05:25:07 -06:00
Akkadius be37525414 Remove Duplicative MySQL Error: Error in Mount query '%s': %s 2015-01-19 05:25:07 -06:00
Akkadius de0de39e08 Remove Duplicative MySQL Error: Error Loading guild bank: %s, %s 2015-01-19 05:25:07 -06:00
Akkadius 0491f22e2b Remove Duplicative MySQL Error: Error in CheckGuildDoor query '%s': %s 2015-01-19 05:25:07 -06:00
Akkadius 43da95e784 Remove Duplicative MySQL Error: Error in Forage query '%s': %s 2015-01-19 05:25:06 -06:00
Akkadius 381749933a Remove Duplicative MySQL Error: Error in Client::SendRewards(): %s (%s) 2015-01-19 05:25:06 -06:00
Akkadius 209adc2828 Remove Duplicative MySQL Error: Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s 2015-01-19 05:25:06 -06:00
Akkadius 0832361729 Remove Duplicative MySQL Error: Start zone query failed: %s : %s\n 2015-01-19 05:25:06 -06:00
Akkadius b6b9e388b3 Remove Duplicative MySQL Error: Error in AdventureManager:::LoadAdventures: %s (%s) 2015-01-19 05:25:06 -06:00
Akkadius 5bf3d40570 Remove Duplicative MySQL Error: Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s) 2015-01-19 05:25:06 -06:00
Akkadius 408baba7aa Remove Duplicative MySQL Error: FindCharacter failed. %s %s 2015-01-19 05:25:06 -06:00
Akkadius 8494543164 Remove Duplicative MySQL Error: Failed to load LFGuild info from database. %s %s 2015-01-19 05:25:06 -06:00
Akkadius 34c6022101 Remove Duplicative MySQL Error: Error runing inventory verification query '%s': %s 2015-01-19 05:25:05 -06:00
Akkadius 3f8926d316 Remove Duplicative MySQL Error: Error in LoadRules query %s: %s 2015-01-19 05:25:05 -06:00
Akkadius 3c02cc454d Remove Duplicative MySQL Error: Error loading guilds '%s': %s 2015-01-19 05:25:05 -06:00
Akkadius 32901297e1 Remove Duplicative MySQL Error: StoreCharacter inventory failed. Query '%s' %s 2015-01-19 05:25:05 -06:00
Akkadius 2e8d9ed6a1 Remove Duplicative MySQL Error: Error in GetSpellColumns query '%s' %s 2015-01-19 05:25:05 -06:00
Akkadius 5604230b55 Remove Duplicative MySQL Error: Error in ExportBaseData query '%s' %s 2015-01-19 05:24:59 -06:00
Akkadius 792cf68a1c Remove Duplicative MySQL Error: Error in get_skill query '%s' %s 2015-01-19 05:24:54 -06:00
Akkadius ed09893a0e Remove Duplicative MySQL Error: Error in skill_usable query '%s' %s 2015-01-19 05:24:48 -06:00
Akkadius 53dce15822 Remove Duplicative MySQL Error: Error in ExportSpells query '%s' %s 2015-01-19 05:24:38 -06:00
Akkadius 56a4459aa8 More stuff 2015-01-19 04:27:22 -06:00
Akkadius f9ba4739f5 add global_define.h 2015-01-19 04:12:30 -06:00
Akkadius 0d9b6703a6 Rename debug.h to global_define.h, update cmakelists and such 2015-01-19 04:12:09 -06:00
Akkadius 0b70706a64 Stuff 2015-01-19 04:09:02 -06:00
Akkadius d41ba853cf Added types.h to more files that relied on mutex.h to get to debug.h to get to types.h 2015-01-19 04:04:50 -06:00
Akkadius 045125d328 Add types.h to a bunch of files 2015-01-19 04:02:45 -06:00
Akkadius 89b16512d5 Delete debug.cpp file and from cmake 2015-01-19 03:49:25 -06:00
Akkadius 62ff6453ef Remove EQDEBUG preprocessor from debug 2015-01-19 03:43:30 -06:00
Akkadius fa83809130 Removal of client_logs.h from #includes 2015-01-19 03:40:09 -06:00
Akkadius dda1806dfb File deletion of client_logs and CMakeLists.txt update 2015-01-19 03:38:07 -06:00
Akkadius d7d1f9757b Removal of client_logs.cpp/.h 2015-01-19 03:37:12 -06:00
Akkadius 4d6c2be191 Gut more of debug.cpp/.h 2015-01-19 03:36:50 -06:00
Akkadius 2a6a3e419c Remove logtypes.h from header includes and the file itself 2015-01-19 03:33:15 -06:00
Akkadius 7503e29211 Remove LogSettingsFile from config parsers which removes log.ini completely 2015-01-19 03:28:00 -06:00
Akkadius d45bc6d26a General cleanup 2015-01-19 03:25:46 -06:00
Akkadius ab4595f56d Remove QueryPerformanceCounter code 2015-01-19 03:22:23 -06:00
Akkadius e428b373ac Adjust category names 2015-01-19 03:02:00 -06:00
Akkadius abc2f9cace Convert 'Dropping client:' to Zone Status 2015-01-19 03:00:32 -06:00
Akkadius b3eadea473 Convert 'Client linkdead' to Zone Status 2015-01-19 02:59:02 -06:00
Akkadius 1c47e6b90d Convert 'Unable to get raid id, char not found!' to Error Category 2015-01-19 02:56:52 -06:00
Akkadius af53666fed Convert TimeBroadcast debug message to zone_server category 2015-01-19 02:54:28 -06:00
Akkadius b546848313 Implement EQEmuLogSys::GetConsoleColorFromCategory in ProcessConsoleMessage 2015-01-19 02:54:01 -06:00
Akkadius 2f74f07be7 Add EQEmuLogSys::GetConsoleColorFromCategory(uint16 log_category) to replace the static map 2015-01-19 02:47:51 -06:00
Akkadius 2ecb91d075 Remove Log.Hex completely for real 2015-01-19 02:35:28 -06:00
Akkadius 87e212046f Remove another Log.Hex straggler 2015-01-19 02:33:52 -06:00
Akkadius bf62d1fd26 Sort header functions 2015-01-19 02:32:46 -06:00
Akkadius e554278811 Remove Log.Raw function 2015-01-19 02:32:24 -06:00
Akkadius ee1c55a813 Remove Log.Hex remaining entries 2015-01-19 02:32:09 -06:00
Akkadius 55d73f0b07 Remove Log.Hex references because we're not going to use them anyways per KLS 2015-01-19 02:30:36 -06:00
Trevius 96820c4a31 Some work on RoF Guild Banks (still not functional). 2015-01-18 23:04:21 -06:00
JJ 5465d76d20 VS would like us to return values. 2015-01-18 19:48:32 -05:00
Michael Cook (mackal) f4224b296a We don't need to cast these anymore 2015-01-18 18:29:37 -05:00
JJ 8cde35ca88 Merge pull request #342 from addtheice/data_bundling2
Looks fine on initial review.
2015-01-18 18:04:33 -05:00
Arthur Ice 53862713f9 Switched to position based GetReciprocalHeading instead of Mob::GetReciprocalHeading 2015-01-18 12:38:27 -08:00
Arthur Ice cc802f2e74 Added 'GetReciprocalHeading' to position.cpp/h 2015-01-18 12:23:55 -08:00
Michael Cook (mackal) 7374313fd9 Fix overflow error in lua_create_npc 2015-01-18 14:41:23 -05:00
JJ c471fbe38f Merge pull request #341 from af4t/master
MS Visual Studio vs. position.cpp
2015-01-18 10:57:38 -05:00
Arthur Ice 0aefc0453d Removed Mob::DistNoRootNoZ 2015-01-18 03:54:49 -08:00
Arthur Ice 2ccac25004 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:52:17 -08:00
Arthur Ice 97d7d69623 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:49:40 -08:00
Arthur Ice ae4e1ef0d0 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:44:08 -08:00
Arthur Ice 8a1e03ced4 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:37:26 -08:00
Arthur Ice dc275b3b1e Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:35:20 -08:00
Arthur Ice 517c084657 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:32:28 -08:00
Arthur Ice 99783fd871 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:31:07 -08:00
Arthur Ice 69a6a6f3f8 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:25:54 -08:00
Arthur Ice 90e011ad99 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:24:40 -08:00
Arthur Ice f54c698ffe Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:12:08 -08:00
Arthur Ice f33eb9f8f3 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:09:08 -08:00
Arthur Ice e58a022e25 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:05:35 -08:00
Arthur Ice 8e112aac03 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 03:03:46 -08:00
Arthur Ice 013518cdb5 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:59:27 -08:00
Arthur Ice e728280c58 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:49:44 -08:00
Arthur Ice 9c3b66df93 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:46:30 -08:00
Arthur Ice 83413178c2 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:44:49 -08:00
Arthur Ice e5ee13bde0 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:43:16 -08:00
Arthur Ice 3f83bc7771 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:41:11 -08:00
Akkadius bc4aa08adf Add crashtest command back in for crash log testing 2015-01-18 04:33:04 -06:00
Arthur Ice 9dc24735a4 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:25:09 -08:00
Arthur Ice 39e059e256 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:21:13 -08:00
Arthur Ice 46eab011f1 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:16:56 -08:00
Akkadius d1572790b1 Remove eqemu_error.cpp/.h as they are useless 2015-01-18 04:15:26 -06:00
Arthur Ice 261feabb7d Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:14:59 -08:00
Arthur Ice c340fc9c39 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:10:42 -08:00
Arthur Ice 095f5d2587 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:08:18 -08:00
Arthur Ice 7c7250ee53 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:07:01 -08:00
Arthur Ice 952459a313 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:05:09 -08:00
Akkadius b6587cc9e2 Removal of logsys.h from #include(s) 2015-01-18 04:03:45 -06:00
Arthur Ice 4abe2fc6ff Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:03:44 -08:00
Arthur Ice c6b3060687 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 02:01:20 -08:00
Akkadius a4e96b46ca Delete logsys.cpp and logsys.h 2015-01-18 03:59:51 -06:00
Arthur Ice 0f1be1ecbf Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:54:54 -08:00
Akkadius 83906af9b6 Buildable state with converting hex packet dumps 2015-01-18 03:53:35 -06:00
Arthur Ice 4ced883373 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:51:36 -08:00
Arthur Ice 3290ddaffa Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:44:54 -08:00
Arthur Ice 4431aa0197 Removed Mob::DistNoRootNoZ 2015-01-18 01:39:17 -08:00
Arthur Ice 8619a0b518 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:38:30 -08:00
Arthur Ice d9b3d59729 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:33:54 -08:00
Arthur Ice baf53890b9 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:31:24 -08:00
Arthur Ice 121328b188 Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead 2015-01-18 01:27:47 -08:00
Akkadius 14bac9f8c0 Remove occurrences of _pkt 2015-01-18 03:25:52 -06:00
Akkadius b3bedef7af Bunch of crazy changes to remove logsys 2015-01-18 03:23:36 -06:00
Arthur Ice 3ed365cd43 Removed mob:DistNoRoot 2015-01-18 01:22:59 -08:00
Arthur Ice 94261700d9 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:21:19 -08:00
Arthur Ice 53ad34b060 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:19:45 -08:00
Arthur Ice 309240de43 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:18:20 -08:00
Arthur Ice eac35f802a Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:17:17 -08:00
Arthur Ice 72bad478d6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:12:15 -08:00
Arthur Ice 5926c993be Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:09:21 -08:00
Arthur Ice 3c1ee5970e Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:07:35 -08:00
Arthur Ice dd70ee13a3 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:04:37 -08:00
Arthur Ice a6ba08c598 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:01:44 -08:00
Arthur Ice dd52259dcf Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 01:00:00 -08:00
Arthur Ice 9bd4007fd6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:58:53 -08:00
Arthur Ice 469b27890b Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:57:34 -08:00
Akkadius 7fac4d5f52 More gutting of logsys.cpp/h 2015-01-18 02:56:51 -06:00
Arthur Ice 263c9b6d3f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:53:24 -08:00
Akkadius f81a8b716b Rip out load_log_settings in all projects 2015-01-18 02:52:32 -06:00
Arthur Ice 9dcdd93549 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:51:25 -08:00
Arthur Ice a0d012a6d6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-18 00:48:51 -08:00
Akkadius 9eb05ff999 Delete zone/zone_logsys.cpp 2015-01-18 02:46:34 -06:00
Akkadius e5f641d6b2 Delete logsys_eqemu.cpp 2015-01-18 02:45:18 -06:00
Akkadius b71f808cb8 Gut some more debug functions 2015-01-18 02:43:11 -06:00
Akkadius 3320867b10 delete world/world_logsys.cpp 2015-01-18 02:40:58 -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
Kemmler 6535690a69 MS Visual Studio needs help finding std::min and std::max 2015-01-18 03:08:12 -05: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
Arthur Ice 37e4829ac4 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:55:16 -08: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 af8ab89a36 Compile state 2015-01-18 01:50:05 -06:00
Arthur Ice 864e9ba8ef Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:48:44 -08:00
Akkadius b15e5f7913 Refactor GMSayHookCallBackProcess to use category instead of type 2015-01-18 01:48:07 -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
Akkadius 57ac6c0e98 Remove EQEmuLogSys::Log from consolidation of types into categories 2015-01-18 01:39:01 -06:00
Akkadius 063a9214ae Consolidate 'LogType' Debug logs over to 'LogCategory' 2015-01-18 01:37:54 -06:00
Arthur Ice fccd767330 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:37:00 -08:00
Akkadius 375f4af946 Consolidate 'LogType' Error (Straggler) logs over to 'LogCategory' 2015-01-18 01:36:10 -06:00
Akkadius b511857333 Consolidate 'LogType' Commands logs over to 'LogCategory' 2015-01-18 01:34:31 -06:00
Arthur Ice f047ed232d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:33:34 -08:00
Akkadius 40d0fba63f Consolidate 'LogType' Quest logs over to 'LogCategory' 2015-01-18 01:32:57 -06:00
Akkadius ec7fd9b4e7 Consolidate 'LogType' Normal logs over to 'LogCategory' 2015-01-18 01:32:18 -06:00
Arthur Ice 0088d353d3 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:31:57 -08:00
Akkadius e691735a2d Consolidate 'LogType' Error logs over to 'LogCategory' 2015-01-18 01:30:25 -06:00
Arthur Ice 1bb4ff2d6a Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:30:18 -08:00
Akkadius b3fc0ab06d Consolidate 'LogType' Crash logs over to 'LogCategory' 2015-01-18 01:29:28 -06:00
Arthur Ice 9aa46a9af2 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:27:57 -08:00
Akkadius e9f8d5fa6d Port Status messages from Type to Category 2015-01-18 01:27:52 -06:00
Arthur Ice c5f38ee700 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:26:22 -08:00
Akkadius 975c298c85 Consolidate 'LogType' over to 'LogCategory' 2015-01-18 01:24:35 -06:00
Arthur Ice 81f36675b3 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:19:56 -08:00
Arthur Ice 80941d23bd Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:16:11 -08:00
Arthur Ice a9c0920bc6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:15:06 -08:00
Arthur Ice fa50ab8a18 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:12:25 -08:00
Arthur Ice dc2534e38c Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:08:48 -08:00
Arthur Ice a9c5f80968 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 23:07:04 -08:00
Akkadius ef04c90d8e Remove new log prefix from console output 2015-01-18 01:04:59 -06:00
Akkadius 1496f14843 Remove old function code from consolidation 2015-01-18 00:56:26 -06:00
Arthur Ice 15bd08b365 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:52:33 -08:00
Akkadius 7dbde36b03 Rename reference logger to Log 2015-01-18 00:41:18 -06:00
Arthur Ice 55024a8615 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:41:04 -08:00
Arthur Ice 30eb545b0b Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:37:28 -08:00
Arthur Ice d01f307edc Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:34:49 -08:00
Akkadius 126eca2ad6 Add opcode name lookup on unhandled client opcode log message 2015-01-18 00:32:11 -06:00
Akkadius 0b687e4779 Fix some unhandled opcode output messages 2015-01-18 00:25:23 -06:00
Arthur Ice 84c82ca4ab Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:12:36 -08:00
Arthur Ice 91221db4c9 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 22:07:17 -08:00
Akkadius 726b3a33f5 Consolidate EQEmuLogsys::Debug stragglers to DebugCategory for further refactoring 2015-01-18 00:06:01 -06:00
Akkadius 58d0b86a67 Consolidate EQEmuLogsys::Debug General calls into DebugCategory 2015-01-18 00:00:03 -06:00
Akkadius d45ed9befa Consolidate EQEmuLogsys::Debug calls into DebugCategory 2015-01-17 23:59:06 -06:00
Arthur Ice 7dce5c4e6f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 21:45:31 -08:00
Arthur Ice 3f37aef41c Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 21:41:53 -08:00
Arthur Ice 8eea92654f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 21:38:44 -08:00
Arthur Ice 93c5422966 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 21:35:30 -08:00
Arthur Ice 4fa102cb24 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:53:08 -08:00
Arthur Ice ef68b46c9c Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:49:09 -08:00
Arthur Ice 608809a5dc Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:45:32 -08:00
Arthur Ice e44d9ce77f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:14:05 -08:00
Arthur Ice 2b72a50f91 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:08:29 -08:00
Arthur Ice a5521badb1 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 20:03:11 -08:00
Arthur Ice dc1db1fa0d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:45:42 -08:00
Arthur Ice 0351ea2d33 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:35:39 -08:00
Arthur Ice 6d7e8d7e9a Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:32:34 -08:00
Arthur Ice 4174036ce7 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:22:59 -08:00
Arthur Ice 0c3efc3c4f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:16:45 -08:00
Arthur Ice 80154d0661 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:13:47 -08:00
Arthur Ice 6b979d1c5d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:09:32 -08:00
Arthur Ice bcc4c1e4b6 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:07:25 -08:00
Arthur Ice 6f209fd8b9 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 19:00:57 -08:00
Arthur Ice 926cba2cdc Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:57:52 -08:00
Arthur Ice 6b3099daac Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:54:57 -08:00
Arthur Ice e54cdad85d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:51:06 -08:00
Arthur Ice 8efb9e75f8 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:49:24 -08:00
Arthur Ice 65bd2cf8ac Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:42:59 -08:00
Arthur Ice e8144cb3ee Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:39:59 -08:00
Arthur Ice 9400b860a3 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:37:01 -08:00
Arthur Ice 78eb852ed3 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:32:41 -08:00
Arthur Ice 1303a297c0 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:26:14 -08:00
Arthur Ice 86639f924d Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:22:48 -08:00
Arthur Ice d71fc61511 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:20:29 -08:00
Arthur Ice 815a208492 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:18:35 -08:00
Arthur Ice 262ae383c9 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:15:48 -08:00
Arthur Ice 64bd24d5f9 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:13:34 -08:00
Arthur Ice f79bad8b4b Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:09:43 -08:00
Arthur Ice f43bf5542f Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:07:16 -08:00
Arthur Ice 254ec5997c Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:05:03 -08:00
Arthur Ice f1937335dd Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 18:01:20 -08:00
Arthur Ice eb2eaa4d68 Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 17:57:36 -08:00
Arthur Ice 1e2198f5f4 Removed Mob::DistNoZ 2015-01-17 17:53:41 -08:00
Arthur Ice 2d7297dc67 Removed a usage of Mob::DistNoZ and used DistanceNoZ instead 2015-01-17 17:51:52 -08:00
Arthur Ice bff17cddf9 Removed a usage of Mob::DistNoZ and used DistanceNoZ instead 2015-01-17 17:50:08 -08:00
Arthur Ice ee0b9edc21 Removed Mob::Dist 2015-01-17 17:49:16 -08:00
Arthur Ice 8895dd599e Removed usage of Mod::Dist and used Distance instead 2015-01-17 17:44:17 -08:00
Arthur Ice a60c37098c Removed usage of Mod::Dist and used Distance instead 2015-01-17 17:41:26 -08:00
Arthur Ice 1bd4d38537 Removed usage of Mod::Dist and used Distance instead 2015-01-17 17:39:12 -08:00
Arthur Ice 76afc11199 Overloads of xyz_heading means no longer need the static cast here 2015-01-17 16:12:30 -08:00
Arthur Ice a135a3d597 Added explicit xyz_heading overrides for the 4 distance functions 2015-01-17 16:08:45 -08:00
Michael Cook (mackal) 6e06110b75 Remove more extra and incorrect memsets 2015-01-17 19:03:13 -05:00
Arthur Ice 77badffa29 Removed a usage of Mob::Dist and used Distance instead 2015-01-17 16:00:12 -08:00
Arthur Ice 2eaeb38138 Removed a usage of Mob::Dist and used Distance instead 2015-01-17 15:56:06 -08:00
Arthur Ice f1759421d1 Removed Mob::DistNoRoot(x,y,z) 2015-01-17 15:51:26 -08:00
Arthur Ice 70a9a4e7cd Removed usage of Mob::DistNoRoot and used ComparativeDistance instead 2015-01-17 15:42:58 -08:00
Arthur Ice 91b2e23e56 removed usage of mob->distnoroot and switched to ComparativeDistance 2015-01-17 15:37:24 -08:00
Arthur Ice e653a3943a removed usage of mob distnoroot and used ComparativeDistance instead 2015-01-17 15:32:04 -08:00
Arthur Ice 9f8dad894c Added 'GetTargetRingLocation' which will eventualy replace the individual GetTargetRing methods 2015-01-17 15:22:46 -08:00
Arthur Ice 136dee691a removed unused macro debug message 2015-01-17 14:55:41 -08:00
Michael Cook (mackal) fd77fbf163 Merge pull request #313 from addtheice/data_bundling
Data bundling
2015-01-17 17:30:14 -05:00
Arthur Ice 53f3fbfb4d 16 char copy not 32 2015-01-17 14:16:23 -08:00
Michael Cook (mackal) f9a7da61b8 Switch NUMHIT_ enum to a strongly typed enum 2015-01-17 16:18:09 -05:00
Akkadius 7d14fad782 Remove zlog completely 2015-01-17 02:59:49 -06:00
Akkadius 551aadd27a Replace all zlog calls 2015-01-17 02:59:10 -06:00
Akkadius 1069b13992 Remove clog completely 2015-01-17 02:57:47 -06:00
Akkadius bcaaaac090 Replace all clog calls, (Mostly WORLD__) 2015-01-17 02:56:10 -06:00
Akkadius 3d5434b91d Remove mlog and _log completely 2015-01-17 02:54:02 -06:00
Akkadius d490209c9e Convert skill mlog call 2015-01-17 02:52:30 -06:00
Akkadius 483086dc3a Convert OPGMTrainSkill mlogs 2015-01-17 02:50:29 -06:00
Akkadius b0412101b0 Convert Client::HandlePaclet 2015-01-17 02:48:50 -06:00
Akkadius 0641be187d Convert Client unhandled incoming opcodes 2015-01-17 02:46:26 -06:00
Akkadius 648494ec16 port mlog '*PATHING*' category to new log system 2015-01-17 02:33:48 -06:00
Akkadius a46c0ee7e2 Add 'Pathing' log category 2015-01-17 02:32:45 -06:00
Akkadius 5b41bdeec6 port mlog 'CLIENT__TRADING' category to new log system 2015-01-17 02:30:58 -06:00
Akkadius 1405d9e114 port mlog 'CLIENT__SPELLS' category to new log system 2015-01-17 02:28:25 -06:00
Akkadius 6a567288ae port mlog 'Combat' category to new log system 2015-01-17 02:22:53 -06:00
Akkadius c9589dce21 Add 'Combat' log category 2015-01-17 02:21:51 -06:00
Akkadius d4f2e0ce5f port mlog 'AI' category to new log system 2015-01-17 02:20:01 -06:00
Akkadius 97e87f53db port mlog 'Guilds' category to new log system 2015-01-17 02:16:44 -06:00
Akkadius 25642f924e port mlog 'Inventory' category to new log system 2015-01-17 02:04:43 -06:00
Akkadius cae6a70a2c port mlog 'Spells' category to new log system 2015-01-17 02:01:20 -06:00
Akkadius aec39d2650 Port mlog AA category to new log system 2015-01-17 01:59:18 -06:00
Akkadius b06d1b9050 Strip newlines that pipe from quest logs 2015-01-17 01:52:12 -06:00
Akkadius 647874d424 Remove occurrences of mkpt 2015-01-16 22:12:36 -06:00
Akkadius 449c12d6c2 Delete mpkt and some calls to it 2015-01-16 22:04:40 -06:00
Akkadius a6c521a73e Keep mlog happy until it is completely replaced 2015-01-16 21:58:08 -06:00
Akkadius 2bc6ed17c7 Remove command_mlog 2015-01-16 21:54:51 -06:00
Akkadius d21466566e Remove some mlog related functions in Mob:: 2015-01-16 21:53:56 -06:00
Akkadius 79ac3f9b44 added debug.cpp/.h back in temporarily because of stupid dependencies 2015-01-16 21:40:47 -06:00
Akkadius 7c78cf5ab7 More debug changes 2015-01-16 21:39:51 -06:00
Akkadius 50b686b162 Remove debug.cpp/.h files and from CMakeLists.txt 2015-01-16 21:30:41 -06:00
Akkadius a4dbe13c3d Remove EQEmuLog::Dump 2015-01-16 21:26:37 -06:00
Akkadius 5161cb6bd2 Remove more old Callback code 2015-01-16 21:23:50 -06:00
Akkadius d3de7c9237 Remove EQEmuLog writebuf 2015-01-16 21:21:53 -06:00
Akkadius 1fcc1f6193 Convert Perl Quest Logging to the new system 2015-01-16 21:19:53 -06:00
Akkadius ef4847555a Add 'Quests' Category 2015-01-16 21:19:19 -06:00
Akkadius bfd73e5b96 Remove some more old log callbacks 2015-01-16 20:58:13 -06:00
Michael Cook (mackal) 7547d7610f Merge pull request #336 from RicardoCampos/master
Clean up of start zone overrides
2015-01-16 20:18:39 -05:00
Uleat 0eb7eefcb5 Fix for possible race/crash condition in ItemInst::ClearByFlags() 2015-01-16 18:07:19 -05:00
Uleat 4978999d78 Pre-p'd a bot iter 2015-01-16 17:15:33 -05:00
Akkadius f410b270ad Fix Callback in zone, some stragglers in the renaming of function 2015-01-16 03:22:23 -06:00
Akkadius 132fbbb0c6 Rename LogDebugType to DebugCategory 2015-01-16 03:09:02 -06:00
Akkadius 5a3b40c503 Remove my test code in net.cpp 2015-01-16 03:02:30 -06:00
Akkadius d1d26437e5 Cleaning up Zone net.cpp 2015-01-16 03:00:49 -06:00
Akkadius 78e08e5327 Move GMSayHookCallBackProcess out of client logs and into Zone Class 2015-01-16 02:56:39 -06:00
Akkadius a1df2b8f64 Rip out Client Log functions that were used in Callbacks 2015-01-16 02:51:29 -06:00
Akkadius d9626e392e Rip out Client Log Callbacks from zone 2015-01-16 02:49:23 -06:00
Akkadius 7173fc5db3 Remove command_logs 2015-01-16 02:45:18 -06:00
Akkadius 82407ba86d Remove command_nologs 2015-01-16 02:44:30 -06:00
Akkadius 7c8e5645f0 Remove command_log 2015-01-16 02:43:24 -06:00
Akkadius 168e6ec80d Convert Client::SendAllPackets to new debug log 2015-01-16 02:26:19 -06:00
Akkadius 00bab96717 Convert Bot::CalcBotFocusEffect Debug to new 2015-01-16 02:25:04 -06:00
Akkadius c9e7e77d4c Merge branch 'logging_changes' of https://github.com/EQEmu/Server into logging_changes 2015-01-16 02:21:14 -06:00
Akkadius 59f90aede9 Another convert 2015-01-16 02:18:30 -06:00
Akkadius 2828d51308 Converted mlogs in Mob::CheckHitChance to new logs 2015-01-16 02:16:07 -06:00
Akkadius c10f5b2cbc Removed #ATTACK_DEBUG Mob::CheckHitChance and converted debug 2015-01-16 02:12:19 -06:00
Akkadius f957d27fa5 Removed #EQDEBUG Mob::CheckHitChance and converted debug 2015-01-16 02:11:28 -06:00
Akkadius 488e94df56 Removed #EQDEBUG Mob::AttackAnimation 2015-01-16 02:10:10 -06:00
Akkadius 1e741c1b92 Add 'Attack' Category 2015-01-16 02:09:13 -06:00
Akkadius edd871353d Removed attack.cpp #EQDEBUG 2015-01-16 02:08:04 -06:00
Akkadius 4851fe1791 Converted more Aggro Debugs 2015-01-16 02:07:19 -06:00
Akkadius f760597684 Removed preprocessor EQDEBUG in CheckWillAggro and converted log message 2015-01-16 02:06:22 -06:00
Akkadius c23a5008e2 Add 'Aggro' Category 2015-01-16 02:04:52 -06:00
Akkadius bd4e15609a astyle the terrible sin that is maxskill.h 2015-01-16 01:59:57 -06:00
Michael Cook (mackal) ba2b91a548 Fix loginserver 2015-01-16 02:56:14 -05:00
Akkadius 3c9a2702b5 Removed preprocessor EQDEBUG from EQStream from unknown opcode to Application map for PopRawPacket 2015-01-16 01:48:43 -06:00
Akkadius bab8e2ef33 Removed preprocessor EQDEBUG from EQStream from unknown opcode to Application map 2015-01-16 01:47:27 -06:00
Akkadius 5902330bc5 ChannelMesssageReceived debug convert from preprocessor 2015-01-16 01:46:17 -06:00
Michael Cook (mackal) 0c905226e1 Fix linux compile (partially) 2015-01-16 02:32:46 -05:00
Akkadius d77ec9b466 Add Client_Server_Packet Category 2015-01-16 01:26:36 -06:00
Akkadius 08d05d8aae ServerOP_ZAAuthFailed cout message to LogDebugType 2015-01-16 01:21:58 -06:00
Akkadius 295fa30a35 Adjust World to zone port assignment message 2015-01-16 01:21:02 -06:00
Akkadius 5b51f69753 Fix for 'is a GM' convert (Derp) 2015-01-16 01:16:17 -06:00
Akkadius d42a63b72d TCPConnection Loop add to TCP Category 2015-01-16 01:08:26 -06:00
Akkadius 3c22b106ef TCPConnection LogCategory Add 2015-01-16 01:07:29 -06:00
Akkadius 04f13bbf4b Fix for tcp_connection.cpp logger references 2015-01-16 01:03:15 -06:00
Akkadius 32a3666170 Add Linux chmod mask 0755 for mkdir 2015-01-16 00:54:27 -06:00
Akkadius 2cb3a491e0 Add include to eq_stream_factory.cpp for EQEmuLogSys 2015-01-16 00:53:31 -06:00
Akkadius af1fc55393 Comment defaults debugging 2015-01-16 00:52:00 -06:00
Akkadius cd7e9d40bf Re-Index Log Categories to avoid bugginies with index references 2015-01-16 00:50:16 -06:00
Akkadius 055f1523c7 Comment defaults debugging 2015-01-16 00:44:28 -06:00
Akkadius e69486d905 Converted 'is a GM' debug 2015-01-16 00:40:43 -06:00
Akkadius cdc249dde3 Converted SyncWorldtime std::cout 2015-01-16 00:37:36 -06:00
Akkadius 829dd8ddaf Correct log_settings checks 2015-01-16 00:15:34 -06:00
Akkadius 73b54ffabb Implement log_settings for ProcessConsoleMessage 2015-01-16 00:14:49 -06:00
Akkadius 0b661a6347 Implement log_settings for ProcessLogWrite 2015-01-16 00:14:16 -06:00
Akkadius 2fb50fa5cc Implement log_settings for ProcessGMSay 2015-01-16 00:13:56 -06:00
Akkadius 70fbf23d27 Rename LoadLogSettings to LoadLogSettingsDefaults 2015-01-16 00:07:30 -06:00
Akkadius 0d2c396680 zone LoadLogSysSettings 2015-01-16 00:06:12 -06:00
Akkadius 44b65d1ee5 Add Database::LoadLogSysSettings function 2015-01-15 23:49:20 -06:00
Akkadius 3a24372009 Added 2015_1_15_logsys_categories_table.sql 2015-01-15 23:10:45 -06:00
Akkadius 362de5084f Add category processing to ProcessGMSay so we don't get a zone crash from feedback loop of GMSay outputting packets, then those packets going to GMSay. This would make a log inside of a log inside of a log, I call it, log inception 2015-01-15 22:44:27 -06:00
Akkadius dbdfb23cc3 Add category to ProcessLogWrite 2015-01-15 22:38:24 -06:00
Akkadius 723b87bba4 Add category to ProcessConsoleMessage 2015-01-15 22:37:36 -06:00
Akkadius 1e10e088ad Add category to ProcessGMSay 2015-01-15 22:35:58 -06:00
Akkadius 6eae464211 Some EQEmuLogSys changes 2015-01-15 22:17:37 -06:00
Uleat 636a259c4c Patchwork of changes..mostly related tracing a cursor queue bug (see changelog) 2015-01-15 21:24:26 -05:00
ricardocampos23 75501fbb5d corrected comment 2015-01-15 21:03:06 +00:00
ricardocampos23 8f3ffe4e6e Merge remote-tracking branch 'upstream/master' 2015-01-15 20:44:59 +00:00
KayenEQ c4c86fd057 Merge pull request #337 from KayenEQ/Development
Fix for beneficial spells that decrease hit points over time
2015-01-15 00:07:22 -05:00
KayenEQ d694940b80 Fix for beneficial spells that do decrease hit point over time to start working again. 2015-01-14 23:47:33 -05:00
JJ 2f32950364 Fix in npc save feature sql. (iluvseq) 2015-01-14 18:32:53 -05:00
Michael Cook (mackal) aa405df0e9 Fix clang compile 2015-01-14 15:32:42 -05:00
Akkadius bdd170df6c More moving around of internal EQEmuLogSys functions 2015-01-14 05:12:01 -06:00
Trevius af42bfdb02 (RoF2) Guild invites now add new members as members instead of recruits, and /guild chat works properly.
(RoF2) Guild Promote is now functional.
2015-01-13 23:37:35 -06:00
Uleat 87bf191fad Placed an upper limit on the cursor queue save loop 2015-01-13 23:48:34 -05:00
RicardoCampos d64b1ed457 Merge remote-tracking branch 'upstream/master' 2015-01-13 21:51:52 +00:00
RicardoCampos ea7453946c Altered the way that start zone overrides work. These now no longer use an entry in the variables table, but rather use TitaniumStartZoneID, and SofStartZoneID in the rule_values table.
If this is set, it will look for a match in the start_zones based on race/class/deity and the zone id. If it finds a matching row (by zone_id), it will use that row's details. If not, it will use a default.
2015-01-13 21:47:51 +00:00
Akkadius 99a0012bdd Removal of rule based settings, moving to separate DB table 2015-01-13 15:13:12 -06:00
Akkadius 72b53ee2a5 EQEmuLogSys internal function consolidation 2015-01-13 15:11:01 -06:00
Akkadius 4bf2bfc8e3 Debug message function updates 2015-01-13 13:43:41 -06:00
Michael Cook (mackal) e0602efca2 Fix out of bounds in Mob::ResourceTap 2015-01-13 00:36:25 -05:00
Akkadius b219d73163 _log replacements in various spots 2015-01-12 23:08:35 -06:00
Akkadius 733159923a Convert 'COMMON' debugging _log to logger.LogDebugType 2015-01-12 23:01:01 -06:00
Akkadius 6d8f64da57 Convert 'TASKS' debugging _log to logger.LogDebugType 2015-01-12 22:58:13 -06:00
Akkadius ae6bf5a227 Convert 'Skills' debugging _log to logger.LogDebugType 2015-01-12 22:57:38 -06:00
Akkadius 44b6e9aa3f Convert 'AA' debugging _log to logger.LogDebugType 2015-01-12 22:57:04 -06:00
Akkadius 509bd2d652 Convert 'TRADESKILLS' debugging _log to logger.LogDebugType 2015-01-12 22:55:44 -06:00
Akkadius 53db4771f7 Convert 'DOORS' debugging _log to logger.LogDebugType 2015-01-12 22:54:16 -06:00
Akkadius 463b358992 Convert 'INVENTORY' debugging _log to logger.LogDebugType 2015-01-12 22:53:46 -06:00
Akkadius eaf2da1171 Convert 'TRIBUTE' debugging _log to logger.LogDebugType 2015-01-12 22:53:17 -06:00
Akkadius 3693868acf Convert 'SPAWNS' debugging _log to logger.LogDebugType 2015-01-12 22:52:46 -06:00
Akkadius 683ff1ea60 Convert 'SPELLS' debugging _log to logger.LogDebugType 2015-01-12 22:52:11 -06:00
Akkadius 3390164aea Convert 'TRADING' debugging _log to logger.LogDebugType 2015-01-12 22:51:35 -06:00
Akkadius 49ecd69b34 Convert 'LAUNCHER' debugging _log to logger.LogDebugType 2015-01-12 22:50:09 -06:00
Akkadius 4c50025f13 Convert 'ZoneServer' debugging _log to logger.LogDebugType 2015-01-12 22:47:37 -06:00
Akkadius 40d32fc1e5 Convert 'UCS' debugging _log to logger.LogDebugType 2015-01-12 22:44:47 -06:00
Akkadius f26f49c2a1 Convert 'QueryServ' debugging _log to logger.LogDebugType 2015-01-12 22:37:20 -06:00
Akkadius c288ca5204 Convert 'Guilds' debugging _log to logger.LogDebugType 2015-01-12 22:32:44 -06:00
Akkadius 6c0e2631dc Convert rules debugging _log to logger.LogDebugType 2015-01-12 22:29:56 -06:00
Akkadius 6e11baf308 Convert world debugging _log to logger.LogDebugType 2015-01-12 22:28:16 -06:00
Akkadius bc02d7c31a More netcode debugging _log to logger.LogDebugType 2015-01-12 22:20:11 -06:00
Akkadius 34f30b974e More netcode debugging _log to logger.LogDebugType 2015-01-12 22:07:16 -06:00
Akkadius ffdce868c1 Convert netcode debugging _log to logger.LogDebugType 2015-01-12 21:45:49 -06:00
Uleat 390681e0d0 Fix for missing names in StringID-based messages 2015-01-12 22:26:33 -05:00
Akkadius 4811631127 Convert _log from TASKS category 2015-01-12 21:19:19 -06:00
Akkadius b1939aaa3e Remove Save from LogTypes 2015-01-12 20:58:17 -06:00
Uleat ec4d96ea79 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-12 21:16:13 -05:00
Uleat e84cebe375 Changed OP_FormattedMessage code to eliminate possible oob error 2015-01-12 21:15:12 -05:00
Akkadius 9d355f0f99 Add zone callback for client messages so log messages can be piped to it 2015-01-12 20:11:23 -06:00
Michael Cook (mackal) 5cb2b14645 Fix issue with SharedDatabase::LoadCharacterInspectMessage 2015-01-12 17:00:55 -05:00
Uleat a6148565e5 Fix for load_bots.sql using '\\' as a delimiter (Changed to '$$') 2015-01-12 15:53:33 -05:00
Uleat d5b24543e8 Added text link translators for OP_TaskDescription (RoF+ -- all clients current) 2015-01-12 14:35:38 -05:00
Akkadius 08a23265f8 Make some log functions less process specific in naming 2015-01-12 12:37:33 -06:00
Akkadius fac1361d36 logger.LoadLogSettings() added after each platform executable registry
Added int return for platform executable
2015-01-12 05:15:31 -06:00
Akkadius 2e397b1383 static const char* LogCategoryName[EQEmuLogSys::LogCategory::MaxCategoryID]
enum LogCategory
2015-01-12 05:14:46 -06:00
Akkadius 489f24a80a Preliminary addition of log settings map 2015-01-12 02:16:57 -06:00
Uleat 51fe41bf51 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-12 01:42:46 -05:00
Uleat f612082f5d Fix for OP_FormattedMessage text link server crashes 2015-01-12 01:42:27 -05:00
Akkadius 3c53d907da Fix double construction of EQEmuLogSys 2015-01-11 22:41:44 -06:00
Michael Cook (mackal) 2c97d98963 Remove unnecessary and incorrect memset 2015-01-11 23:34:00 -05:00
KayenEQ d6bc32f7fd Merge pull request #335 from KayenEQ/Development
#tune command fix
2015-01-11 23:10:45 -05:00
KayenEQ 48199f3744 #tune command fix 2015-01-11 23:09:28 -05:00
Uleat 21e5ccdf88 Fixed conditional criteria for size mismatch check 2015-01-11 22:51:31 -05:00
Uleat 7794ea4a33 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-11 20:57:26 -05:00
Uleat add346b8dc Added text link body size mismatch checks to translators 2015-01-11 20:57:04 -05:00
Akkadius 73c29fc2f0 Added host parameter for folks using different hosts cause one is not enough 2015-01-11 19:13:38 -06:00
Uleat 5c761d3a57 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-11 16:44:30 -05:00
Uleat 756d4f4c5c Added text link translators for OP_TaskDescription (Ti thru UF..RoF+ in-work) 2015-01-11 15:49:54 -05:00
Uleat 8f1c227125 Tweaked client text link translators 2015-01-11 12:25:58 -05:00
KayenEQ c84dc13d53 Merge pull request #334 from KayenEQ/Development
Command #tune
2015-01-11 01:21:02 -05:00
Akkadius 855f7ac2a0 Quote fix 2015-01-11 00:20:43 -06:00
KayenEQ d57d463818 New Command
#tune
Used to return ideal values for tuning NPC/Client combat statistics.
2015-01-11 00:45:37 -05:00
Akkadius 108d3110b6 RULE_BOOL(Logging, EnableConsoleLogging, true) /* Turns on or off ALL logging to console */
RULE_BOOL(Logging, EnableFileLogging, true)	/* Turns on or off ALL forms of file logging */
2015-01-10 23:26:10 -06:00
Akkadius 2159a56b17 Add log test command #logtest 2015-01-10 23:25:50 -06:00
Akkadius b1fbcc51e0 linux compile fix 2015-01-10 20:52:51 -06:00
Akkadius ce0a5cf7b8 Add LogDebugType(DebugLevel debug_level, uint16 log_type, std::string message, ...) 2015-01-10 20:14:27 -06:00
Akkadius 17d9b9199c Replace rest of EQEmuLog->write with EQEmuLogSys Log 2015-01-10 19:36:15 -06:00
Akkadius 167e11426f Log Message reword for zone and world bootup failure 2015-01-10 19:32:07 -06:00
Akkadius 7e7c59967c _log error convert to logger.Log(EQEmuLogSys::Error 2015-01-10 19:05:46 -06:00
Akkadius b2a1597e73 More _log Client replacements 2015-01-10 18:52:27 -06:00
Akkadius d459c144fe replace mlog with logger.LogDebug 2015-01-10 18:38:04 -06:00
Akkadius fc76e5c8ac pathing _log to logger.LogDebug 2015-01-10 18:29:27 -06:00
Akkadius 7a9860fdd1 Added EQEmuLogSys logger; pointer to the rest of the projects 2015-01-10 18:12:58 -06:00
Akkadius b7ade8bf1b EQEmuLog::Dump preprocessor remove 2015-01-10 17:27:24 -06:00
Akkadius 26b550dd0d More log replacements 2015-01-10 16:01:43 -06:00
Akkadius 18c837c398 Replaced various other log calls in zone 2015-01-10 15:59:32 -06:00
Akkadius 4bf74348a1 Replaced Error calls 2015-01-10 15:56:09 -06:00
Akkadius a92233240c Replaced Normal calls 2015-01-10 15:55:10 -06:00
Akkadius fdbd76e4ad Replaced Status log calls 2015-01-10 15:54:37 -06:00
Akkadius b76e179d75 Fix spacing 2015-01-10 15:47:36 -06:00
Akkadius 6844645dfb Replace LogFile->write(EQEmuLog::Error, with logger.logevents(EQEmuLogSys::Error 2015-01-10 15:44:35 -06:00
Akkadius dadae1a71f Replaced Debug messages: LogFile->write with logger.LogDebug 2015-01-10 15:26:38 -06:00
Akkadius ebb2659630 Line changes 2015-01-10 15:08:30 -06:00
Akkadius 9e4ef74dd5 RULE_INT(Logging, DebugLogLevel, 0) /* Sets Debug Level, -1 = OFF, 0 = Low Level, 1 = Info, 2 = Extreme */ 2015-01-10 14:59:32 -06:00
Akkadius 84741e4cb1 log_sys to logger
enum DebugLevel {
		General = 0,	/* 0 - Low-Level general debugging, useful info on single line */
		Moderate,		/* 1 - Informational based, used in functions, when particular things load */
		Detail,			/* 2 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */
	};
void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...)
2015-01-10 14:40:47 -06:00
Akkadius b8ed29c600 Add RULE_CATEGORY(Logging)
RULE_BOOL(Logging, ConsoleLogCommands, false)  /* Turns on or off console logs */
RULE_BOOL(Logging, LogFileCommands, false)
RULE_CATEGORY_END()
2015-01-10 14:37:33 -06:00
Akkadius 01ca81a177 Remove debugging and generalize the Log function 2015-01-10 13:35:02 -06:00
Akkadius f4e33f6faa Changed some console colors 2015-01-10 13:34:39 -06:00
Uleat bbb3e1a1bd Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-10 14:31:18 -05:00
Uleat ce54071296 Added text link translators for OP_Emote 2015-01-10 13:50:48 -05:00
Akkadius 5b4cf79b04 Create console colors type map from Console::Color LogColors 2015-01-10 03:56:52 -06:00
Akkadius 2aacc7323e Backport logging from debug.cpp EQEmuLog::write back to EQEmuLogSys::WriteZoneLog
Logs being written to logs/zone/ currently
2015-01-10 03:44:49 -06:00
Akkadius 80d11d4ca9 Added eqemu_logsys.cpp/.h 2015-01-10 03:43:44 -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
KayenEQ 00ba6e761e Merge pull request #333 from KayenEQ/Development
Fix for spell projectiles (target type 1) being applied as melee damage.
2015-01-10 00:14:39 -05:00
KayenEQ 999a6501e0 Fix for spell projectiles (target type 1) being applied as melee damage.
Resolves those random 1 million damage hits that have been reported
2015-01-09 22:33:41 -05:00
Trevius f799b8ef68 Changed some console logging for slot and group errors. 2015-01-09 20:16:23 -06:00
Uleat bf8f70342b Added text link translators for OP_FormattedMessage 2015-01-09 17:56:46 -05:00
Michael Cook (mackal) 7e72f10a3b clang-modernize -use-nullptr for ucs/worldserver.cpp 2015-01-09 13:18:49 -05:00
Michael Cook (mackal) b398d65eb8 clang-modernize -use-nullptr for ucs/ucs.cpp 2015-01-09 13:18:49 -05:00
Michael Cook (mackal) bf9b126eef clang-modernize -use-nullptr for ucs/clientlist.cpp 2015-01-09 13:18:49 -05:00
Michael Cook (mackal) f3f9997adf Packets are already memset to 0 2015-01-09 12:59:48 -05:00
Michael Cook (mackal) 1b8711bce9 Minor tweaking to zone/entity.cpp 2015-01-09 12:59:13 -05:00
Michael Cook (mackal) b0e59e112d clang-modernize -use-auto convert for world/zoneserver.cpp 2015-01-09 03:05:15 -05:00
Michael Cook (mackal) c6388d8c5d clang-modernize -use-auto convert for world/zonelist.cpp 2015-01-09 03:05:15 -05:00
Michael Cook (mackal) e87a3096f4 clang-modernize -use-auto convert for world/wguild_mgr.cpp 2015-01-09 03:05:15 -05:00
Michael Cook (mackal) ca0a8fd974 clang-modernize -use-auto convert for world/ucs.cpp 2015-01-09 03:05:15 -05:00
Michael Cook (mackal) c9a75dcf64 clang-modernize -use-auto convert for world/queryserv.cpp 2015-01-09 03:05:15 -05:00
Michael Cook (mackal) 7e2661bbc1 clang-modernize -use-auto convert for world/net.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 8f18672690 clang-modernize -use-auto convert for world/login_server_list.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 6b75e03d72 clang-modernize -use-auto convert for world/login_server.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 1770862b10 clang-modernize -use-auto convert for world/lfplist.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 3df27a9379 clang-modernize -use-auto convert for world/launcher_list.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) da13affebc clang-modernize -use-auto convert for world/launcher_link.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 446b085d6c clang-modernize -use-auto convert for world/eqw_parser.cpp 2015-01-09 03:05:14 -05:00
Michael Cook (mackal) 0956575292 clang-modernize -use-auto convert for world/eqw_http_handler.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) 0ed10ec102 clang-modernize -use-auto convert for world/console.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) 81a48cac6c clang-modernize -use-auto convert for world/clientlist.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) bb37dd1b16 clang-modernize -use-auto convert for world/cliententry.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) c2936a893e clang-modernize -use-auto convert for world/client.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) 64be231fe6 clang-modernize -use-auto convert for world/adventure_manager.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) 28680a4695 clang-modernize -use-auto convert for world/adventure.cpp 2015-01-09 03:05:13 -05:00
Michael Cook (mackal) 502bb6ca79 clang-modernize -use-auto convert for ucs/worldserver.cpp 2015-01-09 02:57:00 -05:00
Michael Cook (mackal) 09f37323d1 clang-modernize -use-auto convert for ucs/database.cpp 2015-01-09 02:57:00 -05:00
Michael Cook (mackal) b34b26c423 clang-modernize -use-auto convert for ucs/clientlist.cpp 2015-01-09 02:57:00 -05:00
Michael Cook (mackal) 1873b1d739 Ranged-based for for ucs/clientlist.cpp 2015-01-09 02:50:13 -05:00
Michael Cook (mackal) c33973f20a Optimize EntityList::RemoveGroup/RemoveRaid
lambdas are cheating btw.
2015-01-09 02:44:20 -05:00
Trevius 4c9653d204 Potential crash/bug fixes for Groups and Mercs. 2015-01-08 23:28:22 -06:00
Arthur Ice f6166bcb94 modified mysql results/row to be ready for range based for 2015-01-08 21:20:56 -08:00
Arthur Ice cd9ca65587 merge upstream 2015-01-08 19:40:00 -08:00
Michael Cook (mackal) 4808dcadcf Range-based for for world/zonelist.cpp 2015-01-08 22:01:37 -05:00
Michael Cook (mackal) 4fde4bba72 Range-based for for world/lfplist.cpp 2015-01-08 22:01:21 -05:00
Michael Cook (mackal) 4f643c7201 Range-based for for world/adventure_manager.cpp 2015-01-08 22:01:02 -05:00
Michael Cook (mackal) 784a6974d1 Range-based for for world/adventure.cpp 2015-01-08 22:00:36 -05:00
Akkadius 732fa17afb Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	zone/groups.cpp
2015-01-08 19:50:48 -06:00
Akkadius be381b4e56 Renamed EQEMuLog class to EQEmuLog 2015-01-08 19:46:28 -06:00
Trevius 94be9e9162 Added some extra checks and clean-up related to Groups and Mercenaries. 2015-01-08 17:08:20 -06:00
Michael Cook (mackal) c8278608a3 Merge pull request #331 from af4t/master
Work-around for "strange ADL issues" not needed if using Boost 1.57.0
2015-01-08 12:31:02 -05:00
Kemmler 77f9cf9f63 Work-around for "strange ADL issues" not needed if using Boost 1.57.0 (was required through 1.56.0, thus test for less than 1.57.0). Tested on VS2013. 2015-01-08 09:49:46 -05:00
Trevius 3b2fbd337f Query fix for group_leaders table. This may resolve some crashes/bugs related to Mercs/Bots and Groups. 2015-01-07 23:45:44 -06:00
Trevius a83d536712 Mercenaries now load directly from tables only. The vwMercNpcTypes view is no longer required and can be deleted. 2015-01-07 22:20:44 -06:00
Uleat a6dd14b09f Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-07 14:57:38 -05:00
Uleat 0552220f00 Excluded text link body from message scrambling in Client::GarbleMessage() 2015-01-07 11:13:48 -05:00
Akkadius 2e55c98e90 Merge branch 'master' of https://github.com/EQEmu/Server 2015-01-07 08:45:30 -06:00
Akkadius 66cc498421 Added colors to windows consoles, the logging system still needs to be overhauled but this crap code should make debugging easier until the rest of it is cleaned up 2015-01-07 08:45:04 -06:00
Uleat b27737bfcd Rework of the text link translator code (Known bug with broadcast message link size not in OP_ChannelMessage or OP_SpecialMesg) 2015-01-06 23:19:41 -05:00
Trevius 2c43e6f68d Added defines for all remaining pet commands and some support for them as well. 2015-01-06 19:14:06 -06:00
JJ 6717014601 Lua declaration as well... 2015-01-06 16:10:29 -05:00
JJ 364f2f6bf8 Forgot prototype declaration from previous commit. Also fix corruption declaration. 2015-01-06 15:09:18 -05:00
JJ cde406a496 Add PhR to #showstats and a few places that can/should be implemented in the future. 2015-01-06 13:51:36 -05: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
Uleat 668823eaf2 Fix for text link issues with items whose loregroup is '-1' 2015-01-05 23:11:38 -05:00
Uleat 4b133c808c It helps if you actually push more than the changelog message... 2015-01-05 13:50:03 -05:00
Uleat 7557cfd845 Added text link translators for all supported clients - currently, only OP_ChannelMessage and OP_SpecialMesg are translated. 2015-01-05 13:44:16 -05:00
Trevius 179f47dbe3 RoF+ - Added the "Your race, class, or deity cannot use this item." message since it no longer exists in the eqstr_us.txt file. 2015-01-04 20:42:45 -06:00
Akkadius ac09636a73 Readability: embparser_api.cpp macro section A-Z sort 2015-01-04 07:01:16 -06:00
Akkadius 8491e3ce9b Pro-active adjustment of quest::updatetaskactivity to include ignore_quest_update
quest::updatetaskactivity(task, activity, [count], [ignore_quest_update])
2015-01-04 06:58:30 -06:00
Akkadius a56e9ccda6 Remove iostream from debug output 2015-01-04 02:55:38 -06:00
Akkadius 9419bc8d54 True fix for $client->UpdateTaskActivity(TaskID, ActivityID, Count, [ignore_quest_update]) 2015-01-04 02:54:50 -06:00
Michael Cook (mackal) 85a27cdd74 Fix account_creation 2015-01-04 01:52:46 -05:00
Michael Cook (mackal) a75db63cbc Fix EVENT_CONNECT 2015-01-04 01:48:31 -05:00
Michael Cook (mackal) f8b6ee296c Fix memleak in Mob::TypesTemporaryPets 2015-01-03 18:48:38 -05:00
Michael Cook (mackal) 09d76605f5 Fix memleak in Mob::TemporaryPets 2015-01-03 18:42:28 -05:00
Michael Cook (mackal) 6897aef4b5 Need to set this to 1 again before the perl_destruct 2015-01-03 15:14:12 -05:00
Michael Cook (mackal) 77b8e9ec6e Perl memleak fix
This may need more test!!
2015-01-03 13:54:31 -05:00
Michael Cook (mackal) ea6ab5b10f Virtualize WaterMap's destructor (memleak fix) 2015-01-03 12:33:53 -05:00
Michael Cook (mackal) 9b8598c566 Group/raid memleaks 2015-01-03 02:57:55 -05:00
Michael Cook (mackal) 1b5db0684e Fix memleak in OP_RaidJoin 2015-01-03 02:39:44 -05:00
Trevius 3da3b5641f (RoF2) /shield (shielding) and /key (key ring) are both now functional after opcode updates. 2015-01-03 01:31:44 -06:00
Michael Cook (mackal) 7cbefa4ec2 Fix memleak in OP_RaidUpdate 2015-01-03 01:52:24 -05:00
Michael Cook (mackal) 6a2260f106 Memleak in Map 2015-01-03 01:26:46 -05:00
Akkadius a8d28cbed5 True optional fix for UpdateTaskActivity now that I've had time to take care of it 2015-01-02 17:51:55 -06:00
Trevius 3c6c5b9732 (RoF2) *Hopefully* Fixed looting incorrect items from NPCs. Please report any issues!
(RoF2) Now able to loot items past the 10th slot on NPC corpses.
Attuned Items can now be auto-looted and will equip properly.
Mercenaries and Bots will no longer take a share from /split or /autosplit.
2015-01-02 01:42:52 -06:00
Trevius f0d2fb796f Aug Type 21 fix for RoF client. 2015-01-01 20:00:16 -06:00
JJ fc544e164c Update default npc_types values for previous NULL entries. 2014-12-31 20:53:12 -05:00
Michael Cook (mackal) d93edd7393 Make NPCs less jumpy
We actually didn't want that +2.0f
2014-12-31 17:49:12 -05:00
Trevius 16a8d15909 (RoF2) Aug Type 21 no longer shows the "Buy Now" button in the aug slot of items.
(RoF2) Identified the "Copied" item flag with the help of Uleat.
2014-12-30 00:27:23 -06:00
Michael Cook (mackal) 5df65427b1 Merge pull request #330 from KinglyKrab/master
Made fifth argument of UpdateTaskActivity truly optional.
2014-12-29 17:30:17 -05:00
Kinglykrab 72823182f6 Made fifth argument of UpdateTaskActivity truly optional. 2014-12-29 17:29:45 -05:00
Akkadius 81dfffadf6 Updated $client->UpdateTaskActivity to have optional argument ignore_quest_update IE: Client::UpdateTaskActivity(THIS, TaskID, ActivityID, Count, [ignore_quest_update])
Also updated internal UpdateTaskActivity methods to optionally ignore quest based task updates to prevent feedback
2014-12-29 05:35:50 -06:00
Trevius 33e88bffe9 (RoF2) Identified a few Item Fields and resolved an issue with cloth armor not accepting certain augments that they should. 2014-12-29 00:29:49 -06:00
Uleat dab3d1181e Implemented class Client::TextLink 2014-12-28 12:49:14 -05:00
Uleat 4fb1a3ff3f Merge branch 'master' of https://github.com/EQEmu/Server into item_link
Conflicts:
	changelog.txt
2014-12-28 11:57:51 -05:00
Akkadius 2dadc9ff24 Change SetOwner to SetHateOwner refactor 2014-12-28 00:06:51 -06:00
Akkadius 4af3834715 Some more refactoring of hate_list 2014-12-27 23:52:44 -06:00
Akkadius 18f9a06f06 Re-Push Refactoring changes before without broken functionality 2014-12-27 23:44:15 -06:00
Akkadius 4f65066274 Reverting some hate stuff so things work again 2014-12-27 23:19:48 -06:00
Akkadius 8983953d7d Remove debugging from hate changes 2014-12-27 20:25:20 -06:00
Akkadius 73fe229e25 More hate changes 2014-12-27 20:23:49 -06:00
Akkadius 21ce6efc73 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-27 18:25:00 -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
KayenEQ 7ecea56caf Merge pull request #329 from KayenEQ/Development
NPC special ability (43) CASTING_RESIST_DIFF
2014-12-27 18:47:54 -05:00
KayenEQ 9666f1e25e Implemened npc special ability (43) CASTING_RESIST_DIFF which sets innate resist modifier on
ALL spells used by that NPC. Ie. 43,1,-200 will set a -200 innate resist diff, so if your npc cast
a spell that has a -10 resist modifier the final resist diff would be -210.
2014-12-27 18:43:59 -05:00
Trevius 05c943779d (RoF2) Fixed dropping items on the ground so they go to ground level instead of camera height.
Show Helm Option should be functional again.
2014-12-27 15:46:30 -06:00
Akkadius b63dbd50a8 Fix changelog.txt merge 2014-12-27 01:09:14 -06:00
Akkadius d7b529d2af Add option to automatic database upgrade script 5) Download latest Opcodes from Github 2014-12-27 01:07:58 -06:00
Uleat 00ac9a05d5 Merge branch 'master' of https://github.com/EQEmu/Server into item_link 2014-12-26 23:52:25 -05:00
Trevius 47e98a4b62 Fixed Mercenaries so they can spawn again after table field renames from recent change. 2014-12-26 00:11:51 -06:00
Uleat d9dc2eb4e3 Thought something looked like it was missing! 2014-12-25 21:45:38 -05:00
Uleat 270fe3389c Updated item/say links for all clients. They should be a little easier to keep track of now. 2014-12-25 11:04:01 -05:00
Uleat 15fbb722eb Added a new Client::MakeItemLink() method that uses Item_Struct instead of ItemInst. Changed the way that NPC::QueryLoot() builds its links. 2014-12-25 00:00:57 -05:00
Michael Cook (mackal) 8522542ae2 Use lambdas in sort functions (for zone at least) 2014-12-24 18:29:23 -05:00
Michael Cook (mackal) 811872c17f Rework Bot::GetBotArcheryRange 2014-12-24 17:42:35 -05:00
Trevius baf2f23ce6 (RoF+) Implemented Hero's Forge Armor for NPCs. Set the herosforgemodel field in npc_types table to the model (example: 84 for full set, or 12107 for robe).
(RoF+) Hero's Forge Armor now overrides NPC texture settings.  To display Hero's Forge Armor Helms, set helmtexture field to anything other than 0.
Fixed some NPC loading from the database that was incorrect after adding herosforgemodel.
2014-12-24 12:02:30 -06:00
Akkadius bc25d90441 Merge pull request #328 from KinglyKrab/master
#npcedit Changes.
2014-12-24 04:21:43 -06:00
Kinglykrab 13a3349614 Edited #npcedit to include more options and changed a few to be multiple arguments rather than separate commands.
- #npcedit wep1/#npcedit wep2 is now #npcedit weapon [primary] [secondary]
- #npcedit mindmg/#npcedit maxdmg is now #npcedit damage [minimum] [maximum]
- #npcedit meleetype [primary] [secondary]
- #npcedit rangedtype
- #npcedit ammoidfile
- #npcedit trackable
- #npcedit attackcount
- #npcedit avoidance
- #npcedit walkspeed
- #npcedit armtexture
- #npcedit bracertexture
- #npcedit handtexture
- #npcedit legtexture
- #npcedit feettexture
- #npcedit herosforgemodel
- #npcedit slow_mitigation
2014-12-24 04:49:54 -05: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
Akkadius f6dc138dc8 Merge pull request #327 from KinglyKrab/master
Update npc_types table.
2014-12-24 00:38:30 -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
Trevius 3bb816ad1d Clean up of RoF+ Item Packets. 2014-12-23 23:18:59 -06:00
Trevius a0972e7564 Updated changelog.txt 2014-12-23 23:15:05 -06:00
Trevius 8c3751befa Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-23 23:13:34 -06:00
Trevius 27fe90d02d (RoF+) Added support for Hero's Forge Robe Models. Set herosforgemodel field in items table to exact model such as 11607, 11707, etc. 2014-12-23 23:13:22 -06:00
Uleat a0c99647fa Added item information to logfile writes for failed ItemInst creations 2014-12-23 23:01:59 -05:00
Michael Cook (mackal) 7742892377 Fix issue with Mob::MakeNewPositionAndSendUpdate 2014-12-23 22:26:36 -05:00
Michael Cook (mackal) 5e34b06952 Merge pull request #326 from KinglyKrab/master
Bot Crash Fixes.
2014-12-23 22:15:58 -05:00
Kinglykrab c10bccebdb Two bot crash fixes (#bot bardoutofcombat and #bot setinspectmessage). 2014-12-23 22:10:35 -05:00
Uleat cdd624e7a8 Hack fix for zone shutdown crashes involving HateList::GetTop() 2014-12-23 10:22:03 -05:00
Uleat 34ab3e10f5 Added some nullptr checks for ItemInst* in a few places (tradeskills.cpp - particularly augments - needs a better review) 2014-12-23 10:14:45 -05:00
Trevius ed257b0ef3 (RoF+) Added a work-around for the cursor buffer issue. 2014-12-22 20:51:56 -06:00
Trevius b072f5873d Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-22 20:51:04 -06:00
Trevius cba68645a8 More work on RoF+ Cursor Buffer. 2014-12-22 19:47:02 -06:00
Trevius d454763cd1 RoF+ Cursor Buffer SummonItem Initial Test Change 2014-12-22 19:47:01 -06:00
Michael Cook (mackal) 36c1f50e1b Use lambda expression for compare instead 2014-12-22 17:51:59 -05:00
Trevius 6e192b1794 (RoF2) Fixed Tracking. 2014-12-22 16:09:11 -06:00
akkadius ce3d513ca0 Script used to parse crashes in logs folder and give an ordered summary 2014-12-22 14:12:26 -06:00
Michael Cook (mackal) 62ae7ba1de Fix RoF2 rez response 2014-12-22 13:42:22 -05:00
Akkadius cfbecc1d1b Merge pull request #325 from KinglyKrab/master
Modified #reloadworld. Example: #reloadworld 1 - repops globally and rel...
2014-12-22 04:41:12 -06:00
Kinglykrab a4febbb648 Modified #reloadworld. Example: #reloadworld 1 - repops globally and reloads quests globally. #reloadworld or #reloadworld 0 - reloads quests globally. 2014-12-22 04:47:51 -05:00
Michael Cook (mackal) 18fb86a560 Force changing the timer_time for attack timers
Should fix issues with waiting for a slow timer after a cure
2014-12-22 01:58:54 -05:00
Trevius b9fab9bc1b (RoF/RoF2) Fixed Guild Rank in the Player Profile, which prevents the guild rank message on login/zone. 2014-12-21 23:00:06 -06:00
Michael Cook (mackal) a7cdb4c0af Add a few missing bonus recalcs 2014-12-21 23:53:02 -05:00
Michael Cook (mackal) de3f9f7276 Fix missing {} in SE_*Counter bonus processing 2014-12-21 23:48:18 -05:00
Akkadius cee7a9a0fd variable rename, readability 2014-12-21 21:39:04 -06:00
Arthur Ice f409d39f1a merge upstream 2014-12-21 13:57:20 -08:00
Trevius f588c54d52 (RoF2) Fixed Extended Targets Window by correcting opcodes. 2014-12-21 12:23:11 -06:00
Trevius 7d95f3f582 Fix for RoF2 Selling to Merchant. 2014-12-21 00:32:01 -06:00
Trevius df342d419c Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-20 17:35:29 -06:00
Trevius b682a2f97a Potential fix for RoF2 random crashes during zoning. 2014-12-20 17:34:47 -06:00
Akkadius 812ad530d1 Updated #cvs to display RoF2 Client Stream count 2014-12-20 00:49:14 -06:00
Trevius 4ef3c7a9f4 Fixed Selling for Alternate Currency Merchants for RoF and RoF2. 2014-12-19 23:20:10 -06:00
Michael Cook (mackal) cedec3d872 Revert "Cleared clientversions.h and eq_dictionary files of Client6.2 references"
This reverts commit d4506363b8.
2014-12-19 23:08:44 -05:00
Uleat d4506363b8 Cleared clientversions.h and eq_dictionary files of Client6.2 references 2014-12-19 21:25:44 -05:00
Trevius da75007b0f (RoF2) Fixed Rest Timer, Show Helm Option, Auto-Consent Options, and identified Krono in the PP. 2014-12-19 19:42:55 -06:00
Michael Cook (mackal) dabe550966 Fix eq_dictionary.cpp from 62 removal
Note: 62 references in clientversion.h need to be cleaned up
before we can remove them from other files
2014-12-19 17:22:05 -05:00
Trevius ef287bc857 Fixed Armor Tinting (players and NPCs) that was broken during a previous update. 2014-12-19 15:46:01 -06:00
Trevius fce52d7186 (RoF2) Fixed Leadership AA Purchasing and Recipe Search by correcting opcodes. 2014-12-19 02:02:31 -06:00
Michael Cook (mackal) 1261aac036 Check DivineAura in TryWeaponProc, should resolve #321 2014-12-18 18:50:38 -05:00
Trevius 8aea6da7df Fixed zoning after death for RoF2. 2014-12-18 17:48:15 -06:00
Trevius ba5e5058f9 Finished lining up the RoF2 Player Profile Struct. Zone times are now normal, and everything from the PP is accurate in game now. 2014-12-18 13:13:03 -06:00
KayenEQ 45e71ff6d1 Merge pull request #320 from KayenEQ/Development
Clients will now receive exp / faction from their swarm pets kills ect.
2014-12-18 04:58:23 -05:00
Michael Cook (mackal) ce9bcef620 std::deque is a much better fit, should have bit better performance 2014-12-18 02:20:03 -05:00
Uleat fe4872c921 Debug >= 11 compile fail fix 2014-12-17 20:09:53 -05:00
KayenEQ 7dad77c080 Clients will now receive exp / faction from their swarm pets kills ect. 2014-12-17 20:09:41 -05:00
SecretsOTheP d721580c9f EQStream changes as recommended by a community member in private. 2014-12-17 17:55:21 -05:00
KayenEQ 4f242f01c1 Merge pull request #319 from KayenEQ/Development
NPC ranged attack projectiles will now do damage on impact.
2014-12-17 12:00:03 -05: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 26e87c999b Merge pull request #318 from KayenEQ/Development
Misc fixes / Perl exports
2014-12-17 06:09:29 -05:00
KayenEQ 29ef1527e7 update 2014-12-17 06:09:04 -05:00
KayenEQ d69552d4df Perl: NPC AddRangedProc(spellid, chance)
Perl: NPC AddDefensiveProc(spellid, chance)
2014-12-17 05:57:16 -05:00
Trevius ad61eda7e0 RoF2 fix for being unable to close bags by right clicking or open multiple bags. 2014-12-17 01:27:30 -06:00
Michael Cook (mackal) a14f8058da Switch path stuff to vectors
This should be more CPU cache friendly compared to lists so should
be faster. (profiling looked promising)
2014-12-17 01:52:00 -05:00
KayenEQ ab5d0ad43f Fix for NPC ranged procs 2014-12-16 20:20:22 -05:00
Michael Cook (mackal) 5099010840 Merge pull request #317 from Leere/chargesfix
Fix for stackable items being unmoveable when charges=0
2014-12-16 18:53:56 -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
Leere 7d39ea59e8 Fix for stackable items being unmoveable when charges=0 2014-12-17 00:24:47 +01:00
Akkadius ad8e834fe8 Dropping client 6.2 support 2014-12-15 23:14:55 -06:00
Akkadius 0b89c95ab2 tcp_server.cpp linux build fix for not fake 2014-12-15 23:00:29 -06:00
Akkadius 5b49ecf072 worldconn.cpp header include cleanup 2014-12-15 22:56:55 -06:00
Akkadius 25ee643aeb timer.cpp include header cleanup 2014-12-15 22:56:44 -06:00
Akkadius ef3d4ae51a string_util linux build fix 2014-12-15 22:56:29 -06:00
Akkadius f4609101d5 tcp_server.cpp include header cleanup 2014-12-15 22:52:03 -06:00
Akkadius 6b485273d1 tcp_connection.cpp & .h header include cleanup 2014-12-15 22:50:33 -06:00
Akkadius 40377447ac string_util.cpp & .h header include cleanup 2014-12-15 22:47:48 -06:00
Akkadius a55b2ca557 spdat.cpp header include cleanup 2014-12-15 22:45:37 -06:00
Akkadius b687fb2439 shareddb.cpp header include cleanup 2014-12-15 22:43:58 -06:00
Akkadius f3ebb2e5d8 rdtsc.cpp header include cleanup 2014-12-15 22:42:59 -06:00
Akkadius 12206c0e50 races.cpp header include cleanup 2014-12-15 22:42:44 -06:00
Akkadius 689f95b430 shareddb.cpp & .h header include cleanup 2014-12-15 22:42:34 -06:00
Akkadius 62d8fb538b ptimer.cpp header include cleanup 2014-12-15 22:42:19 -06:00
Akkadius fab6b602a8 packet_dump_file cleanup 2014-12-15 22:28:15 -06:00
Akkadius 1c665653ea packet_dump cleanup 2014-12-15 22:26:58 -06:00
Akkadius 5c903c6ee3 opcodemgr.cpp cleanup 2014-12-15 22:25:46 -06:00
Akkadius ffe447859a opcode_map.cpp readability 2014-12-15 22:23:49 -06:00
Akkadius c1e5d8b7dc misc cleanup 2014-12-15 22:21:57 -06:00
Akkadius f8a1825845 misc_functions cleanup 2014-12-15 22:21:44 -06:00
Akkadius de32970d6f add <string> back in for linux 2014-12-15 22:16:30 -06:00
Akkadius e9b72e0f7d logsys_eqemu .cpp & .h include cleanup 2014-12-15 22:15:17 -06:00
Akkadius 7887511589 faction linux build fix for real 2014-12-15 22:12:56 -06:00
Akkadius 6d0b44d69e item.cpp & .h header include cleanup 2014-12-15 22:10:06 -06:00
Akkadius edec2ad24c faction.cpp linux build fix 2014-12-15 22:04:39 -06:00
Akkadius 20200fd028 guild_base.cpp & .h include header cleanup 2014-12-15 21:59:23 -06:00
Akkadius 0c21f56ff3 faction.cpp & .h header include cleanup and faction.cpp code structure style change 2014-12-15 21:57:07 -06:00
Akkadius 3d8777084c db_update_manifest.txt fix 2014-12-15 21:10:14 -06:00
Akkadius a612f289e7 Another Linux fix 2014-12-15 21:05:35 -06:00
Akkadius 6f747c3678 eqemu_config.cpp code structure cleanup 2014-12-15 21:03:09 -06:00
Akkadius bbea7f4f53 eqemu_config.cpp & .h header cleanup, code style cleanup of eqemu_config.h 2014-12-15 21:01:52 -06:00
Akkadius e048c5cf17 eq_stream_ident.h header include cleanup 2014-12-15 20:32:03 -06:00
Akkadius 968b0adc1d eq_stream_factory.cpp & .h header include cleanup/forward declare 2014-12-15 20:30:53 -06:00
Akkadius 5e31b8f96e eq_stream.cpp & .h include header cleanup 2014-12-15 20:28:27 -06:00
Akkadius 1a6a50c810 eq_packet.cpp & .h header include cleanup 2014-12-15 20:24:38 -06:00
Akkadius 677c6b5750 emu_tcp_connection.cpp & .h include header cleanup and forward declare 2014-12-15 20:21:54 -06:00
Akkadius 41f6349804 linux build fix 2014-12-15 20:09:36 -06:00
Akkadius 359bbb8df1 dbcore.cpp * .h header include cleanup 2014-12-15 20:04:49 -06:00
Akkadius b1623cf696 database.cpp & .h header include cleanup and forward declaration 2014-12-15 20:02:55 -06:00
Akkadius e5f300baaf condition.cpp header include cleanup 2014-12-15 19:49:49 -06:00
Akkadius 5af34a9245 classes.cpp header include cleanup 2014-12-15 19:49:12 -06:00
Akkadius 453dcd8af3 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-15 19:47:23 -06:00
Akkadius 3edda155c6 Linux build fix 2014-12-15 19:47:08 -06:00
Trevius 00d145199b Corrected check in db_update_manifest.txt 2014-12-15 19:34:42 -06:00
Akkadius 53b9f8d0fd base_packet.cpp & .h header cleanup 2014-12-15 19:30:18 -06:00
Akkadius a3a1f05718 zonedb and zoning header spacing 2014-12-15 19:17:31 -06:00
Akkadius 7f1ba17894 zone_logsys structure clean 2014-12-15 19:17:07 -06:00
Akkadius def95b6584 zone_config structure clean 2014-12-15 19:16:53 -06:00
Akkadius c646a6c43a zone.cpp & .h include header cleanup 2014-12-15 19:14:41 -06:00
Akkadius 9ef0fa13c7 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-15 19:12:23 -06:00
Akkadius de243cd5d7 worldserver.cpp header include cleanup 2014-12-15 19:12:04 -06:00
Michael Cook (mackal) b5c60d8123 Bot compile fix 2014-12-15 20:08:46 -05:00
Akkadius 6a6e91abc5 waypoints.cpp header include cleanup 2014-12-15 19:07:31 -06:00
Akkadius 6fd2c2915a water_map.cpp header include cleanup 2014-12-15 19:05:52 -06:00
Akkadius 8ebfa36f00 tribute.cpp header include cleanup 2014-12-15 19:03:24 -06:00
Akkadius 537af79c8e trap.cpp & .h header include cleanup and forward declare 2014-12-15 19:01:54 -06:00
Akkadius a9226c00d8 trading.cpp header include cleanup 2014-12-15 18:59:21 -06:00
Akkadius c5c33f6f49 tradeskills.cpp header include cleanup 2014-12-15 18:57:09 -06:00
Akkadius e218ebb92f titles.cpp & .h header cleanup and forward declare 2014-12-15 18:56:23 -06:00
Akkadius 856eadc628 tasks.cpp & .h header include cleanup 2014-12-15 18:54:23 -06:00
Akkadius 1ec2ce7e26 spells.cpp header include cleanup 2014-12-15 18:48:42 -06:00
Akkadius 020dfbf538 spell_effects header include cleanup 2014-12-15 18:47:22 -06:00
Akkadius b945729d1a special_attacks.cpp header cleanup 2014-12-15 18:46:41 -06:00
Akkadius 24f9e8d181 spawngroup.cpp & .h header include cleanup 2014-12-15 18:44:36 -06:00
Akkadius c25e17f3bc spawn2.cpp & .h header include cleanup 2014-12-15 18:42:14 -06:00
Akkadius 34ce09afd1 raids.cpp & .h header include cleanup and forward declare 2014-12-15 18:38:54 -06:00
Akkadius c43377100e questmgr.cpp & .h include cleanup 2014-12-15 18:35:27 -06:00
Akkadius 87fd99a3e7 queryserv.cpp header cleanup 2014-12-15 18:33:39 -06:00
Akkadius e7911df851 quest_parser_collection.cpp & .h header include cleanup 2014-12-15 18:33:23 -06:00
Akkadius 7dc69b7755 qglobals.cpp & .h include header cleanup 2014-12-15 18:22:27 -06:00
Akkadius 24503bd0ee petitions.cpp & .h header include cleanup 2014-12-15 18:14:56 -06:00
Akkadius 250d9d1fb5 pets.cpp & .h include header cleanup 2014-12-15 18:14:39 -06:00
Akkadius 631d8cb015 pathing.cpp & .h header include cleanup 2014-12-15 18:10:45 -06:00
Akkadius 0e581f38d2 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-15 18:07:52 -06:00
Michael Cook (mackal) c1baade00f Fix build failure 2014-12-15 19:06:38 -05:00
Akkadius d44e982eaf object.cpp & .h header cleanup 2014-12-15 18:03:33 -06:00
Akkadius ec43a9248b mob_ai.cpp header cleanup 2014-12-15 17:57:03 -06:00
Trevius 21b6001351 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-15 17:56:28 -06:00
Trevius 200027bf89 (RoF+) Implemented the 6th Augment Slot for Items.
Player Corpses now saved attuned settings for Items.
Renamed IsInstNoDrop() and SetInstNoDrop() to IsAttuned() and SetAttuned() respectively.
2014-12-15 17:55:23 -06:00
Akkadius 782b6fee94 merc.cpp header include cleanup 2014-12-15 17:54:23 -06:00
Akkadius 55b495826c masterentity.h include order revert for linux 2014-12-15 17:48:18 -06:00
Akkadius 8584895427 merc.h header cleanup and forward declare 2014-12-15 17:47:52 -06:00
Akkadius 85b7cc6330 map.cpp & .h header cleanup 2014-12-15 17:44:46 -06:00
Akkadius 95c95525ba loottables.cpp & .h header include cleanup and forward declare 2014-12-15 17:41:14 -06:00
Akkadius abe471af64 horse.cpp & .h header cleanup and forward declare 2014-12-15 17:39:16 -06:00
Akkadius b733e96aea masterentity.h header order cleanup
hate_list.cpp & .h header cleanup and forward declare
2014-12-15 17:34:19 -06:00
Akkadius 1fcb8235c5 guild_mgr.cpp header cleanup 2014-12-15 17:28:04 -06:00
Akkadius 756e5ee139 groups.cpp & .h header cleanup and forward declare 2014-12-15 17:26:51 -06:00
Akkadius 494e250514 fearpath.cpp header cleanup 2014-12-15 17:23:13 -06:00
Akkadius 430f04775b exp.cpp header cleanup 2014-12-15 17:22:13 -06:00
Akkadius 9cbaedc64f entity.cpp & .h header cleanup & forward declare 2014-12-15 17:19:49 -06:00
Akkadius 4be92db77a embparser_api.cpp header org 2014-12-15 17:04:31 -06:00
Akkadius 9e4605d528 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-15 17:02:55 -06:00
Akkadius c5d23c5f1b effects.cpp header cleanup 2014-12-15 17:02:26 -06:00
Akkadius 1c7acbdbd9 doors.cpp & .h header cleanup & forward declaration 2014-12-15 16:53:53 -06:00
Akkadius 5b6eb885a0 corpse.cpp & .h header cleanup & forward declarations 2014-12-15 16:50:02 -06:00
Akkadius b90897c513 client_mods.cpp header cleanup 2014-12-15 16:41:04 -06:00
Akkadius d20c9c9ac6 client_logs.cpp header cleanup 2014-12-15 16:39:01 -06:00
JJ 905961d278 Linux fix for Mob type in AA_SwarmPetInfo. 2014-12-15 11:06:53 -05:00
Akkadius 0fd87d344c client.h cleanup 2014-12-15 05:13:45 -06:00
Akkadius ed63c92839 bonuses.cpp header cleanup 2014-12-15 04:58:53 -06:00
Akkadius ee4935566b beacon.h/cpp header cleanup 2014-12-15 04:56:01 -06:00
Akkadius 123da175e1 aa.cpp/.h cleanup 2014-12-15 04:49:45 -06:00
Michael Cook (mackal) 62181ff08c Add Random::Shuffle
This is just a wrapper to std::shuffle since it requires a random
engine and ours lives in a class

Must pass random access iterators (array, vector, deque, etc)

ex:

std::vector<int> v;
/* init ... */
random.Shuffle(v.begin(), v.end());
2014-12-15 02:53:58 -05:00
Michael Cook (mackal) 026d5e71fa Adjust common/random.h based on N3551 2014-12-14 19:38:23 -05:00
Trevius c85cbb2f08 Fixed bots build. 2014-12-13 14:09:44 -06:00
Trevius 250ad31038 Added required SQL. Without it, there will be item loss using the last commit! 2014-12-13 14:01:12 -06:00
Trevius 9056008342 (RoF+) Implemented Armor Ornamentation using Hero's Forge Armor Models. To use, create an ornamentation augment and set the herosforgemodel field in the items table.
(RoF+) Added command #heromodel (#hm for short) - Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)
2014-12-13 13:53:55 -06:00
Michael Cook (mackal) 80a67f9ebc Fix guild rank spam 2014-12-13 03:18:30 -05:00
Michael Cook (mackal) 118d587064 Implement IGNORE_ROOT_AGGRO_RULES (special attack 42)
This allows you to have a mob be rooted but still try to attack the
target with the most amount of hate instead of attacking the closest
2014-12-12 18:55:43 -05:00
Michael Cook (mackal) 0e54019fd5 Set the no_target_hotkey data as well 2014-12-10 02:18:57 -05:00
Michael Cook (mackal) d9a1bcb3fd Clean up SoF+ swarm pet F8 hack 2014-12-10 02:15: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
Michael Cook (mackal) 2d1999c961 Update version too 2014-12-10 00:59:54 -05:00
Michael Cook (mackal) 4c9befee22 Some clean ups due thanks to clang's warnings 2014-12-09 23:41:19 -05:00
Michael Cook (mackal) 362bfc79d6 Fix compile error 2014-12-09 22:33:09 -05:00
Trevius 37951d09c7 (RoF+) Implemented Hero's Forge Armor Models for Items. To use, set herosforgemodel field in the item table to a model number such as 63 (for example). 2014-12-09 21:18:56 -06:00
KayenEQ 4161ab3051 Merge pull request #316 from KayenEQ/Development
Fix for completely broken skill proc function.
2014-12-09 00:39:26 -05:00
KayenEQ 4047c70de1 Fix for completely broken skill proc function. 2014-12-09 00:38:20 -05:00
Michael Cook (mackal) 7e7ec8e3d2 Be more explicit about what we are checking
(This removes a crap ton of clang warnings)
2014-12-08 20:58:49 -05:00
KayenEQ 449b1f9d35 Merge pull request #315 from KayenEQ/Development
ADD FD check before adding projectile generated hate.
2014-12-08 19:18:59 -05:00
KayenEQ ba2aefc572 NPC Focus Effects Optional Rules SQL 2014-12-08 18:55:23 -05:00
KayenEQ 8df6e7e26b ADD FD check before adding projectile generated hate. 2014-12-08 18:44:37 -05:00
KayenEQ 2a33da248b Merge pull request #314 from KayenEQ/Development
Support for NPC's to use focus effects.
2014-12-08 18:12:41 -05:00
SecretsOTheP 9db39b5eec Added a feature that allows an EQ client to log in directly to World without having to enter the LoginServer, provided the 'password' field is set in WorldServer.
Mainly used for administration purposes. A DLL hack is needed to utilize this feature, and the DLL itself will be posted (source included) on the EQEmulator forums. It uses Microsoft Detours 1.5. Up to you guys if you want to add the source to this program here.
2014-12-08 05:46:10 -05:00
KayenEQ a4df155219 update 2014-12-08 01:47:29 -05:00
KayenEQ 70f570dbd9 Implemented support for allowing most focus effects to now be usable
by NPCs (ie Heal/Damage focus, cast time, spell range ect) from
both spell buffs and items.
Rule for enabling spell focus is TRUE by default
Rule for enabling item focus is FALSE by default.

Consilidated a number of redundant client / mob functions
to use the same pathway for calculating effect values.
2014-12-08 01:22:01 -05:00
Akkadius f81f62670e Header cleanup of aggro.cpp 2014-12-07 03:08:27 -06:00
Akkadius afd3b9acdc Header and code cleanup of debug.cpp 2014-12-07 03:02:57 -06:00
Michael Cook (mackal) 3e73df2c72 Clean up common/misc_functions.h 2014-12-06 21:56:14 -05:00
Michael Cook (mackal) eed666c8c2 OP_ClearAA and OP_ClearLeadershipAbilities for RoF2 2014-12-06 20:12:19 -05:00
Natedog2012 6b9a408b46 Don't allow AA to be bought that you cant use 2014-12-06 20:04:42 -05:00
Trevius 5713dc2de1 Guild Names now display properly in RoF2. 2014-12-06 18:18:49 -06:00
Trevius 4138e6f82c More RoF2 Opcodes identified. 2014-12-06 14:53:05 -06:00
Trevius 206bbe9e62 Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-06 14:39:32 -06:00
Trevius 97a34b5793 The RoF2 client is now enabled by default. It is almost caught up to RoF Client compatibility. 2014-12-06 14:38:34 -06:00
Arthur Ice f0e22c9ff9 merged, removed mistake 'orig' files 2014-12-05 20:20:54 -08:00
Arthur Ice 2aa287fe3c Merge 2014-12-05 20:16:13 -08:00
Michael Cook (mackal) ce7a995223 Fix previous commit 2014-12-05 22:31:36 -05:00
Michael Cook (mackal) 51b997aa27 Implement OP_ClearAA and OP_ClearLeadershipAbilities for SoF+
This is nice since #resetaa will no longer require a kick
2014-12-05 22:29:41 -05:00
Michael Cook (mackal) 1ac92c603e Add OP_ClearLeadershipAbilties 2014-12-05 22:27:39 -05:00
Michael Cook (mackal) 57a196a50c Rename OP_ShroudClearAA to OP_ClearAA 2014-12-05 22:26:01 -05:00
Arthur Ice 100eca203f GetClosestZonePoint converted to xyz_location 2014-12-05 17:57:07 -08:00
Uleat 60563aead6 Added MapKrono entry to RoF2::InventoryMaps enumeration 2014-12-05 19:33:25 -05:00
Michael Cook (mackal) a201a3e837 Added Shroud ops for UF 2014-12-05 16:26:55 -05:00
Michael Cook (mackal) 2d070ff1c0 OP_Untargetable for SoF 2014-12-05 15:59:03 -05:00
Michael Cook (mackal) 4e257d43b2 OP_CrystalCreate and OP_CrystalReclaim for SoF 2014-12-05 14:40:41 -05:00
Michael Cook (mackal) 7cb1a2e7e4 OP_DzChooseZone for RoF and UF 2014-12-05 14:29:54 -05:00
Michael Cook (mackal) e2bc79401b OP_ShroudClearAA for RoF, UF, and SoF
This should actually be usable to just straight clear AA data
2014-12-05 14:13:05 -05:00
Michael Cook (mackal) 26589835e5 OP_PVPStats for Underfoot 2014-12-05 14:00:51 -05:00
Michael Cook (mackal) e65bf63e51 Fix OP_GMEmoteWorld for SoD 2014-12-05 13:56:20 -05:00
Michael Cook (mackal) f6bddb9502 OP_IncreaseStats for SoF 2014-12-05 13:23:37 -05:00
KayenEQ d071bd2e7c Merge pull request #312 from KayenEQ/Development
Range attack functions clean up, prevent possible nullptr checks.
2014-12-05 04:11:15 -05:00
KayenEQ 921433f998 Range attack clean up, prevent possible nullptr checks. 2014-12-05 03:47:41 -05:00
Michael Cook (mackal) 48be7c508d OP_PlayMP3 for SoF 2014-12-05 02:48:54 -05:00
Trevius f1260a598d Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-04 23:07:23 -06:00
Trevius 36c945a77c Updated a large number of RoF2 opcodes. 2014-12-04 23:06:43 -06:00
Michael Cook (mackal) 0a8f3554e9 Merge branch 'master' into random 2014-12-04 13:07:32 -05:00
Trevius af42af7869 Initial addition of the RoF2 client from May 10th 2013 (currently available on Steam as the F2P client).
RoF2 is disabled by default, but you can enable by editing /common/patches/patches.cpp (see comments)
2014-12-04 02:13:01 -06:00
KayenEQ 65dcfd55a7 Merge pull request #309 from KayenEQ/Development
Max Range attack calculation fix.
2014-12-04 02:58:28 -05:00
KayenEQ 052b41fbb2 Ranged attacks will now much more accurately calculate max distance server side
via accounting for differences in attacker/target size. This
fixes a very common issue of player hitting range attack and
nothing happening due to server improperly calculating
max range.
2014-12-04 02:40:51 -05:00
Michael Cook (mackal) 5998cf8a3c Merge branch 'master' into random 2014-12-03 17:04:58 -05:00
Michael Cook (mackal) fc282f86c0 Rework raid invite handling, shouldn't break rsay being invited to raid anymore 2014-12-03 17:04:26 -05:00
Michael Cook (mackal) 804421095a Fix DB manifest 2014-12-03 16:55:43 -05:00
Michael Cook (mackal) bc53ca3b71 Merge branch 'master' into random 2014-12-03 16:13:39 -05:00
Akkadius ff5eb54331 Merge pull request #307 from KayenEQ/Development
Projectile code fix.
2014-12-03 11:53:53 -06:00
Arthur Ice 523562c152 GetClosestZonePoint converted to xyz_location (id version) 2014-12-02 21:46:16 -08:00
Arthur Ice f00cddd67e graveyard_x(), graveyard_y(), graveyard_z(), and graveyard_heading() converted to GetGraveyardPoint() 2014-12-02 21:00:31 -08:00
Arthur Ice ff1942245b Added GetGraveyardPoint() to Zone 2014-12-02 20:25:38 -08:00
Arthur Ice e64e131c9c Removed safe_x(), safe_y(), safe_z() from Zone 2014-12-02 20:19:12 -08:00
Arthur Ice 0275e9646c Added GetSafePoint to Zone 2014-12-02 19:55:29 -08:00
Arthur Ice 75c1a302c9 Converted Corpse constructor to xyz_heading 2014-12-02 19:38:15 -08:00
Arthur Ice 7c211e1e11 simplified SummonAllCorpses 2014-12-02 19:29:43 -08:00
Arthur Ice ad506ece4d Added distance functions for position 2014-12-02 19:28:28 -08:00
Arthur Ice 2b7ecfdb2c ModifyWP converted to xyz_location 2014-12-02 18:24:56 -08:00
Arthur Ice e58dc94b2c AddWPForSpawn converted to xyz_heading 2014-12-02 18:17:13 -08:00
Arthur Ice 6206133729 AddWP converted to xyz_heading 2014-12-02 17:41:01 -08:00
Arthur Ice 2da6dfa931 CreateSpawn2 converted to xyz_heading 2014-12-02 16:53:52 -08:00
Arthur Ice cafa266c89 UpdateZoneSafeCoords converted to xyz_heading 2014-12-02 16:42:19 -08:00
Arthur Ice 275f2aa80f UpdateCharacterCorpse converted to xyz_heading 2014-12-02 16:21:20 -08:00
Arthur Ice 4243ce8582 SaveCharacterCorpse converted to xyz_heading 2014-12-02 16:02:12 -08:00
Arthur Ice 76210e1f0e CreateGraveyardRecord converted to xyz_heading 2014-12-02 15:42:30 -08:00
Arthur Ice d22f136eea SendCharacterCorpseToGraveyard to xyz_heading 2014-12-02 15:27:43 -08:00
Arthur Ice 361b4d1c62 UnburyCharacterCorpse converted to xyz_heading 2014-12-02 15:18:16 -08:00
Arthur Ice eb6c963c70 SummonAllGraveyardCorpses converted to xyz_heading 2014-12-02 15:04:13 -08:00
Arthur Ice f6c98132f0 SummonAllCorpses converted to xyz_heading 2014-12-02 14:50:48 -08:00
Arthur Ice 4daf4ab507 QuestManager::unique_spawn converted to xyz_heading 2014-12-02 14:36:51 -08:00
Arthur Ice 2e0cfa86bf QuestManager::spawn2 converted to xyz_heading 2014-12-02 13:27:01 -08:00
Arthur Ice 0ad62461f0 CorpseLoadFromDBData converted to xyz_heading 2014-12-02 13:13:04 -08:00
Arthur Ice 3791c38f97 SummonAllCharacterCorpses converted to xyz_heading 2014-12-02 12:52:40 -08:00
Arthur Ice 7a74df5ff1 summonallplayercorpses converted to xyz_heading 2014-12-02 12:42:47 -08:00
Arthur Ice dd5265dc02 SummonBuriedCharacterCorpses converted to xyz_heading 2014-12-02 12:19:27 -08:00
Arthur Ice efc4ba0e27 summonburriedplayercorpse converted to xyz_heading 2014-12-02 12:00:45 -08:00
Michael Cook (mackal) 23698c1373 Merge branch 'master' into random 2014-12-02 14:39:00 -05:00
Arthur Ice 04e24ddce4 moveto converted to xyz_heading 2014-12-02 11:20:10 -08:00
Trevius 0a0260b75b Merge branch 'master' of https://github.com/EQEmu/Server 2014-12-02 13:13:50 -06:00
Michael Cook (mackal) 9636ef3499 Update to new random functions 2014-12-02 14:09:14 -05:00
Michael Cook (mackal) dc0eb0f6b5 Merge branch 'master' into random
Conflicts:
	zone/command.cpp
	zone/merc.cpp
2014-12-02 14:05:55 -05:00
Arthur Ice 9d6a89c65d rebind converted to xyz_location 2014-12-02 10:56:02 -08:00
Arthur Ice 7ce7af05f3 SetBindPoint converted to xyz_location 2014-12-02 10:47:46 -08:00
Michael Cook (mackal) 525eb518f6 Crash fix, this check got removed accidentally 2014-12-02 13:44:23 -05:00
Arthur Ice 2995b20d62 SaveCharacterBindPoint converted to xyz_heading 2014-12-02 10:29:35 -08:00
KayenEQ 70dd447156 Fix for error introduced in projectile update for throwing/archery
to do hit chance check 2x resulting in much greater chance to miss.
2014-12-02 03:42:35 -05:00
Arthur Ice 14608c972a SetGraveyard to xyz_header 2014-12-01 23:34:41 -08:00
Arthur Ice c3333a46c9 pgraveyard_x, pgraveyard_y, pgraveyard_z, and pgraveyard_heading converted to xyz_heading as m_Graveyard 2014-12-01 23:12:19 -08:00
Arthur Ice 40ec1f805f psafe_x, psafe_y, and psafe_z replaced with xyz_location m_SafePoint 2014-12-01 22:35:46 -08:00
Trevius 52eb4d2d4e Fixed Mercenary Depop Crash in Windows. 2014-12-02 00:07:09 -06:00
Trevius 24ea7a0d45 Mercenaries now spawn as the same Gender and Size of the Merchant they are purchased from.
Mercenaries now spawn with randomized facial features when purchased.
Setting a lastname for NPCs will now override any hard coded lastname (such as GM Trainers).
2014-12-01 19:54:01 -06:00
Michael Cook (mackal) faaebc2806 Merge branch 'master' into random 2014-12-01 19:51:02 -05:00
Michael Cook (mackal) 6f867ebca3 Add license info 2014-12-01 19:50:05 -05:00
Michael Cook (mackal) cbadd8bde1 Merge pull request #306 from addtheice/warning_removal
Lua, perl, boost, zlib, mysql, and glm include files are now being inclu...
2014-12-01 19:48:50 -05:00
Arthur Ice f5a94ed07b IsSpellBlocked converted to use xyz_location 2014-12-01 16:00:48 -08:00
Arthur Ice b06647b763 Zone::GetSpellBlockedMessage convered to use IsWithinAxisAlignedBox 2014-12-01 15:48:59 -08:00
Arthur Ice feac1728dc Added two axis aligned bounding box check functions 2014-12-01 15:39:53 -08:00
Michael Cook (mackal) 395be050a3 Switch random function to std::mt19937
Added class EQEmu::Random
Functions:
EQEmu::Random::Int(int low, int high)
EQEmu::Random::Real(double low, double high)
EQEmu::Random::Roll(int required)
EQEmu::Random::Roll(double required)
EQEmu::Random::Reseed()

For zone, you will access the random object through the zone object
ex.
	zone->random.Int(0, 100);

Int returns a random int between low and high
Real returns a random double between low and high
Roll(int) returns true if Int(0, 99) < required is true
Roll(double) returns true if Real(0.0, 1.0) <= required is true
2014-12-01 18:13:12 -05:00
Arthur Ice fb9d76f851 GetSpellBlockedMessage converted to xyz_location 2014-12-01 14:16:53 -08:00
Arthur Ice 81d2e7d242 xdiff, ydiff, and zdiff in ZoneSpellsBlocked converted to xyz_location m_Difference 2014-12-01 13:32:19 -08:00
Michael Cook (mackal) a59cdc2c89 Merge pull request #304 from KayenEQ/Development
Implemented archery projectiles to do damage on impact.
2014-12-01 16:30:26 -05:00
Arthur Ice 2fe80d32f9 ZoneSpellsBlocked converted x,y, and z to m_Location as xyz_location 2014-12-01 13:05:40 -08:00
Arthur Ice 31d32682b0 ZoneDatabase::InsertDoor converted to xyz_heading 2014-12-01 12:30:07 -08:00
Arthur Ice c98964a9e8 Lua, perl, boost, zlib, mysql, and glm include files are now being included marked as system (library) files. warnings for these libraries are now suppressed 2014-12-01 10:33:57 -08:00
Arthur Ice 5af1998167 aa_los_them converted to xyz_location m_AutoAttackTargetLocation 2014-12-01 01:23:58 -08:00
Arthur Ice f973d256dc aa_los_me and aa_los_me_heading converted xyz_heading m_AutoAttackPosition 2014-12-01 01:19:18 -08:00
Arthur Ice 0a685d316d zonesummon_x, zonesummon_y, and zonesummon_z converted to xyz_location m_ZoneSummonLocation 2014-12-01 00:26:35 -08:00
Arthur Ice fb1d5842ea proximity_x, proximity_y, and proximity_z converted to xyz_location m_Proximity 2014-12-01 00:03:59 -08: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 8b7a09dbc1 QuestMgr::movePCInstance converted to xyz_heading 2014-11-30 22:14:57 -08:00
Arthur Ice c8063c31ed QuestMgr::CreateObjectFromModel converted to xyz_heading 2014-11-30 22:05:34 -08:00
Arthur Ice 4c5117cabe QuestManager::CreateGroundObject converted to xyz_heading 2014-11-30 21:42:59 -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
Arthur Ice 7ac9a5c5a6 Doors constructor converted to xyz_heading 2014-11-30 20:49:48 -08:00
Arthur Ice 7239a1339e Replaced SetX(), SetY(), SetZ(), and SetHeading() with SetPosition() on Doors 2014-11-30 20:37:43 -08:00
Arthur Ice a70eadecf4 Replaced GetX(), GetY(), GetZ(), and GetHeading() in Doors with GetPosition() 2014-11-30 20:23:18 -08:00
Arthur Ice 40d26b5bcf replaced GetDestX(), GetDestY(), GetDestZ(), and GetDestHeading() with GetDestination in Doors 2014-11-30 20:05:51 -08:00
Arthur Ice 95f7bd94f3 replaced dest_x, dest_y, dest_z, and dest_headingg in Doors with xyz_heading m_Destination 2014-11-30 19:58:56 -08:00
Arthur Ice 9f62f0e485 replaced pos_x, pos_y, pos_z, heading in Doors with xyz_heading m_Position 2014-11-30 19:47:49 -08:00
Arthur Ice 70d26a532c SetPreSummonX(), SetPreSummonY(), and SetPreSummonZ() converted to SetPreSummonLocation() 2014-11-30 19:34:44 -08:00
Arthur Ice 98a8ddbb21 Replace GetPreSummonX(), GetPreSummonY(), GetPreSummonZ() with GetPreSummonLocation as xyz_location 2014-11-30 19:23:35 -08:00
Arthur Ice 381dc7574f replaced _preSummonX, _preSummonY, and _preSummonZ in bot with xyz_location m_PreSummonlocation 2014-11-30 19:14:24 -08:00
Arthur Ice 6b1b083802 mob constructor converted to xyz_heading 2014-11-30 18:57:50 -08:00
Arthur Ice 708b4f3bfb Horse constructor converted to xyz_heading 2014-11-30 18:33:45 -08:00
Akkadius 1054bfe476 command.cpp #include cleanup
command.h #include cleanup
command.h forward declarations
2014-11-30 20:32:00 -06:00
Arthur Ice 51d6ea622e Switched to c++11 based abs instead of hacky custom version 2014-11-30 18:13:28 -08:00
Arthur Ice 2546c6c226 Trap converted to use xyz_location as m_Position instead of x, y, z 2014-11-30 18:10:50 -08:00
Arthur Ice 54bc1b06e4 NPC constructor converted to use xyz_heading 2014-11-30 17:32:11 -08:00
Arthur Ice 0570722b3b MoveTo converted to xyz_heading 2014-11-30 16:30:09 -08:00
Arthur Ice e6d23228e5 GetSpawnPointX(), GetSpawnPointY(), GetSpawnPointZ(), and GetSpawnPointH(), converted to GetSpawnPoint() 2014-11-30 15:58:44 -08:00
Michael Cook (mackal) 7198e670ae Clang bots compile fix 2014-11-30 18:56:01 -05:00
Arthur Ice 2e6711916e GetClosestWaypoint converted to xyz_location 2014-11-30 15:40:24 -08:00
Michael Cook (mackal) 4a7984f04d Fix clang compile error 2014-11-30 18:32:45 -05:00
Arthur Ice 69dbdb2485 GetSpawnPointX(). GetSpawnPointY(), GetSpawnPointZ(), and GetSpawnPointH() replaced with GetSpawnPoint() 2014-11-30 15:29:13 -08:00
Arthur Ice f9036ddc6a GetGuardPointX(), GetGuardPointY(), GetGuardPointZ(), and GetGuardPointH() replaced with GetGuardPoint() 2014-11-30 15:05:50 -08:00
Arthur Ice c060723762 guard_x_saved, guard_y_saved, guard_z_saved, guard_heading_saved converted to m_GuardPointSaved 2014-11-30 14:34:27 -08:00
Arthur Ice 4b71d28747 guard_x, guard_y, guard_z, guard_heading converted to xyz_heading as m_GuardPoint 2014-11-30 14:17:14 -08:00
Akkadius c0b546921e Merge pull request #297 from addtheice/warning_suppress
Warning suppress
2014-11-30 15:54:23 -06:00
Arthur Ice 6ffd7203ff org_x, org_y, org_z, and org_heading converted to xyz_heading as m_SpawnPoint 2014-11-30 13:51:57 -08:00
Michael Cook (mackal) de84065cde Fix some debug statements 2014-11-30 02:32:11 -05:00
KayenEQ 8dfd61bbcf fix 2014-11-30 01:58:23 -05:00
KayenEQ e04496188b Spell Projectiles have been revamped to use new system. 2014-11-30 01:43:51 -05:00
Arthur Ice 82cc830297 converted Warp to xyz_location instead of x,y,z 2014-11-29 21:24:57 -08:00
KayenEQ 705dd4d7df Merge git://github.com/EQEmu/Server into Development 2014-11-30 00:19:49 -05:00
akkadius 0d0917b779 Temporary revert of net.cpp to wave 1 of cleanups 2014-11-29 23:12:09 -06:00
Arthur Ice 4b48ed7cbc SetDeltas converted to SetDelta 2014-11-29 21:07:08 -08:00
KayenEQ ad2fd9e4d5 update to projectile move check 2014-11-29 21:10:51 -05:00
KayenEQ e8ae28b439 Merge git://github.com/EQEmu/Server into Development 2014-11-29 20:56:13 -05:00
Arthur Ice 607e28dcbf added GetPosition to mob 2014-11-29 16:43:24 -08:00
Arthur Ice 11ecf77c85 added constness to operators 2014-11-29 16:22:36 -08:00
akkadius fde9517247 mob.cpp #include cleanup
mob.h declarations
mob.h #include cleanup
2014-11-29 16:55:35 -06:00
akkadius 4a597a2b38 tradeskills.cpp #include cleanup 2014-11-29 16:48:48 -06:00
akkadius 34b1950820 forage.cpp #include cleanup 2014-11-29 16:46:43 -06:00
akkadius 5562030594 guild.cpp #include cleanup
spell_effects.cpp #include cleanup
2014-11-29 16:43:19 -06:00
akkadius 9821c7da65 zoning.cpp #include cleanup 2014-11-29 16:32:49 -06:00
akkadius c7a79d81ca pets.cpp #include cleanup 2014-11-29 16:28:48 -06:00
akkadius f5ba442ba6 spells.cpp #include cleanup 2014-11-29 15:59:24 -06:00
akkadius 2d052a7a28 mod_functions.cpp #include cleanup 2014-11-29 15:56:51 -06:00
akkadius 3577ff5a81 waypoints.cpp #include cleanup 2014-11-29 15:53:17 -06:00
akkadius 88984a3960 petitions.cpp #include cleanup
petititons.h #include cleanup
2014-11-29 15:44:09 -06:00
akkadius 6d52f3c02a aa.cpp #include cleanup
aa.h #include cleanup
2014-11-29 15:08:16 -06:00
akkadius cb6948b6fd npc.cpp #include cleanup
entity.cpp #include cleanup
2014-11-29 15:02:34 -06:00
akkadius ad603fd213 loottable.cpp #include fix, previously reliant on npc.h to get to loottable.h
npc.cpp #include cleanup
npc.h #include cleanup and forward declaration
2014-11-29 14:39:27 -06:00
akkadius b06fec6ad0 attack.cpp #include cleanup 2014-11-29 14:11:16 -06:00
akkadius 7db731a47d net.cpp #include cleanup
net.cpp forward declaration
2014-11-29 14:07:40 -06:00
akkadius 35e9c3ad98 special_attacks.cpp #include clean 2014-11-29 05:22:27 -06:00
akkadius 904ae416c5 Small world server cleanup 2014-11-29 05:01:49 -06:00
akkadius 4faca5543a net.h cleanup 2014-11-29 04:56:42 -06:00
akkadius 5d5c3fbfd1 database.h forward declaration
database.cpp #include house-keeping
2014-11-29 04:30:03 -06:00
akkadius 251e940fe8 zonedb.h forward declarations
zonedb.cpp #include cleanup
2014-11-29 04:18:18 -06:00
akkadius e833f457a1 inventory.cpp #include clean/remove 2014-11-29 04:08:37 -06:00
akkadius 6d763256f1 client_mods.cpp cleanup 2014-11-29 04:04:49 -06:00
akkadius 8da864bada command.cpp #include cleanup
command.h forward declaration
2014-11-29 03:54:25 -06:00
akkadius 82e96d7014 client_packet.cpp #include cleanup 2014-11-29 03:48:26 -06:00
akkadius 700de3f518 questmgr.h forward declarations
client_process.cpp #include removals
2014-11-29 03:24:48 -06:00
akkadius ad9c0df552 #include and forward declaration cleanup of
client.cpp net.cpp questmgr.cpp zone.cpp zone.h
2014-11-29 03:12:34 -06:00
KayenEQ ca3b5a3221 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-29 03:22:11 -05:00
Trevius 8cd19670ab Minor improvement to last commit. 2014-11-28 20:30:35 -06:00
Trevius 84fa042c75 Fixed a zone crash related to numhits for spells.
Fixed a query related to group leaders logging in.
Fixed a world crash related to attempting to join an adventure with Mercenaries.
2014-11-28 20:23:42 -06:00
KayenEQ 3d83f647bf Implemented projectile on impact for Throwing 2014-11-28 07:08:28 -05:00
KayenEQ 67863e364b fix 2014-11-28 05:46:23 -05:00
KayenEQ ac0933719a Sanity check added before calculating distance. 2014-11-28 05:42:36 -05:00
Michael Cook (mackal) b7c19e4034 Fix model_name in RoF Arrow_Struct 2014-11-28 02:19:45 -05:00
KayenEQ 94a0cb3522 Merge git://github.com/EQEmu/Server into Development 2014-11-28 01:07:55 -05:00
KayenEQ 28ad768c0a fixes 2014-11-28 01:05:57 -05:00
akkadius baa7a1feb9 Disabling file check for db_updater.pl temporarily to force update the update script for users. Will leave it this way for a few weeks and the nre-enable it because the latest one supports automatic update checking 2014-11-27 23:24:32 -06:00
KayenEQ 6b45b2bc52 Fix for better ammo slot sync check. 2014-11-27 23:14:49 -05:00
Michael Cook cf1370b9e2 Spelling matters! 2014-11-27 22:56:40 -05:00
Michael Cook (mackal) 6f67577115 Crash fixes 2014-11-27 22:30:44 -05:00
KayenEQ 191aa575f8 Projectiles (ie Arrows) fired from an archery attacks will do damage upon
actually hitting the target, instead of instantly when fired. Consistent
with live.

Optional SQL added to disable this.

Throwing will be implemented in a future update.
2014-11-27 22:12:13 -05:00
Natedog2012 4e3842b9d8 Detransformation of mold type ornamentations. 2014-11-27 16:14:04 -05:00
Akkadius f0881d4aa9 Self patching db_update script for when new versions come out 2014-11-27 00:03:49 -06:00
Akkadius 521106e286 Renamed back the db_update.pl file 2014-11-27 00:01:26 -06:00
Akkadius 12ea532a7a Renamed db_update.pl to db_updater.pl 2014-11-26 23:50:08 -06:00
Akkadius 98c21635c2 db_update.pl self update routine
Some linux adjustments
2014-11-26 23:45:08 -06:00
Arthur Ice 5b783e84e9 added automatic conversion of Map::Vertex into xyz_location 2014-11-26 21:25:09 -08:00
Arthur Ice 4094d43c49 InLiquid converted to xyz_location 2014-11-26 19:39:39 -08:00
Arthur Ice 2f203fa6bb InLava converted to xyz_location 2014-11-26 19:38:53 -08:00
Arthur Ice 5140e6fabf InVWater converted to xyz_location 2014-11-26 19:37:32 -08:00
Arthur Ice ef18458480 ReturnRegionType converted to xyz_location 2014-11-26 19:36:47 -08:00
Arthur Ice 6cd614a05e InLiquid converted to xyz_location 2014-11-26 19:32:46 -08:00
Arthur Ice 29573d7d19 InLava converted to xyz_location 2014-11-26 19:24:28 -08:00
Arthur Ice d8692c1dc7 InVWater converted to xyz_location 2014-11-26 19:22:41 -08:00
Arthur Ice c0faaa9c20 ReturnRegionType converted to xyz_location 2014-11-26 19:20:41 -08:00
Arthur Ice f9e65acf78 InWater(y,x,z) converted to InWater(xyz_location) 2014-11-26 19:18:06 -08:00
Michael Cook (mackal) c465b8c8c3 Merge pull request #303 from af4t/master
Typo?
2014-11-26 21:06:41 -05:00
Uleat cfa05587fc Added versioning for required ornament inventory sql 2014-11-26 21:05:43 -05:00
Arthur Ice d9d89ba9b3 GetCWPX(), GetCWPY(), GetCWPZ(), GetCWPH() converted to GetCurrentWayPoint 2014-11-26 17:34:45 -08:00
Arthur Ice f63c5ab6ba Added overloads for to_string to handle xyz_heading, xyz_location, and xy_location 2014-11-26 17:21:33 -08:00
af4t 56a96dc817 Typo? 2014-11-26 19:55:46 -05:00
Michael Cook (mackal) 32a034bd58 Flipped logic wrong :P 2014-11-26 19:12:04 -05:00
Michael Cook (mackal) 2814130aad Fix for compilers w/o C++11 uniform initialization 2014-11-26 19:04:20 -05:00
Arthur Ice 408fdc7178 tarv_x, tarv_y. tarv_z converted to xyz_location 2014-11-26 15:58:29 -08:00
Michael Cook (mackal) c5c778f575 Minor bug fixes 2014-11-26 18:29:07 -05:00
Arthur Ice 75543e68e3 tarx, tary, tarz converted to m_TargetLocation as xyz_location 2014-11-26 15:10:49 -08:00
Arthur Ice a6177859ff fear_walkto_x, fear_walkto_y, fear_walkto_z replaced with m_FearWalkTarget converted to xyz_location 2014-11-26 14:57:12 -08:00
Natedog2012 daec5bde66 Item Transformation now works! 2014-11-26 17:23:04 -05:00
Michael Cook (mackal) ee7f88d247 Merge pull request #301 from KayenEQ/Development
Fix for numhits counter being decreased 2x for Outgoing Hit Success from...
2014-11-26 15:27:43 -05:00
Arthur Ice 09f75c09b8 rewind_x, rewind_y,rewind_z replaced with m_RewindLocation of type xyz_location 2014-11-26 00:56:07 -08:00
Arthur Ice cab1f986f1 targetring_x, targetring_y, targetring_z replaced with m_TargetRing as an xyz_location 2014-11-25 23:44:02 -08:00
Arthur Ice d25c5b1fa0 cur_wp_x, cur_wp_y, cur_wp_z, cur_wp_heading replaced with m_CurrentWayPoint 2014-11-25 23:24:17 -08:00
Akkadius 5c5cde7fe5 Database::GetGroupLeaderForLogin fix 2014-11-26 00:31:50 -06:00
Akkadius 08e787da59 Replaced atoll with more appropriate macro atoul 2014-11-26 00:24:31 -06:00
Akkadius b43cfa126f Renamed SetPKItem to SetPlayerKillItemID
Renamed AllowMobLoot to AllowPlayerLoot
Renamed DepopCorpse (PC) to DepopPlayerCorpse
Renamed GetPKItem to GetPlayerKillItem
Renamed Corpse class variable 'orgname' to 'corpse_name'
Renamed CompleteRezz to CompleteResurrection
Renamed GetDBID to GetCorpseDBID

Removed CorpseToServerSlot as it is unnecessary
Removed ServerToCorpseSlot as it is unnecessary

Reogrganized corpse.h header
2014-11-25 23:54:59 -06:00
Arthur Ice 65ad5b5c99 Removed use of initializer lists. so less pretty 2014-11-25 21:45:41 -08:00
Akkadius fbaae2b1e4 Renamed Corpse::LoadFromDBData to Corpse* Corpse::LoadCharacterCorpseEntity
Corpse Private class descriptors added
General cleanup
2014-11-25 23:17:08 -06:00
Arthur Ice 5115a29bb7 spell_x,spell_y, spell_z converted to m_SpellLocation, xyz_location 2014-11-25 21:06:13 -08:00
Akkadius 0598f7e87c Fixed an issue that has surfaced with new code behaving how it should, breaking old code. Naked corpses were not despawning on their decay timers because of incorrect return logic on a database function
Removed ClearCorpseItems as it is no longer necessary as corpses deleted items appropriately when they are removed from the corpse
General cleanup of functions and variables in corpse code
2014-11-25 22:47:50 -06:00
Arthur Ice 096cbaf1bb delta_x, delta_y, delta_z, and int delta_heading converted to m_Delta 2014-11-25 20:43:09 -08:00
Arthur Ice 53602e3c61 heading, x_pos, y_pos, and z_pos replaced with m_Position in Mob 2014-11-25 20:16:04 -08:00
Arthur Ice 640aea24bc xyz_heading, xyz_location, and xy_location built 2014-11-25 02:44:40 -08:00
Trevius b4862dea45 Compile Fix and fix to prevent Mercenaries from being set as Group Leader. 2014-11-25 02:54:02 -06:00
Trevius 09e13d0034 Spells that modify model size are now limited to 2 size adjustments from the base size. 2014-11-25 02:22:58 -06:00
Trevius bee04c1b53 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-24 02:36:13 -06:00
Trevius 2fbe6b304c Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience. 2014-11-24 02:32:33 -06:00
Akkadius 02e82f1cfc Fix for bot build 2014-11-24 02:06:51 -06:00
Akkadius a2bef4d999 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-24 02:02:31 -06:00
Akkadius 50a69a8e20 Finish of automatic corpse convert routine 2014-11-24 01:53:21 -06:00
Akkadius a5207b58e1 Added namespace Convert:: to contain all of the player profile and corpse related structs so that when any of the structs change else where in the code, it does not break the conversion scripts. These are self contained structs just for the conversion scripts. 2014-11-24 01:12:12 -06:00
Akkadius 3c2b8d13b9 Restructure and refactoring of database convert/upgrade check routine, breaking out to individual functions 2014-11-23 23:46:06 -06:00
Trevius 2f1191b263 Fixing my Swarm Pet "fix". 2014-11-23 23:17:57 -06:00
Akkadius e4f45d7b35 Removed DBCore::RunQuery
Converted last corpse.cpp function that mixed database code with corpse code
2014-11-23 22:57:46 -06:00
KayenEQ f4d024fd47 Swarm pets will no longer assist owners if special ability '34' IMMUNE_AGGRO
is set.
2014-11-23 23:44:14 -05:00
Akkadius c30850f00a Rest of ZoneDB Corpse functions converted to new API 2014-11-23 22:33:57 -06:00
Akkadius ce248d83d6 Corpse Class Private scope variables renamed for understandability across the source
Removed ThrowDBError from the source
Implemented MySQL query error log at the root of the MySQL API
Readability changes
2014-11-23 21:37:42 -06:00
KayenEQ 3ca282abfa Fix for numhits counter not working where buffslot was 0 in some situations. 2014-11-23 22:06:15 -05:00
KayenEQ 5c0fbac7b0 Removal of 2x numhits outgoing hit success call from special attack. 2014-11-23 21:41:05 -05:00
KayenEQ ce4c6b0c8a string 2014-11-23 20:52:24 -05:00
Akkadius 6b67c3736b Increased Max charge or stack count on corpses to uint16 (Beyond 1k)
Fixed the deletion of items so that they occur immediately when removed from corpse instead of clicking 'Done'
Fixed loading of item tints and other fields since atoi caps at 2147483647
2014-11-23 19:51:01 -06:00
KayenEQ 3266ed98e6 Fix for target type 39 GroupNoPets.
Should no longer take hold on a pet if your targeting it when
casting spell.
2014-11-23 20:48:07 -05:00
KayenEQ 5970b0ee41 Fix for numhits counter being decreased 2x for Outgoing Hit Success from client melee attacks. 2014-11-23 20:19:54 -05:00
Akkadius 3b51aebb51 More load and delete changes for corpses 2014-11-23 17:49:56 -06:00
Akkadius 12ceac4c02 Corpses properly loading now 2014-11-23 15:55:38 -06:00
Akkadius 7fa1256c5d ... 2014-11-23 01:04:50 -06:00
Akkadius f328853251 More restructures, non-working state 2014-11-22 23:28:20 -06:00
Akkadius d1b0564698 Changing corpse loading structure 2014-11-22 18:43:23 -06:00
Akkadius 111fb84041 Moved zonedatabase functions out of corpse.cpp
Conversion portion mostly complete
Some header readability cleanup
Some function renaming
Struct renaming
Many variable renaming
MySQL error log for all of QueryDatabase
Corpse table renaming
Corpse table field renaming
Most corpse database functions redone
2014-11-22 17:55:48 -06:00
Trevius 79a70271d5 Crash fix for Swarm Pets. 2014-11-22 12:53:49 -06:00
KimLS 1ca397f426 Lua parser: script_init.lua for zones will now follow script_init_v[0-9]+\.lua similar to player quests. 2014-11-22 03:20:39 -08:00
Trevius d49426f763 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-22 00:27:40 -06:00
Trevius c5a90adb39 Grouping with Mercenaries is considerably less buggy. 2014-11-22 00:22:12 -06:00
Michael Cook (mackal) 3573686976 Fix issue with PendingTranslocateData 2014-11-21 22:50:08 -05:00
Michael Cook (mackal) cab071b544 Merge pull request #299 from KayenEQ/Development
Fix to remove double CastSpell call from use disc function.
2014-11-21 16:51:14 -05:00
KayenEQ f1701aae9f Fix to remove double CastSpell calls from use disc function. 2014-11-20 05:53:59 -05:00
KayenEQ 96a0cc37e0 Merge git://github.com/EQEmu/Server into Development 2014-11-20 05:05:29 -05:00
KayenEQ 2330285b04 revert 2014-11-20 05:05:15 -05:00
Michael Cook (mackal) ac463fe9aa Fix RoF Raid opcodes 2014-11-20 01:10:24 -05:00
Arthur Ice fdd78e41da warning from library file SocketLib\Mime.cpp disabled 2014-11-19 21:22:37 -08:00
Arthur Ice 4ad8500a3e luabind now compiles with warnings disabled for this library 2014-11-19 21:01:57 -08:00
Trevius b5c6b47639 Minor Merc Correction. 2014-11-19 22:52:49 -06:00
Trevius 62e22d1aea Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly. 2014-11-19 22:46:15 -06:00
Trevius 1973a065c5 Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-19 22:43:55 -06:00
Trevius 6c5248b9a9 Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly. 2014-11-19 22:43:19 -06:00
Michael Cook (mackal) 1ed9c3082c Add see invis check to tracking packet 2014-11-19 15:00:09 -05:00
Michael Cook (mackal) 37936b63c4 Merge pull request #295 from Leere/getrecipefix
Fix for GetTradeRecipe results variable overload instead of reuse
2014-11-19 14:26:04 -05:00
Akkadius 4a83b4acb9 PEQ AA Download option 4 implemented - http://i.imgur.com/OBrIOCM.png 2014-11-19 02:40:33 -06:00
Leere e7681f1b49 Fix for GetTradeRecipe results variable overload instead of reuse 2014-11-19 09:40:08 +01:00
Akkadius 4f38dba334 Upload of peq_aa_tables.sql for db management interface 2014-11-19 02:30:59 -06:00
Akkadius 67a9779d5b Slight fixes to upgrade logic - If you ran updates manually yourself, and you don't have a local version that matches the binary version yet. It will go through and get you up to date.
Manifest changes - Removed AA 'Required' updates. We will soon have an option to pull them down from PEQ in the prompt menu
2014-11-19 02:16:48 -06:00
KayenEQ 5b85aa6550 Fix to allow discipline reuse timers to be set on client correclty
and therefore have the client return the time remaining instead
of the server.

Hopefully may resolve some bugs reselated to discipline use.
2014-11-19 00:39:42 -05:00
KayenEQ 6a5b3ef4fe Merge git://github.com/EQEmu/Server into Development 2014-11-19 00:19:57 -05:00
KimLS 9570412991 Added special ability functions to perl, removed some of the less used commands (and a few duplicates) 2014-11-18 21:17:03 -08:00
KimLS c506e33018 Fixed merge 2014-11-18 21:12:48 -08:00
Trevius 8f32a9949b Fixed bad formatting of client.h and merc.h caused by my last commit. 2014-11-18 17:32:59 -06:00
Michael Cook (mackal) d7e05de556 Merge pull request #292 from KayenEQ/Development
Updated swarm pet AI to be consistent with live.
2014-11-18 15:04:08 -05:00
KayenEQ 1e13d43b71 Merge git://github.com/EQEmu/Server into Development 2014-11-18 04:46:14 -05:00
Trevius a6b9e6cb3c Trevius: Mercenaries can now zone once again. 2014-11-18 01:02:11 -06:00
Michael Cook (mackal) 0b44f58518 Correct OP_AugmentInfo reply
This fixes the display issue for RoF
SoF/SoD/UF still won't show the charm info on Adventurer's Stone,
probably a client bug.
2014-11-17 16:41:37 -05:00
Akkadius c749155ad2 Fix for invalid input error when script is ran from world during bootup. 2014-11-16 21:37:47 -06:00
Akkadius 9d6248886c Turn off potential warning garbage for different versions of perl 2014-11-16 21:22:09 -06:00
Akkadius de16db5a2f db_update.pl DB upgrade script - Linux Fixes 2014-11-16 21:00:19 -06:00
Akkadius 251d4fa3e3 Implemented Automatic Database update and versioning system
Created database revision define, this is located in version.h in common #define CURRENT_BINARY_DATABASE_VERSION 9057
	- This revision define will need to be incremented each time a database update is made
	- Along with a revision define increment, you will need to update the db_update manifest located in:
		- https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
		- An entry needs to be made at the bottom of the manifest, the entry is quite simple
		- Example: 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
			- This latest example is checking to see if the spells_new table contains the column 'disallow_sit', if its empty, the update needs to be ran
				- More examples of match types below:
		# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
		#	0 = Database Version
		#	1 = Filename.sql
		#	2 = Query_to_Check_Condition_For_Needed_Update
		#	3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
		#		contains = If query results contains text from 4th value
		#		match = If query results matches text from 4th value
		#		missing = If query result is missing text from 4th value
		#		empty = If the query results in no results
		#		not_empty = If the query is not empty
		#	4 = Text to match
	- The manifest contains all database updates 'Required' to be made to the schema, and it will contain a working backport all the way back to SVN -
		currently it is tested and backported through the beginning of our Github repo
	- On world bootup or standalone run of db_update.pl, users will be prompted with a simple menu that we will expand upon later:

		============================================================
			   EQEmu: Automatic Database Upgrade Check
		============================================================
				Operating System is: MSWin32
				(Windows) MySQL is in system path
				Path = C:\Program Files\MariaDB 10.0\bin/mysql
		============================================================
				Binary Database Version: (9057)
				Local Database Version: (9057)

				Database up to Date: Continuing World Bootup...
		============================================================
		Retrieving latest database manifest...
        URL:    https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
        Saved:  db_update/db_update_manifest.txt

Database Management Menu (Please Select):
        1) Backup Database - (Saves to Backups folder)
                Ideal to perform before performing updates
        2) Backup Database Compressed - (Saves to Backups folder)
                Ideal to perform before performing updates
        3) Check for pending Database updates
                Stages updates for automatic upgrade...
        0) Exit

Created db_update.pl, placed in utils/scripts folder, used for the automatic database update routine (Linux/Windows)
	- db_update.pl script created db_version table if not created, if old one is present it will remove it
Created db_dumper.pl, placed in utils/scripts folder, used for the automatic database update routine backups and standalone backups (Linux/Windows)
World will now check the db_update.pl script on bootup, if the db_update.pl script is not present, it will fetch it remotely before running -
	when db_update.pl is done running, world will continue with bootup
world.exe db_version - will report database binary version
2014-11-16 19:26:59 -06:00
Akkadius 9324bdf107 db_update.pl update 2014-11-16 19:04:33 -06:00
Akkadius e3e63efd68 SQL Source update fixes for newer DB versions 2014-11-16 18:32:13 -06:00
Akkadius 071367b6a9 db_update.pl update
db_update_manifest.txt update
2014_09_20_ban_messages.sql fix for non PEQ account tables missing expansion column
2014-11-16 18:17:04 -06:00
JJ 2e8d7b09af Temp merchant items could duplicate slots also... 2014-11-16 19:04:15 -05:00
Akkadius eee65b8c22 Special Abilities column fix for older updates and newer database engines for the automatic database updater.
db_update.pl changes
Manifest update
2014-11-16 17:48:50 -06:00
Michael Cook (mackal) e11fa4a278 Fix issue with ControlBoat_Struct and OP_BoardBoat 2014-11-16 17:42:15 -05:00
KayenEQ 650aa566b0 Fix for perl CastSpell function so it will use a spells innate resist diff
settings if no override value is put in the function.

Due to recent changes in
how we defined that variable it would set it to 0 resist diff by default
when called from perl.
2014-11-16 09:37:26 -05:00
Akkadius bd48efcdd5 db_update.pl changes 2014-11-16 05:31:19 -06:00
Akkadius 9ac79f1071 Manifest changes, initial db_update script upload. Source changes on its way. 2014-11-16 05:09:58 -06:00
KayenEQ fc48a109fd SUB EVENT CAST ON will now be parsed in player.pl
(note: exports $spell_id)
2014-11-16 05:46:46 -05:00
Akkadius 0017951a74 Manifest update, removal of duplicate AA SQL update file 2014-11-16 00:10:09 -06:00
Akkadius 959319f91f Uploading utility script db_dumper.pl - Cross platform database dumper utility that supports compression
############################################################
#::: Script: DB_Dumper.pl
#::: Purpose: Utility to easily manage database backups and compress.
#:::	Export Individual DB Tables...
#:::	Export specific databases...
#::: 	Built for both Windows and Linux
#::: Windows uses WinRar or 7-Zip for compression
#::: Linux uses tar for compression
#::: Author: Akkadius
############################################################
2014-11-15 23:29:37 -06:00
KayenEQ 41cbe5fb01 i hate the change log 2014-11-15 23:42:10 -05:00
KayenEQ 71d72a02a9 Merge git://github.com/EQEmu/Server into Development 2014-11-15 23:41:22 -05:00
KayenEQ 01c580224d Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range. 2014-11-15 23:40:13 -05:00
Uleat 0355af310d Non-buggy fix for OP_ShopPlayerBuy (thanks Natedog!) 2014-11-15 23:16:24 -05: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
Akkadius fe364a0798 Initial upload of db_update_manifest.txt 2014-11-15 21:53:33 -06:00
Michael Cook (mackal) 30922afd08 Remove scaling hack for client 62 (untested) 2014-11-15 01:01:57 -05:00
Michael Cook (mackal) 73e398b0f4 Remove scaling hack for SoD 2014-11-15 01:00:38 -05:00
Michael Cook (mackal) 10ae97e42f Remove scaling hack for SoF 2014-11-15 00:54:21 -05:00
Michael Cook (mackal) 96242f6c5e Remove scaling hack for Titanium 2014-11-15 00:29:56 -05:00
Michael Cook (mackal) 5dc3a5ab20 Also stop using hack on UF 2014-11-15 00:08:16 -05:00
Michael Cook (mackal) 44bfdfebc2 Correct charm scaling for RoF
Other clients should actually work the same as well
2014-11-14 23:45:56 -05:00
SecretsOTheP d33b320436 I accidentally the whole Uleat 2014-11-14 18:29:30 -05:00
SecretsOTheP 51b6db977f Identified object size and solidtype as flags. Exported them as functions to Perl. 2014-11-14 18:22:06 -05:00
Uleat e02e6099aa Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-14 17:58:12 -05:00
Uleat 8e20f3e7dc Updated #peekinv to use MakeItemLink (per Natedog's suggestion) 2014-11-14 17:57:55 -05:00
JJ 5434c47d1f Merge pull request #291 from KayenEQ/Development
Support for spell field to determine if a spell can be blocked or not.
2014-11-14 07:31:39 -05:00
KayenEQ cbc8e652b9 fix 2014-11-14 00:34:17 -05:00
KayenEQ 4a26466b2b add 2014-11-14 00:26:14 -05:00
KayenEQ 6c7a4edae3 Support for spell field to determine if a spell can be blocked or not.
Numerous other spell fields defined.

Required sql added for updating spells_new field definations.
2014-11-14 00:23:26 -05:00
JJ 8c8cec29d4 Merge pull request #290 from KayenEQ/Development
Implemented target type (44) Beams
2014-11-13 22:38:19 -05:00
KayenEQ 9de4f84f22 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-13 21:49:10 -05:00
KayenEQ 563a39c2d9 Spell field defined that determines if must be sneaking to use this ability.
This is handled by client under normal conditions, however if you
force cast this effect in situations like 'procs' you can cause
zone crashes, therefore a failsafe check is added in 'SpellOnTarget'
2014-11-13 21:45:19 -05:00
Uleat 741eca17f4 Added exclusion check for PlayerLogMerchantTransactions partial stack purchase logging 2014-11-13 13:17:29 -05:00
KayenEQ b32f59a40d Further support for spell field 'aemaxtargets' 2014-11-13 06:00:01 -05:00
KayenEQ 352d6fd83c Support for all remaining known spell target types.
Implemented target type (32) AE Target HateList
Implemented target type (36) Area Client Only
Implemented target type (37) Area PC Only
Implemented target type (39) Group No Pet
2014-11-13 05:19:01 -05:00
KayenEQ 738fa38047 Implemented target type (50) which excludes players pets from target AE's. 2014-11-13 02:46:22 -05:00
KayenEQ fabe93e548 Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).
Clean up of target type direction code, implemented use of aemaxtargets field for it.
2014-11-13 02:25:18 -05:00
Uleat 16f72be898 Added remarked #pragma comments around the OPGMTraining problem code (more for a reminder..but, can be enabled if you are having crash issues involving the for-loop) 2014-11-12 23:41:38 -05:00
JJ 9c22de9eb2 Not an error if there isn't merchant data to load... 2014-11-12 19:50:53 -05:00
Uleat f0f5262e3e Updated 'GMTrainee' structs to reflect the proper size of skills (100) 2014-11-12 18:17:03 -05:00
cavedude00 8594148496 Fixed npc_types_tint not being loaded properly. 2014-11-12 11:29:10 -08:00
JJ dd869695c4 Merge pull request #288 from KayenEQ/Development
optimization for how do endurance upkeep for discs
2014-11-12 04:41:07 -05:00
KayenEQ 7943a73cfb code fix 2014-11-12 02:03:24 -05:00
KayenEQ 59bcd031c8 Added a simple check to prevent DoEnduranceUpkeep (1 sec persistent timer)
from constantly checking when client has no endurance drain effects.
This was running 24/7 for all classes.
2014-11-12 01:54:21 -05:00
Uleat 22cc86e6a0 Removed type qualifier for SkillUseTypes enum 2014-11-11 18:01:21 -05:00
Uleat a763fc08b6 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-11-11 00:14:18 -05:00
Uleat 8ae234aedf Real fix for GM trainer crash..evidently the problem went deeper than an undefined condition... 2014-11-11 00:11:44 -05:00
JJ 793487b825 Yellow faction messages. 2014-11-10 22:11:23 -05:00
Uleat bb5ae7447d Fix for GM Trainer crashing server (undefined behavior on enum cast) 2014-11-10 21:41:39 -05:00
JJ 0370156179 Fix changelog. [skip ci] 2014-11-10 10:52:17 -05:00
JJ 39cab761eb Merge pull request #287 from KayenEQ/Development
Implemented support for using target rings from item clicks
2014-11-10 10:39:29 -05:00
KayenEQ 720e80377e Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
	common/eq_packet_structs.h
	common/patches/underfoot_structs.h
	common/spdat.h
	zone/effects.cpp
	zone/mob.cpp
	zone/spells.cpp
2014-11-10 10:22:50 -05:00
KayenEQ 3d44050959 Implemented support for using target rings from item clicks.
(Thanks again to Lecht for the help)
2014-11-10 10:11:29 -05:00
JJ d5efa0f23c Manual merge of TargetRing pull request #286. 2014-11-10 10:00:53 -05:00
KayenEQ e63b310058 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-11-10 09:42:59 -05:00
JJ 384d8c6167 Merge pull request #285 from addtheice/legacy_removal
Removed two unused functions
2014-11-10 00:47:55 -05:00
JJ d23608964e Implement new Live-like faction adjustment message through optional rule. 2014-11-09 23:54:01 -05:00
KayenEQ d656db843a Implemented spell Target Type (45) 'Target Rings' on Underfoot.
Thanks to Lecht for figuring out op code side of it.
2014-11-09 22:37:12 -05:00
Arthur Ice 0ed1e539ae Removed two unused functions 2014-11-09 15:12:31 -08:00
SecretsOTheP d8a8b8e6dc Merge branch 'master' of https://github.com/EQEmu/Server 2014-11-09 03:40:59 -05:00
SecretsOTheP 77f0e7919e Indentation fix. Ornamentation Augments are integrated now. 2014-11-09 03:40:33 -05:00
Natedog2012 587ddc0fdd fix for copy paste error that linux didnt like 2014-11-09 03:33:58 -05:00
Natedog2012 efdc177b78 Implement RoF + UF ornament augmentation.. thanks for the help Drajor! 2014-11-09 03:33:58 -05:00
KimLS 275e1144ad Missed the actual sql 2014-11-08 15:22:54 -08:00
KimLS d987ccf289 Added transactions for corpse creation, added sql to fix a bug in raid member saving in some situations, fixed a bug in encounters 2014-11-08 15:22:03 -08:00
KimLS fe7774ab75 Merge branch 'master' of github.com:EQEmu/Server 2014-11-08 15:18:52 -08:00
Michael Cook (mackal) 19e6a6909f Merge pull request #283 from KayenEQ/Development
Mez spells will no longer attempt memblur each tic, just on initial cast...
2014-11-08 02:21:32 -05:00
KayenEQ 4446a1ed08 Mez spells will no longer attempt memblur each tic, just on initial cast.
reverted change to calcmaxhp due to potential overflow issues.
2014-11-08 02:07:05 -05:00
Trevius b4e4d94061 Fixed dynamic merchant list loading. Allows any merchant to be used in any zone. 2014-11-06 21:41:51 -06:00
Michael Cook (mackal) f81f8ea5d6 Merge pull request #282 from KayenEQ/Development
Fix for CalcMaxHP
2014-11-06 21:57:16 -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 0c4a32246b Fix for CalcMaxHP 2014-11-06 21:00:03 -05:00
Michael Cook (mackal) b8b43c7149 Merge pull request #281 from KayenEQ/Development
Fix to SE_PercentHeal to allow it to work if no max value set.
2014-11-06 02:47:06 -05:00
KayenEQ b4286b87db Fix to SE_PercentHeal to allow it to work if no max value set. 2014-11-06 01:30:05 -05:00
KimLS cb0d5ac7d0 Merge branch 'master' of github.com:EQEmu/Server 2014-11-04 21:01:43 -08:00
KimLS 957f05860b Small changes to encounter stuff 2014-11-04 21:01:20 -08:00
SecretsOTheP d4139b98e3 Linux fix. 2014-11-03 23:01:55 -05:00
SecretsOTheP 29d614421f int16/32 mismatch fixes. see changelog.txt 2014-11-03 22:43:00 -05:00
SecretsOTheP beff1caf4f Merc/bot fix changelog.txt 2014-11-03 19:30:41 -05:00
SecretsOTheP 29ec6db345 because fuck you mercs and bots 2014-11-03 19:30:11 -05:00
SecretsOTheP 8efc652c10 Fixed overflow on AC and ATK values that can go out of range. 2014-11-03 19:14:58 -05:00
SecretsOTheP 29079a7ec2 changelog.txt 2014-11-03 16:47:26 -05:00
SecretsOTheP 3ac0f1506c Fixed melee lifetap overflows - Because being healed for uint16s is not cool. 2014-11-03 16:45:36 -05:00
JJ 38f1e8847c Make output of GetCharactersInInstance for perl more user-friendly. 2014-11-03 12:35:07 -05:00
Akkadius cff9e05626 Weird text characters making it into commit 2014-11-02 22:43:08 -06:00
Akkadius 29a36008d1 Tell queue sanity checks 2014-11-02 22:37:16 -06:00
Akkadius 51958b991c Cleaner way to handle out of range and swaps 2014-11-02 22:30:29 -06:00
Akkadius 771279128d Added out of range checking for Spell Save/Loads 2014-11-02 21:16:04 -06:00
JJ 385d70b294 Merge pull request #279 from KayenEQ/Development
Minor code and warning fixes.
2014-11-02 22:01:03 -05:00
JJ 4bd41b3678 Export of additional instance functions to perl as per #128.
Change QuestManager RemoveAllFromInstance function to use existing function to remove all clients from instance.
2014-11-02 20:43:47 -05:00
KayenEQ 527293d2f2 Merge git://github.com/EQEmu/Server into Development 2014-11-02 20:14:59 -05:00
KayenEQ d754e24a02 Minor code and compiler warning fixes. 2014-11-02 20:14:44 -05:00
Michael Cook (mackal) b4576435e3 Size check on ServerOP_ChannelMessage 2014-11-02 18:50:02 -05:00
Michael Cook (mackal) 5e1500c93b Merge pull request #278 from KayenEQ/Development
Revert for checking buffs if virus, couple of spells don't require a buff.
2014-11-02 18:48:02 -05:00
KayenEQ c9073b10a1 Revert for checking buffs if virus, a couple of spells don't require a buff. 2014-11-02 18:34:22 -05:00
JJ a9f7af59a2 Merge pull request #277 from KayenEQ/Development
Few more minor compiler warnings and code clean up.
2014-11-02 09:00:23 -05:00
KayenEQ 728399e372 Make sure virus is an actual buff before starting timer 2014-11-02 05:35:09 -05:00
KayenEQ 51a3302288 Few more minor compilier warnings and code clean up. 2014-11-02 00:43:01 -04:00
JJ 5decde0af9 (RicardoCampos) End looting before zoning. 2014-11-02 00:10:19 -04:00
JJ 3620ac4eaf Merge pull request #276 from KayenEQ/Development
Fixed compiler warnings and clean up of some code in spell_effects.cpp
2014-11-01 23:34:03 -04:00
JJ 43e906e3c8 Manual merge of new faction system (#256).
Clean up some personal signatures.
2014-11-01 23:27:23 -04:00
KayenEQ 39bb2aa811 minor clear up of 2handstaff block effect code. 2014-11-01 20:57:26 -04:00
JJ acab4dd443 Fix for duplicate merchant items when same merchant types are in same spawngroup. 2014-11-01 13:37:06 -04:00
Trevius 45ff2cddb7 Fixed potential crash related to Pets/Mercs buffs when targeting themselves. 2014-11-01 11:50:55 -05:00
KimLS 1619324d06 Small bug fixes with encounters, also added eq.load_encounter_with_data(encounter_name, data_string) and unload as well. Allows you to send a message via the encounter system load 2014-10-31 22:09:09 -07:00
KayenEQ 7b0045290d Fixed most of the compiler warnings and cleaned up some code in spells_effects.cpp 2014-10-31 22:40:49 -04:00
KayenEQ 441ddf233a Merge git://github.com/EQEmu/Server into Development 2014-10-31 21:47:20 -04:00
KayenEQ 306c641c72 merge 2014-10-31 21:47:07 -04:00
Michael Cook (mackal) b417e23d97 Allow to set/del qglobals in encounters scripts 2014-10-31 00:02:05 -04:00
KimLS 481492cb59 Fixed SQL to be current date, also it will no longer rely on a field that we removed from the db [skip ci] 2014-10-30 19:38:13 -07:00
Michael Cook (mackal) d3fbd026b4 Fix error with commit 2014-10-30 22:08:45 -04:00
Michael Cook (mackal) 2d77adeeb8 Merge pull request #273 from KayenEQ/Development
Allow npc_types field 'special_abilities' to be set as null in database.
2014-10-30 22:01:55 -04:00
KayenEQ f84130fc7c fix 2014-10-30 21:40:46 -04:00
KayenEQ 57f8f61094 code optimization 2014-10-30 21:22:53 -04:00
KayenEQ 5ec0b9993a Merge git://github.com/EQEmu/Server into Development 2014-10-30 19:51:22 -04:00
Uleat 65cb049a38 Added Client::InterrogateInventory() and command #interrogateinv to manually invoke it. (GM's - use #interrogateinv help) 2014-10-28 11:35:26 -04:00
KayenEQ 3247137ef2 Added swarm pet checks to viral spreading function. 2014-10-27 02:20:25 -04:00
KayenEQ adb8175654 Support for spells_new field 'viral_range' 2014-10-26 02:05:36 -04:00
KayenEQ 5afd6b8628 Added 'hit chance' extra attack option can be applied to future special attacks ect. 2014-10-24 23:36:02 -04:00
KayenEQ 4cb6a5635e Merge git://github.com/EQEmu/Server into Development 2014-10-24 23:28:15 -04:00
KimLS b54411e533 Fix for not loading some account data on character load 2014-10-24 19:05:04 -07:00
Michael Cook (mackal) 7f85d8c8a2 Optional SQL to add AA Quick Draw 2014-10-24 01:06:07 -04:00
Uleat c95b18da85 Fixed stacking issue in world tradeskill containers. (Added #peekinv world) 2014-10-22 22:57:20 -04:00
Michael Cook (mackal) a062c27e1a Take into account endurance bonuses from AAs 2014-10-22 22:27:51 -04:00
Michael Cook (mackal) c5df59a2f0 Merge pull request #274 from RicardoCampos/Development
Bugfix: Corpse stays locked when looting fails
2014-10-22 22:01:53 -04:00
RicardoCampos d538b48fbc Merge remote-tracking branch 'origin/master' into Development 2014-10-21 22:51:53 +01:00
RicardoCampos 0a27273d64 Bugfix: Corpse stays locked when looting fails
If looting fails either because of cooldown or there are items on your
cursor, the client is sent an end loot packet- the client releases the
corpse but no one else can loot. This simply resets BeingLootedBy in
this instance.
2014-10-21 22:48:42 +01:00
KayenEQ 22170527c4 Small update to prior commit. 2014-10-21 14:24:25 -04:00
KayenEQ f0f920d0e8 Fix for bug with Discipline recast timers preventing them from
working properly if you used a focus effect to reduce recast time
to zero.

(Specifically the recast timer failed to reset in the situation
where you had already used the disc WIHTOUT the focus applied, then applied
the focus and tried to have it reduced).
2014-10-21 14:14:35 -04:00
KayenEQ 193f7b0fe3 Fix so NPC don't ghost when casting spells from scripts while moving. 2014-10-20 01:16:08 -04:00
Michael Cook (mackal) c81491f97e Inspect buffs rank 1 will now show NPC buffs in target window (SoD+) 2014-10-20 01:05:38 -04:00
KayenEQ bb91265b2b Allow npc_types field 'special_abilities' to be set as null in database.
Changed due to issues when trying to copy npcs or remove abilities from
the field directly in the dataabase.
2014-10-20 00:36:13 -04:00
Uleat affb735c38 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-19 22:31:04 -04:00
Uleat 3db2332821 Missed one! 2014-10-19 22:30:45 -04:00
Michael Cook (mackal) a6ae2ca635 Switch Inspect Buffs to use the OP code
Client 6.2 is SOL until someone find the op for that client
2014-10-19 22:30:11 -04:00
Michael Cook (mackal) 466eecacc4 Implement Group Inspect Buffs for raids 2014-10-19 18:34:43 -04:00
Michael Cook (mackal) a327c91bac Implement group mentoring while in raids (SoF+ only)
Note: This does not allow the raid leader to share raid leader XP
and since the raid leader doesn't gain group leadership, they can't
share that either.
2014-10-19 17:20:07 -04:00
Uleat cef2aa64d9 Fixed server<->corpse translators to reflect what actually needs to be translated (should not have affected anything in the old configuration) 2014-10-19 15:03:11 -04:00
Uleat 69a124e11f Updated #peekinv to display item links properly in RoF clients 2014-10-19 11:39:35 -04:00
Michael Cook (mackal) 3f056462d6 Enable gaining of group leadership while in raids
Note: raid leaders can only gain raid leadership, so they won't
ever gain group leadership while leading a raid, even if they don't
end up gaining group due to the restrictions.

From what I can tell, this should be in line with live
2014-10-18 13:27:33 -04:00
Michael Cook (mackal) e8eb774458 Implement group mentor, leadership exp sharing (SoF+ only)
Currently only works in normal groups
Some decisions: the EXP will be rounded in the favor of the group leader
No idea how live actually handles it.
2014-10-18 00:17:46 -04:00
Uleat 223d06645d Added clarification to 'drop_bots.sql' notes for cases of failed script 2014-10-17 21:04:29 -04:00
Michael Cook (mackal) 2db5dc2ed7 ndle Leadership with leader change in RaidCommandMoveGroup 2014-10-17 15:10:43 -04:00
Michael Cook (mackal) 6d95fc2547 Handle Leadership with leader change in RaidCommandDisband 2014-10-17 15:05:47 -04:00
Michael Cook (mackal) b10062452a Fix issue with moving a group leader in a raid
Moving a group leader to the ungrouped section was not correctly
finding an appropriate new group leader.
2014-10-17 01:06:27 -04:00
Michael Cook (mackal) 9c72533264 Fix issue with raidMakeLeader packets 2014-10-16 19:23:32 -04:00
Uleat f805ddf319 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-16 19:20:49 -04:00
Uleat 2267881d52 Fixed BOTS auto-convert code and load/drop scripts. Added a sql for fixing an existing database that was auto-converted incorrectly (located in ../bots/deprecated) 2014-10-16 19:16:52 -04:00
Michael Cook (mackal) 7ca23d14c7 Remove debug statement 2014-10-16 17:01:06 -04:00
KimLS 4cf845e6ff Workaround for FreeBSD not having std::to_string 2014-10-16 01:16:38 -07:00
KimLS 9c6ab05659 Removed PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP ifdef, we dont use it anyway and it was failing on FreeBSD gcc49 2014-10-16 01:05:43 -07:00
KimLS 0f9cfc0615 Very new versions of gcc appear to have now cleaned up yet another header leaking out 2014-10-15 22:15:24 -07:00
JJ 6028dbb4e5 hateborne: grid assign match fix. 2014-10-15 22:31:44 -04:00
JJ fc8cb2b5b7 Manual merge of 4e3826228d in #269. 2014-10-15 22:12:57 -04:00
JJ 594657f2c7 Manual merge for 0c3e51963b in pull request #269. 2014-10-15 22:08:27 -04:00
JJ 09e1155a26 Merge pull request #261 from addtheice/RunQueryToDatabaseQuery_common_shareddb
Run query to database query common shareddb
2014-10-15 21:37:33 -04:00
Uleat e824f81670 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-10-15 19:50:35 -04:00
Uleat 69c0405004 Updated both load and drop sqls for bots..added a 'deprecated' load for pre-pp blob conversion databases..the auto-conversion code will catch this if the server
is updated to a newer version. (Had a really nice load script coded..but, the supported version of MySQL doesn't support 'TEMPORARY' procedures, nor commit commands from
'PREPARE(d)' statements... :( )
2014-10-15 07:49:39 -04:00
Michael Cook (mackal) e38abaa32a Optimize EntityList::UnMarkNPC
Going over the group_list is much better than hitting the same group
up to 5 unnecessary times
2014-10-14 22:50:09 -04:00
Michael Cook (mackal) c002f834d4 Correct misidentified OP_MarkNPC (RoF,SoD,SoF,UF) [skip ci] 2014-10-14 17:20:19 -04:00
Michael Cook (mackal) e53a91f5c3 Added some previous unidentified (still unhandled) UF opcodes
Didn't want them to get lost ;)
2014-10-14 00:01:51 -04:00
Michael Cook (mackal) ef5e93b71b Add debug log to Client::Handle_OP_DoGroupLeadershipAbility 2014-10-13 23:24:25 -04:00
Michael Cook (mackal) 6f00a69850 Raid Leadership RoF 2014-10-13 22:55:57 -04:00
Michael Cook (mackal) 41938fbe72 Raid leadership SoD 2014-10-13 22:54:57 -04:00
Michael Cook (mackal) d1561c28d9 Raid Leadership SoF 2014-10-13 22:53:41 -04:00
Michael Cook (mackal) be0621de42 Partial implementation of leadership in raids
Currently working: stat bonuses and client side only effects
Currently not working: Mark NPC and others that need more server side work

Currently only tested on UF, Ti and 62 may work, but not tested
SoF, SoD, and RoF need packet translators, which are most likely the same as UF
2014-10-13 21:36:59 -04:00
KimLS 15cec40ed5 Fix for issue #270, fix for temp merchant lists not loading correctly, fix for ah redundant getadventurestats code. 2014-10-13 15:59:11 -07:00
Akkadius ea734c90b5 Fix for LDON Character Stat load 2014-10-12 22:57:49 -05:00
Michael Cook (mackal) 6c5b569c29 Raid MOTD for SoF 2014-10-11 02:07:49 -04:00
Michael Cook (mackal) e5f3f4c552 Raid MOTD for SoD 2014-10-11 02:03:49 -04:00
Michael Cook (mackal) f097eaf3cd Raid MOTD for RoF 2014-10-11 01:54:54 -04:00
Alex 48eba3c092 Merge pull request #260 from addtheice/RunQueryToDatabaseQuery_world_worlddb
Run query to database query world worlddb
2014-10-10 22:44:14 -07:00
Alex bdba6219ac Merge pull request #259 from addtheice/RunQueryToDatabaseQuery_zone_command
Run query to database query zone command
2014-10-10 22:43:07 -07:00
Alex d86912a7bb Merge pull request #262 from addtheice/RunQueryToDatabaseQuery_zone_client
Run query to database query zone client
2014-10-10 22:42:45 -07:00
Alex 362366a333 Merge pull request #263 from addtheice/RunQueryToDatabaseQuery_queryserv_database
GeneralQueryReceive converted to QueryDatabase
2014-10-10 22:42:04 -07:00
Michael Cook (mackal) 35049d530e Implement Raid MOTD for UF
Don't forget to source 2014_10_11_RaidMOTD.sql

SoD and RoF implementations still to come
2014-10-11 01:14:11 -04:00
Uleat 66cfb2e32b Added a 'BOTS' converter to supplement Akkadius's recent 'PP' blob converter - updates views/function to reference the proper tables and columns. 2014-10-09 23:54:48 -04:00
Michael Cook (mackal) 3e1c917f11 Fix issues with purchasing raid AAs 2014-10-09 23:30:08 -04:00
JJ ea4c23efcf Establish default order for merchantlist items.
Allow merchants to use 80th slot.
2014-10-09 23:11:18 -04:00
Michael Cook (mackal) c328829610 Fix out of bounds error in SaveCharacterLeadershipAAs 2014-10-09 22:55:28 -04:00
JJ 28ac586ed8 Update info for #suspend 2014-10-09 00:23:54 -04:00
Alex ee71fa0d56 Merge pull request #268 from addtheice/RunQueryToDatabaseQuery_zone_tradeskills
Run query to database query zone tradeskills
2014-10-08 16:31:55 -07:00
Alex f3e04bfe4c Merge pull request #267 from addtheice/RunQueryToDatabaseQuery_zone_raids
Run query to database query zone raids
2014-10-08 16:31:38 -07:00
Alex a8c23d25f3 Merge pull request #266 from addtheice/RunQueryToDatabaseQuery_zone_tasks
Run query to database query zone tasks
2014-10-08 16:31:03 -07:00
Alex 41f2d71c7c Merge pull request #264 from addtheice/RunQueryToDatabaseQuery_zone_groups
SaveGroupLeaderAA converted to QueryDatabase
2014-10-08 16:28:55 -07:00
Arthur Ice e338f801ea DisableRecipe converted to QueryDatabase 2014-10-08 16:05:52 -07:00
Arthur Ice 6221c1f8ab EnableRecipe converted to QueryDatabase 2014-10-08 16:04:19 -07:00
Arthur Ice 5dac9a944b LearnRecipe converted to QueryDatabase 2014-10-08 16:02:30 -07:00
Arthur Ice 97c1c479f9 GetTradeRecipe converted to QueryDatabase 2014-10-08 15:55:12 -07:00
Arthur Ice 21d6865e8c GetTradeRecipe converted to QueryDatabase 2014-10-08 15:43:50 -07:00
Arthur Ice e2894ef2aa SendTradeskillDetails converted to QueryDatabase 2014-10-08 15:05:24 -07:00
Arthur Ice 7656b9b928 TradeskillSearchResults converted to const std::string query instead of const *char query 2014-10-08 15:00:34 -07:00
Arthur Ice 0fde0fbd23 removed unneeded querylength parameter from TradeskillSearchResults 2014-10-08 14:41:34 -07:00
Arthur Ice d5955da08c TradeskillSearchResults converted to QueryDatabase 2014-10-08 14:38:38 -07:00
Arthur Ice e2333e671b HandleautoCombine converted to QueryDatabase 2014-10-08 14:28:40 -07:00
Arthur Ice 1da70ee6ed LoadProximities converted to QueryDatabase 2014-10-08 14:15:43 -07:00
Arthur Ice 0d8cbca016 LoadLists converted to QueryDatabase 2014-10-08 14:11:35 -07:00
Arthur Ice 1a4b794ce4 RemoveTask converted to QueryDatabase 2014-10-08 13:33:22 -07:00
Arthur Ice fca359bf51 DeleteCompletedTaskFromDatabase 2014-10-08 13:22:10 -07:00
Arthur Ice 5f11e91da2 DisableTask converted to QueryDatabase 2014-10-08 13:17:03 -07:00
Arthur Ice 2c275f603a EnableTask converted to QueryDatabase 2014-10-08 13:07:03 -07:00
Arthur Ice ad921d01d8 LoadClientState converted to QueryDatabase 2014-10-08 12:30:08 -07:00
Arthur Ice e3e2b266f2 SaveClientState converted to QueryDatabase 2014-10-08 11:11:33 -07:00
Michael Cook (mackal) e2d52ec3e5 Allow /setstartcity to work if home is set to tutorialb 2014-10-08 13:43:32 -04:00
Michael Cook (mackal) a325380884 Implement mana/hp/end replenishments if logged off for long enough
Default set to on with a default time of 6 hours (21600 seconds)
2014-10-08 03:36:31 -04:00
Michael Cook (mackal) b6294a28cb Minor clean ups to CheckCharCreateInfo 2014-10-08 01:34:36 -04:00
Michael Cook (mackal) 69336d1e53 Minor clean ups to Client::OPCharCreate 2014-10-08 01:34:36 -04:00
Michael Cook (mackal) 2df5506d82 Merge pull request #265 from KayenEQ/Development
Fix for a few spell triggers using correct resist dif
2014-10-08 00:11:42 -04:00
Michael Cook (mackal) 2dacb523fc Rework OPCharCreate logic with tutorial flag
Hopefully resolves issues with toons on Titanium spawning out of bounds
when starting in tutorial.

Resolves setting home bind to tutorial and being out of bounds.
2014-10-07 23:40:13 -04:00
KayenEQ 6474e1353f Fix for a few spell triggers using correct resist dif 2014-10-07 22:54:12 -04:00
Michael Cook (mackal) 45ef740244 Fix issue with Return Home button always being available 2014-10-07 19:02:07 -04:00
Arthur Ice 48299b6024 LoadTasks converted to QueryDatabase 2014-10-07 11:58:22 -07:00
Arthur Ice be7d2e9457 LoadTaskSets converted to QueryDatabase 2014-10-07 11:36:42 -07:00
Arthur Ice a90babbae1 LearnMembers converted to QueryDatabase 2014-10-07 11:26:03 -07:00
Arthur Ice 4b1d3592d4 GetRaidDetails converted to QueryDatabase 2014-10-07 11:21:20 -07:00
Arthur Ice 77cfd116e0 SetRaidDetails converted to QueryDatabase 2014-10-07 11:15:45 -07:00
Arthur Ice 67c8949cd4 LockRaid converted to QueryDatabase 2014-10-07 11:14:02 -07:00
Arthur Ice b66b7a5fd2 RemoveTaidLooter converted to QueryDatabase 2014-10-07 11:10:27 -07:00
Arthur Ice b0d358cda8 AddRaidLooter converted to QueryDatabase 2014-10-07 11:06:43 -07:00
Arthur Ice 8553278759 UpdateLevel converted to QueryDatabase 2014-10-07 11:02:17 -07:00
Arthur Ice 7a3f7602a5 SetRaidLeader converted to QueryDatabase 2014-10-07 10:59:59 -07:00
Arthur Ice 11e08c9b67 SetGroupleader converted to QueryDatabase 2014-10-07 10:55:10 -07:00
Arthur Ice dfcddac2ef MoveMember converted to QueryDatabase 2014-10-07 10:53:20 -07:00
Arthur Ice 73b2987700 DisbandRaid converted to QueryDatabase 2014-10-07 10:47:16 -07:00
Arthur Ice 5781821ab3 RemoveMember converted to QueryDatabase 2014-10-07 10:16:55 -07:00
Arthur Ice 9183541825 AddMember converted to QueryDatabase 2014-10-07 09:58:21 -07:00
Arthur Ice 7870081716 SaveGroupLeaderAA converted to QueryDatabase 2014-10-07 09:21:39 -07:00
Arthur Ice 0438042844 GeneralQueryReceive converted to QueryDatabase 2014-10-07 09:02:13 -07:00
Michael Cook (mackal) 2bee906784 Slay Undead to String IDs (and better filtering) 2014-10-06 01:30:01 -04:00
Michael Cook (mackal) cab41487d5 Stop the book showing up while inspecting charms with RoF
Stat display still broken sadly
2014-10-05 22:47:57 -04:00
JJ 66448feece Some updates to #command information. 2014-10-05 21:42:33 -04:00
Uleat 65127ad756 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-05 19:35:21 -04:00
Michael Cook (mackal) 1261c228a3 Call CalcBonuses for RoF+ augments 2014-10-05 16:13:13 -04:00
Michael Cook (mackal) 5be8e710a9 More restrictive on the temp hack for UF (only spells with numhits) 2014-10-05 15:15:17 -04:00
Michael Cook (mackal) 3ad7ab625d Add temp hack for num hits and UF
Not sure what I screwed up, could of sworn it was working right before,
but that was also 3 AM or something

Rewrote UF's OP_BuffCreate to use the Write* functions which are a bit
more straight forward
2014-10-05 14:46:55 -04:00
Michael Cook (mackal) b6be6c3709 Merge pull request #258 from KayenEQ/Development
Exported to PERL $client->SendSpellAnim(targetid, spellid)
2014-10-05 13:36:33 -04:00
KayenEQ 8ff4e59d20 Fix to allow regular runes to absorn spell damage (except dots). 2014-10-05 07:51:20 -04:00
KayenEQ ad116af59d Merge git://github.com/EQEmu/Server into Development 2014-10-05 07:49:20 -04:00
Uleat fa1fe55e01 Added corpse encode and decode translators 2014-10-05 06:12:33 -04:00
Michael Cook (mackal) 4f2dbb37d2 Confirmed OP_ItemRecastDelay for SoF 2014-10-05 02:28:17 -04:00
Michael Cook (mackal) 7dc1da21f0 Move OP_ItemRecastDelay to after cast
I originally assumed it needed to be sent "while casting"
but it looks like right at the end (where we set the reuse timer)
also works.
2014-10-05 02:18:30 -04:00
Uleat 806a9fbb99 Identified recast timer field in Ti item packet header 2014-10-04 23:38:20 -04:00
Arthur Ice f4203d0621 command_mysql converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice bf6b9aaef8 command_object converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice d5f5b38d26 command_advnpcspawn converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 6a078279eb command_flagedit converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice a61b930bd9 command_qglobal converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 6be2f6a7e4 command_npcedit converted to QueryDatabase 2014-10-04 15:49:55 -07:00
Arthur Ice 1d08b1687f command_ban converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice e2382137e6 command_repop converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice f1039ab0e9 command_revoke converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice ce3532aa19 command_suspend converted to QueryDatabase 2014-10-04 15:49:54 -07:00
Arthur Ice 1b1c5b5f9f ExpeditionSay converted to QueryDatabase 2014-10-04 15:29:02 -07:00
Arthur Ice 9c3f1937a7 SetAccountFlag converted to QueryDatabase 2014-10-04 15:24:11 -07:00
Arthur Ice 81a641c96c LoadAccountFlags converted to QueryDatabase 2014-10-04 15:21:05 -07:00
Arthur Ice 037df28b7c TryReward converted to QueryDatabase 2014-10-04 15:14:50 -07:00
Arthur Ice fe1c67b8b4 SendRewards converted to QueryDatabase 2014-10-04 14:55:55 -07:00
Arthur Ice c7c9218210 DiscoverItem converted to QueryDatabase 2014-10-04 14:46:19 -07:00
Arthur Ice 6d6516d80d IsDiscovered converted to QueryDatabase 2014-10-04 14:43:02 -07:00
Arthur Ice 528f16bdaf SetBotInspectMessage converted to QueryDatabase 2014-10-04 14:24:29 -07:00
Arthur Ice 64641a3390 GetBotInspectMessage converted to QueryDatabase 2014-10-04 14:23:53 -07:00
Arthur Ice 74b8f38030 LoadLootDrops converted to QueryDatabase 2014-10-04 14:22:27 -07:00
Arthur Ice c7faf8a03c LoadLootTables converted to QueryDatabase 2014-10-04 14:21:25 -07:00
Arthur Ice aa9601352d GetLootDropInfo converted to QueryDatabase 2014-10-04 14:20:46 -07:00
Arthur Ice 81b9d9a57e LoadBaseData converted to QueryDatabase 2014-10-04 14:19:04 -07:00
Arthur Ice cecd9b89ba GetMaxBaseDataLevel converted to QueryDatabase 2014-10-04 14:18:11 -07:00
Arthur Ice 938322a3d1 LoadSpells converted to QueryDatabase 2014-10-04 14:16:54 -07:00
Arthur Ice 1c04dccf53 GetMaxSpellID converted to QueryDatabase 2014-10-04 14:16:00 -07:00
Arthur Ice 0622f02470 LoadDamageShieldTypes converted to queryDatabase 2014-10-04 14:14:27 -07:00
Arthur Ice 1366774931 LoadSkillCaps converted to QueryDatabase 2014-10-04 14:13:05 -07:00
Arthur Ice 5cbae2b833 GetcommandSettings converted to QueryDatabase 2014-10-04 14:12:16 -07:00
Arthur Ice c12805acce DeleteStalePlayerBackups converted to QueryDatabase 2014-10-04 14:11:40 -07:00
Arthur Ice e2c84c5f39 DeleteStalePlayerCorpses converted to QueryDatabase 2014-10-04 14:10:57 -07:00
Arthur Ice e19db3f447 LoadNPCFactionLists converted to QueryDatabase 2014-10-04 14:10:00 -07:00
Arthur Ice 7d0b316e74 GetFactionListInfo converted to QueryDatabase 2014-10-04 14:08:53 -07:00
Arthur Ice 0ef428d286 GetBook converted to QueryDatabase 2014-10-04 14:07:55 -07:00
Arthur Ice 2a73a572d3 LoadItems converted to QueryDatabase 2014-10-04 14:06:37 -07:00
Arthur Ice 638d121b75 GetItemsCount converted to QueryDatabase 2014-10-04 14:05:07 -07:00
Arthur Ice 3b75d4fa8f GetInventory char_id, inv) converted to QueryDatabase 2014-10-04 14:04:19 -07:00
Arthur Ice cb897786bc GetInventory(account_id, name, inv) converted to QueryDatabase 2014-10-04 14:02:43 -07:00
Arthur Ice aa780ceb8c GetSharedBank converted to QueryDatabase 2014-10-04 13:55:43 -07:00
Arthur Ice 4a3f94e688 SetStartingItems converted to QueryDatabase 2014-10-04 13:54:33 -07:00
Arthur Ice 211b3a135e SetSharedPlatinum converted to QueryDatabase 2014-10-04 13:53:28 -07:00
Arthur Ice cbce5e5eb6 GetSharedPlatinum converted to QueryDatabase 2014-10-04 13:50:01 -07:00
Arthur Ice a3347579e6 SaveInventory converted into 4 methods, converted to QueryDatabase 2014-10-04 13:45:50 -07:00
Arthur Ice 2fbd170188 VerifyInventory converted to QueryDatabase 2014-10-04 13:32:01 -07:00
Arthur Ice 95208eb24e SaveCursor 2014-10-04 13:31:06 -07:00
Arthur Ice bcf282da91 SetGMSpeed converted to QueryDatabase 2014-10-04 13:27:26 -07:00
Arthur Ice edc2567b10 GetGMSpeed converted to QueryDatabase 2014-10-04 13:26:45 -07:00
Arthur Ice b379bdd36e SetHideMe converted to QueryDatabase 2014-10-04 13:23:52 -07:00
Arthur Ice eeb9a6ab65 LoadCharacterCreateCombos converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice c4de954b15 LoadCharacterCreateAllocations converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice 2d8e9bf058 GetCharacterLevel converted to QueryDatabase 2014-10-04 12:51:58 -07:00
Arthur Ice 0b352ff0f7 SetMailKey converted to QueryDatabase
fix SetMailKey
2014-10-04 12:51:54 -07:00
Arthur Ice 28ec84a6c9 GetLauncherList converted to QueryDatabase 2014-10-04 12:37:19 -07:00
Arthur Ice 7f5f805c10 GetStartZoneSoF converted to QueryDatabase 2014-10-04 12:36:04 -07:00
Arthur Ice b3789c261b GetStartZone converted to QueryDatabase 2014-10-04 12:34:44 -07:00
Arthur Ice d86fc1c141 command_spawnfix converted to QueryDatabase 2014-10-04 10:16:26 -07:00
Arthur Ice accedf7184 command_listpetition converted to QueryDatabase 2014-10-04 10:12:39 -07:00
Arthur Ice 5f5fba1117 command_findzone converted to QueryDatabase 2014-10-04 10:09:20 -07:00
Arthur Ice 61cd48ff44 command_findnpctype converted to QueryDatabase 2014-10-04 10:07:25 -07:00
Arthur Ice ca2c2ccfac command_delpetition converted to QueryDatabase 2014-10-04 10:04:39 -07:00
Arthur Ice 905a264744 command_petitioninfo converted to QueryDatabase 2014-10-04 10:03:07 -07:00
Arthur Ice 114d0ae11b command_viewpetition converted to QueryDatabase 2014-10-04 10:01:59 -07:00
Arthur Ice 4d768474e8 command_setfaction converted to QueryDatabase 2014-10-04 09:58:55 -07:00
Michael Cook (mackal) e753685ceb Implement number of hit indicators for UF and RoF
There is a small display bug with the initial cast of the spell,
but it updates quickly enough that it shouldn't be too noticeable
This still needs to be fixed though

Changed SendBuffDurationPacket to take a Buffs_Struct by reference
to allow more of the data to be obtained without more params

Added Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
2014-10-04 03:23:42 -04:00
KimLS e0e3059498 Turn off user literal error in clang 2014-10-03 14:57:01 -07:00
KimLS 61545beff2 Hunger and thirst clamping within larger ranges 2014-10-03 13:42:39 -07:00
Uleat 16c5ead887 Merge branch 'master' of https://github.com/EQEmu/Server 2014-10-03 16:31:31 -04:00
Uleat 3a270dd96a Moved OP_LootItem slot translation to external handlers in client patch files 2014-10-03 15:05:20 -04:00
Uleat bb2bed7b00 Fixed OP_AugmentInfo packet processing that I broked'd 2014-10-03 02:03:48 -04:00
Michael Cook (mackal) 0438dee22e Rework ZoneDatabase::SavePetInfo -- should be better
Worst case before some something like 96 queries.
2014-10-03 01:37:51 -04:00
Michael Cook (mackal) b3d8e22539 Make ZoneDatabase::FillAAEffects get the data from memory
Note: This should probably be moved out of ZoneDatabase
2014-10-02 22:52:25 -04:00
KayenEQ 968127c414 Exported to PERL $client->SendSpellAnim(targetid, spellid)
This function sends the spell graphic of a spell without actually having to cast the spell.
2014-10-02 22:08:12 -04:00
Uleat 272180ff0f Detached direct packet routing for some older client opcodes 2014-10-02 20:18:54 -04:00
Michael Cook (mackal) 03fed0f42d Some AA updates from PEQ 2014-10-02 14:10:48 -04:00
KimLS 54fae508c5 Merge branch 'master' into loot 2014-10-02 10:16:15 -07:00
Michael Cook (mackal) fab091da2d Move OP_ItemRecastDelay to the right spot 2014-10-01 20:52:40 -04:00
Michael Cook (mackal) c7417d4b54 Didn't mean to push those .... 2014-10-01 20:51:47 -04:00
Michael Cook (mackal) d8c6c69450 ITEM and PB slot checks too 2014-10-01 20:50:01 -04:00
Michael Cook (mackal) 1024e327b5 Fix nullptr and item_slot check 2014-10-01 20:48:15 -04:00
Michael Cook (mackal) e38268230f Export SendColoredText to lua 2014-10-01 18:34:26 -04:00
Michael Cook (mackal) c7760d8dae Merge pull request #257 from KayenEQ/Development
Exported to PERL $client->SendColoredText(color, msg)
2014-10-01 18:27:54 -04:00
Michael Cook (mackal) 8d050b8f3f Fix errors in Database::ExpireMail in ucs 2014-10-01 18:06:02 -04:00
Michael Cook (mackal) 7800cbbe96 Initial work on OP_ItemRecastDelay 2014-10-01 16:22:45 -04:00
KayenEQ 50233b9a8c changelog 2014-10-01 13:25:19 -04:00
KayenEQ a722e3f112 Exported to PERL $client->SendColoredText(color, msg) 2014-10-01 13:24:38 -04:00
Michael Cook (mackal) be52d413db Fix bazaar welcome message 2014-10-01 02:11:38 -04:00
Michael Cook (mackal) 1dfd3349b7 Add Master Wu message 2014-10-01 01:15:08 -04:00
Michael Cook (mackal) cf8363f62e Fix another bot SQL error 2014-09-30 19:23:02 -04:00
Michael Cook (mackal) 7326a3ea7a Send the right person's name 2014-09-30 19:20:38 -04:00
Michael Cook (mackal) cb49bae53c Fix already in raid message 2014-09-30 18:41:03 -04:00
Michael Cook (mackal) 31f891dda5 Fix error in GetBotOwnerCharacterID 2014-09-30 18:19:57 -04:00
Uleat 38572fe393 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-30 16:18:51 -04:00
Uleat 83367ee806 Added clicky items from bags for clients that support it (RoF, currently) 2014-09-30 16:18:25 -04:00
Michael Cook (mackal) f117aafc45 Added some updownsign to some newer formulas 2014-09-30 13:41:42 -04:00
KimLS 0cd320dd75 Merge branch 'master' into loot 2014-09-29 19:24:12 -07:00
Alex 3e0c1bc02e Merge pull request #243 from addtheice/RunQueryToDatabaseQuery_zone_npc
Run query to database query zone npc
2014-09-29 17:22:53 -07:00
Alex f13a1d6351 Merge pull request #236 from addtheice/RunQueryToDatabaseQuery_zone_bot
Run query to database query zone bot
2014-09-29 17:20:53 -07:00
KimLS 725c5633f6 Fix for avg_coin 2014-09-29 17:13:32 -07:00
Michael Cook (mackal) fdde64dcc3 Merge pull request #255 from noudess/master
Update zone.cpp to fix bug in loading merchantlist_temp
2014-09-29 16:57:35 -04:00
Paul Coene f5fa07c8db Update zone.cpp 2014-09-29 16:38:18 -04:00
Michael Cook (mackal) 5ffb6bdee7 Reworked blind running around
This should be more in line with how we do current fearpath stuff
and with live.
2014-09-29 16:32:48 -04:00
Michael Cook (mackal) 8035c6c558 Correct "cure blindness" catch 2014-09-29 16:16:19 -04:00
Michael Cook (mackal) fc1eca0f31 Merge pull request #254 from noudess/master
Changes so that blind effects like those in Flash of Light work.
2014-09-29 14:26:51 -04:00
Michael Cook (mackal) 28e49801b7 Fix issue with newly inserted saylinks not working correctly
Sadly still silly
2014-09-29 03:08:30 -04:00
Michael Cook (mackal) 66c171b61b Add support for post June 18, 2014 Hundred Hands effects
Set Spells:Jun182014HundredHandsRevamp to true if your spell file is newer
2014-09-28 13:27:38 -04:00
Michael Cook (mackal) 3be7d45d36 Revamp attack delays / hastes / slows based on dev quotes
See changelog
2014-09-27 23:14:11 -04:00
KimLS ef082b9144 Merge branch 'master' into loot 2014-09-27 20:09:13 -07:00
KimLS 7fed01ddea initial rewrite of loot code 2014-09-27 19:57:45 -07:00
Michael Cook (mackal) e5822a0c4a Fix client SetAttackTimer issue
Moved the call to the end of Client::CalcBonuses() since it depends on
Client::CalcHaste() which requires a bunch of others to be called
before it.
2014-09-27 21:37:14 -04:00
KimLS b05dd45d62 Merge branch 'spell_stats' 2014-09-27 14:45:20 -07:00
KimLS 9f64092606 Merge of kayen's PR as well as some fixes i saw 2014-09-27 14:44:48 -07:00
Paul Coene d2acd0505c is_blind works better as an else to the line that handles cure 2014-09-27 17:39:30 -04:00
Paul Coene 05ed577e23 Fixed issue where blind flag was set for beneficial spells like cure.wq 2014-09-27 17:17:12 -04:00
KayenEQ 7831162235 changelog 2014-09-27 16:39:37 -04:00
KayenEQ 8567fd928a Perl Mob function GetSpellStat(spellid, identifier, slot)
indentifier is the spell_new field
slot is used for effectids,base,base2, max ect where 1 = first slot.
Will add a wiki page
2014-09-27 16:12:10 -04:00
Paul Coene 73a23e9f9d Changes so that blind effects like those in Flash of Light work. 2014-09-27 13:00:07 -04:00
KayenEQ f232bf1ccd Fix for commit failure. 2014-09-27 09:21:37 -04:00
KayenEQ acc6926448 Merge git://github.com/EQEmu/Server into Development 2014-09-27 09:20:27 -04:00
Uleat 837ce8ab4a Re-ordered client patch ENCODES and DECODES - snuck in a bitswap change for SoF+ item_struct::Slots translations 2014-09-26 20:51:42 -04:00
Michael Cook (mackal) 2497c719ee Rename Name variable in SendBazaarResults to temp_buffer fixes #253 2014-09-26 12:43:34 -04:00
KayenEQ 31b46efcac Clean up of perl based NPC spell scaling functions.
Added Perl - $npc->GetSpellFocusDMG(), $npc->GetSpellFocusHeal()
2014-09-26 06:56:42 -04:00
KayenEQ 9f3a0a3f95 Merge git://github.com/EQEmu/Server into Development 2014-09-26 06:54:53 -04:00
Michael Cook (mackal) 179400c777 Client::SetClassStartingSkills should now match live 2014-09-26 00:44:51 -04:00
Michael Cook (mackal) 0f12a74074 Add bool EQEmu::IsSpecializedSkill(SkillUseTypes skill) 2014-09-25 21:40:31 -04:00
Michael Cook (mackal) 61b784e96e Add tests for skills utilities 2014-09-25 21:35:17 -04:00
Michael Cook (mackal) 723e5d536a EQEmu::IsTradeskill uint32 to SkillUseTypes 2014-09-25 21:20:59 -04:00
Alex 225929d937 Merge pull request #240 from addtheice/RunQueryToDatabaseQuery_zone_trading
Run query to database query zone trading
2014-09-25 17:26:48 -07:00
Alex 763ed7f7a3 Merge pull request #242 from addtheice/RunQueryToDatabaseQuery_zone_questmgr
Run query to database query zone questmgr
2014-09-25 17:26:22 -07:00
Alex ea6ef4c283 Merge pull request #245 from addtheice/RunQueryToDatabaseQuery_zone_groups
Run query to database query zone groups
2014-09-25 17:26:13 -07:00
Alex e5a0cc9ef7 Merge pull request #251 from KayenEQ/Development
Fix for calculation for SE_ManaAbsorbPercentDamage
2014-09-25 17:25:45 -07:00
Uleat a79ea9b850 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-25 18:49:17 -04:00
Uleat 039e321dde More re-enumeration prep work 2014-09-25 18:48:58 -04:00
KimLS c57292a9dd Tired of this GLM warning (and we dont even use glm rotate grr) also reworked how I approached that peq entity process crash after thinking about it a bit 2014-09-25 14:54:40 -07:00
KayenEQ 9561a3fd3e Merge git://github.com/EQEmu/Server into Development 2014-09-25 15:15:32 -04:00
KimLS aa021addc1 Fix for potion belt name loading. 2014-09-25 04:00:06 -07:00
Michael Cook (mackal) c0cbbf3a65 World needs to load skill cap data for char creation 2014-09-25 03:14:43 -04:00
Michael Cook (mackal) a73ac9cfe8 Added helper function bool EQEmu::IsTradeskill(uint32 skill)
Returns true if you pass a tradeskill to it, otherwise false
2014-09-24 23:36:27 -04:00
KimLS ec8c46abfe I keep seeing a crash due to an invalidated iter during mob delete every few days, seeing if this fixes it. 2014-09-24 19:47:27 -07:00
KayenEQ b9b92762b5 Merge git://github.com/EQEmu/Server into Development
Conflicts:
	changelog.txt
2014-09-24 20:51:20 -04:00
Uleat 7feb531ff7 Re-ordered server opcodes and handlers to facilitate the export of client patch structs and handlers 2014-09-24 20:23:01 -04:00
Michael Cook (mackal) e67423bba7 Add raid mob message
"This creature would take an army to defeat!"
Colors may be a bit off due to differences in clients
2014-09-24 14:04:17 -04:00
Michael Cook (mackal) 531e4b0207 Fix function signature of Mob::IsRaidTarget() so its actually a virtual 2014-09-24 13:50:18 -04:00
Michael Cook (mackal) 34496c49b4 Add Client::SendColoredText(uint32 color, std::string message)
This will send a message (arbitrary size limit of 512) to the client
of the provided color. The MT colors should work here.
2014-09-24 13:14:20 -04:00
Michael Cook (mackal) a445d7e39f Rename OP_BuffFadeMsg to OP_ColoredText since it is a generic opcode 2014-09-24 12:22:06 -04:00
KimLS 0d12715d77 Data verification utils, not in use yet. Also added ability for lua packet to bypass the translation layer (dangerous) if a writer so desires (useful for quickly trying packet stuff) 2014-09-24 03:58:46 -07:00
akkadius 9878459049 Fix tribute loading/saving for real 2014-09-23 20:16:19 -05:00
akkadius 9be0d3b090 memset size fix to calc current size of 400 bytes for discipline initialization 2014-09-23 19:19:40 -05:00
akkadius 16ba3eb11e Restoring Disciplines to their original load order (Slot)
Tribute uninitialized value database conversion fix
Tribute load fix (Lost in translation)
Changed Tribute 0 value to 0xFFFFFFFF instead of 0
Sanity check for unitialized tribute value on load
2014-09-23 19:12:31 -05:00
akkadius 973aa94cb5 Fix for database schema conversion where character_ table has 0 characters present. This will allow the tables to still be created properly and the old one renamed. 2014-09-23 18:28:17 -05:00
KimLS 4cbccfdce2 Fix for MoveCharacterToZone using zoneid instead of zone_id 2014-09-23 16:02:04 -07:00
KayenEQ a5e6fa3479 Merge git://github.com/EQEmu/Server into Development 2014-09-23 18:58:59 -04:00
akkadius 3712d36867 Fix for the undye command to properly purge character armor dye 2014-09-23 17:54:07 -05:00
KimLS 17291e9977 Merge branch 'master' of github.com:EQEmu/Server 2014-09-23 15:42:48 -07:00
KimLS 15f57e4a4c Rob's broken skill up bug reported fixed 2014-09-23 15:42:20 -07:00
akkadius e58d63bf35 IncrementAA for scripting functions changed to use SaveAA instead of Save 2014-09-23 17:21:08 -05:00
KimLS f89add9f64 Fix for AA conversion 2014-09-23 15:09:33 -07:00
Michael Cook (mackal) e039f6d2c6 Fix AA issue 2014-09-23 17:40:17 -04:00
KimLS 7cef4d8fe9 Fix for spell books on newer clients not playing well with the tricksy new deblob code 2014-09-23 13:39:05 -07:00
KimLS 7b85b09f24 isnan fix for vs2012 2014-09-23 13:04:18 -07:00
akkadius 413538f1b5 Sending the client a spell value that is more inline with what it expects when no spell is set. 2014-09-23 14:40:09 -05:00
KayenEQ c03a70651c SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).
Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
2014-09-23 09:15:02 -04:00
KayenEQ ec01e6c69b Merge git://github.com/EQEmu/Server into Development 2014-09-23 09:07:14 -04:00
KimLS 11773208df Style cleanup, clamp hunger and thirst values to correct ranges 2014-09-22 16:46:01 -07:00
KayenEQ 1f155690d8 Fix to SE_ApplyEffect - Will now trigger spell from this effect at correct time. 2014-09-22 19:42:59 -04:00
KimLS 36a29dbb9f Fix for creating characters failing at name verification 2014-09-22 15:37:11 -07:00
KayenEQ c160b8716f Kayen: Spell recourse effects / triggerable spell effects will now be applied AFTER the base spells effects have been applied (consistent with live). 2014-09-22 18:02:40 -04:00
KayenEQ 7ffce01260 Merge git://github.com/EQEmu/Server into Development 2014-09-22 17:50:35 -04:00
akkadius 1170b57fd5 Fix starting items for starting_item entries that use slot -1 to find a free slot 2014-09-22 16:23:43 -05:00
akkadius fee8a1214a Putting back in demonstar's lowercase check 2014-09-22 02:52:23 -05:00
akkadius c26a6959e4 #resetaa now covers the function of #resetaa and #refundaa
#resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
Removed #refundaa
Removed a lot of debug code for blob conversion
Changed status logging for loads/saves to Debug category
2014-09-22 01:00:28 -05:00
akkadius 837b9b7ec7 NoRentExpired character_ reference 2014-09-21 23:54:52 -05:00
akkadius a5a8bfb0f4 Bye bye commented old junk 2014-09-21 23:48:51 -05:00
akkadius 69bddef5a0 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-21 23:35:27 -05:00
akkadius 7d242045ec Another merge aftermath overwriting character_data reference to old table 2014-09-21 23:34:53 -05:00
JJ c3035fdf41 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-21 20:03:09 -04:00
JJ e34c47414f Consistent directory locations under common. 2014-09-21 20:02:01 -04:00
akkadius 909dda7c09 Array iter fix 2014-09-21 19:01:50 -05:00
KimLS 22ab145f19 Merge branch 'master' of github.com:EQEmu/Server 2014-09-21 15:59:24 -07:00
KimLS cd8e30a2ec Bug with MySQLRequestResult 2014-09-21 15:59:02 -07:00
akkadius 03be6b2b6b Debug message adjustments 2014-09-21 16:24:06 -05:00
akkadius cda2217634 .......................................... 2014-09-21 04:26:26 -05:00
KimLS 4525b512ac Build fix plus future travis update 2014-09-21 02:25:05 -07:00
akkadius db0d1116f8 make travis shut up 2014-09-21 04:12:36 -05:00
akkadius 3ef5d8ef0a gcc fix <stdint.h> vs <limits> 2014-09-21 03:43:27 -05:00
akkadius 4ed88e348e Merge aftermath 2014-09-21 02:58:56 -05:00
akkadius ad29fa9cfa Merge remote-tracking branch 'remotes/origin/master' into blob_conversion
Conflicts:
	changelog.txt
	common/database.cpp
	world/client.cpp
	world/zoneserver.cpp
	zone/command.cpp
2014-09-21 02:32:31 -05:00
akkadius 388c4bc574 Fix where if players instance is expired when logging back into it, they will get sent properly to bind. Issue was players player profile instance ID did not match the bind instance ID. 2014-09-21 02:27:57 -05:00
KimLS b4f3993616 Should compile on gcc now 2014-09-20 23:56:04 -07:00
akkadius f9366553a3 Blob changelog.txt 2014-09-21 01:27:05 -05:00
KimLS 9733f04c9c Merge of changelog, how i hate thee 2014-09-20 15:10:33 -07:00
KimLS 7140a2054f Ban and suspend commands now require a reason that is recorded in the DB 2014-09-20 15:09:43 -07:00
Michael Cook (mackal) 1049e48aca Add Spells:SHDProcIDOffByeOne to support newer spell files
In June 2009 SoE stopped doing a +1 to the base for SHD procs
So UF+ spell files were not working, set this to false to support these spell files
2014-09-20 16:58:35 -04:00
Michael Cook (mackal) 33b79a3588 Limit character length to 15 (the client doesn't let you enter more) 2014-09-20 15:59:34 -04:00
Michael Cook (mackal) f82699c39b Fix crash in SendEnterWorld on illegally long names 2014-09-20 15:55:20 -04:00
Michael Cook (mackal) 15eaf4e6d1 Fix issue with not online message from tells 2014-09-20 14:57:15 -04:00
Michael Cook (mackal) 7621882b4e Fix toon names being allowed with lower case starting char 2014-09-20 02:46:04 -04:00
Michael Cook (mackal) 9b70b73759 Correct tell queue related messages 2014-09-19 18:17:42 -04:00
Michael Cook (mackal) 8e43134bda Add Client::Tell_StringID for tell queue messages 2014-09-19 18:16:52 -04:00
akkadius 52608d9b2d Character armor dye save fix 2014-09-18 22:46:28 -05:00
Michael Cook (mackal) d26782b093 Nuke #viewmessages 2014-09-18 22:56:16 -04:00
Michael Cook (mackal) a2368b4ea7 Implement tell queues
Default queue size 20 (World:TellQueueSize)
This doe not play well with multiple sessions and a toon crashes and relogs
Normal tells have issues as well.
2014-09-18 22:55:06 -04:00
Michael Cook (mackal) 3d6bb964df Stop nuking MySQLRequestResult Success flag 2014-09-18 14:59:50 -04:00
Michael Cook (mackal) 347ae1bc34 Fix error in 64f5bfd 2014-09-18 01:29:30 -04:00
Michael Cook (mackal) 64f5bfd5ce Make tell message a bit more understandable. 2014-09-17 23:46:54 -04:00
akkadius 3cb02e3b86 Merge branch 'blob_conversion' of https://github.com/EQEmu/Server into blob_conversion 2014-09-17 20:19:04 -05:00
akkadius 34c3b8628e Merge from master 2014-09-17 20:16:37 -05:00
KimLS 8f921ce919 Merge branch 'blob_conversion' of github.com:EQEmu/Server into blob_conversion 2014-09-17 17:45:53 -07:00
KimLS 6754dfdf6d Small sanity checks that was causing a few errors 2014-09-17 17:45:40 -07:00
akkadius 81722962cf KLS Nazi Grammar Fix 2014-09-17 14:30:19 -05:00
KayenEQ d169d95ab0 Fix for resource tap when gaining/loosing HP. 2014-09-17 12:08:01 -04:00
KayenEQ 63ca4cac5e Fix for calculation for SE_ManaAbsorbPercentDamage 2014-09-17 05:14:10 -04:00
akkadius f30ae9dd5a Some descriptor adjustments 2014-09-17 02:52:13 -05:00
akkadius eb49707779 Changed conversion routine.
At the end of conversion, character_ table will be renamed to character_old so that it does not get hit with trying to convert next world bootup
Added some file logging during the initial conversion routine
2014-09-17 02:47:13 -05:00
Michael Cook (mackal) 86c1420f6e Fix some effect value calcs and implement more
Derived from the client
2014-09-17 00:01:32 -04:00
Uleat 364ed921ce Fix for LoadBuffs() server crash 2014-09-16 22:57:15 -04:00
Michael Cook (mackal) 85e1518856 Implement spell formula 137
This is only used in the BER AA Desperation
2014-09-16 18:35:49 -04:00
akkadius 87bb5deb5c Added quest::crosszonesetentityvariablebynpctypeid(npctype_id, id, m_var)
Added quest::crosszonesignalnpcbynpctypeid(npctype_id, data)
Added $client->GetTaskActivityDoneCount(THIS, TaskID, ActivityID)
2014-09-16 16:03:27 -05:00
Michael Cook (mackal) 11ce399e0d Mob::ProcessSpecialAbilities pass by reference 2014-09-15 20:31:45 -04:00
Michael Cook (mackal) ec0989454d QGlobalCache::LoadBy to pass by reference 2014-09-15 20:11:56 -04:00
Michael Cook (mackal) e9f6031936 Merge pull request #250 from KayenEQ/Development
Nimbus Updates / Other fixes
2014-09-15 18:57:47 -04:00
KayenEQ 03485ef1e0 Nimbus effects will now be reapplied after zoning.
Nimbus effects will now fade when associated buff is removed.
Fix for ReduceAllDamage function.
2014-09-15 16:05:57 -04:00
Michael Cook (mackal) e256175ce6 Style nits 2014-09-14 16:00:18 -04:00
Michael Cook (mackal) 0f662bf70c Fix ZoneDatabase::LoadTraderItem not returning anything valid 2014-09-14 15:58:08 -04:00
Michael Cook (mackal) 4c959159c2 Fix rogues not starting with Thieves' Cant 2014-09-13 03:20:43 -04:00
Michael Cook (mackal) d51241720a Fix attack_delay for real 2014-09-12 13:10:03 -04:00
Michael Cook (mackal) 873d343529 Fix ZoneDatabase::GetNPCType nuking attack_delay changes 2014-09-12 11:57:09 -04:00
Michael Cook (mackal) 95969ce67b Fix ZoneDatabase::GetZoneCFG for real 2014-09-11 18:28:25 -04:00
Michael Cook (mackal) bd5cdf502e Fix ZoneDatabase::GetZoneCFG errors 2014-09-11 18:24:40 -04:00
Michael Cook (mackal) c6a7d5a96c Revert "GetAccountInfoForLogin_result converted to MySQLRequestResult"
This reverts commit 8369570b50.

Conflicts:
	zone/zonedb.h
2014-09-11 16:57:00 -04:00
Michael Cook (mackal) 6bc4ecf390 Revert "LoadFactionValues converted to QueryDatabase"
This reverts commit 2df823d2db.
2014-09-11 16:56:15 -04:00
Michael Cook (mackal) c94ceb5b1d Revert "LoadFactionValues_result converted to MySQLRequestResult"
This reverts commit 2e84781594.
2014-09-11 16:55:58 -04:00
Akkadius e390531dcd Initial character creation escape sequences
Added initial skill/language/bind saves to character creation
2014-09-11 03:14:34 -05:00
Alex bb702335e8 Merge pull request #247 from KayenEQ/Development
Development
2014-09-11 00:21:45 -07:00
Alex 863c0c5b58 Merge pull request #241 from addtheice/RunQueryToDatabaseQuery_zone_titles
Run query to database query zone titles
2014-09-11 00:21:00 -07:00
Alex 76e280da4e Merge pull request #239 from addtheice/RunQueryToDatabaseQuery_zone_waypoints
GetHighestGrid converted to QueryDatabase
2014-09-11 00:19:43 -07:00
Alex bcca35b7b7 Merge pull request #238 from addtheice/RunQueryToDatabaseQuery_zone_guild_mgr
AddItem converted to QueryDatabase
2014-09-11 00:18:57 -07:00
Alex 65abaade88 Merge pull request #237 from addtheice/RunQueryToDatabaseQuery_zone_guild
Run query to database query zone guild
2014-09-11 00:18:21 -07:00
Alex 8020e921aa Merge pull request #234 from addtheice/RunQueryToDatabaseQuery_queryserv_database
Run query to database query queryserv database
2014-09-11 00:17:56 -07:00
Alex f2f5b4c1ad Merge pull request #222 from addtheice/RunQueryToDatabaseQuery_zone_client
Run query to database query zone client
2014-09-11 00:16:37 -07:00
Alex 5c6f9fcdc4 Merge pull request #215 from addtheice/RunQueryToDatabaseQuery_zone_zonedb
Run query to database query zone zonedb
2014-09-11 00:16:15 -07:00
akkadius d7dc733480 Small db changes 2014-09-11 00:44:12 -05:00
KimLS 9e243a2426 bestz will no longer scale off of model size, also it adjusts up less extremely in general. Fixed super duper attack speed on command spawned npcs 2014-09-10 22:33:30 -07:00
Arthur Ice 9a889802d3 merge upstream. yet again 2014-09-09 21:26:26 -07:00
Michael Cook (mackal) 1420987c4c Fix copy paste error 2014-09-10 00:07:16 -04:00
Michael Cook (mackal) ed4d954ba8 Added attackdelay to #npcedit
Also changelog!
2014-09-10 00:05:00 -04:00
Michael Cook (mackal) 881f937a35 Change scale of GetPermaHaste() 2014-09-09 22:50:50 -04:00
Michael Cook (mackal) ed4e762f03 Change NPCs to have their attack delay set in DB
This gives us a much more straight forward way of setting mob
attack delay with respect to live.

The attack_delay column is in 10ths of seconds, just like weapons are
The attack_speed is left for references for now.
2014-09-09 22:42:54 -04:00
Michael Cook (mackal) fa1e33783a Split Mob::SetAttackTimer into Client and NPC methods
This was the easiest way to NPCs delay settings to be sane in the database.
The functions are cleaner since there is no specific logic to change
behavior depending on if they're a client or not.
2014-09-09 22:13:30 -04:00
akkadius 0c38b46bf1 Remove namespace std 2014-09-09 16:15:25 -05:00
akkadius 899cf32e6b Added some DB logging to catch any potential query errors, this logs to eqemu_query_error_log.txt at the root folder, currently no rule toggling for this
Corrected some character name reservation logic
Adjusted telnet console so it does not throw 'Command Unknown' when simply hitting enter key
Adjusted System MSG for worldshutdown to use minutes instead of seconds
Added warning for when Shared platinum is disabled at the rule level for players to NOT put platinum in the shared bank when they insert platinum in the shared platinum slot
Changed a place in the code where disciplines were trained, someone had uint16 allocated to CharacterID and this was causing issues for characters with large ID's in the database
Added a fix for bind points getting overwritten with invalid zone data, setting everything to 0,0,0,0 - Since I've added this change I've had no issues for players
Fixed some spell book swap logic in the code, removed swap function.
Fixed issue with guild ranks not loading properly
Commented out some of the non-working tell-que code
Took out some of the auto increment settings in the auto database conversion that don't affect anything anyways
Added some additional escape string sequences for queries that needed them
Added ThrowDBError logging to catch any potential query issues with saves or load functions
2014-09-09 16:03:24 -05:00
Michael Cook (mackal) 2fa31799f6 Port slow fixes to bots 2014-09-09 17:02:05 -04:00
Michael Cook (mackal) 6c3d5c713c Fix slow effect on NPC special attack reuse timers 2014-09-09 15:34:30 -04:00
Michael Cook (mackal) f16beddf6e Increase NPC bash/kick delay by 3 (8 total by default) 2014-09-09 15:32:02 -04:00
Michael Cook (mackal) 506b3ca4a0 Fix slow calculation
Full details: http://www.eqemulator.org/forums/showthread.php?t=38734
2014-09-08 21:43:25 -04:00
KimLS 80242bd250 Strange crash hack/workaround that occured on peq 2014-09-08 17:02:37 -07:00
KimLS 7f7f99cbe3 BestZ will now adjust for model size when used to adjust movement z 2014-09-08 16:45:20 -07:00
KimLS 579294fbf0 Fixed many bugs with partial resist calculations, targets with higher resist should have a more natural curve when it comes to resisting spells 2014-09-08 03:04:22 -07:00
KimLS a3b54e5cae Fix for forage crash 2014-09-07 22:41:42 -07:00
akkadius b392d16808 Fixed ROF Augment item dupe with not checking for available slots properly and adding items to the virtual instance 2014-09-07 05:43:37 -05:00
akkadius 1f9597a9e2 Fix for item dupe via RoF augmenting 2014-09-07 05:35:19 -05:00
akkadius 54c89d69f6 Merge remote-tracking branch 'remotes/origin/master' into blob_conversion
Conflicts:
	common/database.cpp
	common/mysql_request_result.h
	common/shareddb.cpp
2014-09-07 04:11:09 -05:00
akkadius a14371ba5c Removed debugging
Added player profile data loading safety net checking
2014-09-07 04:00:56 -05:00
KayenEQ 616e13acac Calc fix for spell power distance mod effect. 2014-09-07 03:43:34 -04:00
KayenEQ b50f660339 Merge git://github.com/EQEmu/Server into Development 2014-09-07 03:40:12 -04:00
Akkadius 4c12d31e4a Removed command character backup
Changed all remaining references from the character_ table to the character_data
2014-09-06 22:35:19 -05:00
Akkadius e50cf5c4be - Ported inspect_messages to character_inspect_messages
- Ported character leadership abilities to character_leadership_abilities
- Removed player profile debug printing
- Refactored total time entitled on account to load from the sum of time_played from all characters in character_data
2014-09-06 21:50:29 -05:00
KimLS 84310ec8f0 Merge branch 'master' of github.com:EQEmu/Server 2014-09-06 17:09:33 -07:00
KimLS ffed5a9e22 SQL Injection fix on inspect message setting 2014-09-06 16:43:36 -07:00
Michael Cook (mackal) 92c9ff6e53 Fix issue with hpregen in command_npcedit 2014-09-06 17:58:42 -04:00
KimLS 986a424322 Fix for perl api illusion 2014-09-06 14:31:02 -07:00
Uleat c3e7c48939 Fix ItemTimerCheck() range criteria typo 2014-09-06 16:19:32 -04:00
Arthur Ice b2aa3262a9 Update client.cpp
fixed bug with BEGIN_GENERAL to MainCursor being skipped before since it was starting at GENERAL_BAGS_BEGIN
2014-09-06 12:56:35 -07:00
Arthur Ice b1587f0326 Delete client.cpp.orig
not supposed to be in there.
2014-09-06 12:51:50 -07:00
akkadius ca7dd7d741 - Improved speed of character database conversion x1000 by changing query style
- Adjusted AA MySQL saves for 100x speed increase
- Removed StoreCharacter lookup methods as they will no longer be necessary
- Some other cleanup
2014-09-06 13:53:54 -05:00
Uleat 281b321237 Changed trade behavior to prioritize all main slots before sub slots 2014-09-06 12:45:45 -04:00
KimLS ba0e4bfc1d Bizarre issue reported with SendIllusionPacket corrupting size in lua, dunno if this fixes it but fingers crossed. 2014-09-05 21:18:35 -07:00
Michael Cook (mackal) 3cda62acf4 Fix changelog [skip ci] 2014-09-05 22:38:32 -04:00
Michael Cook (mackal) 2ef43212e1 Fix size issue with Lua_Mob::SendIllusionPacket
Mob::SendIllusionPacket was expecting the size to be 0xFFFFFFFF
to default rather than -1.0f
2014-09-05 22:36:44 -04:00
Michael Cook (mackal) f69eccc42b Add missing QueryDatabase in ZoneDatabase::AddWPForSpawn 2014-09-05 21:57:34 -04:00
Michael Cook (mackal) a1e425f936 Fix indentation of ZoneDatabase::AddWPForSpawn 2014-09-05 21:57:34 -04:00
Arthur Ice 59618e0038 UnDelegateMarkNPC converted to QueryDatabase 2014-09-05 16:14:28 -07:00
Arthur Ice ef1f1562f0 DelegateMarkNPC converted to QueryDatabase 2014-09-05 16:13:50 -07:00
Arthur Ice 31177b7dc7 UnDelegatePuller converted to QueryDatabase 2014-09-05 16:04:34 -07:00
Arthur Ice 5b7aaff150 UnDelegateMainAssist converted to QueryDatabase 2014-09-05 15:58:21 -07:00
Arthur Ice b525a32b6e UndelegateMainTank converted to QueryDatabase 2014-09-05 15:54:07 -07:00
Arthur Ice 99fe610f72 DelegatePuller converted to QueryDatabase 2014-09-05 15:46:06 -07:00
Arthur Ice b5ec35e672 DelegateMainTank converted to QueryDatabase 2014-09-05 15:27:12 -07:00
Uleat 6186c3d866 Fix for gcc failure - Can't fix stupid! 2014-09-05 16:46:03 -04:00
Uleat 1d0a6bdc71 Fix for losing 2nd and 3rd cursor items after zoning 2014-09-05 16:16:56 -04:00
Arthur Ice 15fa2b371c LearnMembers converted to QueryDatabase 2014-09-05 10:45:36 -07:00
Michael Cook (mackal) da121137e5 Fix logging macros
macros should be fully wrapped in do { ... } while(false) to prevent
any accidental coding issues (like else being eaten!!!)
2014-09-05 13:26:44 -04:00
Michael Cook (mackal) c953f1dee1 Merge pull request #244 from addtheice/merc_stance_fix
Fix iterator on mercstance crash bug
2014-09-05 02:30:13 -04:00
Arthur Ice 32b595afb4 Fix iterator on mercstance crash bug 2014-09-04 23:15:20 -07:00
Arthur Ice 0799b47c9c AddSpawnFromSpawnGroup converted to QueryDatabase 2014-09-04 19:40:19 -07:00
Arthur Ice a216672443 Moved add spawn from spawn group command case (5) from NPCSpawnDB into method AddSpawnFromSpawnGroup 2014-09-04 18:13:23 -07:00
Arthur Ice d755aa48bc DeleteSpawnRemoveFromNPCTypeTable converted to QueryDatabase 2014-09-04 17:15:09 -07:00
Arthur Ice f7ecfe7257 DeleteSpawnLeaveInNPCType converted to QueryDatabase 2014-09-04 17:01:34 -07:00
Arthur Ice 89a0bbb8bf Moved deleting npc spawn command case (3) from NPCSpawnDB into method DeleteSpawnLeaveInNPCTypeTable 2014-09-04 16:35:01 -07:00
Arthur Ice 822c8425bd UpdateNPCTypeAppearance converted to QueryDatabase 2014-09-04 16:13:43 -07:00
Arthur Ice a6b57a3423 Moved updating npc type appearance command case (2) from NPCSpawnDB into method UpdateNPCTypeAppearance 2014-09-04 15:32:41 -07:00
Arthur Ice 6d4f7413a5 AddNewNPCSpawnGroupCommand converted to QueryDatabase 2014-09-04 15:01:42 -07:00
Arthur Ice 3e041052ee Moved add new NPC spawngroup command case (1) from NPCSpawnDB into method AddNewNPCSpawnGroupCommand 2014-09-04 14:47:02 -07:00
Arthur Ice 444174ef57 CreateNewNPCCommand converted to QueryDatabase 2014-09-04 12:26:05 -07:00
Arthur Ice 970f7e01a9 Moved create new NPC command case (0) from NPCSpawnDB into method CreateNewNPCCommand 2014-09-04 10:08:02 -07:00
Akkadius 4432c07081 State of Commit: Testable if you ask me (Akkadius) what you need to do
- Need to convert a list of functions and columns and should be ready to start intensive testing phase
 - All preliminary tests show things working great

- All of player profile is saved and loaded from the database
- DBAsync has been completely removed from all code
	- Removed zone/dbasync.cpp/.h
	- Removed common/dbasync.cpp/.h
	- Removed dbasync from cmake commmon and zone
- Cleaned up a ton of functions
- Added several tables to world CheckDatabaseConversions script:
	- `character_skills`
	- `character_languages`
	- `character_bind`
	- `character_alternate_abilities`
	- `character_currency`
	- `character_data`
	- `character_spells`
	- `character_memmed_spells`
	- `character_disciplines`
	- `character_material`
	- `character_tribute`
	- `character_bandolier`
	- `character_potionbelt`
- Character select now loads from `character_data`
- Character creation now creates to `character_data`
- Updated function Database::UpdateName to use `character_data`
- Updated function Database::CheckUsedName to use `character_data`
- Updated function Database::MoveCharacterToZone to use `character_data`
- Updated function Database::SetLoginFlags to use `character_data`
- Updated function Database::SetFirstLogon to use `character_data`
- Updated function Database::SetLFG to use `character_data`
- Removed CopyCharacter functions and commands, to be recreated later since it never worked to begin with
- Removed SharedDatabase::SetPlayerProfile
- Trimmed down redundant case switch statements for World sendpackets to QueryServ
- Added Character Methods to Database class:
	Loads:
		bool	LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp);
		bool	LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
		bool	LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
	Saves:
		bool	SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
		bool	SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level);
		bool	SaveCharacterSpellSwap(uint32 character_id, uint32 spell_id, uint32 from_slot, uint32 to_slot);
		bool	SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color);
		bool	SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value);
		bool	SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value);
		bool	SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id);
		bool	SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
		bool	SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name);
		bool	SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon);
	Deletes:
		bool	DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
		bool	DeleteCharacterDisc(uint32 character_id, uint32 slot_id);
		bool	DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
2014-09-04 07:24:17 -05:00
Arthur Ice 221c667a23 saylink converted to QueryDatabase 2014-09-03 23:26:09 -07:00
Arthur Ice b710c41c34 clearspawntimers converted to QueryDatabase 2014-09-03 23:17:20 -07:00
Arthur Ice 8825218361 showgrid converted to QueryDatabase 2014-09-03 23:14:16 -07:00
Arthur Ice 1bb5c4e0d8 delglobal converted to QueryDatabase 2014-09-03 23:10:42 -07:00
Arthur Ice 58343480ff InsertQuestGlobal converted to QueryDatabase 2014-09-03 23:07:28 -07:00
Arthur Ice 399bf96a0c RemoveTitle converted to QueryDatabase 2014-09-03 21:05:31 -07:00
Arthur Ice b7c409e11b CheckTitle converted to QueryDatabase 2014-09-03 21:03:00 -07:00
Arthur Ice fd08e9f2ad EnableTitle converted to QueryDatabase 2014-09-03 21:00:15 -07:00
Uleat 37d3daaf9a Client timer issue fix 2014-09-03 23:59:55 -04:00
Arthur Ice 9a4d01da8f CreateNewPlayerSuffix converted to QueryDatabase 2014-09-03 20:57:34 -07:00
Arthur Ice 81cf748b2b CreateNewPlayerTitle converted to QueryDatabase 2014-09-03 20:52:00 -07:00
Michael Cook (mackal) 22742b6a25 Add #shownumhits workaround command to show numhits 2014-09-03 23:50:23 -04:00
Arthur Ice 7d8d96c049 LoadTitles converted to QueryDatabase 2014-09-03 20:45:38 -07:00
Arthur Ice 081905dbc3 SendBuyerResults converted to QueryDatabase 2014-09-03 20:34:07 -07:00
Arthur Ice a8b8f71092 ShowBuyLines converted to QueryDatabase 2014-09-03 20:24:30 -07:00
Arthur Ice 36c1d88eac SendBazaarResults converted to QueryDatabase 2014-09-03 20:18:07 -07:00
Arthur Ice 6eba672013 SendBazaarWelcome converted to QueryDatabase 2014-09-03 19:39:50 -07:00
Arthur Ice 091c8ea5f1 BazaarAuditTrail converted to QueryDatabase 2014-09-03 19:33:20 -07:00
Arthur Ice f5e49441b6 GetHighestGrid converted to QueryDatabase 2014-09-03 19:28:25 -07:00
Arthur Ice 610f3ed37f AddItem converted to QueryDatabase 2014-09-03 19:17:55 -07:00
Arthur Ice f215874486 SetGuildDoor converted to QueryDatabase 2014-09-03 19:10:27 -07:00
Arthur Ice 8e529105cf CheckGuildDoor converted to QueryDatabase 2014-09-03 19:07:49 -07:00
Arthur Ice 95dc0c5fc8 GetEquipmentColor converted to QueryDatabase 2014-09-03 18:49:47 -07:00
Arthur Ice 73c8d3d09d ProcessBoyCommands converted to QueryDatabase 2014-09-03 18:46:41 -07:00
Arthur Ice 049a0bf787 LoadGuildMembership converted to QueryDatabase 2014-09-03 18:41:21 -07:00
Arthur Ice 2095380ba4 SetBotGuildMembership converted to QueryDatabase 2014-09-03 18:31:26 -07:00
Arthur Ice 081192d29e GetBotOwnerCharacterID converted to QueryDatabase 2014-09-03 18:24:30 -07:00
Arthur Ice 2429980fd5 CreatedBotCount converted to QueryDatabase 2014-09-03 18:21:17 -07:00
Arthur Ice 0ac238d762 AllowedBotSpawns converted to QueryDatabase 2014-09-03 18:16:22 -07:00
Arthur Ice 45320fd8ec GetBotGroupLeaderIdByBotGroupName converted to QueryDatabase 2014-09-03 18:13:15 -07:00
Arthur Ice 6d33a13e23 GetBotGroupIdByBotGroupName converted to QueryDatabase 2014-09-03 18:09:53 -07:00
Arthur Ice 52d64d03a6 CanLoadBotGroup converted to QueryDatabase 2014-09-03 18:06:05 -07:00
Arthur Ice fe6e289606 DoesBotGroupNameExist converted to QueryDatabase 2014-09-03 18:01:32 -07:00
Arthur Ice 26569ac51d GetBotGroupListByBotOwnerCharacterId converted to QueryDatabase 2014-09-03 17:57:10 -07:00
Arthur Ice 38d04931ba LoadBotGroup converted to QueryDatabase 2014-09-03 17:52:06 -07:00
Arthur Ice 96cf3d967f DeleteBotGroup converted to QueryDatabase 2014-09-03 17:47:38 -07:00
Arthur Ice 36325226eb SaveBotGroup converted to QueryDatabase 2014-09-03 17:43:18 -07:00
Arthur Ice 6410f52c9c ListSpawnedBots converted to QueryDatabase 2014-09-03 17:36:59 -07:00
Arthur Ice 7ae14fffd0 GetBotList converted to QueryDatabase 2014-09-03 17:32:55 -07:00
Arthur Ice d213e3b106 GetGroupedBotsByGroupID converted to QueryDatabase 2014-09-03 17:26:51 -07:00
Arthur Ice ba612f91c7 LoadBot converted to QueryDatabase 2014-09-03 17:18:50 -07:00
Arthur Ice 8312a8cf3b GetBotIDByBotName converted to QueryDatabase 2014-09-03 17:11:06 -07:00
Arthur Ice 390dcc9a88 GetBotItemsCount converted to QueryDatabase 2014-09-03 17:07:11 -07:00
Arthur Ice cd1b45f0d6 GetBotItemBySlot converted to QueryDatabase 2014-09-03 17:04:21 -07:00
Arthur Ice b8caa5dc31 GetBotItems converted to QueryDatabase 2014-09-03 16:52:18 -07:00
Arthur Ice 53572b4d13 RemoveBotItemBySlot converted to QueryDatabase 2014-09-03 16:43:59 -07:00
Arthur Ice cf0c773002 SetBotItemInSlot converted to QueryDatabase 2014-09-03 16:40:31 -07:00
Arthur Ice 515fe8d9e5 DeleteBot converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 06d1bd632b SaveTimers converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 89f34246f0 LoadTimers converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 7d8e128b5f SaveStance converted to QueryDatabase 2014-09-03 16:31:08 -07:00
Arthur Ice 14c642a3f7 LoadStance converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice a67255475c DeletePetStats converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 04045dfc27 DeletePetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 510a51e564 DeletePetBuffs converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 54b2c50109 SavePetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice fe753f05df SavePetBuffs converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice ab76783f8b SavePetStats converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice 364a51b119 LoadPetItems converted to QueryDatabase 2014-09-03 16:31:07 -07:00
Arthur Ice a486db5e95 LoadPetBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice c8e7d9e005 LoadPetStats converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 93aa690a6d GetPetSaveId converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 87f1f78b67 LoadBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 0574a3db86 SaveBuffs converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 0178f3c9bb Save converted to QueryDatabase 2014-09-03 16:31:06 -07:00
Arthur Ice 9eb3907d45 IsBotNameValid converted to QueryDatabase 2014-09-03 16:31:06 -07:00
SecretsOTheP 891952eb79 Bot fixes for previous commit 2014-09-03 18:34:31 -04:00
SecretsOTheP e6a0b01f37 Identified the routines needed to augment items in RoF. Currently, only Insert and Remove are supported. Swap and Destroy do not work due to missing functions related to the cursor. 2014-09-03 18:25:21 -04:00
Arthur Ice 118c2a9db9 LoadAAs converted to QueryDatabase 2014-09-03 13:49:04 -07:00
SecretsOTheP 64c324a42b changelog.txt 2014-09-02 22:09:38 -04:00
SecretsOTheP f909e76260 Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-02 22:08:47 -04:00
SecretsOTheP b7dfdc5060 Oops. 2014-09-02 22:07:49 -04:00
Uleat e25239a50d Merge branch 'master' of https://github.com/EQEmu/Server 2014-09-02 21:20:06 -04:00
Uleat 76d3edc534 Changed #loc to report the same precision as /loc for Cartesians 2014-09-02 21:19:30 -04:00
SecretsOTheP 7301182b3e Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2014-09-02 21:18:30 -04:00
SecretsOTheP 832e5e90d1 Secrets: Identified OP_GuildPromote for RoF clients.
Secrets: Fixed promotion, demotion, transferring a leader and displaying of client ranks in the Rain of Fear client. The rain of fear client, as such, will only have 3 ranks like the other clients, but supports a theoretical 8 ranks later.
Secrets/Akkadius: Fixed an issue involving character name lookup in the new DB code.
2014-09-02 21:16:20 -04:00
Michael Cook (mackal) 7ddaabee30 Merge pull request #235 from addtheice/guild_mgr_patch
Fixed bug with loading failing on Guild bank areas
2014-09-02 16:11:05 -04:00
Arthur Dene Ice 41d57ddab6 Fixed bug with loading failing on Guild bank areas 2014-09-02 12:43:56 -07:00
Michael Cook (mackal) 8dd00f5288 Fix crash issue in zone/hate_list.cpp 2014-09-02 02:39:03 -04:00
Akkadius 0a9222e1ee - 2014-09-01 23:54:15 -05:00
Akkadius e0db3c0b60 Fixed Character select to be loaded from new character data tables 2014-09-01 22:17:06 -05:00
KimLS 15f217b594 Fixed non-conforming sql files. 2014-09-01 15:48:22 -07:00
Michael Cook (mackal) 8422178233 Fix issue with requesting an adventure 2014-09-01 02:58:52 -04:00
Uleat eebe902917 Script update for opcode_handlers.py - changes in file names. 2014-09-01 00:07:21 -04:00
KimLS 04dc593df9 Various bug fixes 2014-08-31 20:27:02 -07:00
Akkadius e0a99730e5 pp revert 2014-08-31 21:58:04 -05:00
Akkadius 6497bdf45a More stuff 2014-08-31 21:31:44 -05:00
Akkadius ca430e2494 Fix void Database::GetCharName(uint32 char_id, char* name)
Increased MAX_PP_SPELLBOOK to 720 for UF/RoF
Increased MAX_PP_MEMSPELL to 12
Implemented up to 12 spell slots
Fix for public_note default value in bool BaseGuildManager::DBSetGuild(uint32 charid, uint32 guild_id, uint8 rank)
Updated all CastSpell entries to use the appropriate slot type defines located now in zone/common.h
Fixed Guild Loading from character_data
Fixed #guild list
Refactored Merchantlist loading
Refactored Temp Merchantlist loading
Gutted most of dbasync

Added:
LoadCharacterSpellBook(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMemmedSpells(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLanguages(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterSpellSwap(uint32 character_id, uint32 spell_id, uint32 from_slot, uint32 to_slot);
SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);

Removed Zone::LoadTempMerchantData_result(MYSQL_RES* result)
Removed Zone::LoadMerchantData_result(MYSQL_RES* result)
Removed SharedDatabase::GetPlayerProfile
Removed SharedDatabase::SetPlayerProfile
Removed SharedDatabase::SetPlayerProfile_MQ
Removed Zone::DBAWComplete(uint8 workpt_b1, DBAsyncWork* dbaw) from zone.cpp
2014-08-31 17:52:43 -05:00
Akkadius f8439fd6e6 Made many adjustments to character load code.
Removed bool Client::FinishConnState2(DBAsyncWork* dbaw)
Removed all async character loads
Removed bool	GetAccountInfoForLogin
Removed bool	GetAccountInfoForLogin_result
Removed bool	GetCharacterInfoForLogin_result
Removed bool	GetCharacterInfoForLogin

Added:
bool	LoadCharacterFactionValues(uint32 character_id, faction_map & val_list);
bool	LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp);
bool	LoadCharacterSkills(uint32 character_id, PlayerProfile_Struct* pp);
2014-08-31 07:52:52 -05:00
Akkadius 8dda7ddd04 Added the following tables to player profile automatic conversion during world bootup:
`character_bind_home`;
`character_alternate_abilities`;
`character_currency`;
`character_data`;
`character_spells`;
`character_memmed_spells`;
`character_disciplines`;
2014-08-31 05:52:36 -05:00
Akkadius 5d8ea5752d Added automatic table creation in conversion process.
More will come when more tables are added
2014-08-31 03:23:42 -05:00
akkadius 4071d88290 At point of commit:
Basic character data, currency and AA are being loaded/saved from the database, currently working on the rest right now.
- Character blob removed from load for testing. Lots of cleanup yet to be done so don't judge code yet.

Saves:
- Two FULL saves when looting a corpse, this has been reduced to just currency saves on initial loot and trimmed to one save since AddToMoneyPP did it already
- Every time a player moves coin with any situation (Splits/Trades/Merchant/Skills/Bank Coin Exchange/Coin Moves), a full save is made, this is now just a currency save
- Every time a player skilled up at a skill vendor, a full blob save hit was made, this is not just a currency hit
2014-08-31 02:53:59 -05:00
Michael Cook (mackal) 11ed698642 (noudess) Merchants are more descriptive in their rejections 2014-08-30 01:38:49 -04:00
Arthur Ice 0996570b78 merge from upstream 2014-08-28 15:49:16 -07:00
KimLS ca84040a39 Crash fixes oh my 2014-08-28 03:47:28 -07:00
KimLS 467afc86af Merge branch 'master' of github.com:EQEmu/Server 2014-08-28 03:18:02 -07:00
KimLS 19271f90a4 Crash fixes 2014-08-28 03:17:47 -07:00
Arthur Ice 0a9732a267 LogMerchantTransaction converted to QueryDatabase 2014-08-28 00:10:55 -07:00
Arthur Ice 1bc06c9c24 LogPlayerMove converted to QueryDatabase 2014-08-28 00:05:28 -07:00
Arthur Ice e0acc937b3 LogPlayerDelete converted to QueryDatabase 2014-08-28 00:04:20 -07:00
Arthur Ice 3a10a0129a LogPlayerNPCKill converted to QueryDatabase 2014-08-27 23:53:37 -07:00
Arthur Ice 18dbcf16cc LogPlayerHandin converted to QueryDatabase 2014-08-27 23:52:36 -07:00
Arthur Ice bed8dc7d34 LogPlayerTrade converted to QueryDatabase 2014-08-27 23:52:35 -07:00
Arthur Ice a0fc9844fd AddSpeech converted to QueryDatabase 2014-08-27 23:21:09 -07:00
Michael Cook (mackal) 9d6dc47cf4 Fix crash with MySQLRequestResult::ErrorMessage() 2014-08-28 02:15:37 -04:00
Michael Cook d42d77d3ef Merge pull request #233 from addtheice/master
Fixed crash on expire mail success, messages where switched accidentally
2014-08-28 02:13:27 -04:00
Arthur Ice 9041891557 Fixed crash on expire mail success, messages where switched accidentally 2014-08-27 22:57:03 -07:00
akkadius dedd1fc70d NPC::ModifyNPCStat function bloat cleanup 2014-08-27 14:26:36 -05:00
Akkadius 5cf748d135 Initial work 2014-08-27 09:55:39 -05:00
Arthur Ice 9ddb56088e merge from master 2014-08-26 18:49:15 -07:00
Alex 9f4167a65c Merge pull request #230 from addtheice/RunQueryToDatabaseQuery_zone_guild_mgr
Run query to database query zone guild mgr
2014-08-26 17:36:46 -07:00
Alex 085b021587 Merge pull request #226 from addtheice/RunQueryToDatabaseQuery_zone_spawngroup
Run query to database query zone spawngroup
2014-08-26 17:36:17 -07:00
Alex 5a65fd4207 Merge pull request #227 from addtheice/RunQueryToDatabaseQuery_zone_spawn2
Run query to database query zone spawn2
2014-08-26 17:36:03 -07:00
Alex 0f321b3a69 Merge pull request #228 from addtheice/RunQueryToDatabaseQuery_zone_client_packet
Run query to database query zone client packet
2014-08-26 17:35:51 -07:00
Alex 53c7b789f2 Merge pull request #229 from KayenEQ/Development
Added new param  to special attack NPC_NO_CHASE
2014-08-26 17:35:36 -07:00
Alex 850ea7789e Merge pull request #225 from addtheice/RunQueryToDatabaseQuery_zone_spells
SpellGlobalCheck converted to QueryDatabase
2014-08-26 17:35:21 -07:00
Alex c3a3dc19a7 Merge pull request #224 from addtheice/RunQueryToDatabaseQuery_zone_zone
LoadStaticZonePoints converted to QueryDatabase
2014-08-26 17:35:10 -07:00
Alex 2606592f32 Merge pull request #223 from addtheice/RunQueryToDatabaseQuery_zone_doors
Run query to database query zone doors
2014-08-26 17:34:53 -07:00
Alex 5c3791631a Merge pull request #221 from addtheice/RunQueryToDatabaseQuery_ucs_database
Run query to database query ucs database
2014-08-26 17:34:36 -07:00
Alex 4c9108a906 Merge pull request #210 from addtheice/RunQueryToDatabaseQuery_zone_waypoints
Run query to database query zone waypoints
2014-08-26 17:34:23 -07:00
Uleat efbcaf6f64 Merge pull request #231 from EQEmu/trade_stacking
'Smart' Trade Transfers
2014-08-26 19:04:01 -04:00
Uleat 18a4f831be Tweaked QS code for Client::FinishTrade() and QueryServ handlers. 2014-08-26 06:37:40 -04:00
KimLS 6597967acd Changed void* to EQEmu::Any in quest interface. Been meaning to change from void* for a while to a structure that data hides instead. 2014-08-25 22:59:52 -07:00
KimLS 24825677dc Merge branch 'master' of github.com:EQEmu/Server 2014-08-25 22:31:15 -07:00
KimLS 70d5983562 Added eqemu::any 2014-08-25 22:31:02 -07:00
Uleat d4a9fed45e Added QS code to Client::FinishTrade() 2014-08-25 22:29:00 -04:00
Arthur Ice a6b923a22e UpdateItemQuantity converted to QueryDatabase 2014-08-25 15:10:46 -07:00
Arthur Ice 1e87086471 DeleteItem converted to QueryDatabase 2014-08-25 12:43:14 -07:00
Arthur Ice c3fdbfe904 SetPermissions converted to QueryDatabase 2014-08-25 12:33:09 -07:00
Arthur Ice 00852063c2 Promote converted to QueryDatabase 2014-08-25 12:15:06 -07:00
KayenEQ 44dcf7af7d Merge git://github.com/EQEmu/Server into Development 2014-08-25 09:23:23 -04:00
Uleat d525d040fe Merge branch 'master' of https://github.com/EQEmu/Server into trade_stacking 2014-08-24 23:40:15 -04:00
Michael Cook (mackal) 67a774dd9b Remove extra c_str() non-sense now that the bug is fixed 2014-08-24 22:28:37 -04:00
Uleat ff7ff658e0 Merge branch 'master' of https://github.com/EQEmu/Server into trade_stacking
Conflicts:
	changelog.txt
2014-08-24 21:38:01 -04:00
Uleat 6100da75c5 Merge branch 'master' of https://github.com/EQEmu/Server into shutdown_crash 2014-08-24 19:59:34 -04:00
KimLS a612c3c006 Idiot kls missed a file 2014-08-24 16:30:02 -07:00
KimLS 412835d7fa Basic string tests, plus fix for StringFormat returning a std::string that was just very subtley malformed. 2014-08-24 16:26:51 -07:00
Uleat 6a4f7466f0 Merge branch 'master' of https://github.com/EQEmu/Server into shutdown_crash
Conflicts:
	changelog.txt
2014-08-24 19:24:07 -04:00
KayenEQ b3ea7ecd0d Added param to special attack NPC_NO_CHASE
Param 2 = If set will disable LOS check
2014-08-24 19:11:41 -04:00
Arthur Ice 50e6d0d256 Load converted to QueryDatabase 2014-08-24 16:03:48 -07:00
Arthur Ice f948786f6a Handle_OP_GMSearchCorpse converted to QueryDatabase 2014-08-24 14:21:33 -07:00
Arthur Ice 4d0179d525 Handle_OP_SetStartCity converted to QueryDatabase 2014-08-24 14:13:06 -07:00
Arthur Ice c851cd3f12 Handle_OP_ItemLinkClick converted to QueryDatabase 2014-08-24 14:06:52 -07:00
Arthur Ice b6875564d4 GetCondition converted to QueryDatabase 2014-08-24 13:50:23 -07:00
Arthur Ice 0240c61952 LoadSpawnConditions converted to QueryDatabase 2014-08-24 13:31:55 -07:00
Arthur Ice 7864a5285d LoadDBEvent converted to QueryDatabase 2014-08-24 13:19:30 -07:00
Arthur Ice 538921701c UpdatedDBCondition converted to QueryDatabase 2014-08-24 13:19:30 -07:00
Arthur Ice 3cf4d4af1b UpdateDBEvent converted to QueryDatabase 2014-08-24 13:11:17 -07:00
Arthur Ice c70c7e13ec CreateSpawn2 converted to QueryDatabase 2014-08-24 13:07:15 -07:00
Arthur Ice 9980dfe80e LoadSpawn2 converted to QueryDatabase 2014-08-24 13:03:45 -07:00
Arthur Ice 42a51eb373 PopulateZoneSpawnList converted to QueryDatabase 2014-08-24 13:00:39 -07:00
Arthur Ice 932dd836d0 LoadSpawnGroupsByID converted to QueryDatabase 2014-08-24 12:54:06 -07:00
Arthur Ice adf36bf912 LoadSpawnGroups converted to QueryDatabase 2014-08-24 12:46:02 -07:00
Arthur Ice e7ef4b5484 SpellGlobalCheck converted to QueryDatabase 2014-08-24 12:37:44 -07:00
Arthur Ice 3d1521857e LoadStaticZonePoints converted to QueryDatabase 2014-08-24 12:21:16 -07:00
Arthur Ice 9707b53df2 LoadDoors converted to QueryDatabase 2014-08-24 12:14:28 -07:00
Arthur Ice 5d6d489889 GetDoorsDBCountPlusOne converted to QueryDatabase 2014-08-24 12:08:39 -07:00
Arthur Ice 8f4e2e99db GetDoorsCountPlusOne converted to QueryDatabase 2014-08-24 12:04:15 -07:00
Arthur Ice 377c6a87a2 GetDoorsCount converted to QueryDatabase 2014-08-24 11:53:28 -07:00
Alex b36cc3ab08 Merge pull request #209 from addtheice/RunQueryToDatabaseQuery_zone_tribute
Run query to database query zone tribute
2014-08-24 11:18:38 -07:00
Alex 339b8e37a6 Merge pull request #208 from addtheice/RunQueryToDatabaseQuery_zone_trap
Run query to database query zone trap
2014-08-24 11:18:25 -07:00
Alex 8f3e9b4a7a Merge pull request #218 from KayenEQ/Development
Implemented NPC special ability 40 'NPC_CHASE_DISTANCE'
2014-08-24 11:17:52 -07:00
akkadius 633583c266 Created character_lookup table for applications that mirrors all character_ table fields minus blob fields for application lookups
- A 2.4GB character_ table will take 7 seconds to query on a SSD versus .1s on the character_lookup table
	- This also causes applications like Magelo to burst reads of the entire character table because of the blob fields that come with the reads, as much as 500-600MB/s even if a indexed id filter is provided
	- This field is synchronized on player save and has 0.001s DB hit
	- When we split out from the blob, ideally this table can be removed, but it really does no harm in mirroring data when a 2.6GB character table mirrors everything subtracting blob data down to 8MB
	- Required SQL: utils\sql\git\required\2014_08_24_character_lookup.sql
2014-08-24 08:52:14 -05:00
akkadius 3b048ee8a2 Character creation process crash fix (world) and query cleanup 2014-08-24 07:13:15 -05:00
Uleat 52ae78709b First attempt at fixing zone shutdown crashes. (Mob timer processing accessing released resources.) 2014-08-24 05:42:43 -04:00
Arthur Ice dec290ba96 Merge branch 'master' of git://github.com/EQEmu/Server into RunQueryToDatabaseQuery_ucs_database 2014-08-24 02:07:19 -07:00
akkadius cef1dfd0c0 Query Fix for SendQuery (Temporary) 2014-08-24 02:50:39 -05:00
Arthur Ice 3262bee6c5 ExpeditionSay converted to QueryDatabase 2014-08-23 23:26:45 -07:00
Arthur Ice 2dbd616725 SetAccountFlag converted to QueryDatabase 2014-08-23 23:23:26 -07:00
Arthur Ice eb98563fa1 LoadAccountFlags converted to QueryDatabase 2014-08-23 23:20:55 -07:00
Arthur Ice 7f92e96ae7 TryReward converted to QueryDatabase 2014-08-23 23:15:49 -07:00
Arthur Ice a48138dfd6 SendRewards converted to QueryDatabase 2014-08-23 23:05:58 -07:00
Michael Cook (mackal) 0b486b3f76 strlen to std::string::length
Minor style nits!
2014-08-24 02:02:42 -04:00
Arthur Ice 46980e5260 DiscoverItem converted to QueryDatabase 2014-08-23 22:59:58 -07:00
Arthur Ice 44f9e5495e IsDiscovered converted to QueryDatabase 2014-08-23 22:59:53 -07:00
Arthur Ice 97f59282cf KeyRingAdd converted to QueryDatabase 2014-08-23 22:49:27 -07:00
Michael Cook (mackal) b112dfe860 Fix gcc compile error 2014-08-24 01:48:29 -04:00
Arthur Ice 2a4a5b1beb KeyRingLoad converted to QueryDatabase 2014-08-23 22:46:29 -07:00
Arthur Ice 232d61b983 GetFriendAndIgnore converted to QueryDatabase 2014-08-23 22:34:14 -07:00
akkadius 4e10b77980 2nd Nix fix 2014-08-24 00:28:45 -05:00
Arthur Ice c1469a3a8e RemoveFriendOrIgnore converted to QueryDatabase 2014-08-23 22:22:49 -07:00
Arthur Ice 9d5f427f57 AddFriendOrIgnore converted to QueryDatabase 2014-08-23 22:20:16 -07:00
akkadius cdd1e17348 Cosmetic log fix from merge 2014-08-24 00:17:31 -05:00
Arthur Ice 20e978b676 ExpiredMail converted to QueryDatabase 2014-08-23 22:16:47 -07:00
akkadius 163906e0f0 Nix fix 2014-08-24 00:09:09 -05:00
Arthur Ice c9bd662b57 SetMessageStatus converted to QueryDatabase 2014-08-23 22:07:04 -07:00
Arthur Ice 8529384b00 SendMail converted to QueryDatabase 2014-08-23 22:01:00 -07:00
akkadius 7f89191ffc Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'
Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
	intensive or metric based logging to a remote server process that could exist on another server entirely
Implemented Player Event Logging Types (Go to table `qs_player_events`):
		1 = Player_Log_Quest,
		2 = Player_Log_Zoning,
		3 = Player_Log_Deaths,
		4 = Player_Log_Connect_State,
		5 = Player_Log_Levels,
		6 = Player_Log_Keyring_Addition,
		7 = Player_Log_QGlobal_Update,
		8 = Player_Log_Task_Updates,
		9 = Player_Log_AA_Purchases,
		10 = Player_Log_Trade_Skill_Events,
		11 = Player_Log_Issued_Commands,
		12 = Player_Log_Money_Transactions,
		13 = Player_Log_Alternate_Currency_Transactions,
		- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
Changed all QS Error related logging to 'QUERYSERV__ERROR'
(Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
Implemented Perl Quest objects (LUA still needed to be exported):
	- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
	- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
Added MySQL Tables:
	- `qs_player_aa_rate_hourly`
	- `qs_player_events`
	- Source table structures from:
		- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
		To get the complete QueryServ schema, source from here:
		- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
Added rules for each logging type, source rules here with them enabled by default:
	- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
Spawn related logging cleanup
General code cleanup
Added queryserv.cpp and queryserv.h with QueryServ class
2014-08-23 23:59:20 -05:00
Arthur Ice aaf5f8c930 SendBody converted to QueryDatabase 2014-08-23 21:52:07 -07:00
Arthur Ice 2bdc44dfb2 SendHeaders converted to QueryDatabase 2014-08-23 21:48:14 -07:00
Arthur Ice 6e7136ea18 SetChannelOwner converted to QueryDatabase 2014-08-23 21:38:57 -07:00
Arthur Ice 7a507e8d1e SetChannelPassword converted to QueryDatabase 2014-08-23 21:34:27 -07:00
Arthur Ice 76fdfa87c1 LoadChatChannels converted to QueryDatabase 2014-08-23 21:31:26 -07:00
Arthur Ice 19486bac0d GetVariable converted to QueryDatabase 2014-08-23 21:27:18 -07:00
Arthur Ice de47755320 FindCharacter converted to QueryDatabase 2014-08-23 21:24:54 -07:00
Arthur Ice 6b90f883cd VerifyMailKey converted to QueryDatabase 2014-08-23 21:20:07 -07:00
Arthur Ice 5c640b2d40 FindAccount converted to QueryDatabase 2014-08-23 21:16:27 -07:00
Arthur Ice a568a6f194 GetAccountStatus converted to QueryDatabase 2014-08-23 21:10:30 -07:00
KayenEQ 85df09b3f2 Implemented NPC special ability 40 'NPC_CHASE_DISTANCE'
Param 0: Sets max distance you need to be away from an npc for it to chase you.
Param 1: Sets min distance you need to be from npc for it to chase you.
Usage: Ideally used with ranged attack npcs / casters who you DO NOT WANT
to chase you unless you get too close or too far or out of sight.
2014-08-23 03:21:36 -04:00
JJ 16d47a2c47 Revert accident in 089360a3a5. Looks like it was meant for 7-10 instead of 4-10. 2014-08-22 22:28:40 -04:00
Uleat 9a5d2d2bc5 Trade Stacking: BETA 2014-08-22 20:48:11 -04:00
KimLS 3b16c86007 Fix for aa effect loading. 2014-08-22 14:50:13 -07:00
Alex 7c451f8170 Merge pull request #207 from addtheice/RunQueryToDatabaseQuery_zone_zoning
Run query to database query zone zoning
2014-08-22 13:48:17 -07:00
Alex 2e1b75e95b Merge pull request #203 from addtheice/RunQueryToDatabaseQuery_zone_pets
Run query to database query zone pets
2014-08-22 13:47:59 -07:00
Alex 1cd5970649 Merge pull request #201 from addtheice/RunQueryToDatabaseQuery_zone_mob
Run query to database query zone mob
2014-08-22 13:47:48 -07:00
Alex 1bccdf57ee Merge pull request #200 from addtheice/RunQueryToDatabaseQuery_zone_merc
Run query to database query zone merc
2014-08-22 13:47:29 -07:00
Alex d03232ce1b Merge pull request #199 from addtheice/RunQueryToDatabaseQuery_zone_horse
Run query to database query zone horse
2014-08-22 13:47:07 -07:00
KimLS ba6a3ac94b Merge branch 'KayenEQ-Development' 2014-08-22 00:22:21 -07:00
KimLS 85bd837a66 Merge branch 'Development' of https://github.com/KayenEQ/Server into KayenEQ-Development 2014-08-22 00:21:11 -07:00
KimLS 264024e8fc Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_zone' 2014-08-22 00:19:53 -07:00
KimLS 0d09f5d536 Merging zone 2014-08-22 00:19:43 -07:00
KimLS 840f936c2f Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_AA' 2014-08-22 00:18:29 -07:00
KimLS ca380edfc8 Merge branch 'RunQueryToDatabaseQuery_zone_AA' of https://github.com/addtheice/Server into addtheice-RunQueryToDatabaseQuery_zone_AA 2014-08-22 00:17:53 -07:00
KimLS 389fa922e5 Merge branch 'addtheice-RunQueryToDatabaseQuery_zone_petitions' 2014-08-22 00:16:20 -07:00
KimLS f9423b018c Merging petitions. 2014-08-22 00:16:04 -07:00
Alex 05ccab87f3 Merge pull request #217 from KimLS/master
Renamed a bunch of files.
2014-08-22 00:07:10 -07:00
KimLS 27dec16551 Missed a file, thanks NTFS 2014-08-21 23:55:04 -07:00
KimLS 07a2cbe9a5 Renamed zone files 2014-08-21 23:46:01 -07:00
KimLS 4821ed79fb More renames, world should be done 2014-08-21 23:30:09 -07:00
KimLS 5bf49d2ef9 More renames 2014-08-21 23:05:21 -07:00
KimLS cd0824ee71 Moved some around, more renames 2014-08-21 22:43:33 -07:00
KayenEQ 8394cc9e2b Fix for NPC ranged attacks not allowing for multiple hits
if set by special attack 11, also changed paramater 0 (which was
incorrectly set as both 'amount of attacks' and 'min range'
0 = amount attacks
4 = min attack range

Fix to spell directional effect targeting.
2014-08-22 00:35:14 -04:00
KimLS 504a8b19ce Missed Mutex.h 2014-08-21 19:36:50 -07:00
KimLS 0b63eaa25d Got rid of socket_server, why the heck is it still around 2014-08-21 19:34:45 -07:00
KimLS 7fc21b9e3a Tons of renames 2014-08-21 19:33:02 -07:00
Arthur Ice 8369570b50 GetAccountInfoForLogin_result converted to MySQLRequestResult 2014-08-21 17:35:04 -07:00
KimLS e429260763 Missed eq stream factory 2014-08-21 17:30:00 -07:00
KimLS 06f18225ce Renaming headers is hard work 2014-08-21 17:26:32 -07:00
Arthur Ice 9ff0c414c1 LoadFactionData converted to QueryDatabase 2014-08-21 17:17:27 -07:00
Arthur Ice 850d1e7c28 SetCharacterFactionLevel converted to QueryDatabase 2014-08-21 17:08:31 -07:00
Arthur Ice 2df823d2db LoadFactionValues converted to QueryDatabase 2014-08-21 17:04:08 -07:00
Arthur Ice 2e84781594 LoadFactionValues_result converted to MySQLRequestResult 2014-08-21 17:00:50 -07:00
KimLS 405884f47d More file renames. 2014-08-21 16:59:32 -07:00
KimLS 6457c00548 Renaming files 2014-08-21 16:44:02 -07:00
Michael Cook (mackal) 2e80e56af1 Fix dangling else statements 2014-08-21 19:17:40 -04:00
Michael Cook (mackal) 0ad4ffe33f Fix error in EQRawApplicationPacket::EQRawApplicationPacket() 2014-08-21 19:02:29 -04:00
Arthur Ice 833227f7f6 LoadPetInfo converted to QueryDatabase 2014-08-21 15:58:11 -07:00
Arthur Ice e731cfd48d RemoveTempFactions converted to QueryDatabase 2014-08-21 15:32:20 -07:00
Arthur Ice cf7574d9b8 SavePetInfo converted to QueryDatabase 2014-08-21 15:30:27 -07:00
Michael Cook (mackal) 16f112a281 Fix some if checks in Mob::CalcFocusEffect() 2014-08-21 18:10:40 -04:00
Michael Cook (mackal) 69944d907d Fix compiler warning in zone/inventory.cpp 2014-08-21 17:59:52 -04:00
Michael Cook (mackal) 663dbf9fc2 Fix incorrect array size on A/B/C/DStackers 2014-08-21 17:56:32 -04:00
Michael Cook (mackal) a4a8a1aba5 Clean up some compiler warnings with Stop_Return 2014-08-21 17:54:49 -04:00
Alex fb84f7f84f Merge pull request #198 from addtheice/RunQueryToDatabaseQuery_zone_forage
Run query to database query zone forage
2014-08-21 14:05:32 -07:00
Alex 1c295453da Merge pull request #197 from addtheice/RunQueryToDatabaseQuery_world_zoneserver
Run query to database query world zoneserver
2014-08-21 14:04:50 -07:00
Alex 8199821343 Merge pull request #196 from addtheice/RunQueryToDatabaseQuery_EQLConfig
Run query to database query eql config
2014-08-21 14:04:32 -07:00
Alex b59e856b33 Merge pull request #194 from addtheice/RunQueryToDatabaseQuery_Object
Run query to database query object
2014-08-21 14:04:06 -07:00
Alex f81acf23a7 Merge pull request #195 from addtheice/RunQueryToDatabaseQuery_QGlobals
Run query to database query q globals
2014-08-21 14:03:57 -07:00
Alex 27eba2e6e9 Merge pull request #214 from KinglyKrab/master
Adds new column to 'merchantlist' table.
2014-08-21 14:02:27 -07:00
Arthur Ice 10d384f131 LoadBuffs converted to QueryDatabase 2014-08-21 13:54:18 -07:00
Arthur Ice 00b8c8ce47 SaveBuffs converted to QueryDatabase 2014-08-21 13:42:02 -07:00
Arthur Ice cab43f41be UpdateAltCurrencyValues converted to QueryDatabase 2014-08-21 13:36:01 -07:00
Arthur Ice fc0d589f12 LoadAltCurrencyValues converted to QueryDatabase 2014-08-21 13:34:19 -07:00
Arthur Ice 743175d4ff InsertDoor converted to QueryDatabase 2014-08-21 13:26:38 -07:00
Arthur Ice b497b07fed QGlobalPurge converted to QueryDatabase 2014-08-21 13:22:21 -07:00
Arthur Ice aab5ed2267 ListAllInstances converted to QueryDatabase 2014-08-21 13:19:37 -07:00
Arthur Ice 46c9fe46e9 UpdateKarma converted to QueryDatabase 2014-08-21 13:09:43 -07:00
Arthur Ice e8c92c6fcc GetKarma converted to QueryDatabase 2014-08-21 13:09:43 -07:00
Arthur Ice 765eaf7f4f getZoneShutDownDelay converted to QueryDatabase 2014-08-21 12:51:09 -07:00
Arthur Ice 699c8cc1eb LoadBlockedSpells converted to QueryDatabase 2014-08-21 12:46:52 -07:00
Arthur Ice 5839921e08 GetBlockedSpellsCount converted to QueryDatabase 2014-08-21 12:39:38 -07:00
Arthur Ice a3bde6e1f1 RaidGroupCount converted to QueryDatabase 2014-08-21 12:35:33 -07:00
Arthur Ice 0ece5bf178 GroupCount converted to QueryDatabase 2014-08-21 12:30:06 -07:00
Arthur Ice fbefad9eaf RefreshGroupFromDB converted to QueryDatabase 2014-08-21 12:25:32 -07:00
Arthur Ice 351a7a52fe GetCharacterInfoForLogin removed, unused, unsupported 2014-08-21 12:01:22 -07:00
Arthur Ice 8441ffda31 GetAccountInfoForLogin removed, unused, unsupported 2014-08-21 11:52:15 -07:00
Kinglykrab 8b19c76e89 Adds new column to 'merchantlist' table.
Adds 'probability' after 'classes_required', valid values are 0 to 100.
2014-08-21 04:05:45 -04:00
Arthur Ice e79747c919 SetZoneTZ converted to QueryDatabase 2014-08-20 23:26:41 -07:00
Arthur Ice 8525d819c1 GetZoneTZ converted to QueryDatabase 2014-08-20 23:13:59 -07:00
Arthur Ice fe600bb084 Removed Get/SetServerFilters, unused and unsupported 2014-08-20 23:07:19 -07:00
Arthur Ice babaff1985 GetUseCFGSafeCoords converted to QueryDatabase 2014-08-20 22:14:40 -07:00
Arthur Ice 909ca5440d UpdateZoneSafeCoords converted to QueryDatabase 2014-08-20 22:11:14 -07:00
Arthur Ice e25f64d03b SaveMerchantTemp converted to QueryDatabase 2014-08-20 22:06:56 -07:00
Arthur Ice 2df66bd625 GetGridType converted to QueryDatabase 2014-08-20 22:04:40 -07:00
Arthur Ice 2028a5846c LoadMercEquipment converted to QueryDatabase 2014-08-20 22:00:00 -07:00
Arthur Ice 2fd2cd4cec DeleteMerc converted to QueryDatabase 2014-08-20 21:54:28 -07:00
Arthur Ice 17b175daa4 LoadMercBuffs converted to QueryDatabase 2014-08-20 21:46:23 -07:00
Arthur Ice 5cabe109da SaveMercBuffs converted to QueryDatabase 2014-08-20 21:30:51 -07:00
Arthur Ice c6e82448b6 SaveMerc converted to QueryDatabase 2014-08-20 21:17:17 -07:00
Alex 8384ab9d2f Merge pull request #193 from addtheice/RunQueryToDatabaseQuery_MobAI
Run query to database query mob ai
2014-08-20 21:04:27 -07:00
Arthur Ice b846d89b5d LoadCurrentMerc converted to QueryDatabase 2014-08-20 21:04:00 -07:00
Alex d5a5635a14 Merge pull request #192 from addtheice/RunQueryToDatabaseQuery_EQW
Run query to database query eqw
2014-08-20 21:03:44 -07:00
Alex f8dc8be6e6 Merge pull request #191 from addtheice/RunQueryToDatabaseQuery_AdventureManager
Run query to database query adventure manager
2014-08-20 21:03:23 -07:00
Alex 5f9676d1a5 Merge pull request #190 from addtheice/RunQueryToDatabaseQuery_Adventure
Run query to database query adventure
2014-08-20 21:03:01 -07:00
Alex 964c4c83df Merge pull request #189 from addtheice/RunQueryToDatabaseQuery_lfguild
Run query to database query lfguild
2014-08-20 21:02:20 -07:00
Arthur Ice 322cea7342 LoadMercInfo converted to QueryDatabase 2014-08-20 20:58:11 -07:00
Arthur Ice 205e1d404e GetMercType converted to QueryDatabase 2014-08-20 20:50:36 -07:00
Arthur Ice 9769a96ebd GetNPCType converted to QueryDatabase 2014-08-20 20:21:39 -07:00
Arthur Ice 74d3192c2e NoRentExpired converted to QueryDatabase 2014-08-20 19:46:44 -07:00
Arthur Ice 41769a3fa8 UpdateBuyLine converted to QueryDatabase 2014-08-20 19:28:53 -07:00
Arthur Ice a7efa9d4e4 RemoveBuyLine converted to QueryDatabase 2014-08-20 19:20:32 -07:00
Arthur Ice 9ed69999a5 AddBuyLine converted to QueryDatabase 2014-08-20 19:02:28 -07:00
Arthur Ice e19a59b269 DeleteBuyLines converted to QueryDatabase 2014-08-20 18:59:17 -07:00
Arthur Ice d234016224 DeleteTraderItem converted to QueryDatabase 2014-08-20 18:55:42 -07:00
Arthur Ice c160d6d929 DeleteTraderItem converted to QueryDatabase 2014-08-20 18:53:05 -07:00
Arthur Ice 62ad60b4ad UpdateTraderItemPrice converted to QueryDatabase 2014-08-20 18:50:10 -07:00
Arthur Ice d44d7c6bbd UpdateTraderItemCharges converted to QueryDatabase 2014-08-20 18:42:25 -07:00
Arthur Ice efd97bad14 SaveTraderItem converted to QueryDatabase 2014-08-20 18:38:57 -07:00
Arthur Ice bc884f5daf LoadSingleTraderItem converted to QueryDatabase 2014-08-20 18:35:54 -07:00
Arthur Ice 0f47b73a64 LoadTraderItemWithCharges converted to QueryDatabase 2014-08-20 18:22:31 -07:00
Arthur Ice e9c6e96452 LoadTraderItem converted to QueryDatabase 2014-08-20 18:22:18 -07:00
Arthur Ice 09713311f6 DeleteWorldContainer converted to QueryDatabase 2014-08-20 18:16:45 -07:00
Arthur Ice c666d9c553 SaveWorldContainer converted to QueryDatabase 2014-08-20 18:03:02 -07:00
Arthur Ice 3777e8d1ce LoadWorldContainer converted to QueryDatabase 2014-08-20 17:57:44 -07:00
Arthur Ice e60658c684 GetEventLogs converted to QueryDatabase 2014-08-20 17:51:52 -07:00
Arthur Ice 046da9efae SetSpecialAttkFlag converted to QueryDatabase 2014-08-20 17:46:12 -07:00
Arthur Ice 09332f6c26 UpdateBug converted to QueryDatabase 2014-08-20 17:43:16 -07:00
Arthur Ice ce507d891a UpdateBug converted to QueryDatabase 2014-08-20 17:43:16 -07:00
Arthur Ice 96f122f901 logevents converted to QueryDatabase 2014-08-20 17:31:16 -07:00
Arthur Ice 3479525f39 UpdateSpawn2Status converted to QueryDatabase 2014-08-20 17:27:19 -07:00
Arthur Ice 4f9d4b0023 GetSpawnTimeLeft converted to QueryDatabase 2014-08-20 17:25:27 -07:00
Arthur Ice bcdfd32bc0 UpdateSpawn2Timeleft converted to QueryDatabase 2014-08-20 17:21:07 -07:00
Arthur Ice 693dde04e3 GetZoneCFG converted to QueryDatabase 2014-08-20 17:16:30 -07:00
Arthur Ice f1bb019933 SaveZoneCFG converted to QueryDatabase 2014-08-20 16:46:17 -07:00
Arthur Ice 5a6373c429 UpdateHotzone converted to QueryDatabase 2014-08-20 16:39:07 -07:00
Arthur Ice 19e04a1875 LoadTickItems converted to QueryDatabase 2014-08-20 16:34:35 -07:00
Arthur Ice 029314ec7f LoadNPCEmotes converted to QueryDatabase 2014-08-20 16:31:05 -07:00
Arthur Ice cee4a3f475 LoadAdventureFlavor converted to QueryDatabase 2014-08-20 16:27:12 -07:00
Arthur Ice 2bc58a97bc LoadAlternateCurrencies converted to QueryDatabase 2014-08-20 16:24:05 -07:00
Arthur Ice 2eb270376f LoadVeteranRewards converted to QueryDatabase 2014-08-20 16:20:46 -07:00
Arthur Ice 5e858678e9 LoadLDoNTrapEntries converted QueryDatabase 2014-08-20 16:15:55 -07:00
Arthur Ice 12a59853b5 LoadLDoNTraps converted to QueryDatabase 2014-08-20 16:08:20 -07:00
Arthur Ice 971c3f633f GetDecayTimes converted to QueryDatabase 2014-08-20 16:05:09 -07:00
Arthur Ice 826f7d0efd LoadMercSpells converted to QueryDatabase 2014-08-20 16:00:36 -07:00
Arthur Ice 5da5e9b5de LoadLevelEXPMods converted to QueryDatabase 2014-08-20 15:57:04 -07:00
Arthur Ice 7a3c05a41f LoadMercTemplates converted to QueryDatabase 2014-08-20 15:53:02 -07:00
Arthur Ice 01382e87a0 LoadNewMerchantData converted to QueryDatabase 2014-08-20 15:37:09 -07:00
Arthur Ice f0abaad84f LoadZoneObjects converted to QueryDatabase 2014-08-20 15:37:03 -07:00
Uleat 5946af88a6 Reworked Trade::AddEntity() to allow client-directed movement of stacked items (as close to 'stacking' as I can get it - see changelog.txt) 2014-08-20 18:30:19 -04:00
Arthur Ice fe718a81f3 GetHighestWaypoint converted to QueryDatabase 2014-08-20 15:14:36 -07:00
Arthur Ice 2f30488cd5 GetFreeGrid converted to QueryDatabase 2014-08-20 15:11:12 -07:00
Arthur Ice 8b69de46e9 AddWPForSpawn converted to QueryDatabase 2014-08-20 15:06:53 -07:00
Arthur Ice c466317082 DeleteWaypoint converted to QueryDatabase 2014-08-20 14:49:18 -07:00
Arthur Ice 06b0bd6da4 AddWP converted to QueryDatabase 2014-08-20 14:44:32 -07:00
Arthur Ice 334e29a6d6 ModifyGrid converted to QueryDatabase 2014-08-20 14:40:47 -07:00
Arthur Ice cab0beb77f AssignGrid converted to QueryDatabase 2014-08-20 14:32:04 -07:00
Arthur Ice 5f2db0d1cb GetWaypoints converted to QueryDatabase 2014-08-20 14:09:47 -07:00
Arthur Ice b654729383 GetGridType2 converted to QueryDatabase 2014-08-20 14:03:00 -07:00
Arthur Ice 5fec840f06 AssignWaypoints converted to QueryDatabase 2014-08-20 13:58:36 -07:00
Alex 1b6ccca709 Merge pull request #188 from addtheice/RunQueryToDatabaseQuery_rulesys
Run query to database query rulesys
2014-08-20 13:49:05 -07:00
Alex 957671e649 Merge pull request #187 from KinglyKrab/master
Renames spells_new fields.
2014-08-20 13:48:41 -07:00
Alex 79a9e393d2 Merge pull request #186 from addtheice/RunQueryToDatabaseQuery_client_files_import_main
Run query to database query client files import main
2014-08-20 13:48:24 -07:00
Alex 50c186b608 Merge pull request #185 from addtheice/RunQueryToDatabaseQuery_client_files_main
Run query to database query client files main
2014-08-20 13:47:43 -07:00
Alex 9054b93338 Merge pull request #183 from addtheice/RunQueryToDatabaseQuery_ptimer
Run query to database query ptimer
2014-08-20 13:46:43 -07:00
Alex cf1f03fd5b Merge pull request #181 from addtheice/RunQueryToDatabaseQuery_guild_base
Run query to database query guild base
2014-08-20 13:46:32 -07:00
Arthur Ice 7742273237 LoadTributes converted to QueryDatabase 2014-08-20 13:31:47 -07:00
Arthur Ice 536773db44 LoadTraps converted to QueryDatabase 2014-08-20 13:20:51 -07:00
Arthur Ice cf4145dad4 LoadZoneFlags converted to QueryDatabase 2014-08-20 13:02:27 -07:00
Arthur Ice bc90ab795b ClearZoneFlag converted to QueryDatabase 2014-08-20 12:55:53 -07:00
Arthur Ice 21ba9953f8 SetZoneFlag converted to QueryDatabase 2014-08-20 12:52:41 -07:00
Arthur Ice 1c87a6069a CountAAEffects converted to QueryDatabase 2014-08-20 12:48:10 -07:00
Arthur Ice 9867fdd4d2 CountAAs converted to QueryDatabase 2014-08-20 12:45:41 -07:00
Arthur Ice 64cd589ca3 FillAAEffects converted to QueryDatabase 2014-08-20 12:41:37 -07:00
Arthur Ice 110d22e775 GetAASkillVars converted to QueryDatabase 2014-08-20 12:37:02 -07:00
Arthur Ice 3bc582885b LoadAAs converted to QueryDatabase 2014-08-20 12:21:46 -07:00
Arthur Ice e33e8b713e GetTotalAALevels converted to QueryDatabase 2014-08-20 12:09:59 -07:00
Arthur Ice 4214cf47c2 LoadAAEffects converted to QueryDatabase 2014-08-20 12:05:57 -07:00
Arthur Ice 68115505f8 LoadAAEffects2 converted to QueryDatabase 2014-08-20 12:00:43 -07:00
Michael Cook (mackal) d87c95c1f8 Properly set '-std=c++0x' as a CXX_FLAGS
This fixes an issue with clang compiling C files.
(Note: this does not mean clang is supported yet)

Ideally, this should check the compiler for -std=c++11 support,
then check -std=c++0x if the previous failed, then error if that
fails as well.
2014-08-19 20:06:49 -04:00
Michael Cook cec990716f Merge pull request #204 from af4t/master
No BOTS compile error
2014-08-19 19:51:21 -04:00
af4t f22b26f80f Squashed commit of the following:
commit 5d074ea998
Author: Michael Cook <mcook@mackal.net>
Date:   Thu Jun 5 02:57:56 2014 -0400

    Update LS default entry in example config

commit e9c4613368
Merge: 3690f93 dd73b82
Author: KimLS <KLS@peqtgc.com>
Date:   Wed Jun 4 18:32:48 2014 -0700

    Merge branch 'master' into water_map_v2

commit 3690f93302
Author: KimLS <KLS@peqtgc.com>
Date:   Sat May 31 16:32:15 2014 -0700

    Fix for fear failing, removed #fear command because it was blank anyway, added a cmake command to change the default map/water/path directory

commit dd73b82ec2
Author: KimLS <KLS@peqtgc.com>
Date:   Tue May 27 16:16:06 2014 -0700

    Fix for a problem with global player quests and hasquestsub

commit 8a5405060f
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 17:39:16 2014 -0700

    Fix for string.h missing in water map

commit 83270d0983
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:10:23 2014 -0700

    Merge from master stuff

commit fd4343702f
Merge: 0483e8b 5af47c5
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:09:46 2014 -0700

    Merge branch 'master' into water_map_v2

commit 0483e8bd1b
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 16:08:02 2014 -0700

    Removed the logging now that the issue is resolved

commit 39cbdbd5c2
Author: KimLS <KLS@peqtgc.com>
Date:   Fri May 23 15:54:26 2014 -0700

    Debug logs for map, also can actually turn perl off on zone

commit 3a2ccd7521
Author: KimLS <KLS@peqtgc.com>
Date:   Wed May 21 17:30:54 2014 -0700

    Added loading of v2 regular maps, also #bestz will report water info even if a reg map failed to load.

commit 8c92271804
Author: KimLS <KLS@peqtgc.com>
Date:   Tue May 20 00:14:26 2014 -0700

    Initial v2 water map format.
2014-08-19 17:07:27 -04:00
akkadius 236d227319 Log merge fix 2014-08-19 10:58:22 -05:00
akkadius a5020a68f0 Implemented a Stop_Return feature (Accidental item handin prevention) that will be symmetrically used with plugin::return_items that I am currently running live testing on EZ before releasing to EQEmu. This does not hurt to have this in the source.
Fixed crash where 'attacker' validation is not being checked
Removed petition console spam that does not follow traditional logging and is useless
Made fix with SympatheticProcChances where it was checking for TempItem->Focus.Effect instead of TempItemAug->Focus.Effect
2014-08-19 10:55:29 -05:00
Arthur Ice c613f362a7 GetBasePetItems converted to QueryDatabase 2014-08-18 22:12:01 -07:00
Arthur Ice 977b28cb9c GetPoweredPetEntry converted to QueryDatabase 2014-08-18 22:02:35 -07:00
Arthur Ice 8b89beb02e MakePoweredPet converted to QueryDatabase 2014-08-18 21:57:29 -07:00
Arthur Ice 748748dda9 RefreshPetitionsFromDB converted to QueryDatabase 2014-08-18 21:46:46 -07:00
Arthur Ice 6364d2c31d UpdatePetitionToDB converted to QueryDatabase 2014-08-18 21:37:17 -07:00
Arthur Ice e618fe87bd DeletePetitionFromDB converted to QueryDatabase 2014-08-18 21:37:17 -07:00
Arthur Ice 4e71330508 InsertQuestGlobal converted to QueryDatabase 2014-08-18 21:16:11 -07:00
Arthur Ice c6091c4f27 DelGlobal converted to QueryDatabase 2014-08-18 21:13:20 -07:00
Arthur Ice 49d231f5dd LoadMercs converted to QueryDatabase 2014-08-18 21:06:04 -07:00
Arthur Ice e907ab4f3e LoadMercTypes converted to QueryDatabase 2014-08-18 21:01:27 -07:00
Arthur Ice 9814a6e5a2 BuildHorseType converted to QueryDatabase 2014-08-18 20:55:28 -07:00
Arthur Ice 65e865a550 GetZoneFishing converted to QueryDatabase 2014-08-18 19:23:40 -07:00
Arthur Ice 9cdf0a7a83 GetZoneForage converted to QueryDatabase 2014-08-18 19:23:39 -07:00
Uleat 43326c1804 Fix for perl scripts passing non-client objects to API handler for MovePC and MovePCInstance. [Fixes #127] 2014-08-18 22:13:15 -04:00
Arthur Ice e2d85337d0 Process converted to QueryDatabase 2014-08-18 18:55:09 -07:00
Arthur Ice c4f1f57f74 SetDynamicCount converted to QueryDatabase 2014-08-18 18:38:51 -07:00
Arthur Ice ab70427b7d DeleteStaticZone converted to QueryDatabase 2014-08-18 18:36:08 -07:00
Arthur Ice 0af394fb96 ChangeStaticZone converted to QueryDatabase 2014-08-18 18:34:15 -07:00
Arthur Ice e4320f98f8 BootStaticZone converted to QueryDatabase 2014-08-18 18:31:20 -07:00
Arthur Ice b5a46735df DeleteLauncher converted to QueryDatabase 2014-08-18 18:28:54 -07:00
Arthur Ice 352d46d2ee CreateLauncher converted to QueryDatabase 2014-08-18 18:25:26 -07:00
Arthur Ice b672475166 LoadSettings converted to QueryDatabase 2014-08-18 18:23:22 -07:00
Arthur Ice 7692793289 Consolidated LoadBy code into new LoadBy method 2014-08-18 18:10:28 -07:00
Arthur Ice 8d909ea8e2 LoadByGlobalContext converted to QueryDatabase 2014-08-18 17:58:51 -07:00
Kinglykrab f7781e6d1d Renames spells_new fields.
field191 => viral_targets
field192 => viral_timer
2014-08-18 20:58:31 -04:00
Arthur Ice 810553de2a LoadByZoneID converted to QueryDatabase 2014-08-18 17:56:36 -07:00
Arthur Ice c6b2b1da4e LoadByCharID converted to QueryDatabase 2014-08-18 17:53:05 -07:00
Arthur Ice 5234eb6fc8 LoadNPCByNPCID converted to QueryDatabase 2014-08-18 17:50:03 -07:00
Arthur Ice d8856a7bae DeleteObject converted to QueryDatabase 2014-08-18 17:37:57 -07:00
Arthur Ice 6ca5fb19f4 LoadGroundSpawns converted to QueryDatabase 2014-08-18 17:35:47 -07:00
Arthur Ice 4d83397506 UpdateObject converted to QueryDatabase 2014-08-18 17:29:19 -07:00
Arthur Ice 3720d9e50f AddObject converted to QueryDatabase 2014-08-18 17:21:27 -07:00
Arthur Ice d73449104a GetMaxNPCSpellsEffectsID converted to QueryDatabase 2014-08-18 17:00:37 -07:00
Arthur Ice 580f32c190 GetNPCSpellsEffects converted to QueryDatabase 2014-08-18 16:57:22 -07:00
Arthur Ice 65cc3a4b0a GetMaxNPCSpellsID converted to QueryDatabase 2014-08-18 16:40:45 -07:00
Arthur Ice 52344bfe24 GetNPCSpells converted to QueryDatabase 2014-08-18 16:34:27 -07:00
Arthur Ice 7b33ef67f2 ResolveBug converted to QueryDatabase 2014-08-18 16:17:07 -07:00
Arthur Ice 9270c45a5e GetBugDetails converted to QueryDatabase 2014-08-18 16:15:47 -07:00
Arthur Ice 34f051ab9a ListBugs converted to QueryDatabase 2014-08-18 16:13:11 -07:00
Arthur Ice a2280d1fe5 CountBugs converted to QueryDatabase 2014-08-18 16:10:39 -07:00
Arthur Ice 042613d234 LoadLeaderboardInfo converted to QueryDatabase 2014-08-18 16:06:20 -07:00
Arthur Ice 8b05eff179 LoadAdventureEntries converted to QueryDatabase 2014-08-18 16:05:22 -07:00
Arthur Ice fcb022b8ae ExpireEntries converted to QueryDatabase 2014-08-18 16:00:32 -07:00
Arthur Ice 41182de4f2 MoveCorpsesToGraveyard converted to QueryDatabase 2014-08-18 15:56:02 -07:00
Arthur Ice 37b45be6d8 LoadAdventureTemplate converted to QueryDatabase 2014-08-18 15:34:41 -07:00
Arthur Ice dd044ca453 ToggleGuild converted to QueryDatabase 2014-08-18 14:56:55 -07:00
Arthur Ice b234c67622 TogglePlayer converted to QueryDatabase 2014-08-18 14:52:38 -07:00
Arthur Ice 529408fca0 LoadDatabase converted to QueryDatabase 2014-08-18 14:45:54 -07:00
Arthur Ice 84e95d9a28 ListRulesets converted to QueryDatabase 2014-08-18 14:36:58 -07:00
Arthur Ice b439881f37 GetRulesetName converted to QueryDatabase 2014-08-18 14:33:27 -07:00
Arthur Ice a75b53f9b0 _FindOrCreateRuleset converted to QueryDatabase 2014-08-18 14:30:13 -07:00
Arthur Ice 85ebb32176 GetRulesetID converted to QueryDatabase 2014-08-18 14:24:58 -07:00
Arthur Ice 6450b08fd6 _SaveRules converted to QueryDatabase 2014-08-18 14:21:12 -07:00
Arthur Ice 0353dcb28c LoadRules converted to QueryDatabase 2014-08-18 14:18:21 -07:00
Arthur Ice 230296e777 ImportBaseData converted to QueryDatabase 2014-08-18 14:05:59 -07:00
Arthur Ice ad987c5531 ImportSkillCaps converted to QueryDatabase 2014-08-18 14:05:06 -07:00
Arthur Ice 503a2c0d04 ImportSpells converted to QueryDatabase 2014-08-18 14:03:53 -07:00
Arthur Ice b7bcd13cbd GetSpellColumns converted to QueryDatabase 2014-08-18 14:02:16 -07:00
Arthur Ice 446da590d8 ExportBaseData converted to QueryDatabase 2014-08-18 13:50:16 -07:00
Arthur Ice 24732eff88 GetSkill converted to QueryDatabase 2014-08-18 13:46:05 -07:00
Arthur Ice b98f8c6262 SkillUsable converted to QueryDatabase 2014-08-18 13:42:25 -07:00
Arthur Ice 11c327e1d7 ExportSpells converted to QueryDatabase 2014-08-18 13:30:55 -07:00
Arthur Ice 1253fa2a25 ClearOffline converted to QueryDatabase 2014-08-18 13:14:46 -07:00
Arthur Ice f052c6004a Clear converted to QueryDatabase 2014-08-18 13:12:52 -07:00
Arthur Ice 3cde8d9af8 Load converted to QueryDatabase 2014-08-18 13:08:05 -07:00
Arthur Ice cbed61db7e Clear converted to QueryDatabase 2014-08-18 13:08:05 -07:00
Arthur Ice e360ba5209 Store converted to QueryDatabase 2014-08-18 12:35:16 -07:00
Arthur Ice fd8dc1214c Load converted to QueryDatabase 2014-08-18 12:34:14 -07:00
Arthur Ice 327fa38232 GetCharInfo converted to QueryDatabase 2014-08-17 12:30:53 -07:00
Arthur Ice 845ed720b3 GetCharInfo converted to QueryDatabase 2014-08-17 12:27:08 -07:00
Arthur Ice ea0c8f86fe GetEntireGuild converted to QueryDatabase 2014-08-17 12:21:57 -07:00
Arthur Ice 76f727b7ff ProcessGuildMember converted to use MySQLRequestRow 2014-08-17 12:21:05 -07:00
Arthur Ice 449d5f9358 Removed large commented out section 2014-08-17 12:13:56 -07:00
Arthur Ice b2ca66267e DoesAccountContainAGuildLeader converted to QueryDatabase 2014-08-17 12:13:27 -07:00
Arthur Ice f292cbc3e7 DBSetPublicNote converted to QueryDatabase 2014-08-17 12:07:43 -07:00
Arthur Ice df705e34ad GetAltFlag converted to QueryDatabase 2014-08-17 12:04:38 -07:00
Arthur Ice 364f133ffd GetBankerFlag converted to QueryDatabase 2014-08-17 12:01:39 -07:00
Arthur Ice c7e2d3b355 DBSetGuild converted to QueryDatabase 2014-08-17 11:57:18 -07:00
Arthur Ice 553d12412b DBSetGuildChannel converted to QueryDatabase 2014-08-17 11:50:10 -07:00
Arthur Ice a701541fce DBSetGuildURL converted to QueryDatabase 2014-08-17 11:48:01 -07:00
Arthur Ice dd06ecf99b DBSetGuildMOTD converted to QueryDatabase 2014-08-17 11:46:03 -07:00
Arthur Ice 9e5fdc50d9 DBSetGuildLeader converted to QueryDatabase 2014-08-17 11:43:45 -07:00
Arthur Ice 80cc6e4ef3 DBSetTributeFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 34a56f75cf DBSetAltFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 941f1cc395 DBSetBankerFlag converted to non len QueryWithLogging 2014-08-17 11:40:28 -07:00
Arthur Ice 9eec8f37f5 DBSetGuildRank converted to non len QueryWithLogging 2014-08-17 11:40:27 -07:00
Arthur Ice 1734641d12 DBRenameGuild converted to QueryDatabase 2014-08-17 11:40:22 -07:00
Arthur Ice 3856f7f1e5 DBDeleteGuild converted to QueryDatabase 2014-08-17 11:39:27 -07:00
Arthur Ice 94110dbe52 removed len from QueryWithLogging 2014-08-17 11:39:16 -07:00
Arthur Ice 8a44271b2f QueryWithLogging converted to QueryDatabase 2014-08-17 11:22:05 -07:00
Arthur Ice cca9ddab43 _RunQuery renamed QueryWithLogging 2014-08-17 11:19:56 -07:00
Arthur Ice 7b440bbd9f _GetFeeGuildID converted to QueryDatabase 2014-08-17 11:11:56 -07:00
Arthur Ice a2d4376763 _StoreGuildDB converted to QueryDatabase 2014-08-17 11:08:41 -07:00
Arthur Ice a91b6a0db8 RefreshGuild converted to QueryDatabase 2014-08-17 10:59:24 -07:00
Arthur Ice 22367622be LoadGuilds converted to QueryDatabase 2014-08-17 10:51:08 -07:00
Arthur Ice 87efd22394 Merge https://github.com/EQEmu/Server 2014-08-17 10:39:37 -07:00
Alex 69b7d500d8 Merge pull request #180 from EQEmu/clientupdate
Clientupdate
2014-08-16 22:23:19 -07:00
Uleat 00321126f1 Merge branch 'master' of https://github.com/EQEmu/Server into clientupdate
Conflicts:
	changelog.txt
2014-08-16 18:17:59 -04:00
Uleat 9e1549b61b Fix for invalid handling of heading criteria in Client::Handle_OP_ClientUpdate() 2014-08-16 18:12:21 -04:00
KimLS a85bb6aca6 Cleanup before push 2014-08-16 15:03:01 -07:00
KimLS 9207220238 Merge branch 'DBQuery' 2014-08-16 15:02:19 -07:00
KimLS 539c09adc5 Merge branch 'master' into DBQuery 2014-08-16 15:00:38 -07:00
Uleat 8ef17f2ccd Merge branch 'master' of https://github.com/EQEmu/Server 2014-08-16 17:21:10 -04:00
KimLS 8b08f19628 Merge branch 'master' into DBQuery 2014-08-16 14:12:33 -07:00
Alex adc801a069 Merge pull request #179 from KinglyKrab/master
Fixed GetItemStat making all information it pulls default as uint32.
2014-08-15 22:47:27 -07:00
Kinglykrab 0f5214f481 Fixed GetItemStat making all information it pulls default it uint32. 2014-08-16 01:35:50 -04:00
Alex eb609f2ea4 Merge pull request #178 from KinglyKrab/master
Fixes uint32 max value issue.
2014-08-15 22:00:26 -07:00
Uleat a3069b63df Minor tweaks... 2014-08-16 00:18:19 -04:00
Uleat f7bb763aac Reactivation of wear change updates in Bot::Spawn() until fix can be found. 2014-08-15 16:28:16 -04:00
Kinglykrab bce3b1b961 Edit some uint32 to int32: GetAugmentIDAt, GetItemIDAt, GetItemStat 2014-08-15 04:26:37 -04:00
Michael Cook e2874b2cc6 Update README.md [skip ci] 2014-08-14 15:05:44 -04:00
Uleat dc6e6fd05f Fix for bot chest armor display glitch in SoF+ clients 2014-08-13 14:24:42 -04:00
Michael Cook (mackal) c2282ced0e Some people were having issues with the other one [skip ci] 2014-08-13 13:20:10 -04:00
Michael Cook (mackal) 6badd7e00e Added SQLs from previous commit [skip ci] 2014-08-12 22:51:36 -04:00
Michael Cook 12b9531d8a Merge pull request #177 from clucksoft/raid_ooc_regen
Implemented Raid OOC Regen
2014-08-12 22:46:17 -04:00
Russell Kinasz 1ba4b6fc31 Implemented Raid OOC Regen 2014-08-12 15:18:11 -07:00
KimLS cb3fa2d4a3 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-12 14:51:09 -07:00
Uleat cfd6364999 Re-worked server 'discovery' code to better handle inclusions and exclusions. 2014-08-11 18:55:00 -04:00
Arthur Ice f1b8908c9a Fixed bug with ErrorBuffer being overwritten on non query requests 2014-08-11 13:55:25 -07:00
KimLS 11abc45e3f Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-11 12:58:53 -07:00
Arthur Ice 321cf17eac fixed issue with row request on null result 2014-08-10 22:27:25 -07:00
Michael Cook (mackal) 091047d08b Pretty up the read me [skip ci] 2014-08-10 23:07:05 -04:00
Michael Cook f0c46664d2 Merge pull request #176 from KayenEQ/Development
ST_PetMaster target type support added
2014-08-10 23:04:06 -04:00
KayenEQ 8b2dba9715 ST_PetMaster target type support added
Targets pets master. (Works for regular and swarm pets)
2014-08-10 20:13:01 -04:00
KimLS 26ff1ae941 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-10 16:27:59 -07:00
Arthur Ice 12ded4b506 Fixed bug with non row returning queries crashing. 2014-08-10 14:19:35 -07:00
KimLS 2b66af2d91 Merge branch 'RunQueryToDatabaseQuery_database' of https://github.com/addtheice/Server into DBQuery 2014-08-10 13:23:09 -07:00
Michael Cook (mackal) 8940e987c1 Fix some compiler warnings 2014-08-10 15:56:58 -04:00
Michael Cook c02cb2c343 Proper bling instead of copy paste for another [skip ci] 2014-08-10 13:08:50 -04:00
Michael Cook 99b25f42e4 Add Travis-CI bling 2014-08-10 12:42:43 -04:00
Michael Cook a327a0028d Merge pull request #175 from KayenEQ/Development
Rule ArcheryHitPenalty fix for calc mistake from prior update.
2014-08-10 11:01:38 -04:00
KayenEQ 478eb35a3b Rule ArcheryHitPenalty fix for calc mistake from prior update. 2014-08-10 08:37:30 -04:00
KimLS d7eb28c7f8 Travis CI file 2014-08-10 02:45:21 -07:00
Uleat e1996e62b0 Added 'discovery' code for server handlers - still needs some debug/messaging work 2014-08-09 20:59:08 -04:00
Michael Cook bb9f440882 Merge pull request #172 from KayenEQ/Development
Implemented support for spells_new fields InCombat, OutofCombat
2014-08-09 16:53:39 -04:00
KayenEQ b7be8fb625 fix 2014-08-08 15:53:53 -04:00
KayenEQ 2aec190afc Support for spells_new field 'uninterruptable' 2014-08-08 13:42:14 -04:00
Uleat f0496a6f59 Total re-work..not much more can be done until more server handlers are added... 2014-08-07 15:27:30 -04:00
KayenEQ aab3cac29c fix 2014-08-06 06:49:29 -04:00
Uleat 9561f841c4 Tweaked some procedural code and re-worked client opcode reader to standardize hex format (i.e., {0x0abc, 0x0ABC, 0xabc} = 0x0abc) 2014-08-05 16:34:57 -04:00
Uleat 32243aa383 Unix fix... Thanks Demonstar!! 2014-08-04 23:12:28 -04:00
Uleat 13f3c13c0e Added a dev script for cross-referencing server-to-client opcodes 2014-08-04 21:28:56 -04:00
KayenEQ 92a1abbbee fix 2014-08-03 16:36:44 -04:00
KayenEQ 4b7fa0654c fix 2014-08-03 16:32:36 -04:00
KayenEQ f3710856ad min_range field 2014-08-03 16:04:55 -04:00
KayenEQ ef982b9ce2 Implemented 'min_range' field, sets a min range that you must
be away from target for spell to land.
2014-08-03 08:21:47 -04:00
KayenEQ 52d92b7181 Implemented broad support for fields min_dist, min_dist_mod, max_dist, max_dist_mod -
Scales spell power based on targets distance from caster.
This implemented in a broad way to function with spells
that would make sense to scale. Some work will still be needed on this.

Be aware if making custom
spells not everything will work and certain effects just
should not be included (use common sense).
2014-08-02 21:10:44 -04:00
KayenEQ e0e473ce06 Merge git://github.com/EQEmu/Server into Development 2014-08-02 20:40:24 -04:00
KayenEQ 9c92c5dbe4 SQL 2014-08-02 10:43:48 -04:00
KayenEQ b65d3c85b6 Implemented support for spells_new fields InCombat, OutofCombat
Required SQL to rename and add new fields to spells_new table.
2014-08-02 10:42:11 -04:00
Michael Cook 71b7fc57f6 Merge pull request #171 from KayenEQ/Development
Support for spells_new field npc_no_los (simply skips the LOS check for ...
2014-08-01 23:50:28 -04:00
KayenEQ 454f2520c3 Support for spells_new field npc_no_los (simply skips the LOS check for that spell
despite name, no reason to hard code it only for NPC).
2014-08-01 23:35:35 -04:00
Arthur Ice e1e219ae97 Merge upstream 2014-08-01 10:41:26 -07:00
Arthur Ice af57ca3b05 Merge upstream 2014-08-01 10:41:16 -07:00
Arthur Ice a98eeb7be6 Merge remote-tracking branch 'upstream/master' 2014-08-01 10:26:38 -07:00
Uleat cc0f2ac37a Changed a few mis-labeled range starts..no functionality change. 2014-07-31 21:05:43 -04:00
Uleat 842f1fb9c7 Test fix for charm in trader's satchel while trader..thanks demonstar and Derision! ** This may need to be tweaked..but, I was able to test without crashing the client. 2014-07-31 11:41:27 -04:00
Uleat 8b14c21a24 More numeric to constant conversions..should be most of them... Please report any inventory abnormalities. 2014-07-31 07:52:38 -04:00
Arthur Ice 0f6ce6a1f4 Upstream merge 2014-07-30 14:46:02 -07:00
Arthur Ice 7aaf9ae00d Merge remote-tracking branch 'upstream/master' 2014-07-30 14:08:10 -07:00
Uleat e902373ce7 This DOES fix the GCC issue..sorry for the inconvenience! 2014-07-27 23:05:16 -04:00
Uleat 0ad7c4470b GCC fix for last dictionary push (hopefully) 2014-07-27 22:18:17 -04:00
Uleat 36a2d52f1c More 'dictionary' updates..added 'constants' files to client translators..started replacement of hard-coded inventory values. 2014-07-27 20:35:43 -04:00
Michael Cook d0756ff2af Merge pull request #169 from KayenEQ/Development
Updates to npc_spells and npc_types table.
2014-07-24 18:44:18 -04:00
KayenEQ 9fcea56fbf Alllow SE_PetMeleeMitigation to work on swarm pets. 2014-07-24 14:06:15 -04:00
KayenEQ 1b239b7119 Support for AA derived AC bonus. 2014-07-24 11:31:22 -04:00
KayenEQ 83f94da43b Spell Effect for melee mitigation will no longer use same bonus
item shielding effect. Added support for spell effect melee mitigation
to work on as item worn effects and AA.
2014-07-24 11:23:14 -04:00
KayenEQ 0d5a0525cd minor fix 2014-07-23 22:08:47 -04:00
KayenEQ 4f07be2343 Update to how bonuses are calculated in chance to hit code to be
consistent across all relevant effects (treating avoidance
and hit chance bonuses equally).
Rule ArcheryHitPenalty will now calc correctly (Was doing basically nothing)
New field npc_types 'Avoidance' (add avoidance bonus to npc)
Rules for setting min / max chance to hit
2014-07-23 21:24:21 -04:00
KayenEQ 152a7410b6 debug msg removal 2014-07-23 16:57:59 -04:00
KayenEQ 9e4a21d934 Allow negative values for avoidance to work. (debuffs) 2014-07-23 13:13:51 -04:00
KayenEQ 6b107d4197 sql fix 2014-07-21 09:46:36 -04:00
KayenEQ d99f9c1c09 fix for aa pet flurry bonus calc 2014-07-18 17:57:03 -04:00
KayenEQ 089360a3a5 merge 2014-07-18 17:00:39 -04:00
Uleat d7c2d6108f Added the initial references for two new dictionaries - EmuConstants and EQLimits..more to come. 2014-07-16 21:23:16 -04:00
KimLS b7e36feeeb Removed more socket server stuff, changed some of the build stuff. 2014-07-14 15:44:28 -07:00
KimLS 658bf04d0b Merge branch 'master' of github.com:EQEmu/Server 2014-07-14 15:10:28 -07:00
Arthur Ice b43ab783b0 AddReport converted to StringFormat 2014-07-10 22:55:00 -07:00
Arthur Ice be90b4e0cc CheckLogin converted to StringFormat 2014-07-10 22:53:20 -07:00
Arthur Ice b3895f717a GetGuildIDByCharID converted to StringFormat 2014-07-10 22:19:14 -07:00
Arthur Ice 77a5d82de4 GetAdventureStats converted to StringFormat 2014-07-10 22:19:07 -07:00
Arthur Ice a7ac4b8deb UpdateAdventureStatsEntry converted to StringFormat 2014-07-10 22:19:01 -07:00
Arthur Ice 9cd2225f8c GlobalInstane converted to StringFormat 2014-07-10 22:04:58 -07:00
Arthur Ice f2e7f8ec64 SetInstanceDuration converted to StringFormat 2014-07-10 21:30:17 -07:00
Arthur Ice 899c34ff63 AssignRaidToInstance converted to StringFormat 2014-07-10 21:30:11 -07:00
Arthur Ice 79819a85d6 AssignGroupToInstance converted to StringFormat 2014-07-10 21:30:05 -07:00
Arthur Ice e66b4e4a3d GetCharactersInInstance converted to StringFormat 2014-07-10 21:29:59 -07:00
KayenEQ 48c24186d1 sql comment fix 2014-07-10 23:44:03 -04:00
KayenEQ 965bb039be Updates to npc_spells and npc_types table.
Implemented innate defensive and range procs
Implemented ability to fine tune AI casting behavior/timers
Global rules for AI casting behavior/timers
NPC Ranged attack updates, set skill and ammo type in npc_types
Various clean ups in attack related functions.
Other minor fixes.
See Change Log, +required, +optional SQL
2014-07-10 22:46:39 -04:00
Arthur Ice d606d8f4f2 GetInstanceID converted to StringFormat 2014-07-10 17:56:53 -07:00
Arthur Ice a862d9a06d GetInstanceID converted to StringFormat 2014-07-10 17:56:48 -07:00
Arthur Ice c4d9e543e3 GetInstanceVersion converted to StringFormat 2014-07-10 17:56:43 -07:00
Arthur Ice 5104b507bb BuryCorpsesInInstance converted to StringFormat 2014-07-10 17:56:38 -07:00
Arthur Ice cb5cecd0c2 CheckInstanceExists converted to StringFormat 2014-07-10 17:56:33 -07:00
Arthur Ice 77c793166c RemoveClientsFromInstance converted to StringFormat 2014-07-10 17:56:27 -07:00
Arthur Ice e08533c634 RemoveClientFromInstance converted to StringFormat 2014-07-10 17:56:22 -07:00
Arthur Ice 39196efcb3 AddClientToInstance converted to StringFormat 2014-07-10 17:56:17 -07:00
Arthur Ice cc9bef9706 PurgeExpiredInstances converted to StringFormat 2014-07-10 17:56:12 -07:00
Arthur Ice 9d38c6d44e CreateInstance converted to StringFormat 2014-07-10 17:56:07 -07:00
Arthur Ice fb213e6ee5 GetUnusedInstanceID converted to StringFormat 2014-07-10 17:56:02 -07:00
Arthur Ice aafc681034 GetTimeRemainingInstance converted to StringFormat 2014-07-10 17:55:57 -07:00
Arthur Ice 11dc235121 VersionFromInstanceID converted to StringFormat 2014-07-10 17:55:52 -07:00
Arthur Ice cb510e13d1 ZoneIDFromInstanceID converted to StringFormat 2014-07-10 17:55:47 -07:00
Arthur Ice 784b16bd43 CheckInstanceExpired converted to StringFormat 2014-07-10 17:55:42 -07:00
Arthur Ice c6c47aba22 DeleteInstance converted to StringFormat 2014-07-10 17:55:37 -07:00
Arthur Ice 3581b0bf1a CharacterInInstanceGroup converted to StringFormat 2014-07-10 17:55:32 -07:00
Arthur Ice b5f5dae9e8 VerifyZoneInstance converted to StringFormat 2014-07-10 17:55:27 -07:00
Arthur Ice d68fca8e51 GetRaidLeaderName converted to StringFormat 2014-07-10 17:55:22 -07:00
Arthur Ice dc6e5bc48e GetRaidID converted to StringFormat 2014-07-10 17:55:16 -07:00
Arthur Ice 12c15c6db0 ClearRaidDetails converted to StringFormat 2014-07-10 17:55:11 -07:00
Arthur Ice d21c4a58b4 ClearAllRaidDetails converted to StringFormat 2014-07-10 17:55:06 -07:00
Arthur Ice 652b158ca4 ClearAllRaids converted to StringFormat 2014-07-10 17:55:01 -07:00
Arthur Ice 71da40c757 ClearRaid converted to StringFormat 2014-07-10 17:54:56 -07:00
Arthur Ice 3cf9c71c27 SetAgreementFlag converted to StringFormat 2014-07-10 17:54:51 -07:00
Arthur Ice c1b69594e5 GetAgreementFlag converted to StringFormat 2014-07-10 17:54:46 -07:00
Arthur Ice 8e8a21349f ClearGroupLeader converted to StringFormat 2014-07-10 17:05:47 -07:00
Arthur Ice b7fb8fa434 ClearAllGroupLeaders converted to StringFormat 2014-07-10 16:21:46 -07:00
Arthur Ice e3d02cdf40 GetGroupLeadershipInfo converted to StringFormat 2014-07-10 16:18:31 -07:00
Arthur Ice 3b18c4891c SetGroupLeaderName converted to StringFormat 2014-07-10 16:17:14 -07:00
Arthur Ice 0862feeba8 GetGroupLeaderForLogin converted to StringFormat 2014-07-10 15:19:10 -07:00
Arthur Ice 34a7b46163 GetGroupID converted to StringFormat 2014-07-10 15:17:10 -07:00
Arthur Ice 538979716d ClearGroup converted to StringFormat 2014-07-10 15:16:02 -07:00
Arthur Ice ed21229bba ClearAllGroups converted to StringFormat 2014-07-10 15:15:05 -07:00
Arthur Ice 1ec7da0f36 SetGroupID converted to StringFormat 2014-07-10 15:11:44 -07:00
Arthur Ice 61732658f2 SetFirstLogon converted to StringFormat 2014-07-10 15:03:25 -07:00
Arthur Ice 474d5d1340 SetLFG converted to StringFormat 2014-07-10 15:02:39 -07:00
Arthur Ice fdb4e54ff6 SetLoginFlags converted to StringFormat 2014-07-10 15:01:56 -07:00
Arthur Ice bde62709b5 SetLFP converted to StringFormat 2014-07-10 15:01:08 -07:00
Arthur Ice d4aaa93047 GetLiveChar converted to StringFormat 2014-07-10 15:00:05 -07:00
Arthur Ice 4ce7081ace UpdateLiveChar converted to StringFormat 2014-07-10 14:59:16 -07:00
Arthur Ice 6f8e7fc720 GetCharacterInfo converted to StringFormat 2014-07-10 14:58:27 -07:00
Arthur Ice 422f3b1ce9 GetSkillCap converted to StringFormat 2014-07-10 14:57:24 -07:00
Arthur Ice 397e3998ff GetRaceSkill converted to StringFormat 2014-07-10 14:55:57 -07:00
Arthur Ice cff96b23a8 Merge branch 'master' into RunQueryToDatabaseQuery_database
Conflicts:
	changelog.txt
	common/spdat.h
	zone/attack.cpp
	zone/bonuses.cpp
	zone/common.h
	zone/mob.h
	zone/special_attacks.cpp
	zone/spell_effects.cpp
2014-07-10 14:15:05 -07:00
Arthur Ice 40798d38c5 Merge remote-tracking branch 'upstream/master' 2014-07-09 16:40:09 -07:00
Arthur Ice 09ede557b1 SetMQDetectionFlag converted to StringFormat 2014-07-09 16:37:21 -07:00
Arthur Ice 1f15f7ff9a SetHackerFlag converted to StringFormat 2014-07-09 16:35:30 -07:00
JJ a96784aa18 Minor typos. 2014-07-09 19:19:51 -04:00
Arthur Ice 3a2ceab58a CopyCharacter converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 84499e43dd MoveCharacterToZone converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 2e8ff36ef7 MoveCharacterToZone converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 6430a62c86 GetServerType converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice ec47f8644c CheckUsedName converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 8b3afbdf10 UpdateName converted to StringFormat 2014-07-08 21:10:04 -07:00
Arthur Ice 57b11629ce ClearMerchantTemp converted to string 2014-07-08 21:10:04 -07:00
Arthur Ice 396eced36e GetAccountFromID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 66070e9bf6 GetAccountIDFromLSID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 97588fbcf4 AddToNameFilter converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice d7a98e7655 CheckNameFilter converted to string 2014-07-08 21:10:03 -07:00
Arthur Ice 4804cca0ab GetPEQZone converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 0850b1edad LoadZoneNames converted to use string 2014-07-08 21:10:03 -07:00
Arthur Ice c2e5875f02 GetzoneGraveyardID converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 56de9072c0 GetZoneLongName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 341121da32 GetSafePoints converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 869c041846 GetMiniLoginAccount converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 879ab418fd SetVariable converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 2ffc77be3d GetAccountName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 2f8cc6e57b GetAccountIDByName converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice a64ef36d06 GetAccountIDByChar (id) converted to StringFormat 2014-07-08 21:10:03 -07:00
Arthur Ice 85895d01eb GetAccountIDByChar converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice fa3d8c9720 StoreCharacter partialy converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 80a8a1fde3 DeleteCharacter converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice bf5ce11ff1 ReserveName converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 4a10bdb91a SetAccountStatus converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 74b73e6f39 SetLocalPassword converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice d287d9731e changed cerr message to cout on DeleteAccount 2014-07-08 21:10:02 -07:00
Arthur Ice 95c072f692 DeleteAccount converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 41f453d5a4 CreateAccount converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice ddcaf855fe CheckStatus converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice d943183994 LoginIP converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 2424b1d3f1 AddGMIP converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice a036200369 CheckGMIPs converted to StringFormat 2014-07-08 21:10:02 -07:00
Arthur Ice 0ddceb78ba AddBannedIP converted to StringFormat 2014-07-08 21:10:01 -07:00
Arthur Ice b23fb0e635 CheckBannedIPs converted to StringFormat 2014-07-08 21:10:01 -07:00
Arthur Ice 98ebbd50a1 minor formatting clean up, no functional changes 2014-07-08 21:10:01 -07:00
Arthur Ice c39eb3ca86 Removed unused FetchRowMap 2014-07-08 21:10:01 -07:00
Arthur Ice 2278ec023f GetGroupLeadershipInfo converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 2afd05de98 GetGroupLeaderForLogin converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 1655050730 string based QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 9a30c24654 Added FieldName for column name requests 2014-07-08 21:10:01 -07:00
Arthur Ice 727d8a2bf8 Added LengthOfColumn method because of stupid BLOBs 2014-07-08 21:10:01 -07:00
Arthur Ice cdcb5e0692 renamed GetGuildDBIDByChar to GetGuildIDByChar, converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 01991f4beb GetAdventureStats converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 28212ab8f8 UpdateAdventureStatsEntry converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 22d06bc3d1 GlobalInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 167ce7829c SetInstanceDuration converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice bb2dc991eb AssignRaidToInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 989b5d96c5 AssignGroupToInstance converted to QueryDatabase 2014-07-08 21:10:01 -07:00
Arthur Ice 0ea1010e3f GetCharactersInInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4f4f9e8eb3 GetUnusedInsanceId converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice d32f16fef5 GetInstanceID (uint32 zone version) converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 41660240fb GetInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice c160059612 GetInstanceVersion converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice c055b20b93 BuryCorpsesInInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice e1b251ee8f CheckInstanceExists converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice e60117cabb AddClientToInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 3449f5e11c PurgeExpiredInstances converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 010bc76440 CreateInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4b647602b3 GetUnusedInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 9abdf5f4b3 GetTimeRemainingInstance converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 903a3a9060 VersionFromInstanceID converted to QueryDatabase 2014-07-08 21:10:00 -07:00
Arthur Ice 4541bd5369 ZoneIDFromInstanceID converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 94e4da9456 CheckInstanceExpired converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 2f3c1ed169 DeleteInstance converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 3db115b52f CharacterInInstanceGroup converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 96c4b283fa VerifyZoneInstance converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 7dce9d6c8e formatting cleanup, no functional change 2014-07-08 21:09:59 -07:00
Arthur Ice bc46b1371d GetRaidLeaderName converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 4a09b9b1a0 GetRaidID converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice a08c6c9a00 ClearRaidDetails converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 9b4491df57 ClearAllRaidDetails converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice e81e47e9c5 Built utility function ClearAllRaidDetails 2014-07-08 21:09:59 -07:00
Arthur Ice 34739b71b3 Converted ClearRaid to QueryDatabase, added ClearAllRaids utility method 2014-07-08 21:09:59 -07:00
Arthur Ice c80f803ba7 SetAgreementFlag converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 6132fa0cb9 GetAgreementFlag converted to QueryDatabase 2014-07-08 21:09:59 -07:00
Arthur Ice 586e177f98 Created private utility methods ClearAllGroups and ClearAllGroupLeaders 2014-07-08 21:09:58 -07:00
Arthur Ice 695e6f2026 ClearGroupLeader converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 9bbde71964 SetGroupLeaderName converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 7a5afd8597 GetZoneName formatting cleanup. much easier to read 2014-07-08 21:09:58 -07:00
Arthur Ice c6f707d95c GetZoneID nullptr and formatting clean up 2014-07-08 21:09:58 -07:00
Arthur Ice b0612f8cdf Converted StoreCharacter to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice ceccf2b1ca GetGroupID converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 137b624008 ClearGroup converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 632b9b9c27 errbuff and Query to query change 2014-07-08 21:09:58 -07:00
Arthur Ice 819de185ef SetGroupID converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 61abdeb3f7 AddReport converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice cc9267707a SetFirstLogon converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice c82ce7cecc SetLoginFlags and SetLFG converted to QueryDatabase 2014-07-08 21:09:58 -07:00
Arthur Ice 00db7e5c93 SetLFP converted to QueryDatabase 2014-07-08 21:09:57 -07:00
Arthur Ice f0106c90a8 GetLiveChar converted to QueryDatabase 2014-07-08 21:09:57 -07:00
Arthur Ice edf24308fb getZoneLongName converted 0 assign of query to nullptr 2014-07-08 21:09:57 -07:00
KayenEQ 705ffa89bc Update SE_InterruptCasting: Will now work for instant spells (as well as over time). 2014-07-08 21:09:57 -07:00
KayenEQ 8cdcd189f5 Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live) 2014-07-08 21:09:57 -07:00
KayenEQ 9e26ebb9e5 Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
2014-07-08 21:09:57 -07:00
KayenEQ 7b085c8018 Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap) 2014-07-08 21:09:57 -07:00
KayenEQ 41d3b177ea Renamed various Cast on Fade spell effects to more accurately describe their functions.
Missing code from prior commit.
2014-07-08 21:09:57 -07:00
KayenEQ effe2149da Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
2014-07-08 21:09:57 -07:00
KayenEQ 9af74e6468 Implemented SE_FactionModPct - Modifies faction gains and losses by percent. 2014-07-08 21:09:56 -07:00
KayenEQ ede9d557a3 Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end. 2014-07-08 21:09:56 -07:00
KayenEQ 0be08b7899 Implemented SE_Sanctuary - Places caster at bottom hate list,
effect fades if caster cast spell on targets other than self.
2014-07-08 21:09:56 -07:00
Michael Cook (mackal) 2b204fa756 Hopefully fix compile issue with some VS versions 2014-07-08 21:09:56 -07:00
Arthur Ice 2c78a47a94 Linux compile fixes 2014-07-08 21:09:56 -07:00
KimLS e599820383 Missing return value 2014-07-08 21:09:56 -07:00
Michael Cook (mackal) cc69e81dab Fix case-sensitive issue 2014-07-08 21:09:56 -07:00
KimLS 7048fcc358 Fix for GCC+11 compile 2014-07-08 21:09:56 -07:00
Arthur Ice b169dbd09d UpdateLiveChar converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice f7c637a0d9 Errbuf fix and GetCharacterInfo converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice a054b83b92 GetSkillCap converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice 4eea1e0468 GetRaceSkill converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice 853f1b56e5 SetMQDetectionFlag converted to QueryDatabase 2014-07-08 21:09:56 -07:00
Arthur Ice bf2d65d7e9 SetHackerFlag converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 7b551f0399 CopyCharacter converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice fdbb166076 MoveCharacterToZone converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 2fe133fa0e GetServerType converted to QueryDatabase 2014-07-08 21:09:55 -07:00
Arthur Ice 6a59b83d43 StringFormat converted to move semantics 2014-07-08 21:09:55 -07:00
Chris M 9a634a2056 Removing socket server from cmake for now and maintaining it in its own branch until push to master 2014-07-08 21:09:55 -07:00
Chris M d0416d5f35 More Socket Server work. Made Socket server a by default disabled option in the CMake configuration while development is underway. For now, do not use. 2014-07-08 21:09:55 -07:00
Chris M 3e0f6b8520 Initial Socket Server implementation with CMakeLists.txt updated. Socket server will connect to world at this point. 2014-07-08 21:09:55 -07:00
KayenEQ 6877e40b38 Update to SE_AStacker, B, C, D
Will correclty use base value to stack with same type ie (A vs A)
Highest base value will take hold.
2014-07-08 21:09:55 -07:00
KayenEQ 1cd20c65e2 Renamed a few spell effects more appropriately. 2014-07-08 21:09:55 -07:00
KayenEQ 4672f223c1 minor fix 2014-07-08 21:09:55 -07:00
KayenEQ 042f6f3789 Updated SE_WaketheDead , max will now set duration. 2014-07-08 21:09:54 -07:00
KayenEQ 718ba3edbf Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Related AA's to be added in a seperate update.
2014-07-08 21:09:54 -07:00
KayenEQ 32d20f22ef Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells. 2014-07-08 21:09:54 -07:00
KayenEQ d3ce9792b5 Fix for AA Finishg Blow rank 1-3.
AA Data was missing and incorrectly added to wrong aaid.
Required SQL
2014-07-08 21:09:54 -07:00
KayenEQ 2afa08e361 Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.

Required SQL for AA updates
2014-07-08 21:09:54 -07:00
KayenEQ 25c20f0629 Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now recieves all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).

Required SQL for AA data
Optional SQL for rules
2014-07-08 21:09:54 -07:00
KayenEQ 786b8c80fd Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Required SQL update.
2014-07-08 21:09:54 -07:00
KayenEQ 6c4e69a71d Slight change to TryDispel formula for better accuracy.
Live PATCH 5-20-14 Note: "Updated all spells which
use Remove Detrimental and Cancel Beneficial spell
effects to use a new method. The chances for those
spells to affect their targets have not changed unless
otherwise noted"

Support added for new base values to give
a nearly equivelent result.
(Ie. Will work for values pre and post change)
2014-07-08 21:09:54 -07:00
KayenEQ ef79a0607b Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells). 2014-07-08 21:09:53 -07:00
KayenEQ fbdc104c12 changelog fix 2014-07-08 21:09:53 -07:00
KayenEQ 34bbb9236e Implemented SE_IllusionOther - Allows next Illusion buff (self only)
cast to be cast on target. (AA ProjectIllusion now uses this)
Run required SLQ to update AA.
2014-07-08 21:09:53 -07:00
KayenEQ 54d1cff546 Implemented SE_MassGroupBuff as spell effect (no longer hard coded for AA
only). Run required SQL to update AA tables.
Updated spells_new field175 -> numhits_type
2014-07-08 21:09:53 -07:00
KayenEQ 4684d92758 Update SE_Taunt - Limit value if present will now add instant hate. 2014-07-08 21:09:53 -07:00
KayenEQ 75fb34934d Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. 2014-07-08 21:09:53 -07:00
KayenEQ a1f2e1c8fd Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. 2014-07-08 21:09:53 -07:00
KayenEQ dc6154f71f Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. 2014-07-08 21:09:53 -07:00
KimLS b7cc19f983 Removed older AZone build options, use eqemu-zone-utils instead 2014-07-08 21:09:53 -07:00
KayenEQ ee6a4bd244 Implemented an enumerator list for numhits type variables.
Implemented type 4 outgoing spell damage numhits type.
2014-07-08 21:09:52 -07:00
KayenEQ e7051d0289 Fix to SE_BlanaceMana to only check classes in group that have mana. 2014-07-08 21:09:52 -07:00
KimLS 9680f39203 Some potential fixes for clang, not complete 2014-07-08 21:09:52 -07:00
KayenEQ 11918fccbf Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player. 2014-07-08 21:09:52 -07:00
KayenEQ 53fb53e822 Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database] 2014-07-08 21:09:52 -07:00
KayenEQ ad31de5f78 SE_NegateAttacks buff stacking optimized. 2014-07-08 21:09:52 -07:00
KayenEQ 6821dc27f5 Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.
DOT ticks will no longer be absorbed.
2014-07-08 21:09:52 -07:00
KayenEQ ef7e107443 Fixes and Updates to spell and melee mitigation runes.
-Fix for calculation error when rune was to be removed.
-Updated to support these spell effect limit values which
give a max amount per hit/spell that can be mitigated.
-Updated to allow support for these spells effects when
the max (rune value) is set to zero, which essentially
gives you unlimited mitigation but typically there is
a limit value set.
2014-07-08 21:09:52 -07:00
KayenEQ 60dcdbd181 minor fix 2014-07-08 21:09:52 -07:00
KayenEQ b732133184 Implemention for SE_Berserk, SE_Vampirism (These are not used on live)
Fix for NPC not receiving spell bonus derived HP regen.
2014-07-08 21:09:51 -07:00
KayenEQ 611f0e2aba Implemented SE_DoubleRiposte 2014-07-08 21:09:51 -07:00
KayenEQ 5a4f80621b Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time) 2014-07-08 21:09:51 -07:00
KayenEQ 606bd86e3a Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent) 2014-07-08 21:09:51 -07:00
KayenEQ 3253f7494e Implemented SE_DamageModifier2 2014-07-08 21:09:51 -07:00
KayenEQ 31a774a92a Implemented SE_AStacker, BStacker, CStacker, DStacker
Effects are buff stacking blockers.
2014-07-08 21:09:51 -07:00
Arthur Ice a0d5e5ad72 CheckUsedName converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice cf8cfd8b17 UpdateName converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice e607f5c079 ClearMerchantTemp converted to QueryDatabase 2014-07-08 21:09:51 -07:00
Arthur Ice 397f7050ef GetAccountFromID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice e20e5e59b8 GetAccountIDFromLSID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 20e40a9a9c AddToNameFilter converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice da2673d35e CheckNameFilter converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 5c8cd19477 GetPEQZone converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 2a19a3ced4 LoadZoneNames converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 24d08857e8 GetZoneGraveyard converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 329fcc8302 GetZoneGraveyardID converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 91c8233a71 GetZoneLongName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice ee696c2122 errbuf fix (again) and GetSafePoints converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 3dfff739fa GetMiniLoginAccount converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 6d6746f5a4 SetVariable converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 74d65f6fda Converted LoadVariables, and LoadVariables_result to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 87cb659dc2 errbuf issue again 2014-07-08 21:09:50 -07:00
Arthur Ice 4e25f4b68c GetCharName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 5ef05d1bb6 GetAccountName converted to QueryDatabase 2014-07-08 21:09:50 -07:00
Arthur Ice 20e80ebb92 errbuff fixed, also moved alphanumeric account check to function in StringUtil 2014-07-08 21:09:49 -07:00
Arthur Ice 9c6b538176 GetAccountIDByName converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 5e629a3e5c GetAccountIDByChar converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 0aacecbee5 GetAccountIDByChar converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 3aacf7df6a DeleteCharacter converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 3cb7d9e3fe removed printf from DeleteCharacter switched to cerr and cout 2014-07-08 21:09:49 -07:00
Arthur Ice 02b1b5ac0c ReserveName converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice e3de570f29 SetAccountStatus converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 2e7f7ad477 SetLocalPassword converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice ed6db3e7b0 DeleteAccount converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 0ab8c2481b CreateAccount converted to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 95c82d9968 CheckStatus using QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 1bfdeeeb16 fixed query release order and converted LoginIP to QueryDatabase 2014-07-08 21:09:49 -07:00
Arthur Ice 418e4ffee8 AddGMIP converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice cbf49b303b CheckGMIPs to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 7f135d6e55 AddBannedIP converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 02f21ad7c9 CheckLogin converted to DatabaseQuery 2014-07-08 21:09:48 -07:00
Arthur Ice e6023a7013 CheckBannedIPs converted to QueryDatabase 2014-07-08 21:09:48 -07:00
Arthur Ice 699b27cecc Added LastInsertID() to MySQLRequestResult 2014-07-08 21:09:48 -07:00
Michael Cook (mackal) 4707e0f858 Inline a few functions that should be 2014-07-08 21:21:44 -04:00
Michael Cook fc721b8ec8 Merge pull request #167 from KayenEQ/Development
Development
2014-07-08 21:18:53 -04:00
KayenEQ 2918f6bc07 removal of debug msg 2014-07-08 18:27:31 -04:00
KayenEQ b27ff80c75 fix for random int -> float error 2014-07-08 08:04:56 -04:00
Alex 0e0dee3d3d Merge pull request #168 from addtheice/mysql_fetch_lengths_interface
Mysql fetch lengths interface
2014-07-07 19:36:08 -07:00
KayenEQ d22d0a8145 Update to how FcBaseEffect focus modifies SE_SkillAttack damage. 2014-07-06 20:13:19 -04:00
Arthur Ice c175369ff6 string based QueryDatabase 2014-07-06 16:15:54 -07:00
Arthur Ice 923adc3ea5 Added FieldName for column name requests 2014-07-06 16:01:10 -07:00
KayenEQ 0e438942e4 Complete revision of SE_SkillProc, SE_LimitToSkill,
SE_SkillProcSuccess (now implemented correctly)
to function more accurately and efficiently, AA supported.
This may need to be updated in the future, if more live
spells readily become avialable to test with.
2014-07-06 18:58:16 -04:00
KimLS 44aa1285ee Merge conflict resolution 2014-07-06 15:24:48 -07:00
KimLS 122d180f02 Changed some headers that seemed to conflict on slightly older versions of msvc 2014-07-06 15:22:58 -07:00
Arthur Ice f3340343ad Merge remote-tracking branch 'upstream/master' 2014-07-06 11:49:26 -07:00
Arthur Ice d514eef59b Added LengthOfColumn method because of stupid BLOBs 2014-07-05 10:20:28 -07:00
KayenEQ 3a4e72e3e7 Merge git://github.com/EQEmu/Server into Development 2014-07-04 23:38:24 -04:00
KayenEQ 58d585e2a6 Updated SE_Sanctuary - Adjust way hate lowering effect worked to be more accurate
Updated SE_SympatheticProc - Revised proc rate formula to be accurate to live.
Sympathetic foci on items with proc rate mod will now benefit from that modifier.
Sympathetic foci can now be placed on AA's (This should always be slot1 in the AA)
Implemented SE_IllusionPersistence- Allows illusions to last until you die or the illusion is forcibly removed.
Added rule 'PreNerftBardAEDot' for SE_BardAEDot to allow it to once again do damage to moving targets. (Set to true)
2014-07-04 23:35:15 -04:00
Michael Cook 9a76df62dd Merge pull request #165 from KayenEQ/Development
Implemented SE_Sanctuary - Places caster at bottom hate list,
2014-07-04 15:59:16 -04:00
KayenEQ fe5416958a Merge branch 'Development' of github.com:KayenEQ/Server into Development 2014-07-04 14:24:49 -04:00
Michael Cook (mackal) 3b9e9ae0fd Hopefully fix compile issue with some VS versions 2014-07-04 13:57:09 -04:00
Arthur Ice 773ab21085 Merge remote-tracking branch 'upstream/master' 2014-07-03 23:38:30 -07:00
KimLS eb62481766 Missing return value 2014-07-03 23:35:19 -07:00
Arthur Ice 6197fb07e1 Merge remote-tracking branch 'upstream/master' 2014-07-03 23:09:19 -07:00
KimLS c9830dff57 Merge branch 'master' of https://github.com/EQEmu/Server into clang 2014-07-03 21:49:39 -07:00
KimLS 192f9f0cb5 Fix for GCC+11 compile 2014-07-03 21:49:14 -07:00
Michael Cook (mackal) e599555ddb Fix case-sensitive issue 2014-07-04 00:46:53 -04:00
Arthur Ice 328cce33b9 Merge remote-tracking branch 'upstream/master' 2014-07-03 19:44:59 -07:00
Alex 127682cc84 Merge pull request #161 from addtheice/DatabaseInterface
Database interface
2014-07-03 19:31:36 -07:00
Arthur Ice 065db3b396 Merge remote-tracking branch 'upstream/master' 2014-07-03 19:20:03 -07:00
Chris M c645b81890 Removing socket server from cmake for now and maintaining it in its own branch until push to master 2014-07-03 18:16:43 -05:00
Arthur Ice 2734307ba2 Added LastInsertID() to MySQLRequestResult 2014-07-03 15:48:17 -07:00
Arthur Ice 53fd5e0a5c Merge remote-tracking branch 'upstream/master' 2014-07-03 15:05:22 -07:00
KayenEQ 5a30d3ed03 Update SE_InterruptCasting: Will now work for instant spells (as well as over time). 2014-07-03 11:37:38 -04:00
KayenEQ 28493488ac Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live) 2014-07-03 11:00:23 -04:00
KayenEQ 0d2127f874 Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
2014-07-03 10:55:59 -04:00
KayenEQ ee741048e9 Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap) 2014-07-03 08:48:27 -04:00
Chris M 90f74d6847 More Socket Server work. Made Socket server a by default disabled option in the CMake configuration while development is underway. For now, do not use. 2014-07-03 03:25:58 -05:00
Chris M a92b4c04e9 Initial Socket Server implementation with CMakeLists.txt updated. Socket server will connect to world at this point. 2014-07-02 22:17:45 -05:00
KayenEQ 8453d5bc48 Renamed various Cast on Fade spell effects to more accurately describe their functions.
Missing code from prior commit.
2014-07-02 21:38:26 -04:00
KayenEQ 542c0913d6 Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
2014-07-02 14:00:50 -04:00
KayenEQ 35e72692c1 Implemented SE_FactionModPct - Modifies faction gains and losses by percent. 2014-07-02 11:54:59 -04:00
KayenEQ 4a49a11e73 Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end. 2014-07-02 11:18:50 -04:00
KayenEQ ee6d7ae6ba Implemented SE_Sanctuary - Places caster at bottom hate list,
effect fades if caster cast spell on targets other than self.
2014-07-02 08:42:18 -04:00
Michael Cook bd86e70766 Merge pull request #164 from KayenEQ/Development
Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant...
2014-07-01 23:50:31 -04:00
KayenEQ 5d85a26be1 Update to SE_AStacker, B, C, D
Will correclty use base value to stack with same type ie (A vs A)
Highest base value will take hold.
2014-07-01 17:34:36 -04:00
KayenEQ ede7f9899c Renamed a few spell effects more appropriately. 2014-07-01 16:52:28 -04:00
KayenEQ 3b8993a302 minor fix 2014-07-01 04:55:50 -04:00
KayenEQ c412038db8 Updated SE_WaketheDead , max will now set duration. 2014-07-01 04:53:24 -04:00
KimLS 2ef6d3f93e Removed older AZone build options, use eqemu-zone-utils instead 2014-06-30 14:09:03 -07:00
KayenEQ 5e7d2fd07d Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Related AA's to be added in a seperate update.
2014-06-30 16:17:55 -04:00
KayenEQ 8edb73dc3a Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells. 2014-06-30 07:18:47 -04:00
KayenEQ 93900086e1 Fix for AA Finishg Blow rank 1-3.
AA Data was missing and incorrectly added to wrong aaid.
Required SQL
2014-06-30 06:34:12 -04:00
KayenEQ 70f10782b0 Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.

Required SQL for AA updates
2014-06-29 23:26:22 -04:00
KayenEQ 8a92fada5a Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now recieves all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).

Required SQL for AA data
Optional SQL for rules
2014-06-29 01:10:19 -04:00
KayenEQ ce2a79b63e Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Required SQL update.
2014-06-27 20:55:17 -04:00
KayenEQ 2fb95b00a5 Slight change to TryDispel formula for better accuracy.
Live PATCH 5-20-14 Note: "Updated all spells which
use Remove Detrimental and Cancel Beneficial spell
effects to use a new method. The chances for those
spells to affect their targets have not changed unless
otherwise noted"

Support added for new base values to give
a nearly equivelent result.
(Ie. Will work for values pre and post change)
2014-06-26 10:54:18 -04:00
KayenEQ 1867088e1a Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells). 2014-06-26 10:04:21 -04:00
KayenEQ a573e840db changelog fix 2014-06-26 06:45:18 -04:00
KayenEQ 87e7b9c3f0 Implemented SE_IllusionOther - Allows next Illusion buff (self only)
cast to be cast on target. (AA ProjectIllusion now uses this)
Run required SLQ to update AA.
2014-06-26 06:23:27 -04:00
KayenEQ ec35c0d933 Implemented SE_MassGroupBuff as spell effect (no longer hard coded for AA
only). Run required SQL to update AA tables.
Updated spells_new field175 -> numhits_type
2014-06-26 05:40:09 -04:00
KayenEQ 2a48b199d2 Update SE_Taunt - Limit value if present will now add instant hate. 2014-06-25 15:25:22 -04:00
KayenEQ 02e780025d Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. 2014-06-25 14:41:15 -04:00
KayenEQ 677ba36d55 Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. 2014-06-25 14:31:35 -04:00
KayenEQ b23af6d436 Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. 2014-06-25 14:14:55 -04:00
Michael Cook db798ea4f4 Merge pull request #163 from KayenEQ/Development
Implemented an enumerator list for 'numhits type' variables.
2014-06-24 22:27:37 -04:00
KayenEQ 6ef11777e3 Implemented an enumerator list for numhits type variables.
Implemented type 4 outgoing spell damage numhits type.
2014-06-24 22:04:13 -04:00
Michael Cook a4fe14a3d3 Merge pull request #160 from KayenEQ/Development
Implemented SE_AStacker, BStacker, CStacker, DStacker
2014-06-24 20:51:24 -04:00
KayenEQ 660db94607 Fix to SE_BlanaceMana to only check classes in group that have mana. 2014-06-24 08:24:11 -04:00
KayenEQ aa8195565d Merge git://github.com/EQEmu/Server into Development 2014-06-24 08:19:19 -04:00
KimLS a6589e283b Some potential fixes for clang, not complete 2014-06-23 16:56:37 -07:00
KayenEQ 58175a5442 Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player. 2014-06-23 08:37:23 -04:00
KayenEQ 41b190930f Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database] 2014-06-22 23:10:29 -04:00
KayenEQ f28a392f71 SE_NegateAttacks buff stacking optimized. 2014-06-22 15:55:04 -04:00
KayenEQ 8ad9ad578c Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed.
DOT ticks will no longer be absorbed.
2014-06-22 10:30:18 -04:00
KayenEQ a4769239fa Fixes and Updates to spell and melee mitigation runes.
-Fix for calculation error when rune was to be removed.
-Updated to support these spell effect limit values which
give a max amount per hit/spell that can be mitigated.
-Updated to allow support for these spells effects when
the max (rune value) is set to zero, which essentially
gives you unlimited mitigation but typically there is
a limit value set.
2014-06-22 06:16:34 -04:00
KayenEQ c20f35b3e8 minor fix 2014-06-21 10:12:24 -04:00
KayenEQ 5a14a85f52 Implemention for SE_Berserk, SE_Vampirism (These are not used on live)
Fix for NPC not receiving spell bonus derived HP regen.
2014-06-20 18:10:29 -04:00
Arthur Ice 3054a4c307 Database interface improvement with stl style iterators 2014-06-18 15:58:26 -07:00
KayenEQ 70476bfb06 Implemented SE_DoubleRiposte 2014-06-18 06:25:14 -04:00
Arthur Dene Ice b3292e1d22 Merge remote-tracking branch 'upstream/master' 2014-06-17 15:28:37 -07:00
KayenEQ a34a69b4c4 Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time) 2014-06-17 16:08:19 -04:00
KayenEQ aa6af15cb5 Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent) 2014-06-17 15:49:56 -04:00
KayenEQ da70a45d22 Implemented SE_DamageModifier2 2014-06-17 15:23:07 -04:00
KayenEQ 57a216cb44 Implemented SE_AStacker, BStacker, CStacker, DStacker
Effects are buff stacking blockers.
2014-06-17 09:45:12 -04:00
Arthur Dene Ice 97e1963674 Merge remote-tracking branch 'upstream/master' 2014-05-28 09:19:26 -07:00
Arthur Dene Ice 2d6670cfe5 Merge remote-tracking branch 'upstream/master' 2014-05-05 16:26:40 -07:00
Arthur Ice 11fbb86f8b merging upstream 2014-03-26 15:17:08 -07:00
Uleat 02d6471c88 Fix for name/account discrepancy in \\zone\inventory.cpp.
Rearranged/condensed code snippets in Client::SummonItem().
Added 'augslotvisible' check to augment validation in C::SI().
2014-03-18 13:57:51 -07:00
Uleat 02633d4b01 ** Fix for RoF clients not displaying Augment Restrictions in the Item Info window.
** Change to Client::SummonItem() to enforce valid item/augment combinations. (Run the optional sql file first, before posting any
SummonItem() failure issues in the forums.)
2014-03-18 13:57:49 -07:00
KayenEQ 95176fc813 Coverted melee and magic runes to use bonuses.
Removed all the old rune flags now that none of them are used.
Fixed issues where runes would not fade properly if damage = remaing rune amount
Fixed issue where runes would stop absorbing damage if you had multiple runes.
2014-03-18 13:57:48 -07:00
ukmeth0d 8571c35e77 Fixed 2H Blunt Animation to match Live
Melee bots (with no mana) will now sit when not full HP and out of combat.
2014-03-18 13:57:47 -07:00
944 changed files with 134983 additions and 106648 deletions
+18
View File
@@ -0,0 +1,18 @@
language: cpp
compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libmysqlclient-dev libperl-dev libboost-dev liblua5.1-0-dev zlib1g-dev
script:
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON
- make
- ./bin/tests
branches:
only:
- master
- stable
notifications:
email: false
irc:
channels: "irc.eqemulator.net#eqemucoders"
os: linux
+61 -26
View File
@@ -1,4 +1,37 @@
#EQEmu Cmake
#EQEmu CMake
#Variables used:
#EQEMU_DISABLE_CRT_SECURE_WARNINGS
#EQEMU_FAST_FLOATINGPOINT
#EQEMU_ENABLE_CRASH_LOGGING
#EQEMU_DISABLE_SAFESEH
#EQEMU_BUILD_MSVC_MP
#EQEMU_DEBUG_LEVEL
#EQEMU_LOG_LEVEL_STATUS
#EQEMU_LOG_LEVEL_NORMAL
#EQEMU_LOG_LEVEL_ERROR
#EQEMU_LOG_LEVEL_DEBUG
#EQEMU_LOG_LEVEL_QUEST
#EQEMU_LOG_LEVEL_COMMANDS
#EQEMU_LOG_LEVEL_CRASH
#EQEMU_STREAM_SEND_RATE
#EQEMU_STREAM_DECAY_RATE
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL
#EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX
#EQEMU_STREAM_AVERAGE_DELTA_MAX
#EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS
#EQEMU_DEPOP_INVALIDATES_CACHE
#EQEMU_ENABLE_BOTS
#EQEMU_DISABLE_LOGSYS
#EQEMU_COMMANDS_LOGGING
#EQEMU_BUILD_SERVER
#EQEMU_BUILD_LOGIN
#EQEMU_BUILD_TESTS
#EQEMU_BUILD_PERL
#EQEMU_BUILD_LUA
#EQEMU_SANITIZE_LUA_LIBS
#EQEMU_BUILD_CLIENT_FILES
#EQEMU_MAP_DIR
#EQEMU_ENABLE_PROFILING
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
#Can change this if you really want but you should upgrade!
@@ -7,9 +40,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#FindMySQL is located here so lets make it so CMake can find it
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
#For checking includes
INCLUDE (CheckIncludeFiles)
#Our project name is EQEmu
PROJECT(EQEmu)
@@ -74,8 +104,8 @@ IF(MSVC)
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
ENDIF(EQEMU_DISABLE_SAFESEH)
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." TRUE)
OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." ON)
IF(EQEMU_BUILD_MSVC_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(EQEMU_BUILD_MSVC_MP)
@@ -86,7 +116,7 @@ IF(MSVC)
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
ADD_DEFINITIONS(-DNOMINMAX)
ELSE(MSVC)
#Normally set by perl but we don't use the perl flags anymore so we set it.
@@ -97,6 +127,7 @@ ENDIF(MSVC)
IF(UNIX)
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
ADD_DEFINITIONS(-DFREEBSD)
ADD_DEFINITIONS(-D_GLIBCXX_USE_C99)
SET(FREEBSD TRUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -105,12 +136,6 @@ IF(UNIX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF(UNIX)
#use stdint.h types if they exist for this platform (we have to guess otherwise)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
IF(HAVE_STDINT_H)
ADD_DEFINITIONS(-DEQEMU_USE_STDINT)
ENDIF(HAVE_STDINT_H)
#debug level, 5 is default. Most people wont ever change this but it's there if you want to
SET(EQEMU_DEBUG_LEVEL 5 CACHE STRING "EQEmu debug level:
0 - Quiet mode Errors to file Status and Normal ignored
@@ -229,15 +254,18 @@ ENDIF(EQEMU_ENABLE_BOTS)
#What to build
OPTION(EQEMU_BUILD_SERVER "Build the game server." ON)
OPTION(EQEMU_BUILD_LOGIN "Build the login server." OFF)
OPTION(EQEMU_BUILD_AZONE "Build azone utility." OFF)
OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
OPTION(EQEMU_BUILD_PERL "Build Perl parser." ON)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." OFF)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Inport/Export Data Programs." ON)
OPTION(EQEMU_BUILD_LUA "Build Lua parser." ON)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
OPTION(EQEMU_ENABLE_PROFILING "Enable CPU profiler. Note: will slow down execution time." OFF)
#C++11 stuff
IF(NOT MSVC)
ADD_DEFINITIONS(-std=c++0x)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal")
ENDIF()
ENDIF(NOT MSVC)
#Various definitions
@@ -267,6 +295,7 @@ ADD_DEFINITIONS(-DLOG_LEVEL_DEBUG=${EQEMU_LOG_LEVEL_DEBUG})
ADD_DEFINITIONS(-DLOG_LEVEL_QUEST=${EQEMU_LOG_LEVEL_QUEST})
ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS})
ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH})
ADD_DEFINITIONS(-DGLM_FORCE_RADIANS)
IF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=true)
@@ -279,31 +308,41 @@ FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(MySQL REQUIRED)
IF(EQEMU_BUILD_PERL)
FIND_PACKAGE(PerlLibs REQUIRED)
INCLUDE_DIRECTORIES("${PERL_INCLUDE_PATH}")
INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}")
ENDIF(EQEMU_BUILD_PERL)
IF(EQEMU_BUILD_LUA)
FIND_PACKAGE(EQLua51 REQUIRED)
SET(Boost_USE_STATIC_LIBS OFF)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost")
FIND_PACKAGE(Boost REQUIRED)
INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}" "luabind")
OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON)
IF(EQEMU_SANITIZE_LUA_LIBS)
ADD_DEFINITIONS(-DSANITIZE_LUA_LIBS)
ENDIF(EQEMU_SANITIZE_LUA_LIBS)
ENDIF(EQEMU_BUILD_LUA)
INCLUDE_DIRECTORIES("${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm/glm")
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}" "${MySQL_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/common/glm")
IF(EQEMU_BUILD_LUA)
ADD_SUBDIRECTORY(luabind)
ENDIF(EQEMU_BUILD_LUA)
IF(EQEMU_ENABLE_PROFILING)
ADD_DEFINITIONS(-DEQPERF_ENABLED)
ADD_DEFINITIONS(-DEQP_MULTITHREAD)
INCLUDE_DIRECTORIES("eqperf")
ADD_SUBDIRECTORY(eqperf)
SET(PERF_LIBS eqperf)
ELSE(EQEMU_ENABLE_PROFILING)
SET(PERF_LIBS "")
ENDIF(EQEMU_ENABLE_PROFILING)
IF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(common)
ENDIF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
@@ -319,10 +358,6 @@ IF(EQEMU_BUILD_LOGIN)
ADD_SUBDIRECTORY(loginserver)
ENDIF(EQEMU_BUILD_LOGIN)
IF(EQEMU_BUILD_AZONE)
ADD_SUBDIRECTORY(utils)
ENDIF(EQEMU_BUILD_AZONE)
IF(EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF(EQEMU_BUILD_TESTS)
+51 -3
View File
@@ -1,5 +1,53 @@
EQEmu - Custom Game Implementation for EverQuest
EQEmu
===
Dependencies can be obtained at http://eqemu.github.io
[![Build Status](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server)
Overview
---
EQEmu is a custom server implementation for EverQuest
Dependencies
---
For Windows: http://eqemu.github.io
Login Server dependencies for Windows/Linux/OSX: http://eqemu.github.io
For Debian based distros (adjust to your local flavor):
- libmysqlclient-dev
- libperl-dev
- liblua5.1-0-dev (5.2 should work as well)
- libboost-dev
Further instructions on building the source can be found on the
[wiki](http://wiki.eqemulator.org/i?M=Wiki).
Bug reports
---
Please use the [issue tracker](https://github.com/EQEmu/Server/issues) provided by GitHub to send us bug
reports or feature requests.
The [EQEmu Forums](http://www.eqemulator.org/forums/) also have forums to submit
bugs/get help with bugs.
Contributions
---
The preferred way to contribute is to fork the repo and submit a pull request on
GitHub. If you need help with your changes, you can always post on the forums or
try IRC. You can also post unified diffs (`git diff` should do the trick) on the
[Server Code Submissions](http://www.eqemulator.org/forums/forumdisplay.php?f=669)
forum, although pull requests will be much quicker and easier on all parties.
Contact
---
- **User IRC Channel**: `#eqemu` on `irc.eqemulator.net`
- **Developer IRC Channel**: `#eqemucoders` on `irc.eqemulator.net`
- [EQEmulator Forums](http://www.eqemulator.org/forums)
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
More Information: https://github.com/EQEmu/Server/wiki
+935
View File
@@ -1,5 +1,940 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 02/09/2015 ==
Trevius: (RoF+) Setting Alt flag on characters in the Guild Management Window is now saved and functional for filtering.
Trevius: (RoF+) Guild Invites between RoF+ and previous Clients is now functional.
== 02/08/2015 ==
Kayen: Implemented npc specialability (44) COUNTER_AVOID_DAMAGE which when applied to the ATTACKING NPC will make their attacks more difficult to be avoided by riposte/dodge/parry/block.
Parama0: Negative modifer value that affects ALL avoid damage types dodge/parry/riposte/block) chance on defender. Ie (44,50 = 50 pct reduction to ALL)
Parama1: Negative modifer value that affects RIPOSTE chance on defender. Ie (44,1,0,50 = 50 pct reduction to riposte chance)
Parama2: Negative modifer value that affects PARRY chance on defender. Ie (44,1,0,0,50 = 50 pct reduction to parry chance)
Parama3: Negative modifer value that affects BLOCK chance on defender. Ie (44,1,0,0,0,50 = 50 pct reduction to block chance)
Parama4: Negative modifer value that affects DODGE chance on defender. e (44,1,0,0,0,0,50 = 50 pct reduction to dodge chance)
Example of usage: Player has Improved Dodge V (+50 pct dodge chance), you want to negate this bonus you would set 44,1,0,0,0,0,50 on your NPC.
== 02/07/2015 ==
Akkadius: Reduced #repop time dramatically by taking down hundreds of individual SELECT/DELETE/INSERT queries in routines and bringing it down to very few
See: https://www.youtube.com/watch?v=9kSFbyTBuAk
== 02/06/2015 ==
Uleat: Updated returns for Inventory and ItemInst const iterators. (const == const)
Uleat: Replaced 'iter_inst' and 'iter_contents' typedefs with their stl definitions
Uleat: Removed 'limbo' from the 'HasItem' series of checks - including lore checks. The client excludes this range and it causes issues when performing item searches - dupe lore checks were added to account for this.
Uleat: Updated command #iteminfo to show light source information and a few other things
== 02/05/2015 ==
Trevius: Fixed Environmental Damage for RoF2.
== 02/03/2015 ==
Trevius: Crashfix for TempName() when numbers are passed at the end of the name.
Uleat: Tweaking of item type exclusions to alleviate strobing conditions with light sources
== 02/02/2015 ==
Akkadius: 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
== 02/01/2015 ==
demonstar55: Add quest debugging to lua
eq.debug("Test debug level implicit 1")
eq.debug("Test debug level explicit 1", 1)
eq.debug("Test debug level explicit 2", 2)
eq.debug("Test debug level explicit 3", 3)
Akkadius: Add Packet Logging Categories
- 5 - Packet: Client -> Server - Logs::Client_Server_Packet
- 39 - Packet: Server -> Client - Logs::Server_Client_Packet
- 40 - Packet: Client -> Server Unhandled - Logs::Client_Server_Packet_Unhandled
See: http://wiki.eqemulator.org/p?Logging_System_Overhaul#packet-logging
== 01/31/2015 ==
Trevius: Fixed FindGroundZ() and GetGroundZ() to once again utilize the X and Y arguments that are passed to them.
== 01/30/2015 ==
Akkadius: Implemented event type "EVENT_ENVIRONMENTAL_DAMAGE"
- This event triggers when taking any sort of environmental damage. Example use:
sub EVENT_ENVIRONMENTAL_DAMAGE{
quest::debug("EVENT_ENVIRONMENTAL_DAMAGE");
quest::debug("env_damage is " . $env_damage);
quest::debug("env_damage_type is " . $env_damage_type);
quest::debug("env_final_damage is " . $env_final_damage);
}
Result: (Test falling in Velks): http://i.imgur.com/tPRL7yL.png
- Implemented LUA counterpart of this same implementation above
Akkadius (Bobaski): Add PoK New Merchant sql/git/optional/2015_01_30_poknowledge_spell_vendors.sql
== 01/29/2015 ==
Trevius: Added more information to Mercenary Logging.
Trevius: Added potential fix for Mercenaries that fail to unsuspend.
Trevius: Added a new "statscale" field to the merc_stats table that can be used to quickly balance Mercenary Stats based on Level.
Trevius: The new "statscale" field now combines with the Mercs::ScaleRate rule value (default 100 percent for both).
== 01/28/2015 ==
Akkadius: 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
== 01/27/2015 ==
Trevius: Removed "Mercenary Debug:" from the Mercenary Log entries.
Trevius: Resolved duplicate "You have no Mercenaries" messages when zoning without owning a Mercenary.
Trevius: Mercenaries should now always be able to unsuspend if the timer is up.
Trevius: More work on Mercenaries and Grouping to reduce bugs and redundant queries.
Uleat: Finished ClientVersion update to include patch file and namespace updates - don't forget to copy the renamed 'patch_UF.conf' into your eqemu directory.)
== 01/26/2015 ==
Uleat: Changed Corpse::MoveItemToCorpse() to allow 'by address' passing of removed item slot list. Fixed a bug that kept soul-bound items inside of bags from attuning properly
== 01/25/2015 ==
Trevius: Fixed an issue where Mercenaries were causing several DB queries per second while suspended.
Trevius: Added Logs::Mercenaries to the new Logging System. Logging of Mercenary information is off by default with the required SQL.
== 01/24/2015 ==
Uleat: Added equipment light source functionality to all mob derived classes (may still need tweaking...)
Notes:
- In addition to equipment light sources, innate npc_type light sources have already been activated
- Valid light source values are 0 thru 15 (values are bitmask checked and limited to 0x0F)
- Not all classes handle equipment light sources the same way due to their equipment/loot list configurations
- Spell (casting?) light sources may be implemented at some point..more information is needed
- Currently, loot list (general inventory) light sources are limited to ItemTypeMisc and ItemTypeLight to avoid issues with worn-specific light sources emitting
- Augment light sources are not recognized by the client and, therefore, not implemented in the server code
== 01/22/2015 ==
Akkadius: Massive Log System overhaul, see: http://wiki.eqemulator.org/p?Logging_System_Overhaul&frm=Main
== 01/21/2015 ==
Uleat: Added `light` field to npc_types load query (all six clients tested positive for functionality.)
Note: This only affects 'innate' light. Equipment (other) light is still in-work.
Optional SQL: utils/sql/git/optional/2015_01_21_NPC_Types_Light_Field_Primer.sql
== 01/20/2015 ==
Uleat: Fix for Inventory::_HasItemByUse(bucket) using the parent container when searching for bag container items.
== 01/19/2015 ==
Uleat: Changed 'enum EQClientVersion' to 'enum class ClientVersion.' Other light modifications were made to accommodate this namespace. Added 'RoF2' to the lua client version enumeration.
== 01/15/2015 ==
Uleat: Attempted fix for elusive inventory bug:
- Removed 'iter_queue' typedef and converted lcast to explicit or auto defines
- Reworked several functions that manipulate the cursor queue
- Found/corrected one occurrence of post-processing iterator incrementing in an ItemInstQueue handler
- Added many scope declarations in code that handles inventory manipulation (loose macros are bad...)
Uleat: Added Item_Struct pointer checks to ItemInst methods that did not have them
Uleat: Changed IsEquippable(race,class) to use bit-wise 'and' (&) over '(x%2)==1' in conditional check.
Uleat: Changed DyeArmor() assignment of 'armor_color' to use bit-wise 'or' and bit-shifting (|,<<) over multiplication and addition (*,+).
== 01/13/2015 ==
Uleat: Placed an upper limit on the cursor queue save loop.
Trevius: (RoF2) Guild invites now add new members as members instead of recruits, and /guild chat works properly.
Trevius: (RoF2) Guild Promote is now functional.
== 01/12/2015 ==
Uleat: Fix for OP_FormattedMessage text link server crashes
Uleat: Added text link translators for OP_TaskDescription (RoF+ -- all clients current)
Uleat: Fix for load_bots.sql using '\\' as a delimiter (Changed to '$$')
== 01/11/2015 ==
Uleat: Added text link translators for OP_TaskDescription (Ti thru UF..RoF+ in-work)
== 01/10/2015 ==
Uleat: Added text link translators for OP_Emote
== 01/09/2015 ==
Uleat: Added text link translators for OP_FormattedMessage
== 01/08/2015 ==
Trevius: Added some extra checks and clean-up related to Groups and Mercenaries.
== 01/07/2015 ==
Uleat: Excluded text link body from message scrambling in Client::GarbleMessage()
Trevius: Mercenaries now load directly from tables only. The vwMercNpcTypes view is no longer required and can be deleted.
Trevius: Query fix for group_leaders table. This may resolve some crashes/bugs related to Mercs/Bots and Groups.
== 01/06/2015 ==
Trevius: Changed the pet command #defines to be based on RoF2 list of pet commands and added decodes to Titanium, SoF and SoD.
Trevius: (RoF+) The /pet focus on/off and /pet hold on/off commands are now functional.
Trevius: Added defines for all remaining pet commands and some support for them as well.
== 01/05/2015 ==
Uleat: Fixed (added translators for) item/text links. Only 'OP_ChannelMessage' and 'OP_SpecialMesg' are currently handled..more text channels will be added as the need arises.
== 01/03/2015 ==
Trevius: (RoF2) /shield (shielding) and /key (key ring) are both now functional after opcode updates.
== 01/02/2015 ==
Trevius: (RoF2) *Hopefully* Fixed looting incorrect items from NPCs. Please report any issues!
Trevius: (RoF2) Now able to loot items past the 10th slot on NPC corpses.
Trevius: Attuned Items can now be auto-looted and will equip properly.
Trevius: Mercenaries and Bots will no longer take a share from /split or /autosplit.
== 12/30/2014 ==
Trevius: (RoF2) Aug Type 21 no longer shows the "Buy Now" button in the aug slot of items.
Trevius: (RoF2) Identified the "Copied" item flag with the help of Uleat.
== 12/29/2014 ==
Trevius: (RoF2) Identified a few Item Fields and resolved an issue with cloth armor not accepting certain augments that they should.
Akkadius: Updated $client->UpdateTaskActivity to have optional argument ignore_quest_update IE: Client::UpdateTaskActivity(THIS, TaskID, ActivityID, Count, [ignore_quest_update])
Akkadius: Also updated internal UpdateTaskActivity methods to optionally ignore quest based task updates to prevent feedback
== 12/28/2014 ==
Uleat: Implemented class Client::TextLink as a replacement for the dozens of individual link formatters.
== 12/27/2014 ==
Akkadius: Add option to automatic database upgrade script 5) Download latest Opcodes from Github
Trevius: (RoF2) Fixed dropping items on the ground so they go to ground level instead of camera height.
Trevius: Show Helm Option should be functional again.
Kayen: Implemened npc special ability (43) CASTING_RESIST_DIFF which sets innate resist modifier on
ALL spells used by that NPC. Ie. 43,1,-200 will set a -200 innate resist diff, so if your npc cast
a spell that has a -10 resist modifier the final resist diff would be -210.
== 12/25/2014 ==
Uleat: Updated 'links' code for all clients
== 12/24/2014 ==
Trevius: (RoF+) Added herosforgemodel field to the npc_types table.
Trevius: (RoF2) Updated item links from #npcstat command output.
Trevius: (RoF+) Implemented Hero's Forge Armor for NPCs. Set the herosforgemodel field in npc_types table to the model (example: 84 for full set, or 12107 for robe).
Trevius: (RoF+) Hero's Forge Armor now overrides NPC texture settings. To display Hero's Forge Armor Helms, set helmtexture field to anything other than 0.
== 12/23/2014 ==
Uleat: Tidied up some ItemInst* declarations and added some nullptr checks.
Trevius: (RoF+) Added support for Hero's Forge Robe Models. Set herosforgemodel field in items table to exact model such as 11607, 11707, etc.
== 12/22/2014 ==
Trevius: (RoF2) Fixed Tracking.
Trevius: (RoF+) Added a work-around for the cursor buffer issue.
== 12/21/2014 ==
Trevius: (RoF2) Fixed Extended Targets Window by correcting opcodes.
Trevius: (RoF/RoF2) Fixed Guild Rank in the Player Profile, which prevents the guild rank message on login/zone.
== 12/20/2014 ==
Akkadius: Updated #cvs to display RoF2 Client Stream count
== 12/19/2014 ==
Trevius: (RoF2) Fixed Leadership AA Purchasing and Recipe Search by correcting opcodes.
Trevius: Fixed Armor Tinting (players and NPCs) that was broken during a previous update.
Trevius: (RoF2) Fixed Rest Timer, Show Helm Option, Auto-Consent Options, and identified Krono in the PP.
Trevius: Fixed Selling for Alternate Currency Merchants for RoF and RoF2.
== 12/18/2014 ==
Trevius: Finished lining up the RoF2 Player Profile Struct. Zone times are now normal, and everything from the PP is accurate in game now.
Trevius: Fixed zoning after death for RoF2.
== 12/17/2014 ==
demonstar55: Use vectors for route stuff, should be more CPU cache friendly so faster
Secrets: EQStream changes as recommended by a community member in private.
== 12/15/2014 ==
Trevius: (RoF+) Implemented the 6th Augment Slot for Items.
Trevius: Player Corpses now saved attuned settings for Items.
Required SQL: utils/sql/git/required/2014_12_15_multiple_table_updates.sql
== 12/13/2014 ==
demonstar55: Fix guild rank spam on zone (needed to be in OP_PP).
Trevius: (RoF+) Implemented Armor Ornamentation using Hero's Forge Armor Models. To use, create an ornamentation augment and set the herosforgemodel field in the items table.
Trevius: (RoF+) Added command #heromodel (#hm for short) - Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)
Be sure to run this or there will be item loss:
Required SQL: utils/sql/git/required/2014_12_13_inventory_table_update.sql
== 12/12/2014 ==
demonstar55: Add special attack 42, Ignore Root Aggro Rules. This allows you to root a mob and have them still use the normal aggro rules (so they will attack the one with most hate, not closest)
== 12/09/2014 ==
Trevius: (RoF+) Implemented Hero's Forge Armor Models for Items. To use, set herosforgemodel field in the item table to a model number such as 63 (for example).
demonstar55: SoF+ swarm pets will no longer be F8able (without a hack!)
== 12/08/2014 ==
Secrets: Added a feature that allows an EQ client to log in directly to World without having to enter the LoginServer, provided the 'password' field is set in WorldServer.
== 12/04/2014 ==
Kayen: Ranged attacks will now more accurately check MAX firing range, fixing the issue where you would
hit ranged attack and nothing would happpen due to incorrect server side range checks.
Trevius: Initial addition of the RoF2 client from May 10th 2013 (currently available on Steam as the F2P client).
Trevius: RoF2 is disabled by default, but you can enable by editing /common/patches/patches.cpp (see comments)
== 12/01/2014 ==
Trevius: Mercenaries now spawn as the same Gender and Size of the Merchant they are purchased from.
Trevius: Mercenaries now spawn with randomized facial features when purchased.
Trevius: Setting a lastname for NPCs will now override any hard coded lastname (such as GM Trainers).
Required SQL: utils/sql/git/required/2014_12_01_mercs_table_update.sql
== 11/28/2014 ==
Trevius: Fixed a zone crash related to numhits for spells.
Trevius: Fixed a query related to group leaders logging in.
Trevius (Natedog): Fixed a world crash related to attempting to join an adventure with Mercenaries.
== 11/27/2014 ==
Kayen: Projectiles (ie Arrows) fired from archery will now do damage upon impact instead of instantly (consistent w/ live).
Optional SQL: utils/sql/git/optional/2014_11_27_ProjectileDmgOnImpact.sql
== 11/25/2014 ==
Trevius: Spells that modify model size are now limited to 2 size adjustments from the base size.
Trevius: Fix to prevent Mercenaries from being set as Group Leader.
== 11/24/2014 ==
Trevius: Added Rule NPC:EnableMeritBasedFaction (disabled by default) - Allows faction gain to work similar to experience.
== 11/22/2014 ==
Trevius: Grouping with Mercenaries is now considerably less buggy.
Trevius: Fixed an issue with Spell Globals related to high Character IDs.
Trevius: Crash fix for Swarm Pets.
== 11/19/2014 ==
Trevius: Mercenaries now Dismiss, Suspend, Unsuspend, and Die correctly.
== 11/18/2014 ==
Trevius: Mercenaries can now zone once again.
== 11/17/2014 ==
demonstar55: Correct OP_AugmentInfo reply. This fixes RoF display issue with Adventurer's Stone. Still issues with UF/SoF/SoD though.
== 11/16/2014 ==
demonstar55: fix size issue with ControlBoat_Struct and exploit fix in OP_BoardBoat
Akkadius: Implemented Automatic Database update and versioning system
Akkadius: Created database revision define, this is located in version.h in common #define CURRENT_BINARY_DATABASE_VERSION 9057
- This revision define will need to be incremented each time a database update is made
- Along with a revision define increment, you will need to update the db_update manifest located in:
- https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
- An entry needs to be made at the bottom of the manifest, the entry is quite simple
- Example: 9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
- This latest example is checking to see if the spells_new table contains the column 'disallow_sit', if its empty, the update needs to be ran
- More examples of match types below:
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
# 0 = Database Version
# 1 = Filename.sql
# 2 = Query_to_Check_Condition_For_Needed_Update
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
# contains = If query results contains text from 4th value
# match = If query results matches text from 4th value
# missing = If query result is missing text from 4th value
# empty = If the query results in no results
# not_empty = If the query is not empty
# 4 = Text to match
- The manifest contains all database updates 'Required' to be made to the schema, and it will contain a working backport all the way back to SVN -
currently it is tested and backported through the beginning of our Github repo
- On world bootup or standalone run of db_update.pl, users will be prompted with a simple menu that we will expand upon later:
============================================================
EQEmu: Automatic Database Upgrade Check
============================================================
Operating System is: MSWin32
(Windows) MySQL is in system path
Path = C:\Program Files\MariaDB 10.0\bin/mysql
============================================================
Binary Database Version: (9057)
Local Database Version: (9057)
Database up to Date: Continuing World Bootup...
============================================================
Retrieving latest database manifest...
URL: https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
Saved: db_update/db_update_manifest.txt
Database Management Menu (Please Select):
1) Backup Database - (Saves to Backups folder)
Ideal to perform before performing updates
2) Backup Database Compressed - (Saves to Backups folder)
Ideal to perform before performing updates
3) Check for pending Database updates
Stages updates for automatic upgrade...
0) Exit
Akkadius: Created db_update.pl, placed in utils/scripts folder, used for the automatic database update routine (Linux/Windows)
- db_update.pl script created db_version table if not created, if old one is present it will remove it
Akkadius: Created db_dumper.pl, placed in utils/scripts folder, used for the automatic database update routine backups and standalone backups (Linux/Windows)
Akkadius: World will now check the db_update.pl script on bootup, if the db_update.pl script is not present, it will fetch it remotely before running -
when db_update.pl is done running, world will continue with bootup
== 11/15/2014 ==
Uleat(Natedog): A better fix for OP_ShopPlayerBuy - doesn't cause the issues that I introduced
Kayen: Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range.
Kayen: 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).
Kayen: Updated perl quest function: MakeTempPet(Tspell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)
Kayen: 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
== 11/14/2014 ==
Secrets: Identified object size and solidtype as flags. Exported them as functions to Perl.
demonstar55: Don't use the hack for charms that doesn't work on RoF
demonstar55: UF too
demonstar55: Tit
demonstar55: SoF
demonstar55: SoD
demonstar55: 62 (untested)
== 11/13/2014 ==
Kayen: Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width).
Kayen: Implemented target type (32) AE Target HateList
Kayen: Implemented target type (36) Area Client Only
Kayen: Implemented target type (37) Area PC Only
Kayen: Implemented target type (39) Group No Pet
Uleat: PlayerLogMerchantTransactions does not support partial stack purchase logging at this time
== 11/12/2014 ==
Uleat: Changed 'GMTrainee' struct to reflect the actual client hard-coded max skill count (100) - applies to all currently supported clients (6.2->RoF)
== 11/11/2014 ==
Uleat: Third attempt at a fix for GM trainer zone crashes... (this is starting to look like a KLS fix...)
== 11/10/2014 ==
Uleat: Fix for GM Trainer crashing server (really!)
JJ: Yellow faction messages.
== 11/09/2014 ==
Kayen: Implemented support for spell target type (45) 'Target Rings' on Underfoot (does work earlier expansions). Thanks to Lecht for figuring out the op_code side.
JJ: Implement new Live-like faction adjustment message using rule Client:UseLiveFactionMessage.
Optional SQL: utils/sql/git/optional/2014_11_09_LiveFactionMessages.sql
== 11/06/2014 ==
demonstar55: Tracking default sort will now be correct order
Trevius: Fixed dynamic merchant list loading. Allows any merchant to be used in any zone.
== 11/03/2014 ==
Secrets: Fixed an overflow in melee lifetap calculations (int16 vs int32)
Secrets: Fixed overflow on AC and ATK values that can go out of range.
Secrets: Merc/Bot fixes for previous updates.
Secrets: Changed a lot of int16s for stat-related functions to int32 because they were causing combat formula overflows (int16/int32 mismatch).
Secrets: Linux fix?
== 11/02/2014 ==
Akkadius: Added out of range checking for Spell Save/Loads
== 11/01/2014 ==
Trevius: Fixed potential crash related to Pets/Mercs buffs when targeting themselves.
JJ: (noudess) Revamped faction system. See https://github.com/EQEmu/Server/pull/256
== 10/28/2014 ==
Uleat: Added Client::InterrogateInventory(). Can be invoked by #interrogateinv and is also called when Handle_OP_MoveItem() calls for SwapItemResync()
== 10/22/2014 ==
Uleat: Fix for stacking items in a world object..added a new command option: #peekinv world - will show world container contents, if one is in use by target.
== 10/20/2014 ==
demonstar55: Inspect Buffs rank 1 will now show NPC buffs in target window (SoD+)
== 10/19/2014 ==
Uleat: Updated command #peekinv to display item links properly in RoF clients
demonstar55: Group Mentoring in raids
demonstar55: Inspect Buffs (text only version) works in raid groups
demonstar55: Make use of the Inspect Buffs op/packet. 62 SOL until someone finds its op
== 10/18/2014==
demonstar55: Implement group mentor, sharing leadership exp (SoF+ only)
demonstar55: Add gaining of group leadership while in raids
== 10/16/2014 ==
Uleat: Fixed the auto-conversion view naming error and renamed the views in the script files. Added a fix sql for databases that auto-converted.
Fix SQL: ../sql/git/bots/deprecated/2014_10_16_Lower_Case_View_Fix.sql
== 10/15/2014 ==
Uleat: Cleaned up load/drop bots sqls, added '../utils/sql/git/bots/deprecated' and '../deprecated/load_bots_old.sql' (use this file on pre-player blob conversion databases.)
Notes: I modifed the behavior of both load and drop bots to fail on the first operation if their modifications have been performed already.
'load_bots.sql' will explicitly add bot schema, while 'drop_bots.sql' will explicitly drop it. I also added a few lines to change
a few altered tables back to their original state - as of the date in the file.
== 10/13/2014 ==
demonstar55: Partially implement leadership and raids
Currently working: client side only effects and stat bonuses.
Not working: Mark NPC, and other stuff that need extra server side support
Currently only UF tested (Tit and 62 may just work, others need packet work)
== 10/12/2014 ==
Akkadius: Fix for LDON Character Stat load
== 10/11/2014 ==
demonstar55: Implement Raid MOTD for UF
Don't forget 2014_10_11_RaidMOTD.sql!
== 10/09/2014 ==
Uleat: Added 'BOTS' conversion code to supplement the database 'PlayerProfile' blob conversion that Akkadius recently implemented.
Note: This automatic conversion uses the view `vwbotcharactermobs` as an update vector. If you need/would like for the converter to run on
previously and/or manually changed code, or just have a need for it to re-run, change the following in the database view and save:
"c.`last_login`," to "c.`timelaston`,"
"c.`zone_id`" to "c.`zoneid`"
"FROM `character_data` AS c" to "FROM `character_old` AS c"
** This will only work if you haven't deleted your `character_old` table **
== 10/07/2014 ==
demonstar55: Identified tutorial flag in all charcreate packets, reworked logic to correctly set homes binds
== 10/05/2014 ==
Uleat: Added Server<->Corpse slot translators needed for re-enumeration (inactive until phased in)
== 10/03/2014 ==
Uleat: Fixed Ti(6.2) OP_AugmentInfo translation that I broke (does not currently need and I mis-read a process)
Uleat: Moved client patch OP_LootItem slot translation to external handlers
== 10/02/2014 ==
Kayen: Exported to PERL $client->SendSpellAnim(targetid, spellid)
This function sends the spell graphic of a spell without actually having to cast the spell.
== 10/02/2014 ==
Uleat: First round of Ti/6.2 translators added - needed for re-enumeration
== 10/01/2014 ==
Kayen: Exported to PERL $client->SendColoredText(color, msg)
demonstar55: Exported SendColoredText to lua
== 09/30/2014 ==
Uleat: Implemented click-casting from bag slots for clients that natively support it (RoF)
== 09/28/2014 ==
demonstar55: Add support for post June 18, 2014 Hundred Hands Effect spells (they changed the formula and stuff)
set Spells:Jun182014HundredHandsRevamp to true if you're using a spell file from June 18, 2014+
== 09/27/2014 ==
Kayen: Implemented perl function $mob->GetSpellStat(spell_id, identifier, slot);
Note: identifier is the stat field in spells_new, slot is used for certain effects like effectid, base,base2, max ect.
Example $mob->GetSpellStat(121, "range"); //Returns spell range
Example $mob->GetSpellStat(121, "effectid", 1); //Returns the the value of effectid1
This will allow you to pull almost all the data for any spell in quest files.
demonstar55: Move the client's SetAttackTimer to the end of Client::CalcBonuses to keep the haste in sync
demonstar55: Correct haste/slow "stacking" rules
demonstar55: Correct SE_AttackSpeed4 to respect unslowable
demonstar55: Make the haste be between 1-225 like the client (<100 = slow, >100 = haste) to ...
demonstar55: Correct Hundred Hands effect and use formula provided by devs
== 09/24/2014 ==
Uleat: Re-ordered server opcodes and handlers to give them some predictability of location (I need this for the inventory re-enumeration.)
demonstar55: Added helper function bool EQEmu::IsTradeskill(uint32 skill)
== 09/23/2014 ==
Kayen: Spell recourse effects will now be applied AFTER the base spells effects have been applied (consistent with live).
Kayen: SE_ApplySpell and SE_TriggerSpell will now be applied based on which effect slot they are used in (instead of always before all spell effects are checked).
Note: If a spell has multiple SE_TriggerSpell effects within it. Only one will be able to trigger. (If you want multiple spells use SE_ApplySpell)
== 09/22/2014 ==
Akkadius: #resetaa now covers the function of #resetaa and #refundaa
- #resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
Akkadius: Removed #refundaa
Akkadius: Removed a lot of debug code for blob conversion
Akkadius: Changed status logging for loads/saves to Debug category
== 09/21/2014 ==
Akkadius: Player Profile Blob to Database Conversion
- Summary: HUGE difference in database speeds reads/writes and 1:10 datasize difference
- The new character storage engine unlike the character_ table before, is able to properly index data and make use of
proper MySQL/MariaDB caching optimizations and performance has increased phenominally
PERFORMANCE AND STATISTICS FIGURES (Varies on hardware):
- EZ Server Character data size of 2.6GB `character_` table alone now takes up approx 600MB
- Character Data Loads take approx .03 seconds BEFORE MySQL/MariaDB cache
- Character Data Loads take approx .001-.0035 seconds AFTER MySQL/MariaDB cache
- Character Data Saves take approx .0001 - .003 for any particular save operation
- Database Auto Conversion: When the 'character_' table exists, World boot-up will queue an auto-conversion prompt and convert all of your characters, BACKUP
YOUR DATABASE BEFORE CONVERTING, here is an EASY backup script: http://wiki.eqemulator.org/p?MySQL_DB_Backup_Script
- On auto conversion, the following tables are created automatically:
- Table: `character_skills` - Stores Character Skills
- Table: `character_languages` - Stores Character Language
- Table: `character_bind` - Stores Character Bind point and Home Bind point designated by is_home bool field
- Table: `character_alternate_abilities` - Stores all Character AA
- Table: `character_currency` - Stores all Platinum/Gold/Silver/Copper and character related currencies
- Table: `character_data` - Stores basic character data (Fields from `character_` table migrated to this table)
- Table: `character_spells` - Stores character spells
- Table: `character_memmed_spells` - Stores character memorized spells
- Table: `character_disciplines` - Stores character disciplines
- Table: `character_material` - Stores character armor dye textures
- Table: `character_tribute` - Stores character tributes
- Table: `character_bandolier` - Stores character bandoliers
- Table: `character_inspect_messages` - Stores character inspection messages (Moved from `character_` table)
- Table: `character_leadership_abilities` - Stores character Leadership AAs
- Loads: Majority of Player profile loads now occur at Client::Handle_Connect_OP_ZoneEntry
LoadCharacterFactionValues(uint32 character_id, faction_map & val_list);
LoadCharacterSpellBook(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMemmedSpells(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLanguages(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterDisciplines(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterSkills(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterData(uint32 character_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
LoadCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBindPoint(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterMaterialColor(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterPotions(uint32 character_id, PlayerProfile_Struct* pp);
LoadCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
- Saves: Occur all over the code now instead of calling full saves
SaveCharacterBindPoint(uint32 character_id, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading, uint8 is_home);
SaveCharacterCurrency(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp);
SaveCharacterAA(uint32 character_id, uint32 aa_id, uint32 current_level);
SaveCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
SaveCharacterMaterialColor(uint32 character_id, uint32 slot_id, uint32 color);
SaveCharacterSkill(uint32 character_id, uint32 skill_id, uint32 value);
SaveCharacterLanguage(uint32 character_id, uint32 lang_id, uint32 value);
SaveCharacterDisc(uint32 character_id, uint32 slot_id, uint32 disc_id);
SaveCharacterTribute(uint32 character_id, PlayerProfile_Struct* pp);
SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name);
SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon);
SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp);
- Deletes:
DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterMemorizedSpell(uint32 character_id, uint32 spell_id, uint32 slot_id);
DeleteCharacterDisc(uint32 character_id, uint32 slot_id);
DeleteCharacterBandolier(uint32 character_id, uint32 band_id);
DeleteCharacterLeadershipAAs(uint32 character_id);
- Now occur all over the code and only trigger when necessary
- Two FULL saves when looting a corpse, this has been reduced to just currency saves on initial loot and trimmed to one save since AddToMoneyPP did it already
- Every time a player moves coin with any situation (Splits/Trades/Merchant/Skills/Bank Coin Exchange/Coin Moves), a full save is made, this is now just a currency save
- Every time a player skilled up at a skill vendor, a full blob save hit was made, this is not just a currency hit
- Every time an AA was purchased, a full save was made
- Every time a spell was scribed/swapped, disc was trained
- When a client exists a zone, when a client enters a zone
- NOTE: These amount of excessive saves have caused scalability issues that cause the `character_` table to hang which causes process hangs that affect the whole server
because of the slowness of the `character_` table and the blob not allowing any indexing to occur
- All functions that once depended on the `character_` table are now rewritten to appropriately read from the `character_data` table
- Database query errors that occur during conversion or from and load/save/delete character functions are now leveraged via ThrowDBError and logs now go to
Server_Folder_Root/eqemu_query_error_log.txt (You cannot log errors natively through MySQL)
- DBASYNC IS NOW COMPLETELY REMOVED - This was mainly for Character data async loads/saves and merchantlist loads
- Side implementations:
Perl Exports:
- quest::crosszonesetentityvariablebynpctypeid(npctype_id, id, m_var) - Sets entity variables world wide with specified npctype_id
- quest::crosszonesignalnpcbynpctypeid(npctype_id, data) - Signals all NPC entities world wide with specified npctype_id
- $client->GetTaskActivityDoneCount(TaskID, ActivityID) - Gets task activity done count by task id and activity id for client entity
VIEW TABLE SIZE AFTER CONVERT:
SELECT CONCAT(table_schema, '.', table_name) as table_name,
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
WHERE `table_name` LIKE 'character_%'
ORDER BY DATA DESC;
== 09/20/2014 ==
demonstar55: Fix crash in SendEnterWorld on illegally long names
demonstar55: The client only lets you enter 15 characters for your name (UF at least)
demonstar55: Add rule Spells:SHDProcIDOffByOne for pre-UF spell file, set to true, UF+ set to false
KLS: #suspend and #ban now have required messages to record the reason for the ban/suspension.
== 09/19/2014 ==
demonstar55: Added Client::Tell_StringID (used in tell queue messages)
demonstar55: Tell queues (and offline) messages now show correctly
demonstar55: Fix starting with capital check
== 09/18/2014==
demonstar55: Implement tell queues
Currently set to a limit of 20 by default (World:TellQueueSize) I was unable to hit the limit on live though (100+)
The required SQL nukes the old tell queue table, which may or may not be in your DB
Optional SQL adds the rule to the DB to allow easy of change
Note: this does not play well with multiple sessions with the same name on (crash and relog and have multiple sessions) but normal tells don't play well either
== 09/16/2014 ==
demonstar55: Implement spell formula 137 (BER AA Desperation)
Uleat (NateDog): Fix for LoadBuffs() crash when a spell with a non-persistent Illusion effect was loaded.
demonstar55: Fix some effect calcs + implement more (derived from the client)
== 09/15/2014 ==
Kayen: Nimbus effects will now be reapplied after zoning and will be removed when associated buff fades.
== 09/13/2014 ==
demonstar55: Fix rogues not having Thieves' Cant
== 09/09/2014 ==
demonstar55: Incrase Mob kick/bash timer by 3
see: http://www.eqemulator.org/forums/showthread.php?t=38734
demonstar55: Fix slow effect on NPC special attack reuse timers
see: http://www.eqemulator.org/forums/showthread.php?t=38734
demonstar55: Slow fixes to bots!
demonstar55: Revamped how NPC attack rate is set
SQL: 2014_09_09_attack_delay.sql
demonstar55: Added attackdelay to #npcedit
== 09/08/2014 ==
demonstar55: Fix slow calc
see: http://www.eqemulator.org/forums/showthread.php?t=38734
== 09/07/2014 ==
Akkadius: Fixed ROF Augment item dupe with not checking for available slots properly and adding items to the virtual instance
== 09/06/2014 ==
Uleat: Tweaked 'Smart' trading code to return main slots before sub slots in stackable and free space search processes. (If enough people ask for it, I'll add an optional rule to allow 'bag packing' - the original implementation behavior)
== 09/05/2014 ==
Uleat: Fix for cursor item loss when zoning. (Thanks to the other devs who traced and fixed the 'macro' issue!)
demonstar55: Fix size getting nuked with lua's SendIllusionPacket
== 09/03/2014 ==
Secrets: Identified the routines needed to augment items in RoF. Currently, only Insert and Remove are supported. Swap and Destroy do not work due to missing functions related to the cursor.
demonstar55: Added work around command to show numhits on your buffs (#shownumhits)
Uleat: Fix for timer issue introduced by Zone::ShutDown() fix.
== 09/02/2014 ==
Secrets: Identified OP_GuildPromote for RoF clients.
Secrets: Fixed promotion, demotion, transferring a leader and displaying of client ranks in the Rain of Fear client. The rain of fear client, as such, will only have 3 ranks like the other clients, but supports a theoretical 8 ranks later.
Secrets/Akkadius: Fixed an issue involving character name lookup in the new DB code.
demonstar55: crash fix checking DivineAura in hate_list.cpp
Secrets: Reverted some code that got in the main branch that shouldn't have gotten there.
Uleat: Changed #loc to report the same precision as /loc for Cartesians
== 08/31/2014 ==
KLS: Fixed a bug in fishing in S3D zones
KLS: Fixed a bug in turnins with new any abstraction
KLS: Fixed a few quest related inconsistencies.
KLS: Added Lua EntityList::ChannelMessage(from, type, msg, language)
== 08/30/2014 ==
demonstar55: (noudess) Merchants should be more descriptive of why they don't sell to you
== 08/26/2014 ==
Uleat: Implemented 'Smart' Player Trade transfers. Trades are processed by containers, stackables and then all remaining. QueryServ logs have been updated to match these transactions.
Note: QueryServ logs previously listed 'Items' on the main entry table. This indicated the number of slots affected and not the actual number of items.
This field now indicates the actual number of items transferred. For non-stackable, the value is '1' and stackable is the number of charges. A _detail_count
property has been added to both 'Trade' and 'Handin' structs to indicate the number of details recorded..though, not tracked..it could be added.
== 08/24/2014 ==
Uleat: Fix (attempted) for zone crashes related to zone shut-down. This change disables all Mob AI and disables/deletes all Mob timers once Zone::ShutDown() is called. More areas will be addressed as reports come in.
Note: Perl and Lua quests tested to work..please post any aberrant behavior. (I finally set my spell-check to US English...)
Akkadius: Character creation process crash fix and query cleanup
Akkadius: Created `character_lookup` table for applications that mirrors all `character_` table fields minus blob fields for application lookups
- A 2.4GB character_ table will take 7 seconds to query on a SSD versus .1s on the character_lookup table
- This also causes applications like Magelo to burst reads of the entire character table because of the blob fields that come with the reads, as much as 500-600MB/s even if a indexed id filter is provided
- This field is synchronized on player save and has 0.001s DB hit
- When we split out from the blob, ideally this table can be removed
- Required SQL: utils\sql\git\required\2014_08_24_character_lookup.sql
== 08/23/2014 ==
Akkadius: Changed zone process window title format, example: 'crushbone :: clients: 6 inst_id: 1 inst_ver: 0 :: port: 7015'
Akkadius: Most of the following changes are QueryServ related, fully implemented its original functionality to be able to offload
intensive or metric based logging to a remote server process that could exist on another server entirely
Akkadius: Implemented Player Event Logging Types (Go to table `qs_player_events`):
1 = Player_Log_Quest,
2 = Player_Log_Zoning,
3 = Player_Log_Deaths,
4 = Player_Log_Connect_State,
5 = Player_Log_Levels,
6 = Player_Log_Keyring_Addition,
7 = Player_Log_QGlobal_Update,
8 = Player_Log_Task_Updates,
9 = Player_Log_AA_Purchases,
10 = Player_Log_Trade_Skill_Events,
11 = Player_Log_Issued_Commands,
12 = Player_Log_Money_Transactions,
13 = Player_Log_Alternate_Currency_Transactions,
- All QueryServ logging will be implemented with a front end in EoC 2.0 very soon
- Architecture page: http://wiki.eqemulator.org/p?QueryServ_Architecture
Akkadius: Changed all QS Error related logging to 'QUERYSERV__ERROR'
Akkadius: (Natedog) (Crash Fix) Legacy MySQL bug revert for loading AA's COALESCE( from COALESCE (
Akkadius: Implemented Perl Quest objects (LUA still needed to be exported):
- quest::qs_send_query("MySQL query") - Will send a raw query to the QueryServ process, useful for custom logging
- quest::qs_player_event(char_id, event_desc); - Will process a quest type event to table `qs_player_events`
Akkadius: Added MySQL Tables
- `qs_player_aa_rate_hourly`
- `qs_player_events`
- Source table structures from:
- utils\sql\git\queryserv\required\08_23_2014_player_events_and_player_aa_rate_hourly
To get the complete QueryServ schema, source from here:
- utils\sql\git\queryserv\required\Complete_QueryServ_Table_Structures.sql
Akkadius: Added rules for each logging type, source rules here with them enabled by default:
- utils\sql\git\queryserv\required\Complete_QueryServ_Rules_Enabled.sql
Akkadius: Spawn related logging cleanup
Akkadius: General code cleanup
Akkadius: More to come for QueryServ
== 08/22/2014 ==
Uleat: Rework of Trade::FinishedTrade() and Trade::ResetTrade() to parse items a little more intelligently.
Trade window items are now sent to client inventory in this order:
- Bags
- Partial stack movements
- All remaining items
If any of these procedures cause any problems, please post them immediately.
== 08/20/2014 ==
Uleat: Rework of Trade::AddEntity() - function used to move items into the trade window. Now accepts argument for 'stack_size' and updates client properly.
Note: I tested trade with Titanium:{SoF,SoD,UF,RoF} in both directions and no client generated an OP_MoveItem event for attempting to place a stackable
onto a partial stack already in the trade window. The only way to achieve stacking is to click on the receiving client. If there is a partial stack remaining
on the cursor after the OP_MoveItem event, and there is room available, the client will generate subsequent events to move the remaining count.
== 08/19/2014 ==
Akkadius: Implemented a Stop_Return feature (Accidental item handin prevention) that will be symmetrically used with plugin::return_items that I am currently running live testing on EZ before releasing to EQEmu. This does not hurt to have this in the source.
Akkadius: Fixed crash where 'attacker' validation is not being checked
Akkadius: Removed petition console spam that does not follow traditional logging and is useless
Akkadius: Made fix with SympatheticProcChances where it was checking for TempItem->Focus.Effect instead of TempItemAug->Focus.Effect
== 08/18/2014 ==
Uleat: Fix for https://github.com/EQEmu/Server/issues/127 -- also activated a remarked action in doors.cpp to eliminate a memory leak.
== 08/16/2014 ==
KLS: (addmoreice) Trying out some unstable DB changes. Do backup your database before trying them as master will be considered unstable for a few days at least.
Uleat (Noudness): Fixed a floating-point comparison error that led to the notorious 'client bounce' (this is not related to the
'mob falling' due to not having maps installed.) This fix also eliminates a sizeable amount of unnecessary out-going packets due
to invalid orientation corrections.
Note: This patch is probably of significant enough importance that admins may wish to manually apply this to older server builds.
The number of packets reduced per second should be approximately (num_stationary_close_clients * (num_close_clients - 1)). This will
likely have the most effect in zones like: Nexus, Bazaar, Guilds (Halls) and RAID INSTANCES - where players don't move around a lot.
== 08/15/2014 ==
Uleat: Reactivated the Bot::Spawn() code for sending post-spawn wear change updates..temporary until I can sort out the proper usage.
== 08/13/2014 ==
Uleat (Kingly_Krab): Fix for bot chest armor graphic glitch. (fix also caused RoF #wc to work properly)
== 08/02/2014 ==
Kayen: Implemented spell_news fields
- npc_no_los (check if LOS is required for spells)
- InCombat, OutofCombat - Used together to restrict spells to only be cast while
in/out of combat (beneficial) or if target is in/out of combat (detrimental).
-min_dist, min_dist_mod, max_dist, max_dist_mod - Scales spell power based on targets distance from caster.
*This will require further work to fully implement but will work with 90% of live spells as is.
*If making custom spells do not include effects that can't be scaled (like a spell trigger)
- min_rage sets minimum distance range that must be away from target.
Required SQL: utils/sql/git/required/2014_08_02_spells_new.sql
== 07/31/2014 ==
Uleat: More inventory slot constant conversions. This should be the bulk of everything..but, due to the size of the server code, there
may be some hidden ones. (client_packet.cpp and the client translators still need a thorough review.)
Note: Please report any abnormal behaviour with inventory-related content..each diff file was reviewed 3 times..but, things CAN be missed.
Uleat: Test fix for client crashes in Bazaar, while actively selling, with a charm in the Trader's Satchel.
== 07/27/2014 ==
Uleat: More updates to the dictionary. Added a 'constants' file for each client translator..these will tie-in to the dictionary. Started
replacement of hard-coded numeric values with a pre-defined constant. This will help in the transition.
== 07/16/2014 ==
Uleat: Initial commit of new client/server 'dictionaries' - work in-progress... Changed equipment slot references to reflect new naming
conventions. Lua enumerations maintain both the old and new names as to not break existing scripts..but, the old names are deprecated.
== 07/14/2014 ==
KLS: Changes to CMake build
-Lua builds by default now
-Common has been renamed common
-Binary files will now be put into ${CMAKE_BINARY_DIR}/bin instead of ${CMAKE_BINARY_DIR}/Bin
The last two are of note to people on non-windows systems as case sensitivity is important. Edit your scripts accordingly, thank you.
== 07/10/2014 ==
Kayen: Updated table npc_spells to now support defensive and ranged procs.
Note: Proc rate modifier work as it does for spell effects (ie 200 = 200% baseline chance modifier)
Table is also now contains 12 AI spell casting variables that can be set to fine tune casting behaviors per spell set.
Global default rules have also been added that can further fine tune all content if no specific variables are set.
Descriptions of new AI casting fields in npc_spells
'fail_recast' AI spell recast time(MS) when an spell is cast but fails (ie stunned)
'engaged_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while engaged in combat. (min time in random)
'engaged_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while engaged in combat. (max time in random)
'engaged_b_self_chance' Chance during first AI Cast check to do a beneficial spell on self (ie check to heal self)
'engaged_b_other_chance' Chance during second AI Cast check to do a beneficial spell on others.(ie check to heal others)
'engaged_d_chance' 'Chance during third AI Cast check to do a determental spell on others (ie check to nuke others)
'pursue_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while chasing target. (min time in random)
'pursue_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while chasing target. (max time in random)
'pursue_d_chance' Chance while chasing target to cast a detrimental spell.
'idle_no_sp_recast_min' AI spell recast time(MS) checked when no spell is cast while idle. (min time in random)
'idle_no_sp_recast_max' AI spell recast time(MS) checked when no spell is cast while idle. (max time in random)
'idle_b_chance' Chance to cast a beneficial spell while idle (ie cast heal on self while out of combat).
Kayen: Updated table npc_types, adding field 'ranged_type' and 'ammo_idfile'
'ranged_type' Will set what skill / animation is used when NPC uses a ranged attacked (special ability 11)
'ammo_idfile' Will set what projectile graphic an NPC uses in a ranged attacked (special ability 11) Format IT#### (same as item 'idfile')
(*Set to IT11118 for some fun*)
Added parameters: SPECATK_RANGED_ATK = 11
Param0: Min Ranged distance (default: 25)
Param1: Max Ranged distance (default: 250)
Param2: Percent Chance to Hit modifier
Param3: Percent Total Damage modifier
Kayen: Updated to Chance to Hit code with how bonuses are applied to be consistent for all effects.
Added field to npc_types 'Avoidance' which will modify chance to avoid melee
Added rules to set max and min chance to hit from melee/ranged (Default 95% / 5%)
Required SQL: utils/sql/git/required/2014_07_10_npc_spells.sql
Optional SQL: utils/sql/git/optional/2014_07_10_AICastingRules.sql
== 07/5/2014 ==
Kayen: Updated SE_Sanctuary - Adjust way hate lowering effect worked to be more accurate
Kayen: Updated SE_SympatheticProc - Revised proc rate formula to be accurate to live.
Sympathetic foci on items with proc rate mod will now benefit from that modifier.
Sympathetic foci can now be placed on AA's (This should always be slot1 in the AA)
Kayen: Implemented SE_IllusionPersistence- Allows illusions to last until you die or the illusion is forcibly removed.
Kayen: Added rule 'PreNerftBardAEDot' for SE_BardAEDot to allow it to once again do damage to moving targets. (Set to true)
Kayen: Completely revised SE_SkillProc, SE_LimitToSkill, SE_SkillProcSuccess to overall just work better and more accurately, AA support.
Required SQL: utils/sql/git/required/2014_07_04_AA_Update.sql
== 07/2/2014 ==
Kayen: Implemented SE_Sanctuary - Places caster at bottom hate list, effect fades if caster cast spell on targets other than self.
Kayen: Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/DoT) to hp/mana/end.
Kayen: Implemented SE_FactionModPct - Modifies faction gains and losses by percent.
Kayen: Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff
takes more than the specified damage amount in a SINGLE hit, then fade the buff.
Kayen: Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap)
Kayen: Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage
(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples)
Kayen: Updated SE_BardAEDot to no longer damage target while target is moving (consistent with live)
Kayen: Update SE_InterruptCasting: Will now work for instant spells (as well as over time).
== 06/25/2014 ==
Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells.
Kayen: Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work.
Kayen: Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus.
Kayen: Update SE_Taunt - Limit value if present will now add instant hate.
Kayen: Implemented SE_MassGroupBuff - Allows next group buff cast to be a MGB (AA now uses this)
Kayen: Implemented SE_IllusionOther - Allows next Illusion buff (self only) cast to be cast on target. (AA now uses this)
Kayen: Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells).
Kayen: Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost.
Kayen: Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet.
Kayen: Implemented SE_HeadShot, SE_HeadShotLevel - Defines headshot damage and level requirements.
Revised HeadShot mechanic so damage now receives all archery bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated).
Kayen: Implemented SE_Assassinate, SE_AssassinateLevel - Defines assassinate damage and level requirements.
Revised Assassinate mechanic so damage now receives all backstab bonuses, proc chance can be set to either (lives new Proc Per minute
system, or flat chance based on dex (formula updated). Assassinate can now proc from THROW if behind target, various other adjustments.
Kayen: Fix to AA Finishing Blow missing aa_effects data, update required SQL.
Revised Finishing blow so that damage now receives all melee bonus. Support also for this effect if placed on items or spells.
Kayen: Implemented SE_PetMeleeMitigation - Bonus applied to pet owner. Gives AC to owner's pet.
Required SQL: utils/sql/git/required/2014_06_25_AA_Update.sql
Optional SQL: utils/sql/git/optiional/2014_06_29_HeadShotRules.sql
== 06/17/2014 ==
Kayen: Implemented SE_AStacker, SE_BStacker, SE_CStacker, SE_DStacker.
These effects when present in buffs prevent each other from stacking,
Any effect with B prevents A, C prevents B, D prevents C.
Kayen: Implemented SE_DamageModifier2 (Stacks with SE_DamageModifier, mods damage by skill type)
Kayen: Implemented SE_AddHatePct (Modifies +/- your total hate on NPC by percent)
Kayen: Implemented SE_AddHateOverTimePct (Modifies +/- your total hate on NPC by percent over time)
Kayen: Implemented SE_DoubleRiposte (Modifies +/- your double riposte chance) *Not used in any live effects
Kayen: Implemented SE_Berserk (Sets client as 'Berserk' giving chance to crippling blow) *Not used in any live effects
Kayen: Implemented SE_Vampirsm (Stackable lifetap from melee effect) *Not used in any live effects
Kayen: Minor fixes to how lifetap from melee effects are calced. Removed arbitrary hard cap of 100%, Negative value will now dmg client.
Kayen: Fix to issue that prevented NPC's from receiving HP Regeneration derived from spell buffs.
Kayen: Fixes and Updates for melee and spell mitigation runes.
Kayen: Update to SE_NegateAttack, 'max' value can now set upper limit of damage absorbed. DOT ticks will no longer be absorbed.
Kayen: Implemented SE_Metabolism - Modifies food/drink consumption rates. [Data for AA is already in database]
Kayen: Update to SE_BalanaceMana, SE_BalanceHP to support limit value which caps max mana/hp that can be taken per player.
== 06/13/2014 ==
Kayen: For table 'npc_spell_effects_entries' setting se_max for damage shield effects (59) will now determine the DS Type (ie burning)
Setting se_max to 1 for SkillDamageTaken effects (127) will allow for stackable mitigation/weakness same as quest function ModSkillDmgTaken.
+5 -2
View File
@@ -11,15 +11,17 @@ ADD_EXECUTABLE(export_client_files ${export_sources} ${export_headers})
INSTALL(TARGETS export_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
TARGET_LINK_LIBRARIES(export_client_files Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
TARGET_LINK_LIBRARIES(export_client_files common ${PERF_LIBS} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(export_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(export_client_files "Ws2_32.lib")
TARGET_LINK_LIBRARIES(export_client_files "rpcrt4")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(export_client_files "WS2_32")
TARGET_LINK_LIBRARIES(export_client_files "rpcrt4")
ENDIF(MINGW)
IF(UNIX)
@@ -30,7 +32,8 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(export_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "pthread")
TARGET_LINK_LIBRARIES(export_client_files "uuid")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+78 -79
View File
@@ -17,13 +17,17 @@
*/
#include <stdio.h>
#include "../../common/debug.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/global_define.h"
#include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/StringUtil.h"
#include "../../common/string_util.h"
EQEmuLogSys Log;
void ExportSpells(SharedDatabase *db);
void ExportSkillCaps(SharedDatabase *db);
@@ -31,118 +35,116 @@ void ExportBaseData(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientExport);
Log.LoadLogSettingsDefaults();
set_exception_handler();
LogFile->write(EQEMuLog::Status, "Client Files Export Utility");
Log.Out(Logs::General, Logs::Status, "Client Files Export Utility");
if(!EQEmuConfig::LoadConfig()) {
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
if(!load_log_settings(config->LogSettingsFile.c_str())) {
LogFile->write(EQEMuLog::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
}
SharedDatabase database;
LogFile->write(EQEMuLog::Status, "Connecting to database...");
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
LogFile->write(EQEMuLog::Error, "Unable to connect to the database, cannot continue without a "
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
return 1;
}
/* Register Log System and Settings */
database.LoadLogSettings(Log.log_settings);
Log.StartFileLogs();
ExportSpells(&database);
ExportSkillCaps(&database);
ExportBaseData(&database);
Log.CloseFileLogs();
return 0;
}
void ExportSpells(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Exporting Spells...");
Log.Out(Logs::General, Logs::Status, "Exporting Spells...");
FILE *f = fopen("export/spells_us.txt", "w");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open export/spells_us.txt to write, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open export/spells_us.txt to write, skipping.");
return;
}
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "SELECT * FROM spells_new ORDER BY id";
MYSQL_RES *result;
MYSQL_ROW row;
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
const std::string query = "SELECT * FROM spells_new ORDER BY id";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = mysql_num_fields(result);
unsigned int fields = results.ColumnCount();
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
line.push_back('^');
}
line += row[i];
if(row[i] != nullptr) {
line += row[i];
}
}
fprintf(f, "%s\n", line.c_str());
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in ExportSpells query '%s' %s", query, errbuf);
}
fclose(f);
}
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = nullptr;
MYSQL_RES *result;
MYSQL_ROW row;
bool res = false;
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id), errbuf, &result)) {
if(row = mysql_fetch_row(result)) {
if(row[0] && atoi(row[0]) > 0) {
res = true;
}
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in skill_usable query '%s' %s", query, errbuf);
}
safe_delete_array(query);
return res;
bool res = false;
std::string query = StringFormat("SELECT max(cap) FROM skill_caps WHERE class=%d AND skillID=%d",
class_id, skill_id);
auto results = db->QueryDatabase(query);
if(!results.Success()) {
return false;
}
if (results.RowCount() == 0)
return false;
auto row = results.begin();
if(row[0] && atoi(row[0]) > 0)
return true;
return false;
}
int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = nullptr;
MYSQL_RES *result;
MYSQL_ROW row;
int res = 0;
if(db->RunQuery(query, MakeAnyLenString(&query, "SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level), errbuf, &result)) {
if(row = mysql_fetch_row(result)) {
res = atoi(row[0]);
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in get_skill query '%s' %s", query, errbuf);
}
safe_delete_array(query);
return res;
std::string query = StringFormat("SELECT cap FROM skill_caps WHERE class=%d AND skillID=%d AND level=%d",
class_id, skill_id, level);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
return 0;
}
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
void ExportSkillCaps(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Exporting Skill Caps...");
Log.Out(Logs::General, Logs::Status, "Exporting Skill Caps...");
FILE *f = fopen("export/SkillCaps.txt", "w");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
return;
}
@@ -167,35 +169,32 @@ void ExportSkillCaps(SharedDatabase *db) {
}
void ExportBaseData(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Exporting Base Data...");
Log.Out(Logs::General, Logs::Status, "Exporting Base Data...");
FILE *f = fopen("export/BaseData.txt", "w");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open export/BaseData.txt to write, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open export/BaseData.txt to write, skipping.");
return;
}
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "SELECT * FROM base_data ORDER BY level, class";
MYSQL_RES *result;
MYSQL_ROW row;
if(db->RunQuery(query, strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
const std::string query = "SELECT * FROM base_data ORDER BY level, class";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for (auto row = results.begin();row != results.end();++row) {
std::string line;
unsigned int fields = mysql_num_fields(result);
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
unsigned int fields = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
line.push_back('^');
}
line += row[i];
if(row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
fprintf(f, "%s\n", line.c_str());
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in ExportBaseData query '%s' %s", query, errbuf);
}
fclose(f);
+5 -2
View File
@@ -11,15 +11,17 @@ ADD_EXECUTABLE(import_client_files ${import_sources} ${import_headers})
INSTALL(TARGETS import_client_files RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
TARGET_LINK_LIBRARIES(import_client_files Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
TARGET_LINK_LIBRARIES(import_client_files common ${PERF_LIBS} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(import_client_files PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(import_client_files "Ws2_32.lib")
TARGET_LINK_LIBRARIES(import_client_files "rpcrt4")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(import_client_files "WS2_32")
TARGET_LINK_LIBRARIES(import_client_files "rpcrt4")
ENDIF(MINGW)
IF(UNIX)
@@ -30,7 +32,8 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(import_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "pthread")
TARGET_LINK_LIBRARIES(import_client_files "uuid")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+75 -48
View File
@@ -16,13 +16,16 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../../common/debug.h"
#include "../../common/eqemu_logsys.h"
#include "../../common/global_define.h"
#include "../../common/shareddb.h"
#include "../../common/EQEmuConfig.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/StringUtil.h"
#include "../../common/string_util.h"
EQEmuLogSys Log;
void ImportSpells(SharedDatabase *db);
void ImportSkillCaps(SharedDatabase *db);
@@ -30,63 +33,77 @@ void ImportBaseData(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientImport);
Log.LoadLogSettingsDefaults();
set_exception_handler();
LogFile->write(EQEMuLog::Status, "Client Files Import Utility");
Log.Out(Logs::General, Logs::Status, "Client Files Import Utility");
if(!EQEmuConfig::LoadConfig()) {
LogFile->write(EQEMuLog::Error, "Unable to load configuration file.");
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
if(!load_log_settings(config->LogSettingsFile.c_str())) {
LogFile->write(EQEMuLog::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
}
SharedDatabase database;
LogFile->write(EQEMuLog::Status, "Connecting to database...");
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
LogFile->write(EQEMuLog::Error, "Unable to connect to the database, cannot continue without a "
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
return 1;
}
database.LoadLogSettings(Log.log_settings);
Log.StartFileLogs();
ImportSpells(&database);
ImportSkillCaps(&database);
ImportBaseData(&database);
Log.CloseFileLogs();
return 0;
}
int GetSpellColumns(SharedDatabase *db) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = "DESCRIBE spells_new";
MYSQL_RES *result;
MYSQL_ROW row;
int res = 0;
if(db->RunQuery(query, (uint32)strlen(query), errbuf, &result)) {
while(row = mysql_fetch_row(result)) {
++res;
}
mysql_free_result(result);
} else {
LogFile->write(EQEMuLog::Error, "Error in GetSpellColumns query '%s' %s", query, errbuf);
}
return res;
const std::string query = "DESCRIBE spells_new";
auto results = db->QueryDatabase(query);
if(!results.Success()) {
return 0;
}
return results.RowCount();
}
bool IsStringField(int i) {
switch(i)
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
return true;
break;
default:
return false;
}
}
void ImportSpells(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Importing Spells...");
Log.Out(Logs::General, Logs::Status, "Importing Spells...");
FILE *f = fopen("import/spells_us.txt", "r");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open import/spells_us.txt to read, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open import/spells_us.txt to read, skipping.");
return;
}
std::string delete_sql = "DELETE FROM spells_new";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
std::string query = "DELETE FROM spells_new";
db->QueryDatabase(query);
int columns = GetSpellColumns(db);
int spells_imported = 0;
@@ -103,8 +120,8 @@ void ImportSpells(SharedDatabase *db) {
std::string escaped = ::EscapeString(buffer);
auto split = SplitString(escaped, '^');
int line_columns = (int)split.size();
std::string sql;
if(line_columns >= columns) {
sql = "INSERT INTO spells_new VALUES(";
for(int i = 0; i < columns; ++i) {
@@ -114,7 +131,12 @@ void ImportSpells(SharedDatabase *db) {
sql += "'";
}
sql += split[i];
if(split[i].compare("") == 0 && !IsStringField(i)) {
sql += "0";
}
else {
sql += split[i];
}
sql += "'";
}
@@ -129,7 +151,12 @@ void ImportSpells(SharedDatabase *db) {
sql += "'";
}
sql += split[i];
if(split[i].compare("") == 0 && !IsStringField(i)) {
sql += "0";
} else {
sql += split[i];
}
sql += "'";
}
@@ -140,68 +167,68 @@ void ImportSpells(SharedDatabase *db) {
sql += ");";
}
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
spells_imported++;
if(spells_imported % 1000 == 0) {
LogFile->write(EQEMuLog::Status, "%d spells imported.", spells_imported);
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
}
}
if(spells_imported % 1000 != 0) {
LogFile->write(EQEMuLog::Status, "%d spells imported.", spells_imported);
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
}
fclose(f);
}
void ImportSkillCaps(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Importing Skill Caps...");
Log.Out(Logs::General, Logs::Status, "Importing Skill Caps...");
FILE *f = fopen("import/SkillCaps.txt", "r");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open import/SkillCaps.txt to read, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open import/SkillCaps.txt to read, skipping.");
return;
}
std::string delete_sql = "DELETE FROM skill_caps";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
db->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
auto split = SplitString(buffer, '^');
if(split.size() < 4) {
continue;
}
std::string sql;
int class_id, skill_id, level, cap;
class_id = atoi(split[0].c_str());
skill_id = atoi(split[1].c_str());
level = atoi(split[2].c_str());
cap = atoi(split[3].c_str());
StringFormat(sql, "INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
std::string sql = StringFormat("INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
class_id, skill_id, level, cap);
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
}
fclose(f);
}
void ImportBaseData(SharedDatabase *db) {
LogFile->write(EQEMuLog::Status, "Importing Base Data...");
Log.Out(Logs::General, Logs::Status, "Importing Base Data...");
FILE *f = fopen("import/BaseData.txt", "r");
if(!f) {
LogFile->write(EQEMuLog::Error, "Unable to open import/BaseData.txt to read, skipping.");
Log.Out(Logs::General, Logs::Error, "Unable to open import/BaseData.txt to read, skipping.");
return;
}
std::string delete_sql = "DELETE FROM base_data";
db->RunQuery(delete_sql.c_str(), (uint32)delete_sql.length());
db->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
@@ -226,12 +253,12 @@ void ImportBaseData(SharedDatabase *db) {
mana_fac = atof(split[8].c_str());
end_fac = atof(split[9].c_str());
StringFormat(sql, "INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
sql = StringFormat("INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
"mana_fac, end_fac) VALUES(%d, %d, %f, %f, %f, %f, %f, %f, %f, %f)",
level, class_id, hp, mana, end, unk1, unk2, hp_fac, mana_fac, end_fac);
db->RunQuery(sql.c_str(), (uint32)sql.length());
db->QueryDatabase(sql);
}
fclose(f);
}
}
+155 -141
View File
@@ -1,76 +1,76 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(common_sources
BasePacket.cpp
base_packet.cpp
classes.cpp
Condition.cpp
condition.cpp
crash.cpp
CRC16.cpp
crc16.cpp
crc32.cpp
database.cpp
dbasync.cpp
database_conversions.cpp
database_instances.cpp
dbcore.cpp
debug.cpp
emu_opcodes.cpp
EmuTCPConnection.cpp
EmuTCPServer.cpp
EQDB.cpp
EQDBRes.cpp
emu_tcp_connection.cpp
emu_tcp_server.cpp
eq_dictionary.cpp
eqdb.cpp
eqdb_res.cpp
eqemu_exception.cpp
EQEmuConfig.cpp
EQEMuError.cpp
EQPacket.cpp
EQStream.cpp
EQStreamFactory.cpp
EQStreamIdent.cpp
EQStreamProxy.cpp
eqemu_config.cpp
eqemu_logsys.cpp
eq_packet.cpp
eq_stream.cpp
eq_stream_factory.cpp
eq_stream_ident.cpp
eq_stream_proxy.cpp
eqtime.cpp
extprofile.cpp
faction.cpp
guild_base.cpp
guilds.cpp
ipc_mutex.cpp
Item.cpp
logsys.cpp
logsys_eqemu.cpp
item.cpp
md5.cpp
memory_mapped_file.cpp
misc.cpp
MiscFunctions.cpp
moremath.cpp
Mutex.cpp
opcode_map.cpp
misc_functions.cpp
mutex.cpp
mysql_request_result.cpp
mysql_request_row.cpp
opcodemgr.cpp
packet_dump.cpp
packet_dump_file.cpp
packet_functions.cpp
perl_EQDB.cpp
perl_EQDBRes.cpp
ProcLauncher.cpp
perl_eqdb.cpp
perl_eqdb_res.cpp
proc_launcher.cpp
ptimer.cpp
races.cpp
rdtsc.cpp
rulesys.cpp
serverinfo.cpp
shareddb.cpp
skills.cpp
spdat.cpp
StringUtil.cpp
StructStrategy.cpp
TCPConnection.cpp
TCPServer.cpp
string_util.cpp
struct_strategy.cpp
tcp_connection.cpp
tcp_server.cpp
timeoutmgr.cpp
timer.cpp
unix.cpp
uuid.cpp
worldconn.cpp
XMLParser.cpp
xml_parser.cpp
platform.cpp
patches/Client62.cpp
patches/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/rof2.cpp
patches/titanium.cpp
patches/uf.cpp
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
@@ -90,40 +90,40 @@ SET(common_sources
)
SET(common_headers
BasePacket.h
any.h
base_packet.h
base_data.h
bodytypes.h
breakdowns.h
classes.h
Condition.h
condition.h
crash.h
CRC16.h
crc16.h
crc32.h
data_verification.h
database.h
dbasync.h
dbcore.h
debug.h
deity.h
emu_opcodes.h
emu_oplist.h
EmuTCPConnection.h
EmuTCPServer.h
emu_tcp_connection.h
emu_tcp_server.h
eq_constants.h
eq_dictionary.h
eq_packet_structs.h
EQDB.h
EQDBRes.h
eqdb.h
eqdb_res.h
eqemu_exception.h
EQEmuConfig.h
EQEmuConfig_elements.h
EQEMuError.h
EQPacket.h
EQStream.h
EQStreamFactory.h
EQStreamIdent.h
EQStreamIntf.h
EQStreamLocator.h
EQStreamProxy.h
EQStreamType.h
eqemu_config.h
eqemu_config_elements.h
eqemu_logsys.h
eq_packet.h
eq_stream.h
eq_stream_factory.h
eq_stream_ident.h
eq_stream_intf.h
eq_stream_locator.h
eq_stream_proxy.h
eq_stream_type.h
eqtime.h
errmsg.h
extprofile.h
@@ -131,36 +131,36 @@ SET(common_headers
features.h
fixed_memory_hash_set.h
fixed_memory_variable_hash_set.h
global_define.h
guild_base.h
guilds.h
ipc_mutex.h
Item.h
item.h
item_fieldlist.h
item_struct.h
languages.h
linked_list.h
logsys.h
logtypes.h
loottable.h
mail_oplist.h
md5.h
memory_mapped_file.h
misc.h
MiscFunctions.h
moremath.h
Mutex.h
misc_functions.h
mutex.h
mysql_request_result.h
mysql_request_row.h
op_codes.h
opcode_dispatch.h
opcodemgr.h
packet_dump.h
packet_dump_file.h
packet_functions.h
ProcLauncher.h
profiler.h
platform.h
proc_launcher.h
ptimer.h
queue.h
races.h
rdtsc.h
random.h
rulesys.h
ruletypes.h
seperator.h
@@ -169,50 +169,56 @@ SET(common_headers
shareddb.h
skills.h
spdat.h
StringUtil.h
StructStrategy.h
TCPBasicServer.h
TCPConnection.h
TCPServer.h
string_util.h
struct_strategy.h
tcp_basic_server.h
tcp_connection.h
tcp_server.h
timeoutmgr.h
timer.h
types.h
unix.h
useperl.h
uuid.h
version.h
worldconn.h
XMLParser.h
ZoneNumbers.h
platform.h
patches/Client62.h
patches/Client62_itemfields.h
patches/Client62_ops.h
patches/Client62_structs.h
xml_parser.h
zone_numbers.h
patches/patches.h
patches/SoD.h
patches/SoD_itemfields.h
patches/SoD_ops.h
patches/SoD_structs.h
patches/SoF.h
patches/SoF_itemfields.h
patches/SoF_opcode_list.h
patches/SoF_ops.h
patches/SoF_structs.h
patches/SSDeclare.h
patches/SSDefine.h
patches/SSRegister.h
patches/RoF.h
patches/RoF_itemfields.h
patches/RoF_ops.h
patches/RoF_structs.h
patches/Titanium.h
patches/Titanium_itemfields.h
patches/Titanium_ops.h
patches/Titanium_structs.h
patches/Underfoot.h
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_structs.h
patches/sod.h
patches/sod_constants.h
patches/sod_itemfields.h
patches/sod_ops.h
patches/sod_structs.h
patches/sof.h
patches/sof_constants.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_ops.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_constants.h
patches/rof_itemfields.h
patches/rof_ops.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_constants.h
patches/rof2_itemfields.h
patches/rof2_ops.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_constants.h
patches/titanium_itemfields.h
patches/titanium_ops.h
patches/titanium_structs.h
patches/uf.h
patches/uf_constants.h
patches/uf_itemfields.h
patches/uf_ops.h
patches/uf_structs.h
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
@@ -231,42 +237,48 @@ SET(common_headers
)
SOURCE_GROUP(Patches FILES
patches/Client62.h
patches/Client62_itemfields.h
patches/Client62_ops.h
patches/Client62_structs.h
patches/patches.h
patches/SoD.h
patches/SoD_itemfields.h
patches/SoD_ops.h
patches/SoD_structs.h
patches/SoF.h
patches/SoF_itemfields.h
patches/SoF_opcode_list.h
patches/SoF_ops.h
patches/SoF_structs.h
patches/SSDeclare.h
patches/SSDefine.h
patches/SSRegister.h
patches/RoF.h
patches/RoF_itemfields.h
patches/RoF_ops.h
patches/RoF_structs.h
patches/Titanium.h
patches/Titanium_itemfields.h
patches/Titanium_ops.h
patches/Titanium_structs.h
patches/Underfoot.h
patches/Underfoot_itemfields.h
patches/Underfoot_ops.h
patches/Underfoot_structs.h
patches/Client62.cpp
patches/sod.h
patches/sod_itemfields.h
patches/sod_ops.h
patches/sod_constants.h
patches/sod_structs.h
patches/sof.h
patches/sof_itemfields.h
patches/sof_opcode_list.h
patches/sof_ops.h
patches/sof_constants.h
patches/sof_structs.h
patches/ss_declare.h
patches/ss_define.h
patches/ss_register.h
patches/rof.h
patches/rof_itemfields.h
patches/rof_ops.h
patches/rof_constants.h
patches/rof_structs.h
patches/rof2.h
patches/rof2_itemfields.h
patches/rof2_ops.h
patches/rof2_constants.h
patches/rof2_structs.h
patches/titanium.h
patches/titanium_itemfields.h
patches/titanium_ops.h
patches/titanium_constants.h
patches/titanium_structs.h
patches/uf.h
patches/uf_itemfields.h
patches/uf_ops.h
patches/uf_constants.h
patches/uf_structs.h
patches/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
patches/sod.cpp
patches/sof.cpp
patches/rof.cpp
patches/rof2.cpp
patches/titanium.cpp
patches/uf.cpp
)
SOURCE_GROUP(SocketLib FILES
@@ -311,11 +323,13 @@ SOURCE_GROUP(TinyXML FILES
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML)
ADD_LIBRARY(Common ${common_sources} ${common_headers})
ADD_LIBRARY(common ${common_sources} ${common_headers})
IF(UNIX)
ADD_DEFINITIONS(-fPIC)
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result)
SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0)
ENDIF(UNIX)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-135
View File
@@ -1,135 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef _WINDOWS
#include <windows.h>
#endif
#include "EQEMuError.h"
#include "linked_list.h"
#include "Mutex.h"
#include "MiscFunctions.h"
#include <stdio.h>
#include <string.h>
#ifdef _WINDOWS
#include <conio.h>
#endif
void UpdateWindowTitle(char* iNewTitle = 0);
void CatchSignal(int sig_num);
const char* EQEMuErrorText[EQEMuError_MaxErrorID] = { "ErrorID# 0, No Error",
"MySQL Error #1405 or #2001 means your mysql server rejected the username and password you presented it.",
"MySQL Error #2003 means you were unable to connect to the mysql server.",
"MySQL Error #2005 means you there are too many connections on the mysql server. The server is overloaded.",
"MySQL Error #2007 means you the server is out of memory. The server is overloaded.",
};
LinkedList<char*>* EQEMuErrorList;
Mutex* MEQEMuErrorList;
AutoDelete< LinkedList<char*> > ADEQEMuErrorList(&EQEMuErrorList);
AutoDelete<Mutex> ADMEQEMuErrorList(&MEQEMuErrorList);
const char* GetErrorText(uint32 iError) {
if (iError >= EQEMuError_MaxErrorID)
return "ErrorID# out of range";
else
return EQEMuErrorText[iError];
}
void AddEQEMuError(eEQEMuError iError, bool iExitNow) {
if (!iError)
return;
if (!EQEMuErrorList) {
EQEMuErrorList = new LinkedList<char*>;
MEQEMuErrorList = new Mutex;
}
LockMutex lock(MEQEMuErrorList);
LinkedListIterator<char*> iterator(*EQEMuErrorList);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()[0] == 1) {
//Umm... this gets a big WTF...
// if (*((uint32*) iterator.GetData()[1]) == iError)
//not sure whats going on, using a character as a pointer....
if (*((eEQEMuError*) &(iterator.GetData()[1])) == iError)
return;
}
iterator.Advance();
}
char* tmp = new char[6];
tmp[0] = 1;
tmp[5] = 0;
*((uint32*) &tmp[1]) = iError;
EQEMuErrorList->Append(tmp);
if (iExitNow)
CatchSignal(2);
}
void AddEQEMuError(char* iError, bool iExitNow) {
if (!iError)
return;
if (!EQEMuErrorList) {
EQEMuErrorList = new LinkedList<char*>;
MEQEMuErrorList = new Mutex;
}
LockMutex lock(MEQEMuErrorList);
char* tmp = strcpy(new char[strlen(iError) + 1], iError);
EQEMuErrorList->Append(tmp);
if (iExitNow)
CatchSignal(2);
}
uint32 CheckEQEMuError() {
if (!EQEMuErrorList)
return 0;
uint32 ret = 0;
char* tmp = 0;
bool HeaderPrinted = false;
LockMutex lock(MEQEMuErrorList);
while ((tmp = EQEMuErrorList->Pop() )) {
if (!HeaderPrinted) {
fprintf(stdout, "===============================\nRuntime errors:\n\n");
HeaderPrinted = true;
}
if (tmp[0] == 1) {
fprintf(stdout, "%s\n", GetErrorText(*((uint32*) &tmp[1])));
fprintf(stdout, "For more information on this error, visit http://www.eqemu.net/eqemuerror.php?id=%u\n\n", *((uint32*) &tmp[1]));
}
else {
fprintf(stdout, "%s\n\n", tmp);
}
safe_delete(tmp);
ret++;
}
return ret;
}
void CheckEQEMuErrorAndPause() {
#ifdef _WINDOWS
if (CheckEQEMuError()) {
fprintf(stdout, "Hit any key to exit\n");
UpdateWindowTitle("Error");
getch();
}
#endif
}
-448
View File
@@ -1,448 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include "EQEmuConfig.h"
#include "MiscFunctions.h"
#include <iostream>
#include <sstream>
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
EQEmuConfig *EQEmuConfig::_config = nullptr;
void EQEmuConfig::do_world(TiXmlElement *ele) {
const char *text;
TiXmlElement * sub_ele;;
text= ParseTextBlock(ele,"shortname");
if (text)
ShortName=text;
text = ParseTextBlock(ele,"longname");
if (text)
LongName=text;
text = ParseTextBlock(ele,"address",true);
if (text)
WorldAddress=text;
text = ParseTextBlock(ele,"localaddress",true);
if (text)
LocalAddress=text;
text = ParseTextBlock(ele,"maxclients",true);
if (text)
MaxClients=atoi(text);
// Get the <key> element
text = ParseTextBlock(ele,"key",true);
if (text)
SharedKey=text;
// Get the <loginserver> element
sub_ele = ele->FirstChildElement("loginserver");
if (sub_ele) {
text=ParseTextBlock(sub_ele,"host",true);
if (text)
LoginHost=text;
text=ParseTextBlock(sub_ele,"port",true);
if (text)
LoginPort=atoi(text);
text=ParseTextBlock(sub_ele,"account",true);
if (text)
LoginAccount=text;
text=ParseTextBlock(sub_ele,"password",true);
if (text)
LoginPassword=text;
} else {
char str[32];
do {
sprintf(str, "loginserver%i", ++LoginCount);
sub_ele = ele->FirstChildElement(str);
if (sub_ele) {
LoginConfig* loginconfig = new LoginConfig;
text=ParseTextBlock(sub_ele,"host",true);
if (text)
loginconfig->LoginHost=text;
text=ParseTextBlock(sub_ele,"port",true);
if (text)
loginconfig->LoginPort=atoi(text);
text=ParseTextBlock(sub_ele,"account",true);
if (text)
loginconfig->LoginAccount=text;
text=ParseTextBlock(sub_ele,"password",true);
if (text)
loginconfig->LoginPassword=text;
loginlist.Insert(loginconfig);
}
} while(sub_ele);
}
// Check for locked
sub_ele = ele->FirstChildElement("locked");
if (sub_ele != nullptr)
Locked=true;
// Get the <tcp> element
sub_ele = ele->FirstChildElement("tcp");
if(sub_ele != nullptr) {
text = sub_ele->Attribute("ip");
if (text)
WorldIP=text;
text = sub_ele->Attribute("port");
if (text)
WorldTCPPort=atoi(text);
text = sub_ele->Attribute("telnet");
if (text && !strcasecmp(text,"enabled"))
TelnetEnabled=true;
}
// Get the <http> element
sub_ele = ele->FirstChildElement("http");
if(sub_ele != nullptr) {
// text = sub_ele->Attribute("ip");
// if (text)
// WorldIP=text;
text = sub_ele->Attribute("mimefile");
if (text)
WorldHTTPMimeFile=text;
text = sub_ele->Attribute("port");
if (text)
WorldHTTPPort=atoi(text);
text = sub_ele->Attribute("enabled");
if (text && !strcasecmp(text,"true"))
WorldHTTPEnabled=true;
}
}
void EQEmuConfig::do_chatserver(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"host",true);
if (text)
ChatHost=text;
text=ParseTextBlock(ele,"port",true);
if (text)
ChatPort=atoi(text);
}
void EQEmuConfig::do_mailserver(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"host",true);
if (text)
MailHost=text;
text=ParseTextBlock(ele,"port",true);
if (text)
MailPort=atoi(text);
}
void EQEmuConfig::do_database(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"host",true);
if (text)
DatabaseHost=text;
text=ParseTextBlock(ele,"port",true);
if (text)
DatabasePort=atoi(text);
text=ParseTextBlock(ele,"username",true);
if (text)
DatabaseUsername=text;
text=ParseTextBlock(ele,"password",true);
if (text)
DatabasePassword=text;
text=ParseTextBlock(ele,"db",true);
if (text)
DatabaseDB=text;
}
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"host",true);
if (text)
QSDatabaseHost=text;
text=ParseTextBlock(ele,"port",true);
if (text)
QSDatabasePort=atoi(text);
text=ParseTextBlock(ele,"username",true);
if (text)
QSDatabaseUsername=text;
text=ParseTextBlock(ele,"password",true);
if (text)
QSDatabasePassword=text;
text=ParseTextBlock(ele,"db",true);
if (text)
QSDatabaseDB=text;
}
void EQEmuConfig::do_zones(TiXmlElement *ele) {
const char *text;
TiXmlElement *sub_ele;
// TiXmlNode *node,*sub_node;
text=ParseTextBlock(ele,"defaultstatus",true);
if (text)
DefaultStatus=atoi(text);
// Get the <ports> element
sub_ele = ele->FirstChildElement("ports");
if(sub_ele != nullptr) {
text = sub_ele->Attribute("low");
if (text)
ZonePortLow=atoi(text);;
text = sub_ele->Attribute("high");
if (text)
ZonePortHigh=atoi(text);
}
}
void EQEmuConfig::do_files(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"spells",true);
if (text)
SpellsFile=text;
text=ParseTextBlock(ele,"opcodes",true);
if (text)
OpCodesFile=text;
text=ParseTextBlock(ele,"logsettings",true);
if (text)
LogSettingsFile=text;
text=ParseTextBlock(ele,"eqtime",true);
if (text)
EQTimeFile=text;
}
void EQEmuConfig::do_directories(TiXmlElement *ele) {
const char *text;
text=ParseTextBlock(ele,"maps",true);
if (text)
MapDir=text;
text=ParseTextBlock(ele,"quests",true);
if (text)
QuestDir=text;
text=ParseTextBlock(ele,"plugins",true);
if (text)
PluginDir=text;
}
void EQEmuConfig::do_launcher(TiXmlElement *ele) {
const char *text;
TiXmlElement *sub_ele;
text=ParseTextBlock(ele,"logprefix",true);
if (text)
LogPrefix = text;
text=ParseTextBlock(ele,"logsuffix",true);
if (text)
LogSuffix = text;
// Get the <exe> element
text = ParseTextBlock(ele,"exe",true);
if (text)
ZoneExe = text;
// Get the <timers> element
sub_ele = ele->FirstChildElement("timers");
if(sub_ele != nullptr) {
text = sub_ele->Attribute("restart");
if (text)
RestartWait = atoi(text);
text = sub_ele->Attribute("reterminate");
if (text)
TerminateWait = atoi(text);
text = sub_ele->Attribute("initial");
if (text)
InitialBootWait = atoi(text);
text = sub_ele->Attribute("interval");
if (text)
ZoneBootInterval = atoi(text);
}
}
std::string EQEmuConfig::GetByName(const std::string &var_name) const {
if(var_name == "ShortName")
return(ShortName);
if(var_name == "LongName")
return(LongName);
if(var_name == "WorldAddress")
return(WorldAddress);
if(var_name == "LoginHost")
return(LoginHost);
if(var_name == "LoginAccount")
return(LoginAccount);
if(var_name == "LoginPassword")
return(LoginPassword);
if(var_name == "LoginPort")
return(itoa(LoginPort));
if(var_name == "Locked")
return(Locked?"true":"false");
if(var_name == "WorldTCPPort")
return(itoa(WorldTCPPort));
if(var_name == "WorldIP")
return(WorldIP);
if(var_name == "TelnetEnabled")
return(TelnetEnabled?"true":"false");
if(var_name == "WorldHTTPPort")
return(itoa(WorldHTTPPort));
if(var_name == "WorldHTTPMimeFile")
return(WorldHTTPMimeFile);
if(var_name == "WorldHTTPEnabled")
return(WorldHTTPEnabled?"true":"false");
if(var_name == "ChatHost")
return(ChatHost);
if(var_name == "ChatPort")
return(itoa(ChatPort));
if(var_name == "MailHost")
return(MailHost);
if(var_name == "MailPort")
return(itoa(MailPort));
if(var_name == "DatabaseHost")
return(DatabaseHost);
if(var_name == "DatabaseUsername")
return(DatabaseUsername);
if(var_name == "DatabasePassword")
return(DatabasePassword);
if(var_name == "DatabaseDB")
return(DatabaseDB);
if(var_name == "DatabasePort")
return(itoa(DatabasePort));
if(var_name == "QSDatabaseHost")
return(QSDatabaseHost);
if(var_name == "QSDatabaseUsername")
return(QSDatabaseUsername);
if(var_name == "QSDatabasePassword")
return(QSDatabasePassword);
if(var_name == "QSDatabaseDB")
return(QSDatabaseDB);
if(var_name == "QSDatabasePort")
return(itoa(QSDatabasePort));
if(var_name == "SpellsFile")
return(SpellsFile);
if(var_name == "OpCodesFile")
return(OpCodesFile);
if(var_name == "EQTimeFile")
return(EQTimeFile);
if(var_name == "LogSettingsFile")
return(LogSettingsFile);
if(var_name == "MapDir")
return(MapDir);
if(var_name == "QuestDir")
return(QuestDir);
if(var_name == "PluginDir")
return(PluginDir);
if(var_name == "LogPrefix")
return(LogPrefix);
if(var_name == "LogSuffix")
return(LogSuffix);
if(var_name == "ZoneExe")
return(ZoneExe);
if(var_name == "ZonePortLow")
return(itoa(ZonePortLow));
if(var_name == "ZonePortHigh")
return(itoa(ZonePortHigh));
if(var_name == "DefaultStatus")
return(itoa(DefaultStatus));
// if(var_name == "DynamicCount")
// return(itoa(DynamicCount));
return("");
}
void EQEmuConfig::Dump() const
{
std::cout << "ShortName = " << ShortName << std::endl;
std::cout << "LongName = " << LongName << std::endl;
std::cout << "WorldAddress = " << WorldAddress << std::endl;
std::cout << "LoginHost = " << LoginHost << std::endl;
std::cout << "LoginAccount = " << LoginAccount << std::endl;
std::cout << "LoginPassword = " << LoginPassword << std::endl;
std::cout << "LoginPort = " << LoginPort << std::endl;
std::cout << "Locked = " << Locked << std::endl;
std::cout << "WorldTCPPort = " << WorldTCPPort << std::endl;
std::cout << "WorldIP = " << WorldIP << std::endl;
std::cout << "TelnetEnabled = " << TelnetEnabled << std::endl;
std::cout << "WorldHTTPPort = " << WorldHTTPPort << std::endl;
std::cout << "WorldHTTPMimeFile = " << WorldHTTPMimeFile << std::endl;
std::cout << "WorldHTTPEnabled = " << WorldHTTPEnabled << std::endl;
std::cout << "ChatHost = " << ChatHost << std::endl;
std::cout << "ChatPort = " << ChatPort << std::endl;
std::cout << "MailHost = " << MailHost << std::endl;
std::cout << "MailPort = " << MailPort << std::endl;
std::cout << "DatabaseHost = " << DatabaseHost << std::endl;
std::cout << "DatabaseUsername = " << DatabaseUsername << std::endl;
std::cout << "DatabasePassword = " << DatabasePassword << std::endl;
std::cout << "DatabaseDB = " << DatabaseDB << std::endl;
std::cout << "DatabasePort = " << DatabasePort << std::endl;
std::cout << "QSDatabaseHost = " << QSDatabaseHost << std::endl;
std::cout << "QSDatabaseUsername = " << QSDatabaseUsername << std::endl;
std::cout << "QSDatabasePassword = " << QSDatabasePassword << std::endl;
std::cout << "QSDatabaseDB = " << QSDatabaseDB << std::endl;
std::cout << "QSDatabasePort = " << QSDatabasePort << std::endl;
std::cout << "SpellsFile = " << SpellsFile << std::endl;
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
std::cout << "EQTimeFile = " << EQTimeFile << std::endl;
std::cout << "LogSettingsFile = " << LogSettingsFile << std::endl;
std::cout << "MapDir = " << MapDir << std::endl;
std::cout << "QuestDir = " << QuestDir << std::endl;
std::cout << "PluginDir = " << PluginDir << std::endl;
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
// std::cout << "DynamicCount = " << DynamicCount << std::endl;
}
-227
View File
@@ -1,227 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEmuConfig_H
#define __EQEmuConfig_H
#include "XMLParser.h"
#include "linked_list.h"
struct LoginConfig {
std::string LoginHost;
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
};
class EQEmuConfig : public XMLParser {
public:
virtual std::string GetByName(const std::string &var_name) const;
// From <world/>
std::string ShortName;
std::string LongName;
std::string WorldAddress;
std::string LocalAddress;
std::string LoginHost;
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
uint32 LoginCount;
LinkedList<LoginConfig*> loginlist;
bool Locked;
uint16 WorldTCPPort;
std::string WorldIP;
bool TelnetEnabled;
int32 MaxClients;
bool WorldHTTPEnabled;
uint16 WorldHTTPPort;
std::string WorldHTTPMimeFile;
std::string SharedKey;
// From <chatserver/>
std::string ChatHost;
uint16 ChatPort;
// From <mailserver/>
std::string MailHost;
uint16 MailPort;
// From <database/>
std::string DatabaseHost;
std::string DatabaseUsername;
std::string DatabasePassword;
std::string DatabaseDB;
uint16 DatabasePort;
// From <qsdatabase> // QueryServ
std::string QSDatabaseHost;
std::string QSDatabaseUsername;
std::string QSDatabasePassword;
std::string QSDatabaseDB;
uint16 QSDatabasePort;
// From <files/>
std::string SpellsFile;
std::string OpCodesFile;
std::string EQTimeFile;
std::string LogSettingsFile;
// From <directories/>
std::string MapDir;
std::string QuestDir;
std::string PluginDir;
// From <launcher/>
std::string LogPrefix;
std::string LogSuffix;
std::string ZoneExe;
uint32 RestartWait;
uint32 TerminateWait;
uint32 InitialBootWait;
uint32 ZoneBootInterval;
// From <zones/>
uint16 ZonePortLow;
uint16 ZonePortHigh;
uint8 DefaultStatus;
// uint16 DynamicCount;
// map<string,uint16> StaticZones;
protected:
static EQEmuConfig *_config;
static std::string ConfigFile;
#define ELEMENT(name) \
void do_##name(TiXmlElement *ele);
#include "EQEmuConfig_elements.h"
EQEmuConfig() {
// import the needed handler prototypes
#define ELEMENT(name) \
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
#include "EQEmuConfig_elements.h"
// Set sane defaults
// Login server
LoginHost="eqemulator.net";
LoginPort=5998;
// World
Locked=false;
WorldTCPPort=9000;
TelnetEnabled=false;
WorldHTTPEnabled=false;
WorldHTTPPort=9080;
WorldHTTPMimeFile="mime.types";
SharedKey = ""; //blank disables authentication
// Mail
ChatHost="eqchat.eqemulator.net";
ChatPort=7778;
// Mail
MailHost="eqmail.eqemulator.net";
MailPort=7779;
// Mysql
DatabaseHost="localhost";
DatabasePort=3306;
DatabaseUsername="eq";
DatabasePassword="eq";
DatabaseDB="eq";
// QueryServ Database
QSDatabaseHost="localhost";
QSDatabasePort=3306;
QSDatabaseUsername="eq";
QSDatabasePassword="eq";
QSDatabaseDB="eq";
// Files
SpellsFile="spells_us.txt";
OpCodesFile="opcodes.conf";
EQTimeFile="eqtime.cfg";
LogSettingsFile="log.ini";
// Dirs
MapDir="Maps";
QuestDir="quests";
PluginDir="plugins";
// Launcher
LogPrefix = "logs/zone-";
LogSuffix = ".log";
RestartWait = 10000; //milliseconds
TerminateWait = 10000; //milliseconds
InitialBootWait = 20000; //milliseconds
ZoneBootInterval = 2000; //milliseconds
#ifdef WIN32
ZoneExe = "zone.exe";
#else
ZoneExe = "./zone";
#endif
// Zones
ZonePortLow=7000;
ZonePortHigh=7999;
DefaultStatus=0;
// For where zones need to connect to.
WorldIP="127.0.0.1";
// Dynamics to start
//DynamicCount=5;
MaxClients=-1;
LoginCount=0;
}
virtual ~EQEmuConfig() {}
public:
// Produce a const singleton
static const EQEmuConfig *get() {
if (_config == nullptr)
LoadConfig();
return(_config);
}
// Allow the use to set the conf file to be used.
static void SetConfigFile(std::string file) { EQEmuConfig::ConfigFile = file; }
// Load the config
static bool LoadConfig() {
if (_config != nullptr)
delete _config;
_config=new EQEmuConfig;
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(),"server");
}
void Dump() const;
};
#endif
-405
View File
@@ -1,405 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* EQStream classes, by Quagmire
*/
#include "../common/debug.h"
#include <iostream>
#include <iomanip>
#ifdef WIN32
#include <process.h>
#else
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "../common/unix.h"
#define SOCKET_ERROR -1
#endif
#include "EQNetwork.h"
#include "EQStream.h"
#include "../common/packet_dump.h"
#include "../common/packet_dump_file.h"
#include "../common/packet_functions.h"
#include "../common/MiscFunctions.h"
#include "../common/crc32.h"
#include "../common/eq_packet_structs.h"
#define EQN_DEBUG 0
#define EQN_DEBUG_Error 0
#define EQN_DEBUG_Packet 0
#define EQN_DEBUG_Fragment 0
#define EQN_DEBUG_ACK 0
#define EQN_DEBUG_Unknown 0
#define EQN_DEBUG_NewStream 0
#define LOG_PACKETS 0
#define LOG_RAW_PACKETS_OUT 0
#define LOG_RAW_PACKETS_IN 0
//#define PRIORITYTEST
template <typename type> // LO_BYTE
type LO_BYTE (type a) {return (a&=0xff);}
template <typename type> // HI_BYTE
type HI_BYTE (type a) {return (a&=0xff00);}
template <typename type> // LO_WORD
type LO_WORD (type a) {return (a&=0xffff);}
template <typename type> // HI_WORD
type HI_WORD (type a) {return (a&=0xffff0000);}
template <typename type> // HI_LOSWAPshort
type HI_LOSWAPshort (type a) {return (LO_BYTE(a)<<8) | (HI_BYTE(a)>>8);}
template <typename type> // HI_LOSWAPlong
type HI_LOSWAPlong (type x) {return (LO_WORD(a)<<16) | (HIWORD(a)>>16);}
EQStreamServer::EQStreamServer(uint16 iPort) {
RunLoop = false;
pPort = iPort;
pOpen = false;
#ifdef WIN32
WORD version = MAKEWORD (1,1);
WSADATA wsadata;
WSAStartup (version, &wsadata);
#endif
sock = 0;
}
EQStreamServer::~EQStreamServer() {
Close();
RunLoop = false;
MLoopRunning.lock();
MLoopRunning.unlock();
#ifdef WIN32
WSACleanup();
#endif
connection_list.clear();
while (!NewQueue.empty())
NewQueue.pop(); // they're deleted with the list, clear this queue so it doesnt try to delete them again
}
bool EQStreamServer::Open(uint16 iPort) {
LockMutex lock(&MOpen);
if (iPort && pPort != iPort) {
if (pOpen)
return false;
pPort = iPort;
}
if (!RunLoop) {
RunLoop = true;
#ifdef WIN32
_beginthread(EQStreamServerLoop, 0, this);
#else
pthread_t thread;
pthread_create(&thread, NULL, &EQStreamServerLoop, this);
#endif
}
if (pOpen) {
return true;
}
else {
struct sockaddr_in address;
// int reuse_addr = 1;
int bufsize = 64 * 1024; // 64kbyte send/recieve buffers, up from default of 8k
#ifdef WIN32
unsigned long nonblocking = 1;
#endif
/* Setup internet address information.
This is used with the bind() call */
memset((char *) &address, 0, sizeof(address));
address.sin_family = AF_INET;
address.sin_port = htons(pPort);
address.sin_addr.s_addr = htonl(INADDR_ANY);
/* Setting up UDP port for new clients */
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
return false;
}
//#ifdef WIN32
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse_addr, sizeof(reuse_addr));
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*) &bufsize, sizeof(bufsize));
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char*) &bufsize, sizeof(bufsize));
//#else
// setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, sizeof(reuse_addr));
// setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize));
// setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize));
//#endif
if (bind(sock, (struct sockaddr *) &address, sizeof(address)) < 0) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
return false;
}
#ifdef WIN32
ioctlsocket (sock, FIONBIO, &nonblocking);
#else
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif
pOpen = true;
return true;
}
}
void EQStreamServer::Close() {
SetOpen(false);
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
}
sock = 0;
}
bool EQStreamServer::IsOpen() {
MOpen.lock();
bool ret = pOpen;
MOpen.unlock();
return ret;
}
void EQStreamServer::SetOpen(bool iOpen) {
MOpen.lock();
pOpen = iOpen;
MOpen.unlock();
}
void EQStreamServer::Process() {
_CP(EQStreamServer_Process);
if (!IsOpen()) {
if (sock) {
#ifdef WIN32
closesocket(sock);
#else
close(sock);
#endif
sock = 0;
}
return;
}
uchar buffer[1518];
int status;
struct sockaddr_in from;
unsigned int fromlen;
from.sin_family = AF_INET;
fromlen = sizeof(from);
while (1) {
#ifdef WIN32
status = recvfrom(sock, (char *) buffer, sizeof(buffer), 0,(struct sockaddr*) &from, (int *) &fromlen);
#else
status = recvfrom(sock, buffer, sizeof(buffer), 0,(struct sockaddr*) &from, &fromlen);
#endif
if (status >= 1) {
cout << "Got data from recvfrom" << endl;
RecvData(buffer, status, from.sin_addr.s_addr, from.sin_port);
}
else {
break;
}
}
std::map <std::string, EQStream*>::iterator connection;
for (connection = connection_list.begin(); connection != connection_list.end();) {
if (!connection->second) {
connection = connection_list.erase(connection);
continue;
}
EQStream* eqs_data = connection->second;
if (eqs_data->IsFree() && (!eqs_data->CheckNetActive())) {
safe_delete(eqs_data);
connection = connection_list.erase(connection);
} else if (!eqs_data->RunLoop) {
eqs_data->Process(sock);
++connection;
}
}
}
void EQStreamServer::RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort) {
/*
CHANGE HISTORY
Version Author Date Comment
1 Unknown Unknown Initial Revision
2 Joolz 05-Jan-2003 Optimised
3 Quagmire 05-Feb-2003 Changed so 2 connection objects wouldnt be created for the same ip/port pair, often happened
*/
// Check for invalid data
if (!data || size <= 4) return;
//if (CRC32::Generate(data, size-4) != ntohl(*((uint32*) &data[size-4]))) {
#if EQN_DEBUG_Error >= 1
//cout << "Incomming Packet failed checksum" << endl;
#endif
//return;
//}
char temp[25];
sprintf(temp,"%lu:%u",(unsigned long)irIP,irPort);
cout << "Data from " << temp << endl;
EQStream* tmp = NULL;
std::map <std::string, EQStream*>::iterator connection;
if ((connection=connection_list.find(temp))!=connection_list.end())
tmp=connection->second;
if(tmp != NULL && tmp->GetrPort() == irPort)
{
tmp->RecvData(data, size);
return;
}
else if(tmp != NULL && tmp->GetrPort() != irPort)
{
printf("Conflicting IPs & Ports: IP %i and Port %i is conflicting with IP %i and Port %i\n",irIP,irPort,tmp->GetrIP(),tmp->GetrPort());
return;
}
if (data[1]==0x01) {
cout << "New EQStream Connection." << endl;
EQStream* tmp = new EQStream(irIP, irPort);
tmp->RecvData(data, size);
connection_list[temp]=tmp;
if (connection_list.find(temp)==connection_list.end()) {
cerr <<"Could not find new connection we just added!" << endl;
}
MNewQueue.lock();
NewQueue.push(tmp);
MNewQueue.unlock();
return;
}
#if EQN_DEBUG >= 4
struct in_addr in;
in.s_addr = irIP;
cout << "WARNING: Stray packet? " << inet_ntoa(in) << ":" << irPort << endl;
#endif
}
EQStream* EQStreamServer::NewQueuePop() {
EQStream* ret = 0;
MNewQueue.lock();
if (!NewQueue.empty()) {
ret = NewQueue.front();
NewQueue.pop();
}
MNewQueue.unlock();
return ret;
}
#ifdef WIN32
void EQStreamServerLoop(void* tmp)
#else
void* EQStreamServerLoop(void* tmp)
#endif
{
#ifdef WIN32
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
#endif
EQStreamServer* eqns = (EQStreamServer*) tmp;
eqns->MLoopRunning.lock();
while (eqns->RunLoop) {
{
_CP(EQStreamServerLoop);
eqns->Process();
}
Sleep(1);
}
eqns->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamInLoop(void* tmp)
#else
void* EQStreamInLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamInLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamInLoop);
if(tmp_timer->Check())
eqs->DoRecvData();
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
#ifdef WIN32
void EQStreamOutLoop(void* tmp)
#else
void* EQStreamOutLoop(void* tmp)
#endif
{
EQStream* eqs = (EQStream*) tmp;
#ifdef _DEBUG
if (eqs->ConnectionType != Outgoing) {
ThrowError("EQStreamOutLoop: eqs->ConnectionType != Outgoing");
}
#endif
eqs->MLoopRunning.lock();
Timer* tmp_timer = new Timer(100);
tmp_timer->Start();
while (eqs->RunLoop) {
{
_CP(EQStreamOutLoop);
if(tmp_timer->Check())
eqs->Process(eqs->outsock);
}
Sleep(1);
}
safe_delete(tmp_timer);
eqs->MLoopRunning.unlock();
#ifdef WIN32
_endthread();
#else
return 0;
#endif
}
-120
View File
@@ -1,120 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQNETWORK_H
#define EQNETWORK_H
#include "../common/debug.h"
//uncomment this to enable the packet profiler. Counts the number
//of each type of packet sent or received on a connection.
#ifdef ZONE
//#define PACKET_PROFILER 1
#endif
#include <string.h>
#include <map>
#include <list>
#include <queue>
#include "../common/types.h"
#include "../common/timer.h"
#include "../common/linked_list.h"
#include "../common/queue.h"
#include "../common/Mutex.h"
#include "../common/packet_functions.h"
#include "EQStream.h"
#ifdef PACKET_PROFILER
#include "../common/rdtsc.h"
#endif
#define EQNC_TIMEOUT 60000
#define NAS_TIMER 100
#define KA_TIMER 400 /* keeps the lag bar constant */
#define MAX_HEADER_SIZE 39 // Quag: 39 is the max header + opcode + crc32 + unknowns size
class EQStreamServer;
class EQStream;
class EQStreamPacket;
class EQStreamFragmentGroupList;
class EQStreamFragmentGroup;
typedef EQStreamServer EQNServer;
typedef EQStream EQNConnection;
typedef EQStreamPacket EQNPacket;
typedef EQStreamFragmentGroupList EQNFragmentGroupList;
typedef EQStreamFragmentGroup EQNFragmentGroup;
#define FLAG_COMPRESSED 0x1000
#define FLAG_COMBINED 0x2000
#define FLAG_ENCRYPTED 0x4000
#define FLAG_IMPLICIT 0x8000
#define FLAG_ALL 0xF000
#define StripFlags(x) (x & ~FLAG_ALL)
// Optimistic compression, used for guessing pre-alloc size on debug output
#define BEST_COMPR_RATIO 300
enum eappCompressed { appNormal, appInflated, appDeflated };
#ifdef WIN32
void EQStreamServerLoop(void* tmp);
void EQStreamInLoop(void* tmp);
void EQStreamOutLoop(void* tmp);
#else
void* EQStreamServerLoop(void* tmp);
void* EQStreamInLoop(void* tmp);
void* EQStreamOutLoop(void* tmp);
#endif
class EQStreamServer {
public:
EQStreamServer(uint16 iPort = 0);
virtual ~EQStreamServer();
bool Open(uint16 iPort = 0); // opens the port
void Close(); // closes the port
void KillAll(); // kills all clients
inline uint16 GetPort() { return pPort; }
EQStream* NewQueuePop();
protected:
#ifdef WIN32
friend void EQStreamServerLoop(void* tmp);
#else
friend void* EQStreamServerLoop(void* tmp);
#endif
void Process();
bool IsOpen();
void SetOpen(bool iOpen);
bool RunLoop;
Mutex MLoopRunning;
private:
void RecvData(uchar* data, uint32 size, uint32 irIP, uint16 irPort);
#ifdef WIN32
SOCKET sock;
#else
int sock;
#endif
uint16 pPort;
bool pOpen;
Mutex MNewQueue;
Mutex MOpen;
std::map<std::string,EQStream*> connection_list;
std::queue<EQStream *> NewQueue;
};
#endif
-1900
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -40,13 +40,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef _WIN32
#pragma warning(disable:4786)
#endif
#include "../debug.h"
#include "../global_define.h"
#include <stdio.h>
#include <string>
#include <stdarg.h>
#include "Parse.h"
#include "HTTPSocket.h"
#include "../TCPConnection.h"
#include "../tcp_connection.h"
#include <cstdlib>
#include <cstring>
+1 -1
View File
@@ -42,7 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <map>
#include <string>
#include "../TCPConnection.h"
#include "../tcp_connection.h"
#ifdef SOCKETS_NAMESPACE
+1 -1
View File
@@ -26,7 +26,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "../debug.h"
#include "../global_define.h"
#ifdef _WIN32
#pragma warning(disable:4786)
#endif
+1 -2
View File
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef _WIN32
#pragma warning(disable:4786)
#endif
#include "../debug.h"
#include "../global_define.h"
#include "Utility.h"
#include "HttpdCookies.h"
#include "HttpdForm.h"
@@ -194,7 +194,6 @@ void HttpdSocket::OnHeaderComplete()
void HttpdSocket::OnData(const char *p,size_t l)
{
//printf("Got %d bytes: %.*s\n", l, l, p);
if (m_file)
{
m_file -> fwrite(p,1,l);
-2
View File
@@ -110,7 +110,6 @@ size_t MemFile::fread(char *ptr, size_t size, size_t nmemb)
size_t sz = size * nmemb;
if (p + sz < BLOCKSIZE)
{
//printf("Read @ %d(%d). %d bytes. (%c)\n", m_read_ptr, p, sz, *(m_current_read -> data + p));
memcpy(ptr, m_current_read -> data + p, sz);
m_read_ptr += sz;
}
@@ -142,7 +141,6 @@ size_t MemFile::fwrite(const char *ptr, size_t size, size_t nmemb)
size_t sz = size * nmemb;
if (p + sz < BLOCKSIZE)
{
//printf("Write @ %d(%d). %d bytes.\n", m_write_ptr, p, sz);
memcpy(m_current_write -> data + p, ptr, sz);
m_write_ptr += sz;
}
+1 -1
View File
@@ -211,7 +211,7 @@ typedef unsigned short port_t;
#endif
#ifdef _THREADSAFE_SOCKETS
#include "Mutex.h"
#include "mutex.h"
#include "Lock.h"
#endif
-1
View File
@@ -1128,7 +1128,6 @@ BOOL __stdcall StackWalker::myReadProcMem(
SIZE_T st;
BOOL bRet = ReadProcessMemory(hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, &st);
*lpNumberOfBytesRead = (DWORD) st;
//printf("ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n", hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, (DWORD) st, (DWORD) bRet);
return bRet;
}
else
+190
View File
@@ -0,0 +1,190 @@
/*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the Software, and to prepare derivative works of the
* Software, and to permit third-parties to whom the Software is furnished to
* do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including
* the above license grant, this restriction and the following disclaimer,
* must be included in all copies of the Software, in whole or in part, and
* all derivative works of the Software, unless such copies or derivative
* works are solely in the form of machine-executable object code generated by
* a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
// EQEmu::Any is a modified version of Boost::Any and as such retains the Boost licensing.
#ifndef EQEMU_COMMON_ANY_H
#define EQEMU_COMMON_ANY_H
#include <algorithm>
#include <typeinfo>
namespace EQEmu
{
class Any
{
public:
Any()
: content(nullptr)
{
}
template<typename ValueType>
Any(const ValueType &value)
: content(new Holder<ValueType>(value))
{
}
Any(const Any &other)
: content(other.content ? other.content->clone() : 0)
{
}
~Any()
{
if(content)
delete content;
}
Any& swap(Any &rhs)
{
std::swap(content, rhs.content);
return *this;
}
template<typename ValueType>
Any& operator=(const ValueType &rhs)
{
Any(rhs).swap(*this);
return *this;
}
Any& operator=(Any rhs)
{
rhs.swap(*this);
return *this;
}
bool empty() const
{
return !content;
}
const std::type_info& type() const
{
return content ? content->type() : typeid(void);
}
class Placeholder
{
public:
virtual ~Placeholder()
{
}
virtual const std::type_info& type() const = 0;
virtual Placeholder* clone() const = 0;
};
template<typename ValueType>
class Holder : public Placeholder
{
public:
Holder(const ValueType &value)
: held(value)
{
}
virtual const std::type_info& type() const
{
return typeid(ValueType);
}
virtual Placeholder* clone() const
{
return new Holder(held);
}
ValueType held;
private:
Holder& operator=(const Holder&);
};
private:
template<typename ValueType>
friend ValueType* any_cast(Any*);
template<typename ValueType>
friend ValueType* unsafe_any_cast(Any*);
Placeholder* content;
};
class bad_any_cast : public std::bad_cast
{
public:
virtual const char * what() const throw()
{
return "DBI::bad_any_cast: failed conversion using DBI::any_cast";
}
};
template<typename ValueType>
ValueType* any_cast(Any* operand)
{
return operand &&
operand->type() == typeid(ValueType) ? &static_cast<Any::Holder<ValueType>*>(operand->content)->held : nullptr;
}
template<typename ValueType>
inline const ValueType* any_cast(const Any* operand)
{
return any_cast<ValueType>(const_cast<Any*>(operand));
}
template<typename ValueType>
ValueType any_cast(Any& operand)
{
typedef typename std::remove_reference<ValueType>::type nonref;
nonref* result = any_cast<nonref>(&operand);
if(!result)
throw bad_any_cast();
return *result;
}
template<typename ValueType>
inline ValueType any_cast(const Any& operand)
{
typedef typename std::remove_reference<ValueType>::type nonref;
return any_cast<const nonref&>(const_cast<Any&>(operand));
}
template<typename ValueType>
inline ValueType* unsafe_any_cast(Any* operand)
{
return &static_cast<Any::Holder<ValueType>*>(operand->content)->held;
}
template<typename ValueType>
inline const ValueType* unsafe_any_cast(const Any* operand)
{
return unsafe_any_cast<ValueType>(const_cast<Any*>(operand));
}
}
#endif
@@ -15,13 +15,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "BasePacket.h"
#include "global_define.h"
#include "base_packet.h"
#include "misc.h"
#include "packet_dump.h"
BasePacket::BasePacket(const unsigned char *buf, uint32 len)
{
this->pBuffer=nullptr;
@@ -21,7 +21,6 @@
#include "types.h"
#include <stdio.h>
#include <string.h>
#include <string>
#ifdef WIN32
#include <time.h>
-134
View File
@@ -1,134 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef BREAKDOWNS_H_
#define BREAKDOWNS_H_
#include "types.h"
#pragma pack(1)
struct uint16_breakdown {
union {
uint16 all;
struct {
uint8 b1;
uint8 b2;
} bytes;
};
inline uint16& operator=(const uint16& val) { return (all=val); }
inline uint16* operator&() { return &all; }
inline operator uint16&() { return all; }
inline uint8& b1() { return bytes.b1; }
inline uint8& b2() { return bytes.b2; }
};
struct uint32_breakdown {
union {
uint32 all;
struct {
uint16 w1;
uint16 w2;
} words;
struct {
uint8 b1;
union {
struct {
uint8 b2;
uint8 b3;
} middle;
uint16 w2_3; // word bytes 2 to 3
};
uint8 b4;
} bytes;
};
inline uint32& operator=(const uint32& val) { return (all=val); }
inline uint32* operator&() { return &all; }
inline operator uint32&() { return all; }
inline uint16& w1() { return words.w1; }
inline uint16& w2() { return words.w2; }
inline uint16& w2_3() { return bytes.w2_3; }
inline uint8& b1() { return bytes.b1; }
inline uint8& b2() { return bytes.middle.b2; }
inline uint8& b3() { return bytes.middle.b3; }
inline uint8& b4() { return bytes.b4; }
};
/*
struct uint64_breakdown {
union {
uint64 all;
struct {
uint16 w1; // 1 2
uint16 w2; // 3 4
uint16 w3; // 5 6
uint16 w4; // 7 8
};
struct {
uint32 dw1; // 1 4
uint32 dw2; // 5 6
};
struct {
uint8 b1;
union {
struct {
uint16 w2_3;
uint16 w4_5;
uint16 w6_7;
};
uint32 dw2_5;
struct {
uint8 b2;
union {
uint32 dw3_6;
struct {
uint8 b3;
union {
uint32 dw4_7;
struct {
uint8 b4;
uint8 b5;
uint8 b6;
uint8 b7;
};
};
};
};
};
};
};
};
inline uint64* operator&() { return &all; }
inline operator uint64&() { return all; }
};
*/
#pragma pack()
#endif /*BREAKDOWNS_H_*/
+2 -49
View File
@@ -14,8 +14,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
*/
#include "../common/global_define.h"
#include "../common/classes.h"
const char* GetEQClassName(uint8 class_, uint8 level) {
@@ -290,50 +290,3 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
}
}
uint32 GetArrayEQClass(uint8 eqclass) {
switch (eqclass) {
case WARRIOR:
return WARRIOR;
case CLERIC:
return CLERIC;
case PALADIN:
return PALADIN;
case RANGER:
return RANGER;
case SHADOWKNIGHT:
return SHADOWKNIGHT;
case DRUID:
return DRUID;
case MONK:
return MONK;
case BARD:
return BARD;
case ROGUE:
return ROGUE;
case SHAMAN:
return SHAMAN;
case NECROMANCER:
return NECROMANCER;
case WIZARD:
return WIZARD;
case MAGICIAN:
return MAGICIAN;
case ENCHANTER:
return ENCHANTER;
case BEASTLORD:
return BEASTLORD;
case BERSERKER:
return BERSERKER;
default:
return 0;
}
}
uint8 GetEQArrayEQClass(uint8 eqclass) {
if (eqclass >= WARRIOR && eqclass <= BERSERKER)
return eqclass - WARRIOR;
if (eqclass >= WARRIORGM && eqclass <= BERSERKERGM)
return eqclass - WARRIORGM;
return WARRIOR;
}
-2
View File
@@ -86,7 +86,5 @@
#define call_1 65536
const char* GetEQClassName(uint8 class_, uint8 level = 0);
uint32 GetArrayEQClass(uint8 eqclass);
uint8 GetEQArrayEQClass(uint8 eqclass);
#endif
+71 -21
View File
@@ -1,27 +1,77 @@
#ifndef CLIENTVERSIONS_H
#define CLIENTVERSIONS_H
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_Underfoot = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_TitaniumAndEarlier = 3;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UnderfootAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
#include "types.h"
typedef enum {
EQClientUnknown = 0,
EQClient62,
EQClientTitanium,
EQClientSoF,
EQClientSoD,
EQClientUnderfoot,
EQClientRoF
} EQClientVersion;
static const uint32 BIT_Client62 = 1;
static const uint32 BIT_Titanium = 2;
static const uint32 BIT_SoF = 4;
static const uint32 BIT_SoD = 8;
static const uint32 BIT_UF = 16;
static const uint32 BIT_RoF = 32;
static const uint32 BIT_RoF2 = 64;
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
static const uint32 BIT_UFAndLater = 0xFFFFFFF0;
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
static const uint32 BIT_AllClients = 0xFFFFFFFF;
enum class ClientVersion
{
Unknown = 0,
Client62, // Build: 'Aug 4 2005 15:40:59'
Titanium, // Build: 'Oct 31 2005 10:33:37'
SoF, // Build: 'Sep 7 2007 09:11:49'
SoD, // Build: 'Dec 19 2008 15:22:49'
UF, // Build: 'Jun 8 2010 16:44:32'
RoF, // Build: 'Dec 10 2012 17:35:44'
RoF2, // Build: 'May 10 2013 23:30:08'
MobNPC,
MobMerc,
MobBot,
MobPet,
};
#define CLIENT_VERSION_COUNT 12
#define LAST_PC_CLIENT ClientVersion::RoF2
#define LAST_NPC_CLIENT ClientVersion::MobPet
static const char* ClientVersionName(ClientVersion version)
{
switch (version)
{
case ClientVersion::Unknown:
return "ClientVersion::Unknown";
case ClientVersion::Client62:
return "ClientVersion::Client62";
case ClientVersion::Titanium:
return "ClientVersion::Titanium";
case ClientVersion::SoF:
return "ClientVersion::SoF";
case ClientVersion::SoD:
return "ClientVersion::SoD";
case ClientVersion::UF:
return "ClientVersion::UF";
case ClientVersion::RoF:
return "ClientVersion::RoF";
case ClientVersion::RoF2:
return "ClientVersion::RoF2";
case ClientVersion::MobNPC:
return "ClientVersion::MobNPC";
case ClientVersion::MobMerc:
return "ClientVersion::MobMerc";
case ClientVersion::MobBot:
return "ClientVersion::MobBot";
case ClientVersion::MobPet:
return "ClientVersion::MobPet";
default:
return "<ERROR> Invalid ClientVersion";
};
}
#endif /* CLIENTVERSIONS_H */
@@ -16,8 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "Condition.h"
#include "condition.h"
#ifdef _WINDOWS
+2 -1
View File
@@ -18,7 +18,8 @@
#ifndef __CONDITION_H
#define __CONDITION_H
#include "debug.h"
#include "global_define.h"
#include "mutex.h"
#ifndef WIN32
#include <pthread.h>
#endif
+24 -23
View File
@@ -1,4 +1,5 @@
#include "debug.h"
#include "global_define.h"
#include "eqemu_logsys.h"
#include "crash.h"
#if defined(_WINDOWS) && defined(CRASH_LOGGING)
@@ -24,7 +25,7 @@ public:
}
}
LogFile->write(EQEMuLog::Crash, buffer);
Log.Out(Logs::General, Logs::Crash, buffer);
StackWalker::OnOutput(szText);
}
};
@@ -34,67 +35,67 @@ LONG WINAPI windows_exception_handler(EXCEPTION_POINTERS *ExceptionInfo)
switch(ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ACCESS_VIOLATION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ACCESS_VIOLATION");
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
break;
case EXCEPTION_BREAKPOINT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_BREAKPOINT");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_BREAKPOINT");
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_FLT_INEXACT_RESULT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
break;
case EXCEPTION_FLT_INVALID_OPERATION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
break;
case EXCEPTION_FLT_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_OVERFLOW");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_OVERFLOW");
break;
case EXCEPTION_FLT_STACK_CHECK:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_STACK_CHECK");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_STACK_CHECK");
break;
case EXCEPTION_FLT_UNDERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_UNDERFLOW");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_UNDERFLOW");
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
break;
case EXCEPTION_IN_PAGE_ERROR:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_IN_PAGE_ERROR");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_IN_PAGE_ERROR");
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_INT_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INT_OVERFLOW");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_OVERFLOW");
break;
case EXCEPTION_INVALID_DISPOSITION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INVALID_DISPOSITION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INVALID_DISPOSITION");
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
break;
case EXCEPTION_PRIV_INSTRUCTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_PRIV_INSTRUCTION");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_PRIV_INSTRUCTION");
break;
case EXCEPTION_SINGLE_STEP:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_SINGLE_STEP");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_SINGLE_STEP");
break;
case EXCEPTION_STACK_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_STACK_OVERFLOW");
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_STACK_OVERFLOW");
break;
default:
LogFile->write(EQEMuLog::Crash, "Unknown Exception");
Log.Out(Logs::General, Logs::Crash, "Unknown Exception");
break;
}
View File
@@ -1,5 +1,5 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,28 +15,34 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_DATA_VERIFICATION_H
#define COMMON_DATA_VERIFICATION_H
#include "debug.h"
#include "logsys.h"
#include "StringUtil.h"
#include <algorithm>
#include <stdarg.h>
#include <stdio.h>
namespace EQEmu
{
#include <string>
void log_message(LogType type, const char *fmt, ...) {
va_list args;
va_start(args, fmt);
log_messageVA(type, fmt, args);
va_end(args);
template <typename T>
T Clamp(const T& value, const T& lower, const T& upper) {
return std::max(lower, std::min(value, upper));
}
void log_messageVA(LogType type, const char *fmt, va_list args) {
std::string prefix_buffer;
StringFormat(prefix_buffer, "[%s] ", log_type_info[type].name);
LogFile->writePVA(EQEMuLog::Debug, prefix_buffer.c_str(), fmt, args);
template <typename T>
T ClampLower(const T& value, const T& lower) {
return std::max(lower, value);
}
template <typename T>
T ClampUpper(const T& value, const T& upper) {
return std::min(value, upper);
}
template <typename T>
bool ValueWithin(const T& value, const T& lower, const T& upper) {
return value >= lower && value <= upper;
}
}
#endif
+1608 -2502
View File
File diff suppressed because it is too large Load Diff
+141 -135
View File
@@ -21,17 +21,14 @@
#define AUTHENTICATION_TIMEOUT 60
#define INVALID_ID 0xFFFFFFFF
#include "debug.h"
#include "global_define.h"
#include "eqemu_logsys.h"
#include "types.h"
#include "dbcore.h"
#include "linked_list.h"
#include "eq_packet_structs.h"
/*#include "EQStream.h"
#include "guilds.h"
#include "MiscFunctions.h"
#include "Mutex.h"
#include "Item.h"
#include "extprofile.h"*/
#include <cmath>
#include <string>
#include <vector>
#include <map>
@@ -39,22 +36,9 @@
//atoi is not uint32 or uint32 safe!!!!
#define atoul(str) strtoul(str, nullptr, 10)
//class Spawn;
class Corpse;
class Spawn2;
class NPC;
class SpawnGroupList;
class Petition;
class Client;
class Merc;
struct Combine_Struct;
//struct Faction;
//struct FactionMods;
//struct FactionValue;
struct ZonePoint;
struct NPCType;
class Inventory;
class ItemInst;
class MySQLRequestResult;
class Client;
struct EventLogDetails_Struct {
uint32 id;
@@ -69,36 +53,36 @@ struct EventLogDetails_Struct {
};
struct CharacterEventLog_Struct {
uint32 count;
uint8 eventid;
EventLogDetails_Struct eld[255];
uint32 count;
uint8 eventid;
EventLogDetails_Struct eld[255];
};
// Added By Hogie
// INSERT into variables (varname,value) values('decaytime [minlevel] [maxlevel]','[number of seconds]');
// IE: decaytime 1 54 = Levels 1 through 54
// decaytime 55 100 = Levels 55 through 100
// It will always put the LAST time for the level (I think) from the Database
struct npcDecayTimes_Struct {
uint16 minlvl;
uint16 maxlvl;
uint32 seconds;
};
// Added By Hogie -- End
struct VarCache_Struct {
char varname[26]; // varname is char(25) in database
char varname[26];
char value[0];
};
struct PlayerProfile_Struct;
struct GuildRankLevel_Struct;
struct GuildRanks_Struct;
struct ExtendedProfile_Struct;
struct GuildMember_Struct;
class PTimerList;
#ifdef _WINDOWS
#if _MSC_VER > 1700 // greater than 2012 (2013+)
# define _ISNAN_(a) std::isnan(a)
#else
# include <float.h>
# define _ISNAN_(a) _isnan(a)
#endif
#else
# define _ISNAN_(a) std::isnan(a)
#endif
class Database : public DBcore {
public:
Database();
@@ -106,152 +90,166 @@ public:
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
~Database();
/*
* General Character Related Stuff
*/
/* Character Creation */
bool AddToNameFilter(const char* name);
bool CreateCharacter(uint32 account_id, char* name, uint16 gender, uint16 race, uint16 class_, uint8 str, uint8 sta, uint8 cha, uint8 dex, uint8 int_, uint8 agi, uint8 wis, uint8 face);
bool DeleteCharacter(char* name);
bool MoveCharacterToZone(const char* charname, const char* zonename);
bool MoveCharacterToZone(const char* charname, const char* zonename,uint32 zoneid);
bool MoveCharacterToZone(uint32 iCharID, const char* iZonename);
bool UpdateName(const char* oldname, const char* newname);
bool ReserveName(uint32 account_id, char* name);
bool SaveCharacterCreate(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp);
bool SetHackerFlag(const char* accountname, const char* charactername, const char* hacked);
bool SetMQDetectionFlag(const char* accountname, const char* charactername, const char* hacked, const char* zone);
bool AddToNameFilter(const char* name);
bool ReserveName(uint32 account_id, char* name);
bool CreateCharacter(uint32 account_id, char* name, uint16 gender, uint16 race, uint16 class_, uint8 str, uint8 sta, uint8 cha, uint8 dex, uint8 int_, uint8 agi, uint8 wis, uint8 face);
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext);
bool DeleteCharacter(char* name);
uint8 CopyCharacter(const char* oldname, const char* newname, uint32 acctid);
bool StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv);
bool UpdateName(const char* oldname, const char* newname);
/*
* General Information Getting Queries
*/
/* General Information Queries */
bool AddBannedIP(char* bannedIP, const char* notes); //Add IP address to the Banned_IPs table.
bool AddGMIP(char* ip_address, char* name);
bool CheckBannedIPs(const char* loginIP); //Check incoming connection against banned IP table.
bool CheckGMIPs(const char* loginIP, uint32 account_id);
bool CheckNameFilter(const char* name, bool surname = false);
bool CheckUsedName(const char* name);
uint32 GetAccountIDByChar(const char* charname, uint32* oCharID = 0);
uint32 GetAccountIDByChar(uint32 char_id);
uint32 GetAccountIDByName(const char* accname, int16* status = 0, uint32* lsid = 0);
uint32 GetGuildDBIDByCharID(uint32 char_id);
uint32 GetCharacterID(const char *name);
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0, float* oX = 0, float* oY = 0, float* oZ = 0);
uint32 GetGuildIDByCharID(uint32 char_id);
void GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID = 0);
void GetCharName(uint32 char_id, char* name);
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0,float* oX = 0, float* oY = 0, float* oZ = 0);
uint32 GetCharacterID(const char *name);
bool CheckBannedIPs(const char* loginIP); //Lieka Edit: Check incomming connection against banned IP table.
bool AddBannedIP(char* bannedIP, const char* notes); //Lieka Edit: Add IP address to the Banned_IPs table.
bool CheckGMIPs(const char* loginIP, uint32 account_id);
bool AddGMIP(char* ip_address, char* name);
void LoginIP(uint32 AccountID, const char* LoginIP);
/*
* Instancing Stuff
*/
bool VerifyZoneInstance(uint32 zone_id, uint16 instance_id);
bool VerifyInstanceAlive(uint16 instance_id, uint32 char_id);
bool CharacterInInstanceGroup(uint16 instance_id, uint32 char_id);
void DeleteInstance(uint16 instance_id);
bool CheckInstanceExpired(uint16 instance_id);
uint32 ZoneIDFromInstanceID(uint16 instance_id);
uint32 VersionFromInstanceID(uint16 instance_id);
uint32 GetTimeRemainingInstance(uint16 instance_id, bool &is_perma);
bool GetUnusedInstanceID(uint16 &instance_id);
bool CreateInstance(uint16 instance_id, uint32 zone_id, uint32 version, uint32 duration);
void PurgeExpiredInstances();
/* Instancing */
bool AddClientToInstance(uint16 instance_id, uint32 char_id);
bool CharacterInInstanceGroup(uint16 instance_id, uint32 char_id);
bool CheckInstanceExists(uint16 instance_id);
bool CheckInstanceExpired(uint16 instance_id);
bool CreateInstance(uint16 instance_id, uint32 zone_id, uint32 version, uint32 duration);
bool GetUnusedInstanceID(uint16 &instance_id);
bool GlobalInstance(uint16 instance_id);
bool RemoveClientFromInstance(uint16 instance_id, uint32 char_id);
bool RemoveClientsFromInstance(uint16 instance_id);
bool CheckInstanceExists(uint16 instance_id);
void BuryCorpsesInInstance(uint16 instance_id);
uint16 GetInstanceVersion(uint16 instance_id);
bool VerifyInstanceAlive(uint16 instance_id, uint32 char_id);
bool VerifyZoneInstance(uint32 zone_id, uint16 instance_id);
uint16 GetInstanceID(const char* zone, uint32 charid, int16 version);
uint16 GetInstanceID(uint32 zone, uint32 charid, int16 version);
void GetCharactersInInstance(uint16 instance_id, std::list<uint32> &charid_list);
uint16 GetInstanceVersion(uint16 instance_id);
uint32 GetTimeRemainingInstance(uint16 instance_id, bool &is_perma);
uint32 VersionFromInstanceID(uint16 instance_id);
uint32 ZoneIDFromInstanceID(uint16 instance_id);
void AssignGroupToInstance(uint32 gid, uint32 instance_id);
void AssignRaidToInstance(uint32 rid, uint32 instance_id);
void BuryCorpsesInInstance(uint16 instance_id);
void DeleteInstance(uint16 instance_id);
void FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 charid, uint32 gid);
void FlagInstanceByRaidLeader(uint32 zone, int16 version, uint32 charid, uint32 rid);
void GetCharactersInInstance(uint16 instance_id, std::list<uint32> &charid_list);
void PurgeExpiredInstances();
void SetInstanceDuration(uint16 instance_id, uint32 new_duration);
bool GlobalInstance(uint16 instance_id);
/*
* Adventure related.
*/
/* Adventure related. */
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win);
bool GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, uint32 &mmc_w, uint32 &ruj_w, uint32 &tak_w,
uint32 &guk_l, uint32 &mir_l, uint32 &mmc_l, uint32 &ruj_l, uint32 &tak_l);
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
/* Account Related */
/*
* Account Related
*/
uint32 GetMiniLoginAccount(char* ip);
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
uint32 CheckLogin(const char* name, const char* password, int16* oStatus = 0);
int16 CheckStatus(uint32 account_id);
uint32 CreateAccount(const char* name, const char* password, int16 status, uint32 lsaccount_id = 0);
bool DeleteAccount(const char* name);
bool GetLiveChar(uint32 account_id, char* cname);
bool SetAccountStatus(const char* name, int16 status);
bool SetLocalPassword(uint32 accid, const char* password);
bool UpdateLiveChar(char* charname, uint32 lsaccount_id);
int16 CheckStatus(uint32 account_id);
uint32 CheckLogin(const char* name, const char* password, int16* oStatus = 0);
uint32 CreateAccount(const char* name, const char* password, int16 status, uint32 lsaccount_id = 0);
uint32 GetAccountIDFromLSID(uint32 iLSID, char* oAccountName = 0, int16* oStatus = 0);
bool UpdateLiveChar(char* charname,uint32 lsaccount_id);
bool GetLiveChar(uint32 account_id, char* cname);
uint32 GetMiniLoginAccount(char* ip);
uint8 GetAgreementFlag(uint32 acctid);
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
void SetAgreementFlag(uint32 acctid);
/*
* Groups
*/
uint32 GetGroupID(const char* name);
void SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ismerc = false);
void ClearGroup(uint32 gid = 0);
/* Groups */
char* GetGroupLeaderForLogin(const char* name,char* leaderbuf);
void SetGroupLeaderName(uint32 gid, const char* name);
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
GroupLeadershipAA_Struct* GLAA = nullptr);
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
uint32 GetGroupID(const char* name);
void ClearGroup(uint32 gid = 0);
void ClearGroupLeader(uint32 gid = 0);
void SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ismerc = false);
void SetGroupLeaderName(uint32 gid, const char* name);
/* Raids */
/*
* Raids
*/
void ClearRaid(uint32 rid = 0);
void ClearRaidDetails(uint32 rid = 0);
uint32 GetRaidID(const char* name);
const char *GetRaidLeaderName(uint32 rid);
/*
* Database Variables
*/
uint32 GetRaidID(const char* name);
void ClearRaid(uint32 rid = 0);
void ClearRaidDetails(uint32 rid = 0);
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
void GetGroupLeadershipInfo(uint32 gid, uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, char *mentoree = nullptr, int *mentor_percent = nullptr, GroupLeadershipAA_Struct* GLAA = nullptr);
void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, RaidLeadershipAA_Struct* RLAA = nullptr);
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
/* Database Conversions 'database_conversions.cpp' */
bool CheckDatabaseConversions();
bool CheckDatabaseConvertBotsPostPPDeblob();
bool CheckDatabaseConvertCorpseDeblob();
bool CheckDatabaseConvertPPDeblob();
/* Database Variables */
bool GetVariable(const char* varname, char* varvalue, uint16 varvalue_len);
bool SetVariable(const char* varname, const char* varvalue);
bool LoadVariables();
uint32 LoadVariables_MQ(char** query);
bool LoadVariables_result(MYSQL_RES* result);
bool LoadVariables_result(MySQLRequestResult results);
/* General Queries */
/*
* General Queries
*/
bool LoadZoneNames();
bool GetZoneLongName(const char* short_name, char** long_name, char* file_name = 0, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, uint32* graveyard_id = 0, uint32* maxclients = 0);
bool GetZoneGraveyard(const uint32 graveyard_id, uint32* graveyard_zoneid = 0, float* graveyard_x = 0, float* graveyard_y = 0, float* graveyard_z = 0, float* graveyard_heading = 0);
uint32 GetZoneGraveyardID(uint32 zone_id, uint32 version);
uint32 GetZoneID(const char* zonename);
uint8 GetPEQZone(uint32 zoneID, uint32 version);
const char* GetZoneName(uint32 zoneID, bool ErrorUnknown = false);
uint8 GetServerType();
bool GetSafePoints(const char* short_name, uint32 version, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, int16* minstatus = 0, uint8* minlevel = 0, char *flag_needed = nullptr);
bool GetSafePoints(uint32 zoneID, uint32 version, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, int16* minstatus = 0, uint8* minlevel = 0, char *flag_needed = nullptr) { return GetSafePoints(GetZoneName(zoneID), version, safe_x, safe_y, safe_z, minstatus, minlevel, flag_needed); }
uint8 GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level);
uint8 GetRaceSkill(uint8 skillid, uint8 in_race);
bool GetZoneGraveyard(const uint32 graveyard_id, uint32* graveyard_zoneid = 0, float* graveyard_x = 0, float* graveyard_y = 0, float* graveyard_z = 0, float* graveyard_heading = 0);
bool GetZoneLongName(const char* short_name, char** long_name, char* file_name = 0, float* safe_x = 0, float* safe_y = 0, float* safe_z = 0, uint32* graveyard_id = 0, uint32* maxclients = 0);
bool LoadPTimers(uint32 charid, PTimerList &into);
void ClearPTimers(uint32 charid);
void ClearMerchantTemp();
void SetLFP(uint32 CharID, bool LFP);
void SetLFG(uint32 CharID, bool LFG);
void SetFirstLogon(uint32 CharID, uint8 firstlogon);
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
bool LoadZoneNames();
const char* GetZoneName(uint32 zoneID, bool ErrorUnknown = false);
uint32 GetZoneGraveyardID(uint32 zone_id, uint32 version);
uint32 GetZoneID(const char* zonename);
uint8 GetPEQZone(uint32 zoneID, uint32 version);
uint8 GetRaceSkill(uint8 skillid, uint8 in_race);
uint8 GetServerType();
uint8 GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level);
void AddReport(std::string who, std::string against, std::string lines);
void ClearMerchantTemp();
void ClearPTimers(uint32 charid);
void SetFirstLogon(uint32 CharID, uint8 firstlogon);
void SetLFG(uint32 CharID, bool LFG);
void SetLFP(uint32 CharID, bool LFP);
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
protected:
void HandleMysqlError(uint32 errnum);
/* EQEmuLogSys */
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
private:
void DBInitVars();
@@ -262,7 +260,15 @@ private:
uint32 varcache_max;
VarCache_Struct** varcache_array;
uint32 varcache_lastupdate;
/* Groups, utility methods. */
void ClearAllGroupLeaders();
void ClearAllGroups();
/* Raid, utility methods. */
void ClearAllRaids();
void ClearAllRaidDetails();
void ClearAllRaidLeaders();
};
bool FetchRowMap(MYSQL_RES *result, std::map<std::string,std::string> &rowmap);
#endif
File diff suppressed because it is too large Load Diff
+562
View File
@@ -0,0 +1,562 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/global_define.h"
#include "../common/rulesys.h"
#include "../common/string_util.h"
#include "../common/timer.h"
#include "database.h"
#include <iomanip>
#include <iostream>
// Disgrace: for windows compile
#ifdef _WINDOWS
#include <windows.h>
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#include "unix.h"
#include <netinet/in.h>
#include <sys/time.h>
#endif
bool Database::AddClientToInstance(uint16 instance_id, uint32 char_id)
{
std::string query = StringFormat(
"REPLACE INTO `instance_list_player` (id, charid) "
"VALUES "
"(%lu, %lu)",
(unsigned long)instance_id,
(unsigned long)char_id
);
auto results = QueryDatabase(query);
return results.Success();
}
bool Database::CharacterInInstanceGroup(uint16 instance_id, uint32 char_id)
{
std::string query = StringFormat("SELECT charid FROM instance_list_player where id=%u AND charid=%u", instance_id, char_id);
auto results = QueryDatabase(query);
if (!results.Success())
return false;
if (results.RowCount() != 1)
return false;
return true;
}
bool Database::CheckInstanceExists(uint16 instance_id) {
std::string query = StringFormat(
"SELECT "
"`id` "
"FROM "
"`instance_list` "
"WHERE "
"`id` = %u",
instance_id
);
auto results = QueryDatabase(query);
if (!results.Success())
return false;
if (results.RowCount() == 0)
return false;
return true;
}
bool Database::CheckInstanceExpired(uint16 instance_id)
{
int32 start_time = 0;
int32 duration = 0;
uint32 never_expires = 0;
std::string query = StringFormat("SELECT start_time, duration, never_expires FROM instance_list WHERE id=%u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
return true;
if (results.RowCount() == 0)
return true;
auto row = results.begin();
start_time = atoi(row[0]);
duration = atoi(row[1]);
never_expires = atoi(row[2]);
if (never_expires == 1)
return false;
timeval tv;
gettimeofday(&tv, nullptr);
if ((start_time + duration) <= tv.tv_sec)
return true;
return false;
}
bool Database::CreateInstance(uint16 instance_id, uint32 zone_id, uint32 version, uint32 duration)
{
std::string query = StringFormat("INSERT INTO instance_list (id, zone, version, start_time, duration)"
" values(%lu, %lu, %lu, UNIX_TIMESTAMP(), %lu)",
(unsigned long)instance_id, (unsigned long)zone_id, (unsigned long)version, (unsigned long)duration);
auto results = QueryDatabase(query);
return results.Success();
}
bool Database::GetUnusedInstanceID(uint16 &instance_id)
{
uint32 count = RuleI(Zone, ReservedInstances);
uint32 max = 65535;
std::string query = StringFormat("SELECT IFNULL(MAX(id),%u)+1 FROM instance_list WHERE id > %u", count, count);
auto results = QueryDatabase(query);
if (!results.Success())
{
instance_id = 0;
return false;
}
if (results.RowCount() == 0)
{
instance_id = 0;
return false;
}
auto row = results.begin();
if (atoi(row[0]) <= max)
{
instance_id = atoi(row[0]);
return true;
}
query = StringFormat("SELECT id FROM instance_list where id > %u ORDER BY id", count);
results = QueryDatabase(query);
if (!results.Success())
{
instance_id = 0;
return false;
}
if (results.RowCount() == 0)
{
instance_id = 0;
return false;
}
count++;
for (auto row = results.begin(); row != results.end(); ++row)
{
if (count < atoi(row[0]))
{
instance_id = count;
return true;
}
if (count > max)
{
instance_id = 0;
return false;
}
count++;
}
instance_id = count;
return true;
}
bool Database::GlobalInstance(uint16 instance_id)
{
std::string query = StringFormat(
"SELECT "
"is_global "
"FROM "
"instance_list "
"WHERE "
"id = %u "
"LIMIT 1 ",
instance_id
);
auto results = QueryDatabase(query);
if (!results.Success())
return false;
if (results.RowCount() == 0)
return false;
auto row = results.begin();
return (atoi(row[0]) == 1) ? true : false;
}
bool Database::RemoveClientFromInstance(uint16 instance_id, uint32 char_id)
{
std::string query = StringFormat("DELETE FROM instance_list_player WHERE id=%lu AND charid=%lu",
(unsigned long)instance_id, (unsigned long)char_id);
auto results = QueryDatabase(query);
return results.Success();
}
bool Database::RemoveClientsFromInstance(uint16 instance_id)
{
std::string query = StringFormat("DELETE FROM instance_list_player WHERE id=%lu", (unsigned long)instance_id);
auto results = QueryDatabase(query);
return results.Success();
}
bool Database::VerifyInstanceAlive(uint16 instance_id, uint32 char_id)
{
//we are not saved to this instance so set our instance to 0
if (!GlobalInstance(instance_id) && !CharacterInInstanceGroup(instance_id, char_id))
return false;
if (CheckInstanceExpired(instance_id))
{
DeleteInstance(instance_id);
return false;
}
return true;
}
bool Database::VerifyZoneInstance(uint32 zone_id, uint16 instance_id)
{
std::string query = StringFormat("SELECT id FROM instance_list where id=%u AND zone=%u", instance_id, zone_id);
auto results = QueryDatabase(query);
if (!results.Success())
return false;
if (results.RowCount() == 0)
return false;
return true;
}
uint16 Database::GetInstanceID(const char* zone, uint32 character_id, int16 version) {
std::string query = StringFormat(
"SELECT "
"instance_list.id "
"FROM "
"instance_list, "
"instance_list_player "
"WHERE "
"instance_list.zone = %u "
"AND instance_list.version = %u "
"AND instance_list.id = instance_list_player.id "
"AND instance_list_player.charid = %u "
"LIMIT 1 ",
GetZoneID(zone),
version,
character_id
);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
uint16 Database::GetInstanceID(uint32 zone, uint32 character_id, int16 version)
{
if (!zone)
return 0;
std::string query = StringFormat(
"SELECT "
"instance_list.id "
"FROM "
"instance_list, "
"instance_list_player "
"WHERE "
"instance_list.zone = %u "
"AND instance_list.version = %u "
"AND instance_list.id = instance_list_player.id "
"AND instance_list_player.charid = %u "
"LIMIT 1; ",
zone,
version,
character_id
);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
uint16 Database::GetInstanceVersion(uint16 instance_id) {
if (instance_id == 0)
return 0;
std::string query = StringFormat("SELECT version FROM instance_list where id=%u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
uint32 Database::GetTimeRemainingInstance(uint16 instance_id, bool &is_perma)
{
uint32 start_time = 0;
uint32 duration = 0;
uint32 never_expires = 0;
std::string query = StringFormat("SELECT start_time, duration, never_expires FROM instance_list WHERE id=%u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
{
is_perma = false;
return 0;
}
if (results.RowCount() == 0)
{
is_perma = false;
return 0;
}
auto row = results.begin();
start_time = atoi(row[0]);
duration = atoi(row[1]);
never_expires = atoi(row[2]);
if (never_expires == 1)
{
is_perma = true;
return 0;
}
is_perma = false;
timeval tv;
gettimeofday(&tv, nullptr);
return ((start_time + duration) - tv.tv_sec);
}
uint32 Database::VersionFromInstanceID(uint16 instance_id)
{
std::string query = StringFormat("SELECT version FROM instance_list where id=%u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
uint32 Database::ZoneIDFromInstanceID(uint16 instance_id)
{
std::string query = StringFormat("SELECT zone FROM instance_list where id=%u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
return 0;
if (results.RowCount() == 0)
return 0;
auto row = results.begin();
return atoi(row[0]);
}
void Database::AssignGroupToInstance(uint32 group_id, uint32 instance_id)
{
uint32 zone_id = ZoneIDFromInstanceID(instance_id);
uint16 version = VersionFromInstanceID(instance_id);
std::string query = StringFormat("SELECT `charid` FROM `group_id` WHERE `groupid` = %u", group_id);
auto results = QueryDatabase(query);
if (!results.Success())
return;
for (auto row = results.begin(); row != results.end(); ++row)
{
uint32 charid = atoi(row[0]);
if (GetInstanceID(zone_id, charid, version) == 0)
AddClientToInstance(instance_id, charid);
}
}
void Database::AssignRaidToInstance(uint32 raid_id, uint32 instance_id)
{
uint32 zone_id = ZoneIDFromInstanceID(instance_id);
uint16 version = VersionFromInstanceID(instance_id);
std::string query = StringFormat("SELECT `charid` FROM `raid_members` WHERE `raidid` = %u", raid_id);
auto results = QueryDatabase(query);
if (!results.Success())
return;
for (auto row = results.begin(); row != results.end(); ++row)
{
uint32 charid = atoi(row[0]);
if (GetInstanceID(zone_id, charid, version) == 0)
AddClientToInstance(instance_id, charid);
}
}
void Database::BuryCorpsesInInstance(uint16 instance_id) {
std::string query = StringFormat(
"UPDATE `character_corpses` "
"SET `is_buried` = 1, "
"`instance_id` = 0 "
"WHERE "
"`instance_id` = %u ",
instance_id
);
auto results = QueryDatabase(query);
}
void Database::DeleteInstance(uint16 instance_id)
{
std::string query = StringFormat("DELETE FROM instance_list WHERE id=%u", instance_id);
QueryDatabase(query);
query = StringFormat("DELETE FROM instance_list_player WHERE id=%u", instance_id);
QueryDatabase(query);
query = StringFormat("DELETE FROM respawn_times WHERE instance_id=%u", instance_id);
QueryDatabase(query);
query = StringFormat("DELETE FROM spawn_condition_values WHERE instance_id=%u", instance_id);
QueryDatabase(query);
BuryCorpsesInInstance(instance_id);
}
void Database::FlagInstanceByGroupLeader(uint32 zone, int16 version, uint32 charid, uint32 gid)
{
uint16 id = GetInstanceID(zone, charid, version);
if (id != 0)
return;
char ln[128];
memset(ln, 0, 128);
strcpy(ln, GetGroupLeadershipInfo(gid, ln));
uint32 l_charid = GetCharacterID((const char*)ln);
uint16 l_id = GetInstanceID(zone, l_charid, version);
if (l_id == 0)
return;
AddClientToInstance(l_id, charid);
}
void Database::FlagInstanceByRaidLeader(uint32 zone, int16 version, uint32 charid, uint32 rid)
{
uint16 id = GetInstanceID(zone, charid, version);
if (id != 0)
return;
uint32 l_charid = GetCharacterID(GetRaidLeaderName(rid));
uint16 l_id = GetInstanceID(zone, l_charid, version);
if (l_id == 0)
return;
AddClientToInstance(l_id, charid);
}
void Database::GetCharactersInInstance(uint16 instance_id, std::list<uint32> &charid_list) {
std::string query = StringFormat("SELECT `charid` FROM `instance_list_player` WHERE `id` = %u", instance_id);
auto results = QueryDatabase(query);
if (!results.Success())
return;
for (auto row = results.begin(); row != results.end(); ++row)
charid_list.push_back(atoi(row[0]));
}
void Database::PurgeExpiredInstances()
{
std::string query("SELECT id FROM instance_list where (start_time+duration) <= UNIX_TIMESTAMP() and never_expires = 0");
auto results = QueryDatabase(query);
if (!results.Success())
return;
if (results.RowCount() == 0)
return;
for (auto row = results.begin(); row != results.end(); ++row)
DeleteInstance(atoi(row[0]));
}
void Database::SetInstanceDuration(uint16 instance_id, uint32 new_duration)
{
std::string query = StringFormat("UPDATE `instance_list` SET start_time=UNIX_TIMESTAMP(), "
"duration=%u WHERE id=%u", new_duration, instance_id);
auto results = QueryDatabase(query);
}
-669
View File
@@ -1,669 +0,0 @@
#include "debug.h"
#ifdef _WINDOWS
#include <windows.h>
#include <process.h>
#include <winsock2.h>
#endif
#include <iostream>
#include "dbasync.h"
#include "database.h"
#include <errmsg.h>
#include <mysqld_error.h>
#include <limits.h>
#include "dbcore.h"
#include <string.h>
//#include "../common/MiscFunctions.h"
#include "StringUtil.h"
#define ASYNC_LOOP_GRANULARITY 4 //# of ms between checking our work
bool DBAsyncCB_LoadVariables(DBAsyncWork* iWork) {
char errbuf[MYSQL_ERRMSG_SIZE];
MYSQL_RES* result = 0;
DBAsyncQuery* dbaq = iWork->PopAnswer();
if (dbaq->GetAnswer(errbuf, &result))
iWork->GetDB()->LoadVariables_result(result);
else
std::cout << "Error: DBAsyncCB_LoadVariables failed: !GetAnswer: '" << errbuf << "'" << std::endl;
return true;
}
void AsyncLoadVariables(DBAsync *dba, Database *db) {
char* query = 0;
DBAsyncWork* dbaw = new DBAsyncWork(db, &DBAsyncCB_LoadVariables, 0, DBAsync::Read);
dbaw->AddQuery(0, &query, db->LoadVariables_MQ(&query));
dba->AddWork(&dbaw);
}
//we only need to do anything when somebody puts work on the queue
//so instead of checking all the time, we will wait on a condition
//which will get signaled when somebody puts something on the queue
ThreadReturnType DBAsyncLoop(void* tmp) {
DBAsync* dba = (DBAsync*) tmp;
#ifndef WIN32
_log(COMMON__THREADS, "Starting DBAsyncLoop with thread ID %d", pthread_self());
#endif
dba->MLoopRunning.lock();
while (dba->RunLoop()) {
//wait before working so we check the loop condition
//as soon as were done working
dba->CInList.Wait();
//we could check dba->RunLoop() again to see if we
//got turned off while we were waiting
{
dba->Process();
}
}
dba->MLoopRunning.unlock();
#ifndef WIN32
_log(COMMON__THREADS, "Ending DBAsyncLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
}
DBAsync::DBAsync(DBcore* iDBC)
: Timeoutable(10000)
{
pDBC = iDBC;
pRunLoop = true;
pNextID = 1;
#ifdef _WINDOWS
_beginthread(DBAsyncLoop, 0, this);
#else
pthread_t thread;
pthread_create(&thread, nullptr, DBAsyncLoop, this);
#endif
}
DBAsync::~DBAsync() {
StopThread();
}
bool DBAsync::StopThread() {
bool ret;
MRunLoop.lock();
ret = pRunLoop;
pRunLoop = false;
MRunLoop.unlock();
//signal the condition so we exit the loop if were waiting
CInList.Signal();
//this effectively waits for the processing thread to finish
MLoopRunning.lock();
MLoopRunning.unlock();
return ret;
}
uint32 DBAsync::AddWork(DBAsyncWork** iWork, uint32 iDelay) {
MInList.lock();
uint32 ret = GetNextID();
if (!(*iWork)->SetWorkID(ret)) {
MInList.unlock();
return 0;
}
InList.Append(*iWork);
(*iWork)->SetStatus(Queued);
if (iDelay)
(*iWork)->pExecuteAfter = Timer::GetCurrentTime() + iDelay;
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "Adding AsyncWork #" << (*iWork)->GetWorkID() << std::endl;
std::cout << "ExecuteAfter = " << (*iWork)->pExecuteAfter << " (" << Timer::GetCurrentTime() << " + " << iDelay << ")" << std::endl;
#endif
*iWork = 0;
MInList.unlock();
//wake up the processing thread and tell it to get to work.
CInList.Signal();
return ret;
}
bool DBAsync::CancelWork(uint32 iWorkID) {
if (iWorkID == 0)
return false;
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "DBAsync::CancelWork: " << iWorkID << std::endl;
#endif
MCurrentWork.lock();
if (CurrentWork && CurrentWork->GetWorkID() == iWorkID) {
CurrentWork->Cancel();
MCurrentWork.unlock();
return true;
}
MCurrentWork.unlock();
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->GetWorkID() == iWorkID) {
iterator.RemoveCurrent(true);
MInList.unlock();
return true;
}
iterator.Advance();
}
MInList.unlock();
return false;
}
bool DBAsync::RunLoop() {
bool ret;
MRunLoop.lock();
ret = pRunLoop;
MRunLoop.unlock();
return ret;
}
DBAsyncWork* DBAsync::InListPop() {
DBAsyncWork* ret = 0;
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->pExecuteAfter <= Timer::GetCurrentTime()) {
ret = iterator.GetData();
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "Poping AsyncWork #" << ret->GetWorkID() << std::endl;
std::cout << ret->pExecuteAfter << " <= " << Timer::GetCurrentTime() << std::endl;
#endif
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MInList.unlock();
return ret;
}
DBAsyncWork* DBAsync::InListPopWrite() {
MInList.lock();
LinkedListIterator<DBAsyncWork*> iterator(InList);
DBAsyncWork* ret = 0;
DBAsync::Type tmpType;
iterator.Reset();
while (iterator.MoreElements()) {
tmpType = iterator.GetData()->Type();
if (tmpType == Write || tmpType == Both) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MInList.unlock();
return ret;
}
void DBAsync::AddFQ(DBAsyncFinishedQueue* iDBAFQ) {
MFQList.lock();
DBAsyncFinishedQueue** tmp = new DBAsyncFinishedQueue*;
*tmp = iDBAFQ;
FQList.Append(tmp);
MFQList.unlock();
}
void DBAsync::Process() {
DBAsyncWork* tmpWork;
MCurrentWork.lock();
while ((CurrentWork = InListPop())) {
MCurrentWork.unlock();
//move from queued to executing
Status tmpStatus = CurrentWork->SetStatus(Executing);
if (tmpStatus == Queued) {
//execute the work
ProcessWork(CurrentWork);
tmpWork = CurrentWork;
MCurrentWork.lock();
CurrentWork = 0;
MCurrentWork.unlock();
//move from executing to finished
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
if (tmpStatus != Executing) {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #1" << std::endl;
}
MCurrentWork.lock();
safe_delete(tmpWork);
}
else {
//call callbacks or put results on finished queue
DispatchWork(tmpWork);
Sleep(25);
MCurrentWork.lock();
}
}
else {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #2" << std::endl;
}
MCurrentWork.lock();
safe_delete(CurrentWork);
}
}
MCurrentWork.unlock();
}
void DBAsync::CheckTimeout() {
try{
MFQList.lock();
LinkedListIterator<DBAsyncFinishedQueue**> iterator(FQList);
iterator.Reset();
while (iterator.MoreElements()) {
(*iterator.GetData())->CheckTimeouts();
iterator.Advance();
}
MFQList.unlock();
}
catch(...){
}
}
void DBAsync::CommitWrites() {
#if DEBUG_MYSQL_QUERIES >= 2
std::cout << "DBAsync::CommitWrites() called." << std::endl;
#endif
DBAsyncWork* tmpWork;
while ((tmpWork = InListPopWrite())) {
Status tmpStatus = tmpWork->SetStatus(Executing);
if (tmpStatus == Queued) {
ProcessWork(tmpWork);
tmpStatus = tmpWork->SetStatus(DBAsync::Finished);
if (tmpStatus != Executing) {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #1" << std::endl;
}
safe_delete(tmpWork);
}
else {
DispatchWork(tmpWork);
}
}
else {
if (tmpStatus != Canceled) {
std::cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #2" << std::endl;
}
safe_delete(tmpWork);
}
}
}
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
DBAsyncQuery* CurrentQuery;
while ((CurrentQuery = iWork->PopQuery())) {
CurrentQuery->Process(pDBC);
iWork->PushAnswer(CurrentQuery);
if (iSleep)
Sleep(1);
}
}
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
//if this work has a callback, call it
//otherwise, stick the work on the finish queue
if (iWork->pCB) {
if (iWork->pCB(iWork))
safe_delete(iWork);
}
else {
if (!iWork->pDBAFQ->Push(iWork))
safe_delete(iWork);
}
}
DBAsyncFinishedQueue::DBAsyncFinishedQueue(uint32 iTimeout) {
pTimeout = iTimeout;
}
DBAsyncFinishedQueue::~DBAsyncFinishedQueue() {
}
void DBAsyncFinishedQueue::CheckTimeouts() {
if (pTimeout == 0xFFFFFFFF)
return;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->CheckTimeout(pTimeout))
iterator.RemoveCurrent(true);
iterator.Advance();
}
MLock.unlock();
}
DBAsyncWork* DBAsyncFinishedQueue::Pop() {
DBAsyncWork* ret = 0;
MLock.lock();
ret = list.Pop();
MLock.unlock();
return ret;
}
DBAsyncWork* DBAsyncFinishedQueue::Find(uint32 iWorkID) {
DBAsyncWork* ret = 0;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->GetWorkID() == iWorkID) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MLock.unlock();
return ret;
}
DBAsyncWork* DBAsyncFinishedQueue::PopByWPT(uint32 iWPT) {
DBAsyncWork* ret = 0;
MLock.lock();
LinkedListIterator<DBAsyncWork*> iterator(list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->WPT() == iWPT) {
ret = iterator.GetData();
iterator.RemoveCurrent(false);
break;
}
iterator.Advance();
}
MLock.unlock();
return ret;
}
bool DBAsyncFinishedQueue::Push(DBAsyncWork* iDBAW) {
if (!this)
return false;
MLock.lock();
list.Append(iDBAW);
MLock.unlock();
return true;
}
DBAsyncWork::DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
: m_db(db)
{
pstatus = DBAsync::AddingWork;
pType = iType;
pExecuteAfter = 0;
pWorkID = 0;
pDBAFQ = iDBAFQ;
pCB = 0;
pWPT = iWPT;
pQuestionCount = 0;
pAnswerCount = 0;
pTimeout = iTimeout;
pTSFinish = 0;
}
DBAsyncWork::DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT, DBAsync::Type iType, uint32 iTimeout)
: m_db(db)
{
pstatus = DBAsync::AddingWork;
pType = iType;
pExecuteAfter = 0;
pWorkID = 0;
pDBAFQ = 0;
pCB = iCB;
pWPT = iWPT;
pQuestionCount = 0;
pAnswerCount = 0;
pTimeout = iTimeout;
pTSFinish = 0;
}
DBAsyncWork::~DBAsyncWork() {
DBAsyncQuery* dbaq = 0;
while ((dbaq = todo.pop()))
safe_delete(dbaq);
while ((dbaq = done.pop()))
safe_delete(dbaq);
while ((dbaq = todel.pop()))
safe_delete(dbaq);
}
bool DBAsyncWork::AddQuery(DBAsyncQuery** iDBAQ) {
bool ret;
MLock.lock();
if (pstatus != DBAsync::AddingWork)
ret = false;
else {
ret = true;
pQuestionCount++;
todo.push(*iDBAQ);
(*iDBAQ)->pstatus = DBAsync::Queued;
*iDBAQ = 0;
}
MLock.unlock();
return ret;
}
bool DBAsyncWork::AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
DBAsyncQuery* DBAQ = new DBAsyncQuery(iQPT, iQuery, iQueryLen, iGetResultSet, iGetErrbuf);
if (AddQuery(&DBAQ))
return true;
else {
safe_delete(DBAQ);
return false;
}
}
bool DBAsyncWork::SetWorkID(uint32 iWorkID) {
bool ret = true;
MLock.lock();
if (pWorkID)
ret = false;
else
pWorkID = iWorkID;
MLock.unlock();
return ret;
}
uint32 DBAsyncWork::GetWorkID() {
uint32 ret;
MLock.lock();
ret = pWorkID;
MLock.unlock();
return ret;
}
uint32 DBAsyncWork::WPT() {
uint32 ret;
MLock.lock();
ret = pWPT;
MLock.unlock();
return ret;
}
DBAsync::Type DBAsyncWork::Type() {
DBAsync::Type ret;
MLock.lock();
ret = pType;
MLock.unlock();
return ret;
}
DBAsyncQuery* DBAsyncWork::PopAnswer() {
DBAsyncQuery* ret;
MLock.lock();
ret = done.pop();
if (ret)
pAnswerCount--;
todel.push(ret);
MLock.unlock();
return ret;
}
bool DBAsyncWork::CheckTimeout(uint32 iFQTimeout) {
if (pTimeout == 0xFFFFFFFF)
return false;
bool ret = false;
MLock.lock();
if (pTimeout > iFQTimeout)
iFQTimeout = pTimeout;
if (Timer::GetCurrentTime() > (pTSFinish + iFQTimeout))
ret = true;
MLock.unlock();
return ret;
}
//sets the work's status to the supplied value and returns
//the revious status
DBAsync::Status DBAsyncWork::SetStatus(DBAsync::Status iStatus) {
DBAsync::Status ret;
MLock.lock();
if (iStatus == DBAsync::Finished)
pTSFinish = Timer::GetCurrentTime();
ret = pstatus;
pstatus = iStatus;
MLock.unlock();
return ret;
}
bool DBAsyncWork::Cancel() {
bool ret;
MLock.lock();
if (pstatus != DBAsync::Finished) {
pstatus = DBAsync::Canceled;
ret = true;
}
else
ret = false;
MLock.unlock();
return ret;
}
bool DBAsyncWork::IsCancled() {
bool ret;
MLock.lock();
ret = (bool) (pstatus == DBAsync::Canceled);
MLock.unlock();
return ret;
}
DBAsyncQuery* DBAsyncWork::PopQuery() {
DBAsyncQuery* ret = 0;
MLock.lock();
ret = todo.pop();
if (ret)
pQuestionCount--;
MLock.unlock();
return ret;
}
void DBAsyncWork::PushAnswer(DBAsyncQuery* iDBAQ) {
MLock.lock();
done.push(iDBAQ);
pAnswerCount++;
MLock.unlock();
}
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
if (iQueryLen == 0xFFFFFFFF)
pQueryLen = strlen(*iQuery);
else
pQueryLen = iQueryLen;
pQuery = *iQuery;
*iQuery = 0;
Init(iQPT, iGetResultSet, iGetErrbuf);
}
DBAsyncQuery::DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen, bool iGetResultSet, bool iGetErrbuf) {
if (iQueryLen == 0xFFFFFFFF)
pQueryLen = strlen(iQuery);
else
pQueryLen = iQueryLen;
pQuery = strn0cpy(new char[pQueryLen+1], iQuery, pQueryLen+1);
Init(iQPT, iGetResultSet, iGetErrbuf);
}
void DBAsyncQuery::Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf) {
pstatus = DBAsync::AddingWork;
pQPT = iQPT;
pGetResultSet = iGetResultSet;
pGetErrbuf = iGetErrbuf;
pmysqlsuccess = false;
perrbuf = 0;
perrnum = 0;
presult = 0;
paffected_rows = 0;
plast_insert_id = 0;
}
DBAsyncQuery::~DBAsyncQuery() {
safe_delete_array(perrbuf);
safe_delete_array(pQuery);
if (presult)
mysql_free_result(presult);
}
bool DBAsyncQuery::GetAnswer(char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum) {
if (pstatus != DBAsync::Finished) {
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error: Query not finished.");
if (errnum)
*errnum = UINT_MAX;
return false;
}
if (errbuf) {
if (pGetErrbuf) {
if (perrbuf)
strn0cpy(errbuf, perrbuf, MYSQL_ERRMSG_SIZE);
else
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message should've been saved, but hasnt. errno: %u", perrnum);
}
else
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "Error message not saved. errno: %u", perrnum);
}
if (errnum)
*errnum = perrnum;
if (affected_rows)
*affected_rows = paffected_rows;
if (last_insert_id)
*last_insert_id = plast_insert_id;
if (result)
*result = presult;
return pmysqlsuccess;
}
void DBAsyncQuery::Process(DBcore* iDBC) {
pstatus = DBAsync::Executing;
if (pGetErrbuf)
perrbuf = new char[MYSQL_ERRMSG_SIZE];
MYSQL_RES** resultPP = 0;
if (pGetResultSet)
resultPP = &presult;
pmysqlsuccess = iDBC->RunQuery(pQuery, pQueryLen, perrbuf, resultPP, &paffected_rows, &plast_insert_id, &perrnum);
pstatus = DBAsync::Finished;
}
-176
View File
@@ -1,176 +0,0 @@
#ifndef DBASYNC_H
#define DBASYNC_H
#include "../common/dbcore.h"
#include "../common/timeoutmgr.h"
class DBAsyncFinishedQueue;
class DBAsyncWork;
class DBAsyncQuery;
class Database;
// Big daddy that owns the threads and does the work
class DBAsync : private Timeoutable {
public:
enum Status { AddingWork, Queued, Executing, Finished, Canceled };
enum Type { Read, Write, Both };
DBAsync(DBcore* iDBC);
~DBAsync();
bool StopThread();
uint32 AddWork(DBAsyncWork** iWork, uint32 iDelay = 0);
bool CancelWork(uint32 iWorkID);
void CommitWrites();
void AddFQ(DBAsyncFinishedQueue* iDBAFQ);
protected:
//things related to the processing thread:
friend ThreadReturnType DBAsyncLoop(void* tmp);
Mutex MLoopRunning;
Condition CInList;
bool RunLoop();
void Process();
private:
virtual void CheckTimeout();
void ProcessWork(DBAsyncWork* iWork, bool iSleep = true);
void DispatchWork(DBAsyncWork* iWork);
inline uint32 GetNextID() { return pNextID++; }
DBAsyncWork* InListPop();
DBAsyncWork* InListPopWrite(); // Ignores delay
void OutListPush(DBAsyncWork* iDBAW);
Mutex MRunLoop;
bool pRunLoop;
DBcore* pDBC;
uint32 pNextID;
Mutex MInList;
LinkedList<DBAsyncWork*> InList;
Mutex MFQList;
LinkedList<DBAsyncFinishedQueue**> FQList;
// Mutex for outside access to current work & when current work is being changed.
// NOT locked when CurrentWork is being accessed by the DBAsync thread.
// Never change pointer from outside DBAsync thread!
// Only here for access to thread-safe DBAsyncWork functions.
Mutex MCurrentWork;
DBAsyncWork* CurrentWork;
};
/*
DB Work Complete Callback:
This will be called under the DBAsync thread! Never access any non-threadsafe
data/functions/classes. (ie: zone, entitylist, client, etc are not threadsafe)
Function prototype:
return value: true if we should delete the data, false if we should keep it
*/
typedef bool(*DBWorkCompleteCallBack)(DBAsyncWork*);
class DBAsyncFinishedQueue {
public:
DBAsyncFinishedQueue(uint32 iTimeout = 90000);
~DBAsyncFinishedQueue();
DBAsyncWork* Pop();
DBAsyncWork* PopByWPT(uint32 iWPT);
DBAsyncWork* Find(uint32 iWPT);
bool Push(DBAsyncWork* iDBAW);
void CheckTimeouts();
private:
Mutex MLock;
uint32 pTimeout;
LinkedList<DBAsyncWork*> list;
};
// Container class for multiple queries
class DBAsyncWork {
public:
DBAsyncWork(Database *db, DBAsyncFinishedQueue* iDBAFQ, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
DBAsyncWork(Database *db, DBWorkCompleteCallBack iCB, uint32 iWPT = 0, DBAsync::Type iType = DBAsync::Both, uint32 iTimeout = 0);
~DBAsyncWork();
bool AddQuery(DBAsyncQuery** iDBAQ);
bool AddQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
uint32 WPT();
DBAsync::Type Type();
// Pops finished queries off the work
DBAsyncQuery* PopAnswer();
uint32 QueryCount();
Database *GetDB() const { return(m_db); }
bool CheckTimeout(uint32 iFQTimeout);
bool SetWorkID(uint32 iWorkID);
uint32 GetWorkID();
protected:
friend class DBAsync;
DBAsync::Status SetStatus(DBAsync::Status iStatus);
bool Cancel();
bool IsCancled();
DBAsyncQuery* PopQuery(); // Get query to be run
void PushAnswer(DBAsyncQuery* iDBAQ); // Push answer back into workset
// not mutex'd cause only to be accessed from dbasync class
uint32 pExecuteAfter;
private:
Mutex MLock;
uint32 pQuestionCount;
uint32 pAnswerCount;
uint32 pWorkID;
uint32 pWPT;
uint32 pTimeout;
uint32 pTSFinish; // timestamp when finished
DBAsyncFinishedQueue* pDBAFQ; //we do now own this pointer
DBWorkCompleteCallBack pCB;
DBAsync::Status pstatus;
DBAsync::Type pType;
MyQueue<DBAsyncQuery> todo;
MyQueue<DBAsyncQuery> done;
MyQueue<DBAsyncQuery> todel;
Database *const m_db; //we do now own this pointer
};
// Container class for the query information
class DBAsyncQuery {
public:
DBAsyncQuery(uint32 iQPT, char** iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
DBAsyncQuery(uint32 iQPT, const char* iQuery, uint32 iQueryLen = 0xFFFFFFFF, bool iGetResultSet = true, bool iGetErrbuf = true);
~DBAsyncQuery();
bool GetAnswer(char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0);
inline uint32 QPT() { return pQPT; }
protected:
friend class DBAsyncWork;
uint32 pQPT;
friend class DBAsync;
void Process(DBcore* iDBC);
void Init(uint32 iQPT, bool iGetResultSet, bool iGetErrbuf);
DBAsync::Status pstatus;
char* pQuery;
uint32 pQueryLen;
bool pGetResultSet;
bool pGetErrbuf;
bool pmysqlsuccess;
char* perrbuf;
uint32 perrnum;
uint32 paffected_rows;
uint32 plast_insert_id;
MYSQL_RES* presult;
};
void AsyncLoadVariables(DBAsync *dba, Database *db);
#endif
+82 -84
View File
@@ -1,17 +1,17 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <winsock2.h>
#endif
#include <iostream>
#include <errmsg.h>
#include <mysqld_error.h>
#include <limits.h>
#include "../common/misc_functions.h"
#include "../common/eqemu_logsys.h"
#include "dbcore.h"
#include <errmsg.h>
#include <fstream>
#include <iostream>
#include <mysqld_error.h>
#include <string.h>
#include "../common/MiscFunctions.h"
#include <cstdlib>
#ifdef _WINDOWS
#define snprintf _snprintf
@@ -58,93 +58,91 @@ void DBcore::ping() {
MDatabase.unlock();
}
bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
if (errnum)
*errnum = 0;
if (errbuf)
errbuf[0] = 0;
bool ret = false;
MySQLRequestResult DBcore::QueryDatabase(std::string query, bool retryOnFailureOnce)
{
return QueryDatabase(query.c_str(), query.length(), retryOnFailureOnce);
}
MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce)
{
LockMutex lock(&MDatabase);
// Reconnect if we are not connected before hand.
if (pStatus != Connected)
Open();
if (mysql_real_query(&mysql, query, querylen)) {
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
// request query. != 0 indicates some kind of error.
if (mysql_real_query(&mysql, query, querylen) != 0)
{
unsigned int errorNumber = mysql_errno(&mysql);
if (errorNumber == CR_SERVER_GONE_ERROR)
pStatus = Error;
if (mysql_errno(&mysql) == CR_SERVER_LOST || mysql_errno(&mysql) == CR_SERVER_GONE_ERROR) {
if (retry) {
// error appears to be a disconnect error, may need to try again.
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR)
{
if (retryOnFailureOnce)
{
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
ret = RunQuery(query, querylen, errbuf, result, affected_rows, last_insert_id, errnum, false);
if (ret)
MySQLRequestResult requestResult = QueryDatabase(query, querylen, false);
if (requestResult.Success())
{
std::cout << "Reconnection to database successful." << std::endl;
return requestResult;
}
}
else {
pStatus = Error;
if (errnum)
*errnum = mysql_errno(&mysql);
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
ret = false;
}
pStatus = Error;
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
}
else {
if (errnum)
*errnum = mysql_errno(&mysql);
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
#ifdef _EQDEBUG
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
#endif
ret = false;
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
/* Implement Logging at the Root */
if (mysql_errno(&mysql) > 0 && strlen(query) > 0){
if (Log.log_settings[Logs::MySQLError].is_category_enabled == 1)
Log.Out(Logs::General, Logs::MySQLError, "%i: %s \n %s", mysql_errno(&mysql), mysql_error(&mysql), query);
}
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
}
else {
if (result && mysql_field_count(&mysql)) {
*result = mysql_store_result(&mysql);
#ifdef _EQDEBUG
DBMemLeak::Alloc(*result, query);
#endif
}
else if (result)
*result = 0;
if (affected_rows)
*affected_rows = mysql_affected_rows(&mysql);
if (last_insert_id)
*last_insert_id = mysql_insert_id(&mysql);
if (result) {
if (*result) {
ret = true;
}
else {
#ifdef _EQDEBUG
std::cout << "DB Query Error: No Result" << std::endl;
#endif
if (errnum)
*errnum = UINT_MAX;
if (errbuf)
strcpy(errbuf, "DBcore::RunQuery: No Result");
ret = false;
}
}
else {
ret = true;
}
}
#if DEBUG_MYSQL_QUERIES >= 1
if (ret) {
std::cout << "query successful";
if (result && (*result))
std::cout << ", " << (int) mysql_num_rows(*result) << " rows returned";
if (affected_rows)
std::cout << ", " << (*affected_rows) << " rows affected";
std::cout<< std::endl;
}
else {
std::cout << "QUERY: query FAILED" << std::endl;
}
#endif
return ret;
// successful query. get results.
MYSQL_RES* res = mysql_store_result(&mysql);
uint32 rowCount = 0;
if (res != nullptr)
rowCount = (uint32)mysql_num_rows(res);
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
if (Log.log_settings[Logs::MySQLQuery].is_category_enabled == 1)
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u rows returned)", query, rowCount, requestResult.RowCount());
return requestResult;
}
void DBcore::TransactionBegin() {
QueryDatabase("START TRANSACTION");
}
void DBcore::TransactionCommit() {
QueryDatabase("COMMIT");
}
void DBcore::TransactionRollback() {
QueryDatabase("ROLLBACK");
}
uint32 DBcore::DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen) {
+11 -8
View File
@@ -4,15 +4,14 @@
#ifdef _WINDOWS
#include <winsock.h>
#include <windows.h>
//#include <winsock.h>
#endif
#include <mysql.h>
#include "../common/mutex.h"
#include "../common/mysql_request_result.h"
#include "../common/types.h"
#include "../common/Mutex.h"
#include "../common/linked_list.h"
#include "../common/queue.h"
#include "../common/timer.h"
#include "../common/Condition.h"
#include <mysql.h>
#include <string.h>
class DBcore {
public:
@@ -21,7 +20,11 @@ public:
DBcore();
~DBcore();
eStatus GetStatus() { return pStatus; }
bool RunQuery(const char* query, uint32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* last_insert_id = 0, uint32* errnum = 0, bool retry = true);
MySQLRequestResult QueryDatabase(const char* query, uint32 querylen, bool retryOnFailureOnce = true);
MySQLRequestResult QueryDatabase(std::string query, bool retryOnFailureOnce = true);
void TransactionBegin();
void TransactionCommit();
void TransactionRollback();
uint32 DoEscapeString(char* tobuf, const char* frombuf, uint32 fromlen);
void ping();
MYSQL* getMySQL(){ return &mysql; }
-126
View File
@@ -1,126 +0,0 @@
// Doors
#ifdef SHAREMEM
int32 Database::GetDoorsCount(uint32* oMaxID) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
query = new char[256];
strcpy(query, "SELECT MAX(id), count(*) FROM doors");
if (RunQuery(query, strlen(query), errbuf, &result)) {
safe_delete(query);
row = mysql_fetch_row(result);
if (row && row[1]) {
int32 ret = atoi(row[1]);
if (oMaxID) {
if (row[0])
*oMaxID = atoi(row[0]);
else
*oMaxID = 0;
}
mysql_free_result(result);
return ret;
}
}
else {
cerr << "Error in GetDoorsCount query '" << query << "' " << errbuf << endl;
delete[] query;
return -1;
}
return -1;
}
extern "C" bool extDBLoadDoors(uint32 iDoorCount, uint32 iMaxDoorID) { return database.DBLoadDoors(iDoorCount, iMaxDoorID); }
const Door* Database::GetDoor(uint8 door_id, const char* zone_name) {
for(uint32 i=0; i<max_door_type; i++) {
const Door* door = GetDoorDBID(i);
if(door && door->door_id == door_id && strcasecmp(door->zone_name, zone_name) == 0)
return door;
}
return 0;
}
const Door* Database::GetDoorDBID(uint32 db_id) {
return EMuShareMemDLL.Doors.GetDoor(db_id);
}
bool Database::LoadDoors() {
if (!EMuShareMemDLL.Load())
return false;
int32 tmp_max_door_type = -1;
uint32 tmp = 0;
tmp_max_door_type = GetDoorsCount(&tmp);
if (tmp_max_door_type < 0) {
cout << "Error: Database::LoadDoors-ShareMem: GetDoorsCount() returned < 0" << endl;
return false;
}
max_door_type = tmp_max_door_type;
bool ret = EMuShareMemDLL.Doors.DLLLoadDoors(&extDBLoadDoors, sizeof(Door), max_door_type, tmp);
return ret;
}
bool Database::DBLoadDoors(uint32 iDoorCount, uint32 iMaxDoorID) {
cout << "Loading Doors from database..." << endl;
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
query = new char[256];
strcpy(query, "SELECT MAX(id), Count(*) FROM doors");
if (RunQuery(query, strlen(query), errbuf, &result))
{
safe_delete(query);
row = mysql_fetch_row(result);
if (row && row[0]) {
if (atoi(row[0]) > iMaxDoorID) {
cout << "Error: Insufficient shared memory to load doors." << endl;
cout << "Max(id): " << atoi(row[0]) << ", iMaxDoorID: " << iMaxDoorID << endl;
cout << "Fix this by increasing the MMF_MAX_Door_ID define statement" << endl;
return false;
}
if (atoi(row[1]) != iDoorCount) {
cout << "Error: Insufficient shared memory to load doors." << endl;
cout << "Count(*): " << atoi(row[1]) << ", iDoorCount: " << iDoorCount << endl;
return false;
}
max_door_type = atoi(row[0]);
mysql_free_result(result);
Door tmpDoor;
MakeAnyLenString(&query, "SELECT id,doorid,zone,name,pos_x,pos_y,pos_z,heading,opentype,guild,lockpick,keyitem,triggerdoor,triggertype from doors");//WHERE zone='%s'", zone_name
if (RunQuery(query, strlen(query), errbuf, &result))
{
safe_delete(query);
while((row = mysql_fetch_row(result))) {
memset(&tmpDoor, 0, sizeof(Door));
tmpDoor.db_id = atoi(row[0]);
tmpDoor.door_id = atoi(row[1]);
strn0cpy(tmpDoor.zone_name,row[2],32);
strn0cpy(tmpDoor.door_name,row[3],32);
tmpDoor.pos_x = (float)atof(row[4]);
tmpDoor.pos_y = (float)atof(row[5]);
tmpDoor.pos_z = (float)atof(row[6]);
tmpDoor.heading = atoi(row[7]);
tmpDoor.opentype = atoi(row[8]);
tmpDoor.guild_id = atoi(row[9]);
tmpDoor.lockpick = atoi(row[10]);
tmpDoor.keyitem = atoi(row[11]);
tmpDoor.trigger_door = atoi(row[12]);
tmpDoor.trigger_type = atoi(row[13]);
EMuShareMemDLL.Doors.cbAddDoor(tmpDoor.db_id, &tmpDoor);
Sleep(0);
}
mysql_free_result(result);
}
else
{
cerr << "Error in DBLoadDoors query '" << query << "' " << errbuf << endl;
delete[] query;
return false;
}
}
}
return true;
}
#endif
-441
View File
@@ -1,441 +0,0 @@
#include <iostream>
#include <string>
#include <cstdarg>
#include <time.h>
#ifdef _WINDOWS
#include <process.h>
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#include <sys/types.h>
#include <unistd.h>
#endif
#include "debug.h"
#include "StringUtil.h"
#include "MiscFunctions.h"
#include "platform.h"
#ifndef va_copy
#define va_copy(d,s) ((d) = (s))
#endif
static volatile bool logFileValid = false;
static EQEMuLog realLogFile;
EQEMuLog *LogFile = &realLogFile;
static const char* FileNames[EQEMuLog::MaxLogID] = { "logs/eqemu", "logs/eqemu", "logs/eqemu_error", "logs/eqemu_debug", "logs/eqemu_quest", "logs/eqemu_commands", "logs/crash" };
static const char* LogNames[EQEMuLog::MaxLogID] = { "Status", "Normal", "Error", "Debug", "Quest", "Command", "Crash" };
EQEMuLog::EQEMuLog() {
for (int i=0; i<MaxLogID; i++) {
fp[i] = 0;
logCallbackFmt[i] = nullptr;
logCallbackBuf[i] = nullptr;
logCallbackPva[i] = nullptr;
}
pLogStatus[Status] = LOG_LEVEL_STATUS;
pLogStatus[Normal] = LOG_LEVEL_NORMAL;
pLogStatus[Error] = LOG_LEVEL_ERROR;
pLogStatus[Debug] = LOG_LEVEL_DEBUG;
pLogStatus[Quest] = LOG_LEVEL_QUEST;
pLogStatus[Commands] = LOG_LEVEL_COMMANDS;
pLogStatus[Crash] = LOG_LEVEL_CRASH;
logFileValid = true;
}
EQEMuLog::~EQEMuLog() {
logFileValid = false;
for (int i=0; i<MaxLogID; i++) {
LockMutex lock(&MLog[i]); //to prevent termination race
if (fp[i])
fclose(fp[i]);
}
}
bool EQEMuLog::open(LogIDs id) {
if (!logFileValid) {
return false;
}
if (id >= MaxLogID) {
return false;
}
LockMutex lock(&MOpen);
if (pLogStatus[id] & 4) {
return false;
}
if (fp[id]) {
//cerr<<"Warning: LogFile already open"<<endl;
return true;
}
char exename[200] = "";
const EQEmuExePlatform &platform = GetExecutablePlatform();
if(platform == ExePlatformWorld) {
snprintf(exename, sizeof(exename), "_world");
} else if(platform == ExePlatformZone) {
snprintf(exename, sizeof(exename), "_zone");
} else if(platform == ExePlatformLaunch) {
snprintf(exename, sizeof(exename), "_launch");
} else if(platform == ExePlatformUCS) {
snprintf(exename, sizeof(exename), "_ucs");
} else if(platform == ExePlatformQueryServ) {
snprintf(exename, sizeof(exename), "_queryserv");
} else if(platform == ExePlatformSharedMemory) {
snprintf(exename, sizeof(exename), "_shared_memory");
} else if(platform == ExePlatformClientImport) {
snprintf(exename, sizeof(exename), "_import");
} else if(platform == ExePlatformClientExport) {
snprintf(exename, sizeof(exename), "_export");
}
char filename[200];
#ifndef NO_PIDLOG
snprintf(filename, sizeof(filename), "%s%s_%04i.log", FileNames[id], exename, getpid());
#else
snprintf(filename, sizeof(filename), "%s%s.log", FileNames[id], exename);
#endif
fp[id] = fopen(filename, "a");
if (!fp[id]) {
std::cerr << "Failed to open log file: " << filename << std::endl;
pLogStatus[id] |= 4; // set file state to error
return false;
}
fputs("---------------------------------------------\n",fp[id]);
write(id, "Starting Log: %s", filename);
return true;
}
bool EQEMuLog::write(LogIDs id, const char *fmt, ...) {
if (!logFileValid) {
return false;
}
if (id >= MaxLogID) {
return false;
}
bool dofile = false;
if (pLogStatus[id] & 1) {
dofile = open(id);
}
if (!(dofile || pLogStatus[id] & 2))
return false;
LockMutex lock(&MLog[id]);
if (!logFileValid)
return false; //check again for threading race reasons (to avoid two mutexes)
time_t aclock;
struct tm *newtime;
time( &aclock ); /* Get time in seconds */
newtime = localtime( &aclock ); /* Convert time to struct */
if (dofile)
#ifndef NO_PIDLOG
fprintf(fp[id], "[%02d.%02d. - %02d:%02d:%02d] ", newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
#else
fprintf(fp[id], "%04i [%02d.%02d. - %02d:%02d:%02d] ", getpid(), newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
#endif
va_list argptr, tmpargptr;
va_start(argptr, fmt);
if (dofile) {
va_copy(tmpargptr, argptr);
vfprintf( fp[id], fmt, tmpargptr );
}
if(logCallbackFmt[id]) {
msgCallbackFmt p = logCallbackFmt[id];
va_copy(tmpargptr, argptr);
p(id, fmt, tmpargptr );
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
fprintf(stderr, "[%s] ", LogNames[id]);
vfprintf( stderr, fmt, argptr );
}
else {
fprintf(stdout, "[%s] ", LogNames[id]);
vfprintf( stdout, fmt, argptr );
}
}
va_end(argptr);
if (dofile)
fprintf(fp[id], "\n");
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
fprintf(stderr, "\n");
fflush(stderr);
} else {
fprintf(stdout, "\n");
fflush(stdout);
}
}
if(dofile)
fflush(fp[id]);
return true;
}
//write with Prefix and a VA_list
bool EQEMuLog::writePVA(LogIDs id, const char *prefix, const char *fmt, va_list argptr) {
if (!logFileValid) {
return false;
}
if (id >= MaxLogID) {
return false;
}
bool dofile = false;
if (pLogStatus[id] & 1) {
dofile = open(id);
}
if (!(dofile || pLogStatus[id] & 2)) {
return false;
}
LockMutex lock(&MLog[id]);
if (!logFileValid)
return false; //check again for threading race reasons (to avoid two mutexes)
time_t aclock;
struct tm *newtime;
time( &aclock ); /* Get time in seconds */
newtime = localtime( &aclock ); /* Convert time to struct */
va_list tmpargptr;
if (dofile) {
#ifndef NO_PIDLOG
fprintf(fp[id], "[%02d.%02d. - %02d:%02d:%02d] %s", newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec, prefix);
#else
fprintf(fp[id], "%04i [%02d.%02d. - %02d:%02d:%02d] %s", getpid(), newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec, prefix);
#endif
va_copy(tmpargptr, argptr);
vfprintf( fp[id], fmt, tmpargptr );
}
if(logCallbackPva[id]) {
msgCallbackPva p = logCallbackPva[id];
va_copy(tmpargptr, argptr);
p(id, prefix, fmt, tmpargptr );
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
fprintf(stderr, "[%s] %s", LogNames[id], prefix);
vfprintf( stderr, fmt, argptr );
}
else {
fprintf(stdout, "[%s] %s", LogNames[id], prefix);
vfprintf( stdout, fmt, argptr );
}
}
va_end(argptr);
if (dofile)
fprintf(fp[id], "\n");
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8)
fprintf(stderr, "\n");
else
fprintf(stdout, "\n");
}
if(dofile)
fflush(fp[id]);
return true;
}
bool EQEMuLog::writebuf(LogIDs id, const char *buf, uint8 size, uint32 count) {
if (!logFileValid) {
return false;
}
if (id >= MaxLogID) {
return false;
}
bool dofile = false;
if (pLogStatus[id] & 1) {
dofile = open(id);
}
if (!(dofile || pLogStatus[id] & 2))
return false;
LockMutex lock(&MLog[id]);
if (!logFileValid)
return false; //check again for threading race reasons (to avoid two mutexes)
time_t aclock;
struct tm *newtime;
time( &aclock ); /* Get time in seconds */
newtime = localtime( &aclock ); /* Convert time to struct */
if (dofile)
#ifndef NO_PIDLOG
fprintf(fp[id], "[%02d.%02d. - %02d:%02d:%02d] ", newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
#else
fprintf(fp[id], "%04i [%02d.%02d. - %02d:%02d:%02d] ", getpid(), newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
#endif
if (dofile) {
fwrite(buf, size, count, fp[id]);
fprintf(fp[id], "\n");
}
if(logCallbackBuf[id]) {
msgCallbackBuf p = logCallbackBuf[id];
p(id, buf, size, count);
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
fprintf(stderr, "[%s] ", LogNames[id]);
fwrite(buf, size, count, stderr);
fprintf(stderr, "\n");
} else {
fprintf(stdout, "[%s] ", LogNames[id]);
fwrite(buf, size, count, stdout);
fprintf(stdout, "\n");
}
}
if(dofile)
fflush(fp[id]);
return true;
}
bool EQEMuLog::writeNTS(LogIDs id, bool dofile, const char *fmt, ...) {
va_list argptr, tmpargptr;
va_start(argptr, fmt);
if (dofile) {
va_copy(tmpargptr, argptr);
vfprintf( fp[id], fmt, tmpargptr );
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8)
vfprintf( stderr, fmt, argptr );
else
vfprintf( stdout, fmt, argptr );
}
va_end(argptr);
return true;
};
bool EQEMuLog::Dump(LogIDs id, uint8* data, uint32 size, uint32 cols, uint32 skip) {
if (!logFileValid) {
#if EQDEBUG >= 10
std::cerr << "Error: Dump() from null pointer" << std::endl;
#endif
return false;
}
if (size == 0)
return true;
if (!LogFile)
return false;
if (id >= MaxLogID)
return false;
bool dofile = false;
if (pLogStatus[id] & 1) {
dofile = open(id);
}
if (!(dofile || pLogStatus[id] & 2))
return false;
LockMutex lock(&MLog[id]);
if (!logFileValid)
return false; //check again for threading race reasons (to avoid two mutexes)
write(id, "Dumping Packet: %i", size);
// Output as HEX
int beginningOfLineOffset = 0;
uint32 indexInData;
std::string asciiOutput;
for(indexInData=skip; indexInData<size; indexInData++) {
if ((indexInData-skip)%cols==0) {
if (indexInData != skip)
writeNTS(id, dofile, " | %s\n", asciiOutput.c_str());
writeNTS(id, dofile, "%4i: ", indexInData-skip);
asciiOutput.clear();
beginningOfLineOffset = 0;
}
else if ((indexInData-skip)%(cols/2) == 0) {
writeNTS(id, dofile, "- ");
}
writeNTS(id, dofile, "%02X ", (unsigned char)data[indexInData]);
if (data[indexInData] >= 32 && data[indexInData] < 127)
{
// According to http://msdn.microsoft.com/en-us/library/vstudio/ee404875(v=vs.100).aspx
// Visual Studio 2010 doesn't have std::to_string(int) but it does have the long long
// version.
asciiOutput.append(std::to_string((long long)data[indexInData]));
}
else
{
asciiOutput.append(".");
}
}
uint32 k = ((indexInData-skip)-1)%cols;
if (k < 8)
writeNTS(id, dofile, " ");
for (uint32 h = k+1; h < cols; h++) {
writeNTS(id, dofile, " ");
}
writeNTS(id, dofile, " | %s\n", asciiOutput.c_str());
if (dofile)
fflush(fp[id]);
return true;
}
void EQEMuLog::SetCallback(LogIDs id, msgCallbackFmt proc) {
if (!logFileValid)
return;
if (id >= MaxLogID) {
return;
}
logCallbackFmt[id] = proc;
}
void EQEMuLog::SetCallback(LogIDs id, msgCallbackBuf proc) {
if (!logFileValid)
return;
if (id >= MaxLogID) {
return;
}
logCallbackBuf[id] = proc;
}
void EQEMuLog::SetCallback(LogIDs id, msgCallbackPva proc) {
if (!logFileValid)
return;
if (id >= MaxLogID) {
return;
}
logCallbackPva[id] = proc;
}
void EQEMuLog::SetAllCallbacks(msgCallbackFmt proc) {
if (!logFileValid)
return;
int r;
for(r = Status; r < MaxLogID; r++) {
SetCallback((LogIDs)r, proc);
}
}
void EQEMuLog::SetAllCallbacks(msgCallbackBuf proc) {
if (!logFileValid)
return;
int r;
for(r = Status; r < MaxLogID; r++) {
SetCallback((LogIDs)r, proc);
}
}
void EQEMuLog::SetAllCallbacks(msgCallbackPva proc) {
if (!logFileValid)
return;
int r;
for(r = Status; r < MaxLogID; r++) {
SetCallback((LogIDs)r, proc);
}
}
-147
View File
@@ -1,147 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Debug Levels
#ifndef EQDEBUG
#define EQDEBUG 1
#else
////// File/Console options
// 0 <= Quiet mode Errors to file Status and Normal ignored
// 1 >= Status and Normal to console, Errors to file
// 2 >= Status, Normal, and Error to console and logfile
// 3 >= Lite debug
// 4 >= Medium debug
// 5 >= Debug release (Anything higher is not recommended for regular use)
// 6 == (Reserved for special builds) Login opcode debug All packets dumped
// 7 == (Reserved for special builds) Chat Opcode debug All packets dumped
// 8 == (Reserved for special builds) World opcode debug All packets dumped
// 9 == (Reserved for special builds) Zone Opcode debug All packets dumped
// 10 >= More than you ever wanted to know
//
/////
// Add more below to reserve for file's functions ect.
/////
// Any setup code based on defines should go here
//
#endif
#if defined(_DEBUG) && defined(WIN32)
#ifndef _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
#endif
#ifndef EQDEBUG_H
#define EQDEBUG_H
#ifndef _WINDOWS
#define DebugBreak() if(0) {}
#endif
#define _WINSOCKAPI_ //stupid windows, trying to fix the winsock2 vs. winsock issues
#if defined(WIN32) && ( defined(PACKETCOLLECTOR) || defined(COLLECTOR) )
// Packet Collector on win32 requires winsock.h due to latest pcap.h
// winsock.h must come before windows.h
#include <winsock.h>
#endif
#ifdef _WINDOWS
#include <windows.h>
#include <winsock2.h>
#endif
#include "logsys.h"
#include "../common/Mutex.h"
#include <stdio.h>
#include <stdarg.h>
class EQEMuLog {
public:
EQEMuLog();
~EQEMuLog();
enum LogIDs {
Status = 0, //this must stay the first entry in this list
Normal,
Error,
Debug,
Quest,
Commands,
Crash,
MaxLogID
};
//these are callbacks called for each
typedef void (* msgCallbackBuf)(LogIDs id, const char *buf, uint8 size, uint32 count);
typedef void (* msgCallbackFmt)(LogIDs id, const char *fmt, va_list ap);
typedef void (* msgCallbackPva)(LogIDs id, const char *prefix, const char *fmt, va_list ap);
void SetAllCallbacks(msgCallbackFmt proc);
void SetAllCallbacks(msgCallbackBuf proc);
void SetAllCallbacks(msgCallbackPva proc);
void SetCallback(LogIDs id, msgCallbackFmt proc);
void SetCallback(LogIDs id, msgCallbackBuf proc);
void SetCallback(LogIDs id, msgCallbackPva proc);
bool writebuf(LogIDs id, const char *buf, uint8 size, uint32 count);
bool write(LogIDs id, const char *fmt, ...);
bool writePVA(LogIDs id, const char *prefix, const char *fmt, va_list args);
bool Dump(LogIDs id, uint8* data, uint32 size, uint32 cols=16, uint32 skip=0);
private:
bool open(LogIDs id);
bool writeNTS(LogIDs id, bool dofile, const char *fmt, ...); // no error checking, assumes is open, no locking, no timestamp, no newline
Mutex MOpen;
Mutex MLog[MaxLogID];
FILE* fp[MaxLogID];
/* LogStatus: bitwise variable
1 = output to file
2 = output to stdout
4 = fopen error, dont retry
8 = use stderr instead (2 must be set)
*/
uint8 pLogStatus[MaxLogID];
msgCallbackFmt logCallbackFmt[MaxLogID];
msgCallbackBuf logCallbackBuf[MaxLogID];
msgCallbackPva logCallbackPva[MaxLogID];
};
extern EQEMuLog* LogFile;
#ifdef _EQDEBUG
class PerformanceMonitor {
public:
PerformanceMonitor(int64* ip) {
p = ip;
QueryPerformanceCounter(&tmp);
}
~PerformanceMonitor() {
LARGE_INTEGER tmp2;
QueryPerformanceCounter(&tmp2);
*p += tmp2.QuadPart - tmp.QuadPart;
}
LARGE_INTEGER tmp;
int64* p;
};
#endif
#endif
+1 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
*/
#include "debug.h"
#include "global_define.h"
#include "emu_opcodes.h"
const char *OpcodeNames[_maxEmuOpcode+1] = {
+509 -500
View File
File diff suppressed because it is too large Load Diff
@@ -23,17 +23,14 @@ crap into its own subclass of this object, it will clean things up
tremendously.
*/
#include "../common/debug.h"
#include "../common/global_define.h"
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <iomanip>
#include "EmuTCPConnection.h"
#include "EmuTCPServer.h"
#include "emu_tcp_connection.h"
#include "emu_tcp_server.h"
#include "../common/servertalk.h"
#include "../common/packet_dump.h"
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
#define MSG_NOSIGNAL 0
@@ -53,6 +50,7 @@ EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, SOCKET in_s
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
_eqp
id = 0;
Server = nullptr;
pOldFormat = iOldFormat;
@@ -79,6 +77,7 @@ EmuTCPConnection::EmuTCPConnection(bool iOldFormat, EmuTCPServer* iRelayServer,
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
_eqp
Server = iRelayServer;
if (Server)
RelayServer = true;
@@ -101,13 +100,14 @@ EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConne
keepalive_timer(SERVER_TIMEOUT),
timeout_timer(SERVER_TIMEOUT * 2)
{
_eqp
Server = iServer;
RelayLink = iRelayLink;
RelayServer = true;
RelayCount = 0;
RemoteID = iRemoteID;
pOldFormat = false;
ConnectionType = Incomming;
ConnectionType = Incoming;
TCPMode = modePacket;
PacketMode = packetModeZone;
#if TCPN_DEBUG_Memory >= 7
@@ -120,6 +120,7 @@ EmuTCPConnection::~EmuTCPConnection() {
}
EmuTCPNetPacket_Struct* EmuTCPConnection::MakePacket(ServerPacket* pack, uint32 iDestination) {
_eqp
int32 size = sizeof(EmuTCPNetPacket_Struct) + pack->size;
if (pack->compressed) {
size += 4;
@@ -147,6 +148,7 @@ EmuTCPNetPacket_Struct* EmuTCPConnection::MakePacket(ServerPacket* pack, uint32
}
SPackSendQueue* EmuTCPConnection::MakeOldPacket(ServerPacket* pack) {
_eqp
SPackSendQueue* spsq = (SPackSendQueue*) new uchar[sizeof(SPackSendQueue) + pack->size + 4];
if (pack->pBuffer != 0 && pack->size != 0)
memcpy((char *) &spsq->buffer[4], (char *) pack->pBuffer, pack->size);
@@ -157,6 +159,7 @@ SPackSendQueue* EmuTCPConnection::MakeOldPacket(ServerPacket* pack) {
}
bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
_eqp
if (!Connected())
return false;
eTCPMode tmp = GetMode();
@@ -217,6 +220,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
}
bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
_eqp
if (RemoteID)
return false;
if (!Connected())
@@ -257,6 +261,7 @@ bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
}
ServerPacket* EmuTCPConnection::PopPacket() {
_eqp
ServerPacket* ret;
if (!MOutQueueLock.trylock())
return nullptr;
@@ -266,12 +271,14 @@ ServerPacket* EmuTCPConnection::PopPacket() {
}
void EmuTCPConnection::InModeQueuePush(EmuTCPNetPacket_Struct* tnps) {
_eqp
MSendQueue.lock();
InModeQueue.push(tnps);
MSendQueue.unlock();
}
void EmuTCPConnection::OutQueuePush(ServerPacket* pack) {
_eqp
MOutQueueLock.lock();
OutQueue.push(pack);
MOutQueueLock.unlock();
@@ -279,6 +286,7 @@ void EmuTCPConnection::OutQueuePush(ServerPacket* pack) {
bool EmuTCPConnection::LineOutQueuePush(char* line) {
_eqp
#if defined(GOTFRAGS) && 0
if (strcmp(line, "**CRASHME**") == 0) {
int i = 0;
@@ -366,13 +374,13 @@ bool EmuTCPConnection::LineOutQueuePush(char* line) {
safe_delete_array(line);
return(true);
}
}
return(TCPConnection::LineOutQueuePush(line));
}
void EmuTCPConnection::Disconnect(bool iSendRelayDisconnect) {
_eqp
TCPConnection::Disconnect();
if (RelayLink) {
@@ -382,6 +390,7 @@ void EmuTCPConnection::Disconnect(bool iSendRelayDisconnect) {
}
bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
_eqp
if(!TCPConnection::ConnectIP(irIP, irPort, errbuf))
return(false);
@@ -419,7 +428,8 @@ bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
sendbuf_used = sendbuf_size;
sendbuf = new uchar[sendbuf_size];
memcpy(sendbuf, "\0**PACKETMODEQS**\r", sendbuf_size);
} else {
}
else {
//default: packetModeZone
safe_delete_array(sendbuf);
sendbuf_size = 20;
@@ -435,6 +445,7 @@ bool EmuTCPConnection::ConnectIP(uint32 irIP, uint16 irPort, char* errbuf) {
}
void EmuTCPConnection::ClearBuffers() {
_eqp
TCPConnection::ClearBuffers();
LockMutex lock2(&MOutQueueLock);
@@ -451,6 +462,7 @@ void EmuTCPConnection::ClearBuffers() {
}
void EmuTCPConnection::SendNetErrorPacket(const char* reason) {
_eqp
#if TCPC_DEBUG >= 1
struct in_addr in;
in.s_addr = GetrIP();
@@ -472,6 +484,7 @@ void EmuTCPConnection::SendNetErrorPacket(const char* reason) {
}
void EmuTCPConnection::RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisconnect) {
_eqp
if (iSendRelayDisconnect) {
ServerPacket* pack = new ServerPacket(0, 5);
pack->pBuffer[0] = 3;
@@ -485,6 +498,7 @@ void EmuTCPConnection::RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisco
bool EmuTCPConnection::ProcessReceivedData(char* errbuf) {
_eqp
if (errbuf)
errbuf[0] = 0;
timeout_timer.Start();
@@ -508,6 +522,7 @@ bool EmuTCPConnection::ProcessReceivedData(char* errbuf) {
bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
_eqp
if (errbuf)
errbuf[0] = 0;
int32 base = 0;
@@ -624,6 +639,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
}
bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
_eqp
int32 base = 0;
int32 size = 4;
uchar* buffer;
@@ -698,6 +714,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
}
void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
_eqp
uint8 opcode = pack->pBuffer[0];
uint8* data = &pack->pBuffer[1];
switch (opcode) {
@@ -717,7 +734,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
SendNetErrorPacket("Switch to RelayServer mode by a Relay Client");
break;
}
if (ConnectionType != Incomming) {
if (ConnectionType != Incoming) {
SendNetErrorPacket("Switch to RelayServer mode on outgoing connection");
break;
}
@@ -738,7 +755,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
SendNetErrorPacket("New RelayClient: wrong size, expected 11");
break;
}
if (ConnectionType != Incomming) {
if (ConnectionType != Incoming) {
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
break;
}
@@ -758,7 +775,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
}
EmuTCPConnection* con = Server->FindConnection(*((uint32*)data));
if (con) {
if (ConnectionType == Incomming) {
if (ConnectionType == Incoming) {
if (con->GetRelayLink() != this) {
SendNetErrorPacket("Delete RelayClient: RelayLink != this");
break;
@@ -783,6 +800,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
}
bool EmuTCPConnection::SendData(bool &sent_something, char* errbuf) {
_eqp
sent_something = false;
if(!TCPConnection::SendData(sent_something, errbuf))
return(false);
@@ -802,6 +820,7 @@ bool EmuTCPConnection::SendData(bool &sent_something, char* errbuf) {
}
bool EmuTCPConnection::RecvData(char* errbuf) {
_eqp
if(!TCPConnection::RecvData(errbuf)) {
if (OutQueue.count())
return(true);
@@ -1,7 +1,7 @@
#ifndef EmuTCPCONNECTION_H_
#define EmuTCPCONNECTION_H_
#include "TCPConnection.h"
#include "tcp_connection.h"
#include "timer.h"
//moved out of TCPConnection:: to be more exportable
@@ -26,6 +26,7 @@
struct SPackSendQueue;
class EmuTCPServer;
class ServerPacket;
class EmuTCPConnection : public TCPConnection {
public:
@@ -1,6 +1,6 @@
#include "debug.h"
#include "EmuTCPServer.h"
#include "EmuTCPConnection.h"
#include "global_define.h"
#include "emu_tcp_server.h"
#include "emu_tcp_connection.h"
EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
: TCPServer<EmuTCPConnection>(iPort),
@@ -9,6 +9,7 @@ EmuTCPServer::EmuTCPServer(uint16 iPort, bool iOldFormat)
}
EmuTCPServer::~EmuTCPServer() {
_eqp
MInQueue.lock();
while(!m_InQueue.empty()) {
delete m_InQueue.front();
@@ -18,23 +19,27 @@ EmuTCPServer::~EmuTCPServer() {
}
void EmuTCPServer::Process() {
_eqp
CheckInQueue();
TCPServer<EmuTCPConnection>::Process();
}
void EmuTCPServer::CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
{
_eqp
EmuTCPConnection *conn = new EmuTCPConnection(ID, this, in_socket, irIP, irPort, pOldFormat);
AddConnection(conn);
}
void EmuTCPServer::SendPacket(ServerPacket* pack) {
_eqp
EmuTCPNetPacket_Struct* tnps = EmuTCPConnection::MakePacket(pack);
SendPacket(&tnps);
}
void EmuTCPServer::SendPacket(EmuTCPNetPacket_Struct** tnps) {
_eqp
MInQueue.lock();
m_InQueue.push(*tnps);
MInQueue.unlock();
@@ -42,6 +47,7 @@ void EmuTCPServer::SendPacket(EmuTCPNetPacket_Struct** tnps) {
}
void EmuTCPServer::CheckInQueue() {
_eqp
EmuTCPNetPacket_Struct* tnps = 0;
while (( tnps = InQueuePop() )) {
@@ -57,6 +63,7 @@ void EmuTCPServer::CheckInQueue() {
}
EmuTCPNetPacket_Struct* EmuTCPServer::InQueuePop() {
_eqp
EmuTCPNetPacket_Struct* ret = nullptr;
MInQueue.lock();
if(!m_InQueue.empty()) {
@@ -69,6 +76,7 @@ EmuTCPNetPacket_Struct* EmuTCPServer::InQueuePop() {
EmuTCPConnection *EmuTCPServer::FindConnection(uint32 iID) {
_eqp
vitr cur, end;
cur = m_list.begin();
end = m_list.end();
@@ -1,7 +1,7 @@
#ifndef EmuTCPSERVER_H_
#define EmuTCPSERVER_H_
#include "TCPServer.h"
#include "tcp_server.h"
class EmuTCPConnection;
struct EmuTCPNetPacket_Struct;
+237 -103
View File
@@ -19,6 +19,7 @@
#define EQ_CONSTANTS_H
#include "skills.h"
#include "types.h"
/*
** Item attributes
@@ -138,45 +139,86 @@ enum ItemUseTypes : uint8
};
/*
** Augmentation use types (in-work)
** Augmentation use type bitmasks (1-based)
**
** (ref: dbstr_us.txt)
**
*/
enum AugmentationUseTypes : uint32 {
AugTypeNone = 0, // not 100% sure on this...
AugTypeGeneralSingleStat, /*1^16^1 (General: Single Stat)^0*/
AugTypeGeneralMultipleStat, /*2^16^2 (General: Multiple Stat)^0*/
AugTypeGeneralSpellEffect, /*3^16^3 (General: Spell Effect)^0*/
AugTypeWeaponGeneral, /*4^16^4 (Weapon: General)^0*/
AugTypeWeaponElemDamage, /*5^16^5 (Weapon: Elem Damage)^0*/
AugTypeWeaponBaseDamage, /*6^16^6 (Weapon: Base Damage)^0*/
AugTypeGeneralGroup, /*7^16^7 (General: Group)^0*/
AugTypeGeneralRaid, /*8^16^8 (General: Raid)^0*/
AugTypeGeneralDragonsPoints, /*9^16^9 (General: Dragons Points)^0*/
AugTypeCraftedCommon, /*10^16^10 (Crafted: Common)^0*/
AugTypeCraftedGroup1, /*11^16^11 (Crafted: Group)^0*/
AugTypeCraftedRaid1, /*12^16^12 (Crafted: Raid)^0*/
AugTypeEnergeiacGroup, /*13^16^13 (Energeiac: Group)^0*/
AugTypeEnergeiacRaid, /*14^16^14 (Energeiac: Raid)^0*/
AugTypeEmblem, /*15^16^15 (Emblem)^0*/
AugTypeCraftedGroup2, /*16^16^16 (Crafted: Group)^0*/
AugTypeCraftedRaid2, /*17^16^17 (Crafted: Raid)^0*/
AugTypeUnknown1, /*18^16^18^0*/
AugTypeUnknown2, /*19^16^19^0*/
AugTypeOrnamentation, /*20^16^20 (Ornamentation)^0*/
AugTypeSpecialOrnamentation, /*21^16^21 (Special Ornamentation)^0*/
AugTypeUnknown3, /*22^16^22^0*/
AugTypeUnknown4, /*23^16^23^0*/
AugTypeUnknown5, /*24^16^24^0*/
AugTypeUnknown6, /*25^16^25^0*/
AugTypeUnknown7, /*26^16^26^0*/
AugTypeUnknown8, /*27^16^27^0*/
AugTypeUnknown9, /*28^16^28^0*/
AugTypeUnknown10, /*29^16^29^0*/
AugTypeEpic25, /*30^16^30^0*/
AugTypeTest, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
_AugTypeCount
enum AugmentationUseTypeBitmasks : uint32 {
AugUseNone = 0x00000000,
AugUseGeneralSingleStat = 0x00000001, /*1^16^1 (General: Single Stat)^0*/
AugUseGeneralMultipleStat = 0x00000002, /*2^16^2 (General: Multiple Stat)^0*/
AugUseGeneralSpellEffect = 0x00000004, /*3^16^3 (General: Spell Effect)^0*/
AugUseWeaponGeneral = 0x00000008, /*4^16^4 (Weapon: General)^0*/
AugUseWeaponElemDamage = 0x00000010, /*5^16^5 (Weapon: Elem Damage)^0*/
AugUseWeaponBaseDamage = 0x00000020, /*6^16^6 (Weapon: Base Damage)^0*/
AugUseGeneralGroup = 0x00000040, /*7^16^7 (General: Group)^0*/
AugUseGeneralRaid = 0x00000080, /*8^16^8 (General: Raid)^0*/
AugUseGeneralDragonsPoints = 0x00000100, /*9^16^9 (General: Dragons Points)^0*/
AugUseCraftedCommon = 0x00000200, /*10^16^10 (Crafted: Common)^0*/
AugUseCraftedGroup1 = 0x00000400, /*11^16^11 (Crafted: Group)^0*/
AugUseCraftedRaid1 = 0x00000800, /*12^16^12 (Crafted: Raid)^0*/
AugUseEnergeiacGroup = 0x00001000, /*13^16^13 (Energeiac: Group)^0*/
AugUseEnergeiacRaid = 0x00002000, /*14^16^14 (Energeiac: Raid)^0*/
AugUseEmblem = 0x00004000, /*15^16^15 (Emblem)^0*/
AugUseCraftedGroup2 = 0x00008000, /*16^16^16 (Crafted: Group)^0*/
AugUseCraftedRaid2 = 0x00010000, /*17^16^17 (Crafted: Raid)^0*/
AugUseUnknown1 = 0x00020000, /*18^16^18^0*/
AugUseUnknown2 = 0x00040000, /*19^16^19^0*/
AugUseOrnamentation = 0x00080000, /*20^16^20 (Ornamentation)^0*/
AugUseSpecialOrnamentation = 0x00100000, /*21^16^21 (Special Ornamentation)^0*/
AugUseUnknown3 = 0x00200000, /*22^16^22^0*/
AugUseUnknown4 = 0x00400000, /*23^16^23^0*/
AugUseUnknown5 = 0x00800000, /*24^16^24^0*/
AugUseUnknown6 = 0x01000000, /*25^16^25^0*/
AugUseUnknown7 = 0x02000000, /*26^16^26^0*/
AugUseUnknown8 = 0x04000000, /*27^16^27^0*/
AugUseUnknown9 = 0x08000000, /*28^16^28^0*/
AugUseUnknown10 = 0x10000000, /*29^16^29^0*/
AugUseEpic25 = 0x20000000, /*30^16^30^0*/
AugUseTest = 0x40000000, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
AugUseAll = 0xFFFFFFFF
};
/*
** Augmentation use types (enumerated)
**
*/
enum AugmentationUseTypes : uint8 {
AugTypeNone = 0,
AugTypeGeneralSingleStat,
AugTypeGeneralMultipleStat,
AugTypeGeneralSpellEffect,
AugTypeWeaponGeneral,
AugTypeWeaponElemDamage,
AugTypeWeaponBaseDamage,
AugTypeGeneralGroup,
AugTypeGeneralRaid,
AugTypeGeneralDragonsPoints,
AugTypeCraftedCommon,
AugTypeCraftedGroup1,
AugTypeCraftedRaid1,
AugTypeEnergeiacGroup,
AugTypeEnergeiacRaid,
AugTypeEmblem,
AugTypeCraftedGroup2,
AugTypeCraftedRaid2,
AugTypeUnknown1,
AugTypeUnknown2,
AugTypeOrnamentation,
AugTypeSpecialOrnamentation,
AugTypeUnknown3,
AugTypeUnknown4,
AugTypeUnknown5,
AugTypeUnknown6,
AugTypeUnknown7,
AugTypeUnknown8,
AugTypeUnknown9,
AugTypeUnknown10,
AugTypeEpic25,
AugTypeTest,
_AugTypeCount,
AugTypeAll = 255
};
/*
@@ -326,7 +368,7 @@ enum {
#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
//#define AT_Trader 300 // Bazzar Trader Mode
// solar: animations for AT_Anim
// animations for AT_Anim
#define ANIM_FREEZE 102
#define ANIM_STAND 0x64
#define ANIM_SIT 0x6e
@@ -735,10 +777,11 @@ enum MaterialUseSlots : uint8
_MaterialInvalid = 255
};
/*
// Used for worn NPC inventory tracking. NPCs don't use
// augments, so only the basic slots need to be kept track of.
#define MAX_WORN_INVENTORY 22
*/
/*
** Inventory Slot Equipment Enum
@@ -768,73 +811,164 @@ enum MaterialUseSlots : uint8
**
*/
enum InventorySlot
{
////////////////////////
// Equip slots
////////////////////////
SLOT_CHARM = 0,
SLOT_EAR01 = 1,
SLOT_HEAD = 2,
SLOT_FACE = 3,
SLOT_EAR02 = 4,
SLOT_NECK = 5,
SLOT_SHOULDER = 6,
SLOT_ARMS = 7,
SLOT_BACK = 8,
SLOT_BRACER01 = 9,
SLOT_BRACER02 = 10,
SLOT_RANGE = 11,
SLOT_HANDS = 12,
SLOT_PRIMARY = 13,
SLOT_SECONDARY = 14,
SLOT_RING01 = 15,
SLOT_RING02 = 16,
SLOT_CHEST = 17,
SLOT_LEGS = 18,
SLOT_FEET = 19,
SLOT_WAIST = 20,
SLOT_AMMO = 21,
////////////////////////
// All other slots
////////////////////////
SLOT_PERSONAL_BEGIN = 22,
SLOT_PERSONAL_END = 29,
SLOT_CURSOR = 30,
SLOT_CURSOR_END = (int16)0xFFFE, // Last item on cursor queue
// Cursor bag slots are 331->340 (10 slots)
// Personal Inventory Slots
// Slots 1 through 8 are slots 22->29
// Inventory bag slots are 251->330 (10 slots per bag)
// Tribute slots are 400-404? (upper bound unknown)
// storing these in worn item's map
// Bank slots
// Bank slots 1 through 16 are slots 2000->2015
// Bank bag slots are 2031->2190
// Shared bank slots
// Shared bank slots 1 through 2 are slots 2500->2501
// Shared bank bag slots are 2531->2550
// Trade session slots
// Trade slots 1 through 8 are slots 3000->3007
// Trade bag slots are technically 0->79 when passed to client,
// but in our code, we treat them as slots 3100->3179
// Slot used in OP_TradeSkillCombine for world tradeskill containers
SLOT_TRADESKILL = 1000,
SLOT_AUGMENT = 1001,
SLOT_POWER_SOURCE = 9999,
// Value recognized by client for destroying an item
SLOT_INVALID = (int16)0xFFFF
enum InventoryMapTypes : int16 {
MapPossessions = 0,
MapBank,
MapSharedBank,
MapTrade,
MapWorld,
MapLimbo,
MapTribute,
MapTrophyTribute,
MapGuildTribute,
MapMerchant,
MapDeleted,
MapCorpse,
MapBazaar,
MapInspect,
MapRealEstate,
MapViewMODPC,
MapViewMODBank,
MapViewMODSharedBank,
MapViewMODLimbo,
MapAltStorage,
MapArchived,
MapMail,
MapGuildTrophyTribute,
MapKrono,
MapOther,
_MapCount
};
enum InventoryMainTypes : int16 {
MainCharm = 0,
MainEar1,
MainHead,
MainFace,
MainEar2,
MainNeck,
MainShoulders,
MainArms,
MainBack,
MainWrist1,
MainWrist2,
MainRange,
MainHands,
MainPrimary,
MainSecondary,
MainFinger1,
MainFinger2,
MainChest,
MainLegs,
MainFeet,
MainWaist,
MainPowerSource = 9999, // temp
MainAmmo = 21, // temp
MainGeneral1,
MainGeneral2,
MainGeneral3,
MainGeneral4,
MainGeneral5,
MainGeneral6,
MainGeneral7,
MainGeneral8,
//MainGeneral9,
//MainGeneral10,
MainCursor,
_MainCount
};
#define INVALID_INDEX -1
#define NOT_USED 0
#define NO_ITEM 0
// yes..these are redundant... but, they help to identify and define what is actually being performed
// plus, since they're pre-op's, they don't affect the actual binary size
#define MAP_BEGIN 0
#define MAIN_BEGIN 0
#define SUB_BEGIN 0
#define AUG_BEGIN 0
namespace legacy {
// this is for perl and other legacy systems
typedef enum {
SLOT_CHARM = 0,
SLOT_EAR01 = 1,
SLOT_HEAD = 2,
SLOT_FACE = 3,
SLOT_EAR02 = 4,
SLOT_NECK = 5,
SLOT_SHOULDER = 6,
SLOT_ARMS = 7,
SLOT_BACK = 8,
SLOT_BRACER01 = 9,
SLOT_BRACER02 = 10,
SLOT_RANGE = 11,
SLOT_HANDS = 12,
SLOT_PRIMARY = 13,
SLOT_SECONDARY = 14,
SLOT_RING01 = 15,
SLOT_RING02 = 16,
SLOT_CHEST = 17,
SLOT_LEGS = 18,
SLOT_FEET = 19,
SLOT_WAIST = 20,
SLOT_POWER_SOURCE = 9999,
SLOT_AMMO = 21,
SLOT_GENERAL_1 = 22,
SLOT_GENERAL_2 = 23,
SLOT_GENERAL_3 = 24,
SLOT_GENERAL_4 = 25,
SLOT_GENERAL_5 = 26,
SLOT_GENERAL_6 = 27,
SLOT_GENERAL_7 = 28,
SLOT_GENERAL_8 = 29,
//SLOT_GENERAL_9 = not supported
//SLOT_GENERAL_10 = not supported
SLOT_CURSOR = 30,
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
SLOT_TRADESKILL = 1000,
SLOT_AUGMENT = 1001,
SLOT_INVALID = (int16)0xFFFF,
SLOT_POSSESSIONS_BEGIN = 0,
SLOT_POSSESSIONS_END = 30,
SLOT_EQUIPMENT_BEGIN = 0,
SLOT_EQUIPMENT_END = 21,
SLOT_PERSONAL_BEGIN = 22,
SLOT_PERSONAL_END = 29,
SLOT_PERSONAL_BAGS_BEGIN = 251,
SLOT_PERSONAL_BAGS_END = 330,
SLOT_CURSOR_BAG_BEGIN = 331,
SLOT_CURSOR_BAG_END = 340,
SLOT_TRIBUTE_BEGIN = 400,
SLOT_TRIBUTE_END = 404,
SLOT_BANK_BEGIN = 2000,
SLOT_BANK_END = 2023,
SLOT_BANK_BAGS_BEGIN = 2031,
SLOT_BANK_BAGS_END = 2270,
SLOT_SHARED_BANK_BEGIN = 2500,
SLOT_SHARED_BANK_END = 2501,
SLOT_SHARED_BANK_BAGS_BEGIN = 2531,
SLOT_SHARED_BANK_BAGS_END = 2550,
SLOT_TRADE_BEGIN = 3000,
SLOT_TRADE_END = 3007,
SLOT_TRADE_BAGS_BEGIN = 3031,
SLOT_TRADE_BAGS_END = 3110,
SLOT_WORLD_BEGIN = 4000,
SLOT_WORLD_END = 4009
} InventorySlot;
}
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
#endif
+956
View File
@@ -0,0 +1,956 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "eq_dictionary.h"
#include "string_util.h"
//
// class EmuConstants
//
uint16 EmuConstants::InventoryMapSize(int16 indexMap) {
switch (indexMap) {
case MapPossessions:
return MAP_POSSESSIONS_SIZE;
case MapBank:
return MAP_BANK_SIZE;
case MapSharedBank:
return MAP_SHARED_BANK_SIZE;
case MapTrade:
return MAP_TRADE_SIZE;
case MapWorld:
return MAP_WORLD_SIZE;
case MapLimbo:
return MAP_LIMBO_SIZE;
case MapTribute:
return MAP_TRIBUTE_SIZE;
case MapTrophyTribute:
return MAP_TROPHY_TRIBUTE_SIZE;
case MapGuildTribute:
return MAP_GUILD_TRIBUTE_SIZE;
case MapMerchant:
return MAP_MERCHANT_SIZE;
case MapDeleted:
return MAP_DELETED_SIZE;
case MapCorpse:
return MAP_CORPSE_SIZE;
case MapBazaar:
return MAP_BAZAAR_SIZE;
case MapInspect:
return MAP_INSPECT_SIZE;
case MapRealEstate:
return MAP_REAL_ESTATE_SIZE;
case MapViewMODPC:
return MAP_VIEW_MOD_PC_SIZE;
case MapViewMODBank:
return MAP_VIEW_MOD_BANK_SIZE;
case MapViewMODSharedBank:
return MAP_VIEW_MOD_SHARED_BANK_SIZE;
case MapViewMODLimbo:
return MAP_VIEW_MOD_LIMBO_SIZE;
case MapAltStorage:
return MAP_ALT_STORAGE_SIZE;
case MapArchived:
return MAP_ARCHIVED_SIZE;
case MapMail:
return MAP_MAIL_SIZE;
case MapGuildTrophyTribute:
return MAP_GUILD_TROPHY_TRIBUTE_SIZE;
case MapKrono:
return MAP_KRONO_SIZE;
case MapOther:
return MAP_OTHER_SIZE;
default:
return NOT_USED;
}
}
/*
std::string EmuConstants::InventoryLocationName(Location_Struct location) {
// not ready for implementation...
std::string ret_str;
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
return ret_str;
}
*/
std::string EmuConstants::InventoryMapName(int16 indexMap) {
switch (indexMap) {
case INVALID_INDEX:
return "Invalid Map";
case MapPossessions:
return "Possessions";
case MapBank:
return "Bank";
case MapSharedBank:
return "Shared Bank";
case MapTrade:
return "Trade";
case MapWorld:
return "World";
case MapLimbo:
return "Limbo";
case MapTribute:
return "Tribute";
case MapTrophyTribute:
return "Trophy Tribute";
case MapGuildTribute:
return "Guild Tribute";
case MapMerchant:
return "Merchant";
case MapDeleted:
return "Deleted";
case MapCorpse:
return "Corpse";
case MapBazaar:
return "Bazaar";
case MapInspect:
return "Inspect";
case MapRealEstate:
return "Real Estate";
case MapViewMODPC:
return "View MOD PC";
case MapViewMODBank:
return "View MOD Bank";
case MapViewMODSharedBank:
return "View MOD Shared Bank";
case MapViewMODLimbo:
return "View MOD Limbo";
case MapAltStorage:
return "Alt Storage";
case MapArchived:
return "Archived";
case MapMail:
return "Mail";
case MapGuildTrophyTribute:
return "Guild Trophy Tribute";
case MapKrono:
return "Krono";
case MapOther:
return "Other";
default:
return "Unknown Map";
}
}
std::string EmuConstants::InventoryMainName(int16 indexMain) {
switch (indexMain) {
case INVALID_INDEX:
return "Invalid Main";
case MainCharm:
return "Charm";
case MainEar1:
return "Ear 1";
case MainHead:
return "Head";
case MainFace:
return "Face";
case MainEar2:
return "Ear 2";
case MainNeck:
return "Neck";
case MainShoulders:
return "Shoulders";
case MainArms:
return "Arms";
case MainBack:
return "Back";
case MainWrist1:
return "Wrist 1";
case MainWrist2:
return "Wrist 2";
case MainRange:
return "Range";
case MainHands:
return "Hands";
case MainPrimary:
return "Primary";
case MainSecondary:
return "Secondary";
case MainFinger1:
return "Finger 1";
case MainFinger2:
return "Finger 2";
case MainChest:
return "Chest";
case MainLegs:
return "Legs";
case MainFeet:
return "Feet";
case MainWaist:
return "Waist";
case MainPowerSource:
return "Power Source";
case MainAmmo:
return "Ammo";
case MainGeneral1:
return "General 1";
case MainGeneral2:
return "General 2";
case MainGeneral3:
return "General 3";
case MainGeneral4:
return "General 4";
case MainGeneral5:
return "General 5";
case MainGeneral6:
return "General 6";
case MainGeneral7:
return "General 7";
case MainGeneral8:
return "General 8";
/*
case MainGeneral9:
return "General 9";
case MainGeneral10:
return "General 10";
*/
case MainCursor:
return "Cursor";
default:
return "Unknown Main";
}
}
std::string EmuConstants::InventorySubName(int16 indexSub) {
if (indexSub == INVALID_INDEX)
return "Invalid Sub";
if ((uint16)indexSub >= ITEM_CONTAINER_SIZE)
return "Unknown Sub";
std::string ret_str;
ret_str = StringFormat("Container %i", (indexSub + 1)); // zero-based index..but, count starts at one
return ret_str;
}
std::string EmuConstants::InventoryAugName(int16 indexAug) {
if (indexAug == INVALID_INDEX)
return "Invalid Aug";
if ((uint16)indexAug >= ITEM_COMMON_SIZE)
return "Unknown Aug";
std::string ret_str;
ret_str = StringFormat("Augment %i", (indexAug + 1)); // zero-based index..but, count starts at one
return ret_str;
}
//
// class EQLimits
//
// client validation
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion) {
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion) {
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// npc validation
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion) {
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion) {
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// mob validation
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion) {
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
return true;
return false;
}
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion) {
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
return clientVersion;
return ClientVersion::Unknown;
}
// inventory
uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion) {
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
// ALL of these values need to be verified before pushing to live
//
// make sure that you transcribe the actual value from 'defaults' to here before updating or client crashes will ensue..and/or...
// insert older clients inside of the progression of client order
//
// MAP_POSSESSIONS_SIZE does not reflect all actual <client>_constants size due to bitmask-use compatibility
//
// when setting NPC-based values, try to adhere to an EmuConstants::<property> or NOT_USED value to avoid unnecessary issues
static const uint16 local[_MapCount][CLIENT_VERSION_COUNT] = {
// server and database are sync'd to current MapPossessions's client as set in 'using namespace RoF::slots;' and
// 'EmuConstants::MAP_POSSESSIONS_SIZE' - use/update EquipmentBitmask(), GeneralBitmask() and CursorBitmask()
// for partial range validation checks and 'EmuConstants::MAP_POSSESSIONS_SIZE' for full range iterations
{ // local[MainPossessions]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Titanium*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*SoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*RoF2*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Bot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
/*Pet*/ EmuConstants::MAP_POSSESSIONS_SIZE
},
{ // local[MapBank]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapSharedBank]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*Titanium*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*SoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_SHARED_BANK_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapTrade]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_TRADE_SIZE,
/*Titanium*/ EmuConstants::MAP_TRADE_SIZE,
/*SoF*/ EmuConstants::MAP_TRADE_SIZE,
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
/*RoF2*/ EmuConstants::MAP_TRADE_SIZE,
/*NPC*/ 4,
/*Merc*/ 4,
/*Bot*/ EmuConstants::MAP_TRADE_SIZE, // client thinks this is another client
/*Pet*/ 4
},
{ // local[MapWorld]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_WORLD_SIZE,
/*Titanium*/ EmuConstants::MAP_WORLD_SIZE,
/*SoF*/ EmuConstants::MAP_WORLD_SIZE,
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
/*RoF2*/ EmuConstants::MAP_WORLD_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapLimbo]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_LIMBO_SIZE,
/*Titanium*/ EmuConstants::MAP_LIMBO_SIZE,
/*SoF*/ EmuConstants::MAP_LIMBO_SIZE,
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
/*RoF2*/ EmuConstants::MAP_LIMBO_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapTribute]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*Titanium*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*SoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapTrophyTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapGuildTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapMerchant]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
/*RoF2*/ EmuConstants::MAP_MERCHANT_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapDeleted]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
/*RoF2*/ EmuConstants::MAP_DELETED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapCorpse]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
/*Underfoot*/ UF::consts::MAP_CORPSE_SIZE,
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapBazaar]
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::MAP_BAZAAR_SIZE,
/*Titanium*/ EmuConstants::MAP_BAZAAR_SIZE,
/*SoF*/ EmuConstants::MAP_BAZAAR_SIZE,
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
/*RoF2*/ EmuConstants::MAP_BAZAAR_SIZE,
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapInspect]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
/*Underfoot*/ UF::consts::MAP_INSPECT_SIZE,
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
},
{ // local[MapRealEstate]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*RoF2*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODPC]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODBank]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODSharedBank]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapViewMODLimbo]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapAltStorage]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*RoF2*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapArchived]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*RoF2*/ EmuConstants::MAP_ARCHIVED_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapMail]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
/*RoF2*/ EmuConstants::MAP_MAIL_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapGuildTrophyTribute]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*RoF2*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapKrono]
/*Unknown*/ NOT_USED,
/*62*/ NOT_USED,
/*Titanium*/ NOT_USED,
/*SoF*/ NOT_USED,
/*SoD*/ NOT_USED,
/*Underfoot*/ NOT_USED,
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
/*RoF2*/ EmuConstants::MAP_KRONO_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
},
{ // local[MapOther]
/*Unknown*/ NOT_USED,
/*62*/ 0,
/*Titanium*/ 0,
/*SoF*/ 0,
/*SoD*/ 0,
/*Underfoot*/ 0,
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
/*RoF2*/ EmuConstants::MAP_OTHER_SIZE,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
}
};
if ((uint16)indexMap < _MapCount)
return local[indexMap][static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
return NOT_USED;
}
uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion) {
// these are for the new inventory system (RoF)..not the current (Ti) one...
// 0x0000000000200000 is SlotPowerSource (SoF+)
// 0x0000000080000000 is SlotGeneral9 (RoF+)
// 0x0000000100000000 is SlotGeneral10 (RoF+)
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x000000027FDFFFFF,
/*Titanium*/ 0x000000027FDFFFFF,
/*SoF*/ 0x000000027FFFFFFF,
/*SoD*/ 0x000000027FFFFFFF,
/*Underfoot*/ 0x000000027FFFFFFF,
/*RoF*/ 0x00000003FFFFFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion) {
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x00000000005FFFFF,
/*Titanium*/ 0x00000000005FFFFF,
/*SoF*/ 0x00000000007FFFFF,
/*SoD*/ 0x00000000007FFFFF,
/*Underfoot*/ 0x00000000007FFFFF,
/*RoF*/ 0x00000000007FFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion) {
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x000000007F800000,
/*Titanium*/ 0x000000007F800000,
/*SoF*/ 0x000000007F800000,
/*SoD*/ 0x000000007F800000,
/*Underfoot*/ 0x000000007F800000,
/*RoF*/ 0x00000001FF800000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint64 EQLimits::CursorBitmask(ClientVersion clientVersion) {
static const uint64 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ 0x0000000200000000,
/*Titanium*/ 0x0000000200000000,
/*SoF*/ 0x0000000200000000,
/*SoD*/ 0x0000000200000000,
/*Underfoot*/ 0x0000000200000000,
/*RoF*/ 0x0000000200000000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
/*Pet*/ 0
};
return NOT_USED;
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion) {
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ false,
/*62*/ false,
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*Underfoot*/ UF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return false; // not implemented
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion) {
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ false,
/*62*/ false,
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*Underfoot*/ UF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
// items
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion) {
static const uint16 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
/*Titanium*/ EmuConstants::ITEM_COMMON_SIZE,
/*SoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF2*/ EmuConstants::ITEM_COMMON_SIZE,
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
/*Bot*/ EmuConstants::ITEM_COMMON_SIZE,
/*Pet*/ EmuConstants::ITEM_COMMON_SIZE
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion) {
static const uint16 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Titanium*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*SoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF2*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Bot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Pet*/ EmuConstants::ITEM_CONTAINER_SIZE
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
bool EQLimits::CoinHasWeight(ClientVersion clientVersion) {
static const bool local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ true,
/*62*/ true,
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
/*Underfoot*/ UF::limits::COIN_HAS_WEIGHT,
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
/*NPC*/ true,
/*Merc*/ true,
/*Bot*/ true,
/*Pet*/ true
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint32 EQLimits::BandoliersCount(ClientVersion clientVersion) {
static const uint32 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::BANDOLIERS_COUNT,
/*Titanium*/ EmuConstants::BANDOLIERS_COUNT,
/*SoF*/ EmuConstants::BANDOLIERS_COUNT,
/*SoD*/ EmuConstants::BANDOLIERS_COUNT,
/*Underfoot*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF2*/ EmuConstants::BANDOLIERS_COUNT,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint32 EQLimits::BandolierSize(ClientVersion clientVersion) {
static const uint32 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::BANDOLIER_SIZE,
/*Titanium*/ EmuConstants::BANDOLIER_SIZE,
/*SoF*/ EmuConstants::BANDOLIER_SIZE,
/*SoD*/ EmuConstants::BANDOLIER_SIZE,
/*Underfoot*/ EmuConstants::BANDOLIER_SIZE,
/*RoF*/ EmuConstants::BANDOLIER_SIZE,
/*RoF2*/ EmuConstants::BANDOLIER_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
uint32 EQLimits::PotionBeltSize(ClientVersion clientVersion) {
static const uint32 local[CLIENT_VERSION_COUNT] = {
/*Unknown*/ NOT_USED,
/*62*/ EmuConstants::POTION_BELT_SIZE,
/*Titanium*/ EmuConstants::POTION_BELT_SIZE,
/*SoF*/ EmuConstants::POTION_BELT_SIZE,
/*SoD*/ EmuConstants::POTION_BELT_SIZE,
/*Underfoot*/ EmuConstants::POTION_BELT_SIZE,
/*RoF*/ EmuConstants::POTION_BELT_SIZE,
/*RoF2*/ EmuConstants::POTION_BELT_SIZE,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
/*Pet*/ NOT_USED
};
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
}
+209
View File
@@ -0,0 +1,209 @@
/*
EQEMu: Everquest Server Emulator
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQ_DICTIONARY_H
#define EQ_DICTIONARY_H
#include "types.h"
#include "eq_constants.h"
#include "clientversions.h"
#include <string>
#include "../common/patches/titanium_constants.h"
#include "../common/patches/sof_constants.h"
#include "../common/patches/sod_constants.h"
#include "../common/patches/uf_constants.h"
#include "../common/patches/rof_constants.h"
#include "../common/patches/rof2_constants.h"
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
// Hard-coded values usually indicate that further research is needed and the values given are from the old (known) system
// (future use)
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
class EmuConstants {
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
public:
// database
static const ClientVersion CHARACTER_CREATION_CLIENT = ClientVersion::RoF2; // adjust according to starting item placement and target client
// inventory
static uint16 InventoryMapSize(int16 indexMap);
//static std::string InventoryLocationName(Location_Struct location);
static std::string InventoryMapName(int16 indexMap);
static std::string InventoryMainName(int16 indexMain);
static std::string InventorySubName(int16 indexSub);
static std::string InventoryAugName(int16 indexAug);
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
static const uint16 MAP_POSSESSIONS_SIZE = _MainCount;
static const uint16 MAP_BANK_SIZE = 24;
static const uint16 MAP_SHARED_BANK_SIZE = 2;
static const uint16 MAP_TRADE_SIZE = 8;
static const uint16 MAP_WORLD_SIZE = 10;
static const uint16 MAP_LIMBO_SIZE = 36;
static const uint16 MAP_TRIBUTE_SIZE = 5; // (need client values)
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
static const uint16 MAP_MERCHANT_SIZE = 0;
static const uint16 MAP_DELETED_SIZE = 0;
static const uint16 MAP_CORPSE_SIZE = _MainCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
static const uint16 MAP_BAZAAR_SIZE = 80;
static const uint16 MAP_INSPECT_SIZE = 22;
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
static const uint16 MAP_VIEW_MOD_PC_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = NOT_USED;
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
static const uint16 MAP_ARCHIVED_SIZE = 0;
static const uint16 MAP_MAIL_SIZE = 0;
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
static const uint16 MAP_KRONO_SIZE = 0;
static const uint16 MAP_OTHER_SIZE = 0;
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
static const int16 EQUIPMENT_BEGIN = MainCharm;
static const int16 EQUIPMENT_END = MainAmmo;
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
static const int16 GENERAL_BEGIN = MainGeneral1;
static const int16 GENERAL_END = MainGeneral8;
static const uint16 GENERAL_SIZE = 8;
static const int16 GENERAL_BAGS_BEGIN = 251;
static const int16 GENERAL_BAGS_END_OFFSET = 79;
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
static const int16 CURSOR_BAG_BEGIN = 331;
static const int16 CURSOR_BAG_END_OFFSET = 9;
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
static const int16 BANK_BEGIN = 2000;
static const int16 BANK_END = 2023;
static const int16 BANK_BAGS_BEGIN = 2031;
static const int16 BANK_BAGS_END_OFFSET = 239;
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
static const int16 SHARED_BANK_BEGIN = 2500;
static const int16 SHARED_BANK_END = 2501;
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
static const int16 TRADE_BEGIN = 3000;
static const int16 TRADE_END = 3007;
static const int16 TRADE_NPC_END = 3003;
static const int16 TRADE_BAGS_BEGIN = 3031;
static const int16 TRADE_BAGS_END_OFFSET = 79;
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
static const int16 WORLD_BEGIN = 4000;
static const int16 WORLD_END = 4009;
static const int16 WORLD_SIZE = MAP_WORLD_SIZE;
static const int16 TRIBUTE_BEGIN = 400;
static const int16 TRIBUTE_END = 404;
static const int16 TRIBUTE_SIZE = MAP_TRIBUTE_SIZE;
static const int16 CORPSE_BEGIN = 22;
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
static const int16 MATERIAL_BEGIN = MaterialHead;
static const int16 MATERIAL_END = MaterialSecondary;
static const int16 MATERIAL_TINT_END = MaterialFeet;
static const int16 MATERIAL_SIZE = _MaterialCount;
// items
// common and container sizes will not increase until the new 'location' struct is implemented
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
// player profile
//static const uint32 CLASS_BITMASK = 0; // needs value
//static const uint32 RACE_BITMASK = 0; // needs value
// BANDOLIERS_COUNT sets maximum limit..active limit will need to be handled by the appropriate AA
static const uint32 BANDOLIERS_COUNT = Titanium::consts::BANDOLIERS_COUNT; // count = number of bandolier instances
static const uint32 BANDOLIER_SIZE = Titanium::consts::BANDOLIER_SIZE; // size = number of equipment slots in bandolier instance
static const uint32 POTION_BELT_SIZE = Titanium::consts::POTION_BELT_SIZE;
static const size_t TEXT_LINK_BODY_LENGTH = 56;
// legacy-related functions
//static int ServerToPerlSlot(int slot); // encode
//static int PerlToServerSlot(int slot); // decode
};
class EQLimits {
// values should default to a non-beneficial value..unless value conflicts with intended operation
//
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
public:
// client version validation (checks to avoid crashing zone server when accessing reference arrays)
// use this inside of class Client (limits to actual clients)
static bool IsValidPCClientVersion(ClientVersion clientVersion);
static ClientVersion ValidatePCClientVersion(ClientVersion clientVersion);
// basically..any non-client classes - do not when setting a valid client
static bool IsValidNPCClientVersion(ClientVersion clientVersion);
static ClientVersion ValidateNPCClientVersion(ClientVersion clientVersion);
// these are 'universal' - do not when setting a valid client
static bool IsValidMobClientVersion(ClientVersion clientVersion);
static ClientVersion ValidateMobClientVersion(ClientVersion clientVersion);
// inventory
static uint16 InventoryMapSize(int16 indexMap, ClientVersion clientVersion);
static uint64 PossessionsBitmask(ClientVersion clientVersion);
static uint64 EquipmentBitmask(ClientVersion clientVersion);
static uint64 GeneralBitmask(ClientVersion clientVersion);
static uint64 CursorBitmask(ClientVersion clientVersion);
static bool AllowsEmptyBagInBag(ClientVersion clientVersion);
static bool AllowsClickCastFromBag(ClientVersion clientVersion);
// items
static uint16 ItemCommonSize(ClientVersion clientVersion);
static uint16 ItemContainerSize(ClientVersion clientVersion);
// player profile
static bool CoinHasWeight(ClientVersion clientVersion);
static uint32 BandoliersCount(ClientVersion clientVersion);
static uint32 BandolierSize(ClientVersion clientVersion);
static uint32 PotionBeltSize(ClientVersion clientVersion);
};
#endif /* EQ_DICTIONARY_H */
/*
Working Notes:
--------------
- full review of client_packet.cpp and client translators needed
*/
+53 -83
View File
@@ -15,18 +15,22 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include "EQPacket.h"
#include "crc16.h"
#include "global_define.h"
#include "eq_packet.h"
#include "misc.h"
#include "op_codes.h"
#include "CRC16.h"
#include "platform.h"
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdio.h>
#ifndef STATIC_OPCODE
#include "opcodemgr.h"
#endif
#include "packet_dump.h"
#include "packet_functions.h"
#include <cstdlib>
@@ -36,9 +40,11 @@ EQPacket::EQPacket(EmuOpcode op, const unsigned char *buf, uint32 len)
: BasePacket(buf, len),
emu_opcode(op)
{
_eqp
}
void EQPacket::build_raw_header_dump(char *buffer, uint16 seq) const {
_eqp
BasePacket::build_raw_header_dump(buffer, seq);
buffer += strlen(buffer);
@@ -47,17 +53,20 @@ void EQPacket::build_raw_header_dump(char *buffer, uint16 seq) const {
void EQPacket::DumpRawHeader(uint16 seq, FILE *to) const
{
_eqp
char buff[196];
build_raw_header_dump(buff, seq);
fprintf(to, "%s", buff);
}
void EQPacket::build_header_dump(char *buffer) const {
_eqp
sprintf(buffer, "[EmuOpCode 0x%04x Size=%u]", emu_opcode, size);
}
void EQPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
{
_eqp
if (src_ip) {
std::string sIP,dIP;;
sIP=long2ip(src_ip);
@@ -72,6 +81,7 @@ void EQPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
void EQProtocolPacket::build_raw_header_dump(char *buffer, uint16 seq) const
{
_eqp
BasePacket::build_raw_header_dump(buffer, seq);
buffer += strlen(buffer);
@@ -80,6 +90,7 @@ void EQProtocolPacket::build_raw_header_dump(char *buffer, uint16 seq) const
void EQProtocolPacket::DumpRawHeader(uint16 seq, FILE *to) const
{
_eqp
char buff[196];
build_raw_header_dump(buff, seq);
fprintf(to, "%s", buff);
@@ -87,11 +98,13 @@ void EQProtocolPacket::DumpRawHeader(uint16 seq, FILE *to) const
void EQProtocolPacket::build_header_dump(char *buffer) const
{
_eqp
sprintf(buffer, "[ProtoOpCode 0x%04x Size=%u]",opcode,size);
}
void EQProtocolPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
{
_eqp
if (src_ip) {
std::string sIP,dIP;;
sIP=long2ip(src_ip);
@@ -106,6 +119,7 @@ void EQProtocolPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
void EQApplicationPacket::build_raw_header_dump(char *buffer, uint16 seq) const
{
_eqp
BasePacket::build_raw_header_dump(buffer, seq);
buffer += strlen(buffer);
@@ -118,6 +132,7 @@ void EQApplicationPacket::build_raw_header_dump(char *buffer, uint16 seq) const
void EQApplicationPacket::DumpRawHeader(uint16 seq, FILE *to) const
{
_eqp
char buff[196];
build_raw_header_dump(buff, seq);
fprintf(to, "%s", buff);
@@ -125,6 +140,7 @@ void EQApplicationPacket::DumpRawHeader(uint16 seq, FILE *to) const
void EQApplicationPacket::build_header_dump(char *buffer) const
{
_eqp
#ifdef STATIC_OPCODE
sprintf(buffer, "[OpCode 0x%04x Size=%u]\n", emu_opcode,size);
#else
@@ -134,6 +150,7 @@ void EQApplicationPacket::build_header_dump(char *buffer) const
void EQApplicationPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
{
_eqp
if (src_ip) {
std::string sIP,dIP;;
sIP=long2ip(src_ip);
@@ -152,6 +169,7 @@ void EQApplicationPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
void EQRawApplicationPacket::build_raw_header_dump(char *buffer, uint16 seq) const
{
_eqp
BasePacket::build_raw_header_dump(buffer, seq);
buffer += strlen(buffer);
@@ -164,6 +182,7 @@ void EQRawApplicationPacket::build_raw_header_dump(char *buffer, uint16 seq) con
void EQRawApplicationPacket::DumpRawHeader(uint16 seq, FILE *to) const
{
_eqp
char buff[196];
build_raw_header_dump(buff, seq);
fprintf(to, "%s", buff);
@@ -171,6 +190,7 @@ void EQRawApplicationPacket::DumpRawHeader(uint16 seq, FILE *to) const
void EQRawApplicationPacket::build_header_dump(char *buffer) const
{
_eqp
#ifdef STATIC_OPCODE
sprintf(buffer, "[OpCode 0x%04x (0x%04x) Size=%u]\n", emu_opcode, opcode,size);
#else
@@ -180,6 +200,7 @@ void EQRawApplicationPacket::build_header_dump(char *buffer) const
void EQRawApplicationPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
{
_eqp
if (src_ip) {
std::string sIP,dIP;;
sIP=long2ip(src_ip);
@@ -198,6 +219,7 @@ void EQRawApplicationPacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
uint32 EQProtocolPacket::serialize(unsigned char *dest) const
{
_eqp
if (opcode>0xff) {
*(uint16 *)dest=opcode;
} else {
@@ -211,6 +233,7 @@ uint32 EQProtocolPacket::serialize(unsigned char *dest) const
uint32 EQApplicationPacket::serialize(uint16 opcode, unsigned char *dest) const
{
_eqp
uint8 OpCodeBytes = app_opcode_size;
if (app_opcode_size==1)
@@ -232,29 +255,10 @@ uint32 EQApplicationPacket::serialize(uint16 opcode, unsigned char *dest) const
return size+OpCodeBytes;
}
/*EQProtocolPacket::EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len)
: BasePacket(buf, len),
opcode(op)
{
uint32 offset;
opcode=ntohs(*(const uint16 *)buf);
offset=2;
if (len-offset) {
pBuffer= new unsigned char[len-offset];
memcpy(pBuffer,buf+offset,len-offset);
size=len-offset;
} else {
pBuffer=nullptr;
size=0;
}
OpMgr=&RawOpcodeManager;
}*/
bool EQProtocolPacket::combine(const EQProtocolPacket *rhs)
{
bool result=false;
_eqp
bool result=false;
if (opcode==OP_Combined && size+rhs->size+5<256) {
unsigned char *tmpbuffer=new unsigned char [size+rhs->size+3];
memcpy(tmpbuffer,pBuffer,size);
@@ -280,61 +284,12 @@ bool result=false;
}
return result;
}
/*
this is the code to do app-layer combining, instead of protocol layer.
this was taken out due to complex interactions with the opcode manager,
and will require a bit more thinking (likely moving into EQStream) to
get running again... but might be a good thing some day.
bool EQApplicationPacket::combine(const EQApplicationPacket *rhs)
{
uint32 newsize=0, offset=0;
unsigned char *tmpbuffer=nullptr;
if (opcode!=OP_AppCombined) {
newsize=app_opcode_size+size+(size>254?3:1)+app_opcode_size+rhs->size+(rhs->size>254?3:1);
tmpbuffer=new unsigned char [newsize];
offset=0;
if (size>254) {
tmpbuffer[offset++]=0xff;
*(uint16 *)(tmpbuffer+offset)=htons(size);
offset+=1;
} else {
tmpbuffer[offset++]=size;
}
offset+=serialize(tmpbuffer+offset);
} else {
newsize=size+app_opcode_size+rhs->size+(rhs->size>254?3:1);
tmpbuffer=new unsigned char [newsize];
memcpy(tmpbuffer,pBuffer,size);
offset=size;
}
if (rhs->size>254) {
tmpbuffer[offset++]=0xff;
*(uint16 *)(tmpbuffer+offset)=htons(rhs->size);
offset+=1;
} else {
tmpbuffer[offset++]=rhs->size;
}
offset+=rhs->serialize(tmpbuffer+offset);
size=offset;
opcode=OP_AppCombined;
delete[] pBuffer;
pBuffer=tmpbuffer;
return true;
}
*/
bool EQProtocolPacket::ValidateCRC(const unsigned char *buffer, int length, uint32 Key)
{
bool valid=false;
_eqp
bool valid=false;
// OP_SessionRequest, OP_SessionResponse, OP_OutOfSession are not CRC'd
if (buffer[0]==0x00 && (buffer[1]==OP_SessionRequest || buffer[1]==OP_SessionResponse || buffer[1]==OP_OutOfSession)) {
valid=true;
@@ -353,8 +308,9 @@ bool valid=false;
uint32 EQProtocolPacket::Decompress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize)
{
uint32 newlen=0;
uint32 flag_offset=0;
_eqp
uint32 newlen=0;
uint32 flag_offset=0;
newbuf[0]=buffer[0];
if (buffer[0]==0x00) {
flag_offset=2;
@@ -378,7 +334,8 @@ uint32 flag_offset=0;
}
uint32 EQProtocolPacket::Compress(const unsigned char *buffer, const uint32 length, unsigned char *newbuf, uint32 newbufsize) {
uint32 flag_offset=1,newlength;
_eqp
uint32 flag_offset=1,newlength;
//dump_message_column(buffer,length,"Before: ");
newbuf[0]=buffer[0];
if (buffer[0]==0) {
@@ -401,6 +358,7 @@ uint32 flag_offset=1,newlength;
void EQProtocolPacket::ChatDecode(unsigned char *buffer, int size, int DecodeKey)
{
_eqp
if ((size >= 2) && buffer[1]!=0x01 && buffer[0]!=0x02 && buffer[0]!=0x1d) {
int Key=DecodeKey;
unsigned char *test=(unsigned char *)malloc(size);
@@ -426,6 +384,7 @@ void EQProtocolPacket::ChatDecode(unsigned char *buffer, int size, int DecodeKey
void EQProtocolPacket::ChatEncode(unsigned char *buffer, int size, int EncodeKey)
{
_eqp
if (buffer[1]!=0x01 && buffer[0]!=0x02 && buffer[0]!=0x1d) {
int Key=EncodeKey;
char *test=(char*)malloc(size);
@@ -449,10 +408,12 @@ void EQProtocolPacket::ChatEncode(unsigned char *buffer, int size, int EncodeKey
}
EQApplicationPacket *EQApplicationPacket::Copy() const {
_eqp
return(new EQApplicationPacket(*this));
}
EQRawApplicationPacket *EQProtocolPacket::MakeAppPacket() const {
_eqp
EQRawApplicationPacket *res = new EQRawApplicationPacket(opcode, pBuffer, size);
res->copyInfo(this);
return(res);
@@ -462,10 +423,13 @@ EQRawApplicationPacket::EQRawApplicationPacket(uint16 opcode, const unsigned cha
: EQApplicationPacket(OP_Unknown, buf, len),
opcode(opcode)
{
_eqp
}
EQRawApplicationPacket::EQRawApplicationPacket(const unsigned char *buf, const uint32 len)
: EQApplicationPacket(OP_Unknown, buf+sizeof(uint16), len-sizeof(uint16))
{
_eqp
if(GetExecutablePlatform() != ExePlatformUCS) {
opcode = *((const uint16 *) buf);
if(opcode == 0x0000)
@@ -476,7 +440,7 @@ EQRawApplicationPacket::EQRawApplicationPacket(const unsigned char *buf, const u
const unsigned char *packet_start = (buf + 3);
const int32 packet_length = len - 3;
safe_delete_array(pBuffer);
if(len >= 0)
if(packet_length >= 0)
{
size = packet_length;
pBuffer = new unsigned char[size];
@@ -499,11 +463,17 @@ EQRawApplicationPacket::EQRawApplicationPacket(const unsigned char *buf, const u
}
void DumpPacket(const EQApplicationPacket* app, bool iShowInfo) {
_eqp
if (iShowInfo) {
std::cout << "Dumping Applayer: 0x" << std::hex << std::setfill('0') << std::setw(4) << app->GetOpcode() << std::dec;
std::cout << " size:" << app->size << std::endl;
}
DumpPacketHex(app->pBuffer, app->size);
// DumpPacketAscii(app->pBuffer, app->size);
}
std::string DumpPacketToString(const EQApplicationPacket* app){
_eqp
std::ostringstream out;
out << DumpPacketHexToString(app->pBuffer, app->size);
return out.str();
}
+12 -13
View File
@@ -18,10 +18,9 @@
#ifndef _EQPACKET_H
#define _EQPACKET_H
#include "BasePacket.h"
#include "EQStreamType.h"
#include "op_codes.h"
#include "base_packet.h"
#include "platform.h"
#include <iostream>
#ifdef STATIC_OPCODE
typedef unsigned short EmuOpcode;
@@ -30,9 +29,6 @@
#include "emu_opcodes.h"
#endif
class EQStream;
class EQStreamPair;
class EQPacket : public BasePacket {
friend class EQStream;
public:
@@ -97,16 +93,15 @@ protected:
};
class EQApplicationPacket : public EQPacket {
// friend class EQProtocolPacket;
friend class EQStream;
public:
EQApplicationPacket() : EQPacket(OP_Unknown,nullptr,0)
EQApplicationPacket() : EQPacket(OP_Unknown, nullptr, 0), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op) : EQPacket(op,nullptr,0)
EQApplicationPacket(const EmuOpcode op) : EQPacket(op, nullptr, 0), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op,nullptr,len)
EQApplicationPacket(const EmuOpcode op, const uint32 len) : EQPacket(op, nullptr, len), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op,buf,len)
EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op, buf, len), opcode_bypass(0)
{ app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; }
bool combine(const EQApplicationPacket *rhs);
uint32 serialize (uint16 opcode, unsigned char *dest) const;
@@ -119,12 +114,16 @@ public:
virtual void DumpRawHeader(uint16 seq=0xffff, FILE *to = stdout) const;
virtual void DumpRawHeaderNoTime(uint16 seq=0xffff, FILE *to = stdout) const;
uint16 GetOpcodeBypass() { return opcode_bypass; }
void SetOpcodeBypass(uint16 v) { opcode_bypass = v; }
protected:
uint8 app_opcode_size;
uint16 opcode_bypass;
private:
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size) { app_opcode_size = p.app_opcode_size; }
EQApplicationPacket(const EQApplicationPacket &p) : EQPacket(p.emu_opcode, p.pBuffer, p.size), opcode_bypass(p.opcode_bypass) { app_opcode_size = p.app_opcode_size; }
};
@@ -148,6 +147,6 @@ protected:
};
extern void DumpPacket(const EQApplicationPacket* app, bool iShowInfo = false);
extern std::string DumpPacketToString(const EQApplicationPacket* app);
#endif
+265 -99
View File
@@ -32,7 +32,8 @@ static const uint32 MAX_MERC_GRADES = 10;
static const uint32 MAX_MERC_STANCES = 10;
static const uint32 BLOCKED_BUFF_COUNT = 20;
#include "eq_constants.h"
//#include "eq_constants.h"
#include "eq_dictionary.h"
/*
** Compiler override to ensure
@@ -144,6 +145,28 @@ struct Color_Struct
};
};
/*
* Visible equiptment.
* Size: 20 Octets
*/
struct EquipStruct {
/*00*/ uint32 material;
/*04*/ uint32 unknown1;
/*08*/ uint32 elitematerial;
/*12*/ uint32 heroforgemodel;
/*16*/ uint32 material2; // Same as material?
/*20*/
};
struct CharSelectEquip {
uint32 material;
uint32 unknown1;
uint32 elitematerial;
uint32 heroforgemodel;
uint32 material2;
Color_Struct color;
};
/*
** Character Selection Struct
** Length: 1704 Bytes
@@ -151,10 +174,11 @@ struct Color_Struct
*/
struct CharacterSelect_Struct {
/*0000*/ uint32 race[10]; // Characters Race
/*0040*/ Color_Struct cs_colors[10][9]; // Characters Equipment Colors
/*0040*/ //Color_Struct cs_colors[10][9]; // Characters Equipment Colors
/*0400*/ uint8 beardcolor[10]; // Characters beard Color
/*0410*/ uint8 hairstyle[10]; // Characters hair style
/*0420*/ uint32 equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be)
/*0420*/ //uint32 equip[10][9]; // 0=helm, 1=chest, 2=arm, 3=bracer, 4=hand, 5=leg, 6=boot, 7=melee1, 8=melee2 (Might not be)
/*0000*/ CharSelectEquip equip[10][9];
/*0780*/ uint32 secondary[10]; // Characters secondary IDFile number
/*0820*/ uint32 drakkin_heritage[10]; // added for SoF
/*0860*/ uint32 drakkin_tattoo[10]; // added for SoF
@@ -257,26 +281,26 @@ struct Spawn_Struct {
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
/*0194*/ uint8 unknown0194[3];
/*0197*/ union
{
struct
{
/*0197*/ uint32 equip_helmet; // Equipment: Helmet Visual
/*0201*/ uint32 equip_chest; // Equipment: Chest Visual
/*0205*/ uint32 equip_arms; // Equipment: Arms Visual
/*0209*/ uint32 equip_bracers; // Equipment: Bracers Visual
/*0213*/ uint32 equip_hands; // Equipment: Hands Visual
/*0217*/ uint32 equip_legs; // Equipment: Legs Visual
/*0221*/ uint32 equip_feet; // Equipment: Feet Visual
/*0225*/ uint32 equip_primary; // Equipment: Primary Visual
/*0229*/ uint32 equip_secondary; // Equipment: Secondary Visual
} equip;
/*0197*/ uint32 equipment[_MaterialCount]; // Array elements correspond to struct equipment above
};
{
struct
{
/*0000*/ EquipStruct equip_helmet; // Equipment: Helmet visual
/*0000*/ EquipStruct equip_chest; // Equipment: Chest visual
/*0000*/ EquipStruct equip_arms; // Equipment: Arms visual
/*0000*/ EquipStruct equip_bracers; // Equipment: Wrist visual
/*0000*/ EquipStruct equip_hands; // Equipment: Hands visual
/*0000*/ EquipStruct equip_legs; // Equipment: Legs visual
/*0000*/ EquipStruct equip_feet; // Equipment: Boots visual
/*0000*/ EquipStruct equip_primary; // Equipment: Main visual
/*0000*/ EquipStruct equip_secondary; // Equipment: Off visual
} equip;
/*0000*/ EquipStruct equipment[_MaterialCount];
};
/*0233*/ float runspeed; // Speed when running
/*0036*/ uint8 afk; // 0=no, 1=afk
/*0238*/ uint32 guildID; // Current guild
/*0242*/ char title[32]; // Title
/*0274*/ uint8 unknown0274;
/*0274*/ uint8 unknown0274; // non-zero prefixes name with '!'
/*0275*/ uint8 set_to_0xFF[8]; // ***Placeholder (all ff)
/*0283*/ uint8 helm; // Helm texture
/*0284*/ uint32 race; // Spawn race
@@ -339,6 +363,7 @@ union
uint32 DestructibleUnk7;
uint8 DestructibleUnk8;
uint32 DestructibleUnk9;
bool targetable_with_hotkey;
};
@@ -477,7 +502,11 @@ struct CastSpell_Struct
uint32 spell_id;
uint32 inventoryslot; // slot for clicky item, 0xFFFF = normal cast
uint32 target_id;
uint8 cs_unknown[4];
uint32 cs_unknown1;
uint32 cs_unknown2;
float y_pos;
float x_pos;
float z_pos;
};
struct SpellEffect_Struct
@@ -511,7 +540,7 @@ struct SpawnAppearance_Struct
};
// solar: this is used inside profile
// this is used inside profile
struct SpellBuff_Struct
{
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
@@ -533,7 +562,7 @@ struct SpellBuffFade_Struct {
/*007*/ uint8 unknown7;
/*008*/ uint32 spellid;
/*012*/ uint32 duration;
/*016*/ uint32 unknown016;
/*016*/ uint32 num_hits;
/*020*/ uint32 unknown020; //prolly global player ID
/*024*/ uint32 slotid;
/*028*/ uint32 bufffade;
@@ -596,8 +625,8 @@ struct GMTrainee_Struct
{
/*000*/ uint32 npcid;
/*004*/ uint32 playerid;
/*008*/ uint32 skills[73];
/*300*/ uint8 unknown300[148];
/*008*/ uint32 skills[PACKET_SKILL_ARRAY_SIZE];
/*408*/ uint8 unknown408[40];
/*448*/
};
@@ -688,7 +717,7 @@ struct CharCreate_Struct
/*0076*/ uint32 drakkin_heritage; // added for SoF
/*0080*/ uint32 drakkin_tattoo; // added for SoF
/*0084*/ uint32 drakkin_details; // added for SoF
/*0088*/
/*0088*/ uint32 tutorial;
};
/*
@@ -720,12 +749,8 @@ struct Disciplines_Struct {
uint32 values[MAX_PP_DISCIPLINES];
};
static const uint32 TRIBUTE_SLOT_START = 400;
static const uint32 MAX_PLAYER_TRIBUTES = 5;
static const uint32 MAX_PLAYER_BANDOLIER = 4;
static const uint32 MAX_PLAYER_BANDOLIER_ITEMS = 4;
static const uint32 MAX_POTIONS_IN_BELT = 4;
static const uint32 TRIBUTE_NONE = 0xFFFFFFFF;
struct Tribute_Struct {
uint32 tribute;
uint32 tier;
@@ -747,10 +772,10 @@ enum { //bandolier item positions
};
struct Bandolier_Struct {
char name[32];
BandolierItem_Struct items[MAX_PLAYER_BANDOLIER_ITEMS];
BandolierItem_Struct items[EmuConstants::BANDOLIER_SIZE];
};
struct PotionBelt_Struct {
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
BandolierItem_Struct items[EmuConstants::POTION_BELT_SIZE];
};
struct MovePotionToBelt_Struct {
@@ -762,14 +787,62 @@ struct MovePotionToBelt_Struct {
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
struct LeadershipAA_Struct {
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
struct GroupLeadershipAA_Struct {
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 groupAAMarkNPC;
uint32 groupAANPCHealth;
uint32 groupAADelegateMainAssist;
uint32 groupAADelegateMarkNPC;
uint32 groupAA4;
uint32 groupAA5;
uint32 groupAAInspectBuffs;
uint32 groupAA7;
uint32 groupAASpellAwareness;
uint32 groupAAOffenseEnhancement;
uint32 groupAAManaEnhancement;
uint32 groupAAHealthEnhancement;
uint32 groupAAHealthRegeneration;
uint32 groupAAFindPathToPC;
uint32 groupAAHealthOfTargetsTarget;
uint32 groupAA15;
};
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
};
};
struct RaidLeadershipAA_Struct {
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
union {
struct {
uint32 raidAAMarkNPC;
uint32 raidAANPCHealth;
uint32 raidAADelegateMainAssist;
uint32 raidAADelegateMarkNPC;
uint32 raidAA4;
uint32 raidAA5;
uint32 raidAA6;
uint32 raidAASpellAwareness;
uint32 raidAAOffenseEnhancement;
uint32 raidAAManaEnhancement;
uint32 raidAAHealthEnhancement;
uint32 raidAAHealthRegeneration;
uint32 raidAAFindPathToPC;
uint32 raidAAHealthOfTargetsTarget;
uint32 raidAA14;
uint32 raidAA15;
};
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
};
};
struct LeadershipAA_Struct {
union {
struct {
GroupLeadershipAA_Struct group;
RaidLeadershipAA_Struct raid;
};
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
};
};
/**
@@ -782,17 +855,18 @@ struct BindStruct {
/*008*/ float y;
/*012*/ float z;
/*016*/ float heading;
/*020*/
/*020*/ uint32 instance_id;
/*024*/
};
struct SuspendedMinion_Struct
{
/*000*/ uint16 SpellID;
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*000*/ uint16 SpellID;
/*002*/ uint32 HP;
/*006*/ uint32 Mana;
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
/*510*/ uint32 Items[_MaterialCount];
/*546*/ char Name[64];
/*610*/
};
@@ -803,10 +877,13 @@ struct SuspendedMinion_Struct
** Length: 4308 bytes
** OpCode: 0x006a
*/
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 480; // Increased to 480 to support SoF
static const uint32 MAX_PP_MEMSPELL = 9;
static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size
static const uint32 MAX_PP_LANGUAGE = 28;
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
static const uint32 MAX_PP_MEMSPELL = 9; // Set to latest client so functions can work right
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
static const uint32 MAX_PP_AA_ARRAY = 240;
static const uint32 MAX_GROUP_MEMBERS = 6;
static const uint32 MAX_RECAST_TYPES = 20;
@@ -883,7 +960,7 @@ struct PlayerProfile_Struct
/*0245*/ uint8 guildbanker;
/*0246*/ uint8 unknown0246[6]; //
/*0252*/ uint32 intoxication;
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
/*0292*/ uint32 abilitySlotRefresh;
/*0296*/ uint8 haircolor; // Player hair color
/*0297*/ uint8 beardcolor; // Player beard color
@@ -922,9 +999,9 @@ struct PlayerProfile_Struct
/*2505*/ uint8 unknown2541[47]; // ?
/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
/*2580*/ uint8 unknown2616[4];
/*2584*/ uint32 spell_book[MAX_PP_SPELLBOOK];
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
/*4668*/ uint8 unknown4704[32]; //
/*4700*/ float y; // Player y position
/*4704*/ float x; // Player x position
@@ -999,7 +1076,7 @@ struct PlayerProfile_Struct
/*7212*/ uint32 tribute_points;
/*7216*/ uint32 unknown7252;
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Tribute_Struct tributes[MAX_PLAYER_TRIBUTES];
/*7224*/ Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
/*7264*/ Disciplines_Struct disciplines;
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
/*7744*/ char unknown7780[160];
@@ -1026,7 +1103,7 @@ struct PlayerProfile_Struct
/*12800*/ uint32 expAA;
/*12804*/ uint32 aapoints; //avaliable, unspent
/*12808*/ uint8 unknown12844[36];
/*12844*/ Bandolier_Struct bandoliers[MAX_PLAYER_BANDOLIER];
/*12844*/ Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_COUNT];
/*14124*/ uint8 unknown14160[4506];
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
/*19240*/ uint32 timeentitledonaccount;
@@ -1191,7 +1268,7 @@ struct Animation_Struct {
/*04*/
};
// solar: this is what causes the caster to animate and the target to
// this is what causes the caster to animate and the target to
// get the particle effects around them when a spell is cast
// also causes a buff icon
struct Action_Struct
@@ -1215,7 +1292,7 @@ struct Action_Struct
/* 31 */
};
// solar: this is what prints the You have been struck. and the regular
// this is what prints the You have been struck. and the regular
// melee messages like You try to pierce, etc. It's basically the melee
// and spell damage message
struct CombatDamage_Struct
@@ -1303,19 +1380,19 @@ struct PlayerPositionUpdateServer_Struct
struct PlayerPositionUpdateClient_Struct
{
/*0000*/ uint16 spawn_id;
/*0022*/ uint16 sequence; //increments one each packet
/*0002*/ uint16 sequence; //increments one each packet
/*0004*/ float y_pos; // y coord
/*0008*/ float delta_z; // Change in z
/*0016*/ float delta_x; // Change in x
/*0012*/ float delta_y; // Change in y
/*0012*/ float delta_x; // Change in x
/*0016*/ float delta_y; // Change in y
/*0020*/ int32 animation:10, // animation
delta_heading:10, // change in heading
padding0020:12; // ***Placeholder (mostly 1)
/*0024*/ float x_pos; // x coord
/*0028*/ float z_pos; // z coord
/*0034*/ uint16 heading:12, // Directional heading
/*0032*/ uint16 heading:12, // Directional heading
padding0004:4; // ***Placeholder
/*0032*/ uint8 unknown0006[2]; // ***Placeholder
/*0034*/ uint8 unknown0006[2]; // ***Placeholder
/*0036*/
};
@@ -1432,7 +1509,8 @@ enum ItemPacketType
ItemPacketTributeItem = 0x6C,
ItemPacketMerchant = 0x64,
ItemPacketWorldContainer = 0x6B,
ItemPacketCharmUpdate = 0x6E
ItemPacketCharmUpdate = 0x6E,
ItemPacketInvalid = 0xFF
};
struct ItemPacket_Struct
{
@@ -1449,17 +1527,18 @@ struct BulkItemPacket_Struct
struct Consume_Struct
{
/*0000*/ uint32 slot;
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
/*0008*/ uint8 c_unknown1[4];
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
/*0013*/ uint8 unknown13[3];
/*0000*/ uint32 slot;
/*0004*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
/*0008*/ uint8 c_unknown1[4];
/*0012*/ uint8 type; // 0x01=Food 0x02=Water
/*0013*/ uint8 unknown13[3];
};
struct DeleteItem_Struct {
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
struct MoveItem_Struct
@@ -1467,6 +1546,18 @@ struct MoveItem_Struct
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
// both MoveItem_Struct/DeleteItem_Struct server structures will be changing to a structure-based slot format..this will
// be used for handling SoF/SoD/etc... time stamps sent using the MoveItem_Struct format. (nothing will be done with this
// info at the moment..but, it is forwarded on to the server for handling/future use)
struct ClientTimeStamp_Struct
{
/*0000*/ uint32 from_slot;
/*0004*/ uint32 to_slot;
/*0008*/ uint32 number_in_stack;
/*0012*/
};
//
@@ -1720,7 +1811,7 @@ struct RandomReq_Struct {
uint32 high;
};
/* solar: 9/23/03 reply to /random command; struct from Zaphod */
/* 9/23/03 reply to /random command */
struct RandomReply_Struct {
/* 00 */ uint32 low;
/* 04 */ uint32 high;
@@ -2170,6 +2261,12 @@ struct GroupLeaderChange_Struct
/*128*/ char Unknown128[20];
};
struct GroupMentor_Struct {
/*000*/ int percent;
/*004*/ char name[64];
/*068*/
};
struct FaceChange_Struct {
/*000*/ uint8 haircolor;
/*001*/ uint8 beardcolor;
@@ -2280,15 +2377,18 @@ struct Stun_Struct { // 4 bytes total
};
struct AugmentItem_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*04*/ int32 augment_slot;
/*08*/
/*00*/ uint32 container_index;
/*04*/ int32 container_slot;
/*08*/ uint32 augment_index;
/*12*/ int32 augment_slot;
/*16*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
/*20*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
/*24*/
};
// OP_Emote
struct Emote_Struct {
/*0000*/ uint32 unknown01;
/*0000*/ uint32 type; // 0 - custom, 0xffffffff - command (/dance, /flip, etc...)
/*0004*/ char message[1024];
/*1028*/
};
@@ -2589,6 +2689,17 @@ struct Translocate_Struct {
/*088*/ uint32 Complete;
};
struct PendingTranslocate_Struct
{
uint32 zone_id;
uint16 instance_id;
float heading;
float x;
float y;
float z;
uint32 spell_id;
};
struct Sacrifice_Struct {
/*000*/ uint32 CasterID;
/*004*/ uint32 TargetID;
@@ -2809,7 +2920,7 @@ uint8 npccastfilters; // 0) No, 1) Ignore NPC Casts (all), 2) Ignore NPC Casts
*/
struct ItemViewRequest_Struct {
/*000*/ uint32 item_id;
/*004*/ uint32 augments[5];
/*004*/ uint32 augments[6];
/*024*/ uint32 link_hash;
/*028*/ uint32 unknown028;
/*032*/ char unknown032[12]; //probably includes loregroup & evolving info. see Client::MakeItemLink() in zone/inventory.cpp:469
@@ -2905,14 +3016,14 @@ struct ClientError_Struct
};
struct Track_Struct {
uint16 entityid;
uint16 padding002;
uint32 entityid;
float distance;
// Fields for SoD and later
uint8 level;
uint8 NPC;
uint8 GroupMember;
uint8 is_npc;
char name[64];
uint8 is_pet;
uint8 is_merc;
};
struct Tracking_Struct {
@@ -3342,8 +3453,8 @@ struct SelectTributeReply_Struct {
struct TributeInfo_Struct {
uint32 active; //0 == inactive, 1 == active
uint32 tributes[MAX_PLAYER_TRIBUTES]; //-1 == NONE
uint32 tiers[MAX_PLAYER_TRIBUTES]; //all 00's
uint32 tributes[EmuConstants::TRIBUTE_SIZE]; //-1 == NONE
uint32 tiers[EmuConstants::TRIBUTE_SIZE]; //all 00's
uint32 tribute_master_id;
};
@@ -3387,7 +3498,7 @@ struct Split_Struct
*/
struct NewCombine_Struct {
/*00*/ int16 container_slot;
/*02*/ char unknown02[2];
/*02*/ int16 guildtribute_slot;
/*04*/
};
@@ -3461,6 +3572,7 @@ struct MerchantList {
int8 level_required;
uint16 alt_currency_cost;
uint32 classes_required;
uint8 probability;
};
struct TempMerchantList {
@@ -3897,6 +4009,11 @@ struct MarkNPC_Struct
/*08**/ char Name[64];
};
struct InspectBuffs_Struct {
/*000*/ uint32 spell_id[BUFF_COUNT];
/*100*/ uint32 tics_remaining[BUFF_COUNT];
};
struct RaidGeneral_Struct {
/*00*/ uint32 action; //=10
/*04*/ char player_name[64]; //should both be the player's name
@@ -3912,6 +4029,19 @@ struct RaidAddMember_Struct {
/*139*/ uint8 flags[5]; //no idea if these are needed...
};
struct RaidMOTD_Struct {
/*000*/ RaidGeneral_Struct general; // leader_name and action only used
/*136*/ char motd[0]; // max size is 1024, but reply is variable
};
struct RaidLeadershipUpdate_Struct {
/*000*/ uint32 action;
/*004*/ char player_name[64];
/*068*/ char leader_name[64];
/*132*/ GroupLeadershipAA_Struct group; //unneeded
/*196*/ RaidLeadershipAA_Struct raid;
/*260*/ char Unknown260[128]; //unverified
};
struct RaidAdd_Struct {
/*000*/ uint32 action; //=0
@@ -4053,7 +4183,7 @@ struct GroupInvite_Struct {
// uint8 unknown128[65];
};
struct BuffFadeMsg_Struct {
struct ColoredText_Struct {
uint32 color;
char msg[1];
};
@@ -4250,6 +4380,13 @@ struct ItemVerifyReply_Struct {
/*012*/
};
struct ItemRecastDelay_Struct {
/*000*/ uint32 recast_delay; // in seconds
/*004*/ uint32 recast_type;
/*008*/ uint32 unknown008;
/*012*/
};
/**
* Shroud yourself. For yourself shrouding, this has your spawnId, spawnStruct,
* bits of your charProfileStruct (no checksum, then charProfile up till
@@ -4283,14 +4420,14 @@ typedef struct {
struct ControlBoat_Struct {
/*000*/ uint32 boatId; // entitylist id of the boat
/*004*/ bool TakeControl; // 01 if taking control, 00 if releasing it
/*007*/ // no idea what these last three bytes represent
/*007*/ char unknown[3]; // no idea what these last three bytes represent
};
struct AugmentInfo_Struct
{
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint8 window; // window to display the information in
/*005*/ uint8 unknown005[67]; // total packet length 72, all the rest were always 00
/*000*/ uint32 itemid; // id of the solvent needed
/*004*/ uint32 window; // window to display the information in
/*008*/ char augment_info[64]; // the reply has the text here
/*072*/
};
@@ -4453,6 +4590,14 @@ struct GuildBankPromote_Struct
/*12*/ uint32 Slot2; // Always appears to be the same as Slot for Action code 3
};
struct GuildPromoteStruct {
/*000*/ char target[64];
/*064*/ char name[64];
/*128*/ uint32 rank;
/*132*/ uint32 myrank;
/*136*/
};
struct GuildBankPermissions_Struct
{
/*00*/ uint32 Action; // 6
@@ -4570,11 +4715,13 @@ struct BuffIconEntry_Struct
uint32 buff_slot;
uint32 spell_id;
uint32 tics_remaining;
uint32 num_hits;
};
struct BuffIcon_Struct
{
uint32 entity_id;
uint8 all_buffs;
uint16 count;
BuffIconEntry_Struct entries[0];
};
@@ -5087,17 +5234,19 @@ struct MercenaryMerchantResponse_Struct {
};
struct ServerLootItem_Struct {
uint32 item_id;
int16 equipSlot;
uint8 charges;
uint16 lootslot;
uint32 aug1;
uint32 aug2;
uint32 aug3;
uint32 aug4;
uint32 aug5;
uint8 minlevel;
uint8 maxlevel;
uint32 item_id; // uint32 item_id;
int16 equip_slot; // int16 equip_slot;
uint16 charges; // uint8 charges;
uint16 lootslot; // uint16 lootslot;
uint32 aug_1; // uint32 aug_1;
uint32 aug_2; // uint32 aug_2;
uint32 aug_3; // uint32 aug_3;
uint32 aug_4; // uint32 aug_4;
uint32 aug_5; // uint32 aug_5;
uint32 aug_6; // uint32 aug_5;
uint8 attuned;
uint8 min_level;
uint8 max_level;
};
//Found in client near a ref to the string:
@@ -5120,6 +5269,23 @@ struct ClientMarqueeMessage_Struct {
typedef std::list<ServerLootItem_Struct*> ItemList;
struct TextLinkBody_Struct {
// Current server mask: EQClientRoF2
uint8 unknown_1; /* %1X */
uint32 item_id; /* %05X */
uint32 augment_1; /* %05X */
uint32 augment_2; /* %05X */
uint32 augment_3; /* %05X */
uint32 augment_4; /* %05X */
uint32 augment_5; /* %05X */
uint32 augment_6; /* %05X */
uint8 is_evolving; /* %1X */
uint32 evolve_group; /* %05X */
uint8 evolve_level; /* %02X */
uint32 ornament_icon; /* %05X */
int hash; /* %08X */
};
// Restore structure packing to default
#pragma pack()
File diff suppressed because it is too large Load Diff
+30 -11
View File
@@ -1,23 +1,27 @@
#ifndef _EQSTREAM_H
#define _EQSTREAM_H
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <deque>
#ifndef WIN32
#include <netinet/in.h>
#endif
#include "EQStreamType.h"
#include "EQPacket.h"
#include "EQStreamIntf.h"
#include "Mutex.h"
#include "../common/opcodemgr.h"
#include "../common/misc.h"
#include "../common/Condition.h"
#include "../common/opcodemgr.h"
#include "../common/timer.h"
#include "eq_packet.h"
#include "eq_stream_intf.h"
#include "eq_stream_type.h"
#include "mutex.h"
class EQApplicationPacket;
class EQProtocolPacket;
#define FLAG_COMPRESSED 0x01
#define FLAG_ENCODED 0x04
@@ -45,6 +49,10 @@
#define RETRANSMIT_ACKED_PACKETS true
#endif
#ifndef MAX_SESSION_RETRIES
#define MAX_SESSION_RETRIES 30
#endif
#pragma pack(1)
struct SessionRequest {
uint32 UnknownA;
@@ -78,7 +86,6 @@ struct SessionStats {
#pragma pack()
class OpcodeManager;
class EQStreamPair;
class EQRawApplicationPacket;
class EQStream : public EQStreamInterface {
@@ -101,6 +108,9 @@ class EQStream : public EQStreamInterface {
uint32 retransmittimer;
uint32 retransmittimeout;
uint16 sessionAttempts;
bool streamactive;
//uint32 buffer_len;
uint32 Session, Key;
@@ -194,10 +204,16 @@ class EQStream : public EQStreamInterface {
void _SendDisconnect();
void init();
void init(bool resetSession=true);
public:
EQStream() { init(); remote_ip = 0; remote_port = 0; State=UNESTABLISHED; StreamType=UnknownStream; compressed=true; encoded=false; app_opcode_size=2; bytes_sent=0; bytes_recv=0; create_time=Timer::GetTimeSeconds(); }
EQStream(sockaddr_in addr) { init(); remote_ip=addr.sin_addr.s_addr; remote_port=addr.sin_port; State=UNESTABLISHED; StreamType=UnknownStream; compressed=true; encoded=false; app_opcode_size=2; bytes_sent=0; bytes_recv=0; create_time=Timer::GetTimeSeconds(); }
EQStream() { init(); remote_ip = 0; remote_port = 0; State = UNESTABLISHED;
StreamType = UnknownStream; compressed = true; encoded = false; app_opcode_size = 2;
bytes_sent = 0; bytes_recv = 0; create_time = Timer::GetTimeSeconds(); sessionAttempts = 0;
streamactive = false; }
EQStream(sockaddr_in addr) { init(); remote_ip = addr.sin_addr.s_addr;
remote_port = addr.sin_port; State = UNESTABLISHED; StreamType = UnknownStream;
compressed = true; encoded = false; app_opcode_size = 2; bytes_sent = 0; bytes_recv = 0;
create_time = Timer::GetTimeSeconds(); }
virtual ~EQStream() { RemoveData(); SetState(CLOSED); }
void SetMaxLen(uint32 length) { MaxLen=length; }
@@ -221,6 +237,9 @@ class EQStream : public EQStreamInterface {
void SetLastPacketTime(uint32 t) {LastPacket=t;}
void Write(int eq_fd);
// whether or not the stream has been assigned (we passed our stream match)
void SetActive(bool val) { streamactive = val; }
//
inline bool IsInUse() { bool flag; MInUse.lock(); flag=(active_users>0); MInUse.unlock(); return flag; }
inline void PutInUse() { MInUse.lock(); active_users++; MInUse.unlock(); }
@@ -1,5 +1,7 @@
#include "debug.h"
#include "EQStreamFactory.h"
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_stream_factory.h"
#ifdef _WINDOWS
#include <winsock.h>
#include <process.h>
@@ -13,24 +15,25 @@
#include <netdb.h>
#include <pthread.h>
#endif
#include <fcntl.h>
#include <iostream>
#include <fcntl.h>
#include "op_codes.h"
#include "EQStream.h"
#include "logsys.h"
ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs)
{
EQStreamFactory *fs=(EQStreamFactory *)eqfs;
_eqp
EQStreamFactory *fs = (EQStreamFactory*)eqfs;
#ifndef WIN32
_log(COMMON__THREADS, "Starting EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
Log.Out(Logs::Detail, Logs::None, "Starting EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
#endif
fs->ReaderLoop();
#ifndef WIN32
_log(COMMON__THREADS, "Ending EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
Log.Out(Logs::Detail, Logs::None, "Ending EQStreamFactoryReaderLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
@@ -38,16 +41,17 @@ EQStreamFactory *fs=(EQStreamFactory *)eqfs;
ThreadReturnType EQStreamFactoryWriterLoop(void *eqfs)
{
EQStreamFactory *fs=(EQStreamFactory *)eqfs;
_eqp
EQStreamFactory *fs = (EQStreamFactory*)eqfs;
#ifndef WIN32
_log(COMMON__THREADS, "Starting EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
Log.Out(Logs::Detail, Logs::None, "Starting EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
#endif
fs->WriterLoop();
#ifndef WIN32
_log(COMMON__THREADS, "Ending EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
Log.Out(Logs::Detail, Logs::None, "Ending EQStreamFactoryWriterLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(nullptr);
@@ -56,6 +60,7 @@ ThreadReturnType EQStreamFactoryWriterLoop(void *eqfs)
EQStreamFactory::EQStreamFactory(EQStreamType type, int port, uint32 timeout)
: Timeoutable(5000), stream_timeout(timeout)
{
_eqp
StreamType=type;
Port=port;
sock=-1;
@@ -63,6 +68,7 @@ EQStreamFactory::EQStreamFactory(EQStreamType type, int port, uint32 timeout)
void EQStreamFactory::Close()
{
_eqp
Stop();
#ifdef _WINDOWS
@@ -75,7 +81,8 @@ void EQStreamFactory::Close()
bool EQStreamFactory::Open()
{
struct sockaddr_in address;
_eqp
struct sockaddr_in address;
#ifndef WIN32
pthread_t t1,t2;
#endif
@@ -104,8 +111,6 @@ struct sockaddr_in address;
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif
//moved these because on windows the output was delayed and causing the console window to look bad
//std::cout << "Starting factory Reader" << std::endl;
//std::cout << "Starting factory Writer" << std::endl;
#ifdef _WINDOWS
_beginthread(EQStreamFactoryReaderLoop,0, this);
_beginthread(EQStreamFactoryWriterLoop,0, this);
@@ -116,44 +121,42 @@ struct sockaddr_in address;
return true;
}
EQStream *EQStreamFactory::Pop()
std::shared_ptr<EQStream> EQStreamFactory::Pop()
{
EQStream *s=nullptr;
//std::cout << "Pop():Locking MNewStreams" << std::endl;
_eqp
std::shared_ptr<EQStream> s = nullptr;
MNewStreams.lock();
if (NewStreams.size()) {
s=NewStreams.front();
s = NewStreams.front();
NewStreams.pop();
s->PutInUse();
}
MNewStreams.unlock();
//std::cout << "Pop(): Unlocking MNewStreams" << std::endl;
return s;
}
void EQStreamFactory::Push(EQStream *s)
void EQStreamFactory::Push(std::shared_ptr<EQStream> s)
{
//std::cout << "Push():Locking MNewStreams" << std::endl;
_eqp
MNewStreams.lock();
NewStreams.push(s);
MNewStreams.unlock();
//std::cout << "Push(): Unlocking MNewStreams" << std::endl;
}
void EQStreamFactory::ReaderLoop()
{
fd_set readset;
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
int num;
int length;
unsigned char buffer[2048];
sockaddr_in from;
int socklen=sizeof(sockaddr_in);
timeval sleep_time;
//time_t now;
_eqp
fd_set readset;
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator stream_itr;
int num;
int length;
unsigned char buffer[2048];
sockaddr_in from;
int socklen = sizeof(sockaddr_in);
timeval sleep_time;
ReaderRunning = true;
ReaderRunning=true;
while(sock!=-1) {
MReaderRunning.lock();
if (!ReaderRunning)
@@ -184,10 +187,10 @@ timeval sleep_time;
// What do we wanna do?
} else {
MStreams.lock();
stream_itr=Streams.find(std::make_pair(from.sin_addr.s_addr, from.sin_port));
stream_itr = Streams.find(std::make_pair(from.sin_addr.s_addr, from.sin_port));
if (stream_itr == Streams.end()) {
if (buffer[1]==OP_SessionRequest) {
EQStream *s = new EQStream(from);
std::shared_ptr<EQStream> s = std::make_shared<EQStream>(from);
s->SetStreamType(StreamType);
Streams[std::make_pair(from.sin_addr.s_addr, from.sin_port)]=s;
WriterWork.Signal();
@@ -198,13 +201,13 @@ timeval sleep_time;
}
MStreams.unlock();
} else {
EQStream *curstream = stream_itr->second;
std::shared_ptr<EQStream> curstream = stream_itr->second;
//dont bother processing incoming packets for closed connections
if(curstream->CheckClosed())
curstream = nullptr;
else
curstream->PutInUse();
MStreams.unlock(); //the in use flag prevents the stream from being deleted while we are using it.
//the in use flag prevents the stream from being deleted while we are using it.
if(curstream) {
curstream->AddBytesRecv(length);
@@ -212,6 +215,7 @@ timeval sleep_time;
curstream->SetLastPacketTime(Timer::GetCurrentTime());
curstream->ReleaseFromUse();
}
MStreams.unlock();
}
}
}
@@ -220,14 +224,15 @@ timeval sleep_time;
void EQStreamFactory::CheckTimeout()
{
_eqp
//lock streams the entire time were checking timeouts, it should be fast.
MStreams.lock();
unsigned long now=Timer::GetCurrentTime();
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator stream_itr;
for(stream_itr=Streams.begin();stream_itr!=Streams.end();) {
EQStream *s = stream_itr->second;
for(stream_itr = Streams.begin(); stream_itr != Streams.end();) {
std::shared_ptr<EQStream> s = stream_itr->second;
s->CheckTimeout(now, stream_timeout);
@@ -239,11 +244,9 @@ void EQStreamFactory::CheckTimeout()
//give it a little time for everybody to finish with it
} else {
//everybody is done, we can delete it now
//std::cout << "Removing connection" << std::endl;
std::map<std::pair<uint32, uint16>,EQStream *>::iterator temp=stream_itr;
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator temp = stream_itr;
++stream_itr;
//let whoever has the stream outside delete it
delete temp->second;
temp->second = nullptr;
Streams.erase(temp);
continue;
}
@@ -256,21 +259,18 @@ void EQStreamFactory::CheckTimeout()
void EQStreamFactory::WriterLoop()
{
std::map<std::pair<uint32, uint16>,EQStream *>::iterator stream_itr;
bool havework=true;
std::vector<EQStream *> wants_write;
std::vector<EQStream *>::iterator cur,end;
bool decay=false;
uint32 stream_count;
Timer DecayTimer(20);
WriterRunning=true;
_eqp
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator stream_itr;
bool havework=true;
std::vector<std::shared_ptr<EQStream>> wants_write;
std::vector<std::shared_ptr<EQStream>>::iterator cur, end;
bool decay = false;
uint32 stream_count;
Timer DecayTimer(20);
WriterRunning = true;
DecayTimer.Enable();
while(sock!=-1) {
//if (!havework) {
//WriterWork.Wait();
//}
MWriterRunning.lock();
if (!WriterRunning)
break;
@@ -291,7 +291,7 @@ Timer DecayTimer(20);
//bullshit checking, to see if this is really happening, GDB seems to think so...
if(stream_itr->second == nullptr) {
fprintf(stderr, "ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i", stream_itr->first.first, stream_itr->first.second);
fprintf(stderr, "ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i:%i", stream_itr->first.first, stream_itr->first.second);
continue;
}
@@ -314,12 +314,10 @@ Timer DecayTimer(20);
Sleep(10);
MStreams.lock();
stream_count=Streams.size();
stream_count = Streams.size();
MStreams.unlock();
if (!stream_count) {
//std::cout << "No streams, waiting on condition" << std::endl;
WriterWork.Wait();
//std::cout << "Awake from condition, must have a stream now" << std::endl;
}
}
}
@@ -2,13 +2,16 @@
#define _EQSTREAMFACTORY_H
#include <memory>
#include <queue>
#include <map>
#include "../common/EQStream.h"
#include "../common/Condition.h"
#include "../common/eq_stream.h"
#include "../common/condition.h"
#include "../common/timeoutmgr.h"
#include "../common/opcodemgr.h"
#include "../common/timer.h"
class EQStream;
class Timer;
class EQStreamFactory : private Timeoutable {
private:
@@ -24,10 +27,10 @@ class EQStreamFactory : private Timeoutable {
EQStreamType StreamType;
std::queue<EQStream *> NewStreams;
std::queue<std::shared_ptr<EQStream>> NewStreams;
Mutex MNewStreams;
std::map<std::pair<uint32, uint16>,EQStream *> Streams;
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>> Streams;
Mutex MStreams;
virtual void CheckTimeout();
@@ -40,8 +43,8 @@ class EQStreamFactory : private Timeoutable {
EQStreamFactory(EQStreamType type, uint32 timeout = 135000) : Timeoutable(5000), stream_timeout(timeout) { ReaderRunning=false; WriterRunning=false; StreamType=type; sock=-1; }
EQStreamFactory(EQStreamType type, int port, uint32 timeout = 135000);
EQStream *Pop();
void Push(EQStream *s);
std::shared_ptr<EQStream> Pop();
void Push(std::shared_ptr<EQStream> s);
bool Open();
bool Open(unsigned long port) { Port=port; return Open(); }
@@ -1,20 +1,20 @@
#include "debug.h"
#include "EQStreamIdent.h"
#include "EQStreamProxy.h"
#include "logsys.h"
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_stream_ident.h"
#include "eq_stream_proxy.h"
EQStreamIdentifier::~EQStreamIdentifier() {
while(!m_identified.empty()) {
m_identified.front()->ReleaseFromUse();
m_identified.pop();
}
std::vector<Record *>::iterator cur, end;
std::vector<Record>::iterator cur, end;
cur = m_streams.begin();
end = m_streams.end();
for(; cur != end; ++cur) {
Record *r = *cur;
r->stream->ReleaseFromUse();
delete r;
Record &r = *cur;
r.stream->ReleaseFromUse();
}
std::vector<Patch *>::iterator curp, endp;
curp = m_patches.begin();
@@ -34,54 +34,52 @@ void EQStreamIdentifier::RegisterPatch(const EQStream::Signature &sig, const cha
}
void EQStreamIdentifier::Process() {
std::vector<Record *>::iterator cur;
std::vector<Record>::iterator cur;
std::vector<Patch *>::iterator curp, endp;
//foreach pending stream.
cur = m_streams.begin();
while(cur != m_streams.end()) {
Record *r = *cur;
Record &r = *cur;
//first see if this stream has expired
if(r->expire.Check(false)) {
if(r.expire.Check(false)) {
//this stream has failed to match any pattern in our timeframe.
_log(NET__IDENTIFY, "Unable to identify stream from %s:%d before timeout.", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()));
r->stream->ReleaseFromUse();
delete r;
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before timeout.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
r.stream->ReleaseFromUse();
cur = m_streams.erase(cur);
continue;
}
//then make sure the stream is still active
//if stream hasn't finished initializing then continue;
if(r->stream->GetState() == UNESTABLISHED)
if(r.stream->GetState() == UNESTABLISHED)
{
++cur;
continue;
}
if(r->stream->GetState() != ESTABLISHED) {
if(r.stream->GetState() != ESTABLISHED) {
//the stream closed before it was identified.
_log(NET__IDENTIFY, "Unable to identify stream from %s:%d before it closed.", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()));
switch(r->stream->GetState())
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d before it closed.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
switch(r.stream->GetState())
{
case ESTABLISHED:
_log(NET__IDENTIFY, "Stream state was Established");
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Established");
break;
case CLOSING:
_log(NET__IDENTIFY, "Stream state was Closing");
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closing");
break;
case DISCONNECTING:
_log(NET__IDENTIFY, "Stream state was Disconnecting");
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Disconnecting");
break;
case CLOSED:
_log(NET__IDENTIFY, "Stream state was Closed");
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Closed");
break;
default:
_log(NET__IDENTIFY, "Stream state was Unestablished or unknown");
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Stream state was Unestablished or unknown");
break;
}
r->stream->ReleaseFromUse();
delete r;
r.stream->ReleaseFromUse();
cur = m_streams.erase(cur);
continue;
}
@@ -98,20 +96,23 @@ void EQStreamIdentifier::Process() {
Patch *p = *curp;
//ask the stream to see if it matches the supplied signature
EQStream::MatchState res = r->stream->CheckSignature(&p->signature);
EQStream::MatchState res = r.stream->CheckSignature(&p->signature);
switch(res) {
case EQStream::MatchNotReady:
//the stream has not received enough packets to compare with this signature
// _log(NET__IDENT_TRACE, "%s:%d: Tried patch %s, but stream is not ready for it.", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()), p->name.c_str());
// Log.LogDebugType(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, but stream is not ready for it.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
all_ready = false;
break;
case EQStream::MatchSuccessful: {
//yay, a match.
_log(NET__IDENTIFY, "Identified stream %s:%d with signature %s", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()), p->name.c_str());
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Identified stream %s:%d with signature %s", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
// before we assign the eqstream to an interface, let the stream recognize it is in use and the session should not be reset any further
r.stream->SetActive(true);
//might want to do something less-specific here... some day..
EQStreamInterface *s = new EQStreamProxy(r->stream, p->structs, p->opcodes);
EQStreamInterface *s = new EQStreamProxy(r.stream, p->structs, p->opcodes);
m_identified.push(s);
found_one = true;
@@ -119,7 +120,7 @@ void EQStreamIdentifier::Process() {
}
case EQStream::MatchFailed:
//do nothing...
_log(NET__IDENT_TRACE, "%s:%d: Tried patch %s, and it did not match.", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()), p->name.c_str());
Log.Out(Logs::General, Logs::Netcode, "[IDENT_TRACE] %s:%d: Tried patch %s, and it did not match.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()), p->name.c_str());
break;
}
}
@@ -127,14 +128,13 @@ void EQStreamIdentifier::Process() {
//if we checked all patches and did not find a match.
if(all_ready && !found_one) {
//the stream cannot be identified.
_log(NET__IDENTIFY, "Unable to identify stream from %s:%d, no match found.", long2ip(r->stream->GetRemoteIP()).c_str(), ntohs(r->stream->GetRemotePort()));
r->stream->ReleaseFromUse();
Log.Out(Logs::General, Logs::Netcode, "[IDENTIFY] Unable to identify stream from %s:%d, no match found.", long2ip(r.stream->GetRemoteIP()).c_str(), ntohs(r.stream->GetRemotePort()));
r.stream->ReleaseFromUse();
}
//if we found a match, or were not able to identify it
if(found_one || all_ready) {
//cannot print ip/port here. r->stream is invalid.
delete r;
//cannot print ip/port here. r.stream is invalid.
cur = m_streams.erase(cur);
} else {
++cur;
@@ -142,8 +142,8 @@ void EQStreamIdentifier::Process() {
} //end foreach stream
}
void EQStreamIdentifier::AddStream(EQStream *&eqs) {
m_streams.push_back(new Record(eqs));
void EQStreamIdentifier::AddStream(std::shared_ptr<EQStream> &eqs) {
m_streams.push_back(Record(eqs));
eqs = nullptr;
}
@@ -155,7 +155,7 @@ EQStreamInterface *EQStreamIdentifier::PopIdentified() {
return(res);
}
EQStreamIdentifier::Record::Record(EQStream *s)
EQStreamIdentifier::Record::Record(std::shared_ptr<EQStream> s)
: stream(s),
expire(STREAM_IDENT_WAIT_MS)
{
@@ -1,16 +1,17 @@
#ifndef EQSTREAMIDENT_H_
#define EQSTREAMIDENT_H_
#include "EQStream.h"
#include "eq_stream.h"
#include "timer.h"
#include <vector>
#include <string>
#include <queue>
#include <memory>
#define STREAM_IDENT_WAIT_MS 10000
class OpcodeManager;
class StructStrategy;
class EQStreamInterface;
class EQStreamIdentifier {
public:
@@ -21,7 +22,7 @@ public:
//main processing interface
void Process();
void AddStream(EQStream *& eqs);
void AddStream(std::shared_ptr<EQStream> &eqs);
EQStreamInterface *PopIdentified();
protected:
@@ -39,11 +40,11 @@ protected:
//pending streams..
class Record {
public:
Record(EQStream *s);
EQStream *stream; //we own this
Record(std::shared_ptr<EQStream> s);
std::shared_ptr<EQStream> stream; //we own this
Timer expire;
};
std::vector<Record *> m_streams; //we own these objects, and the streams contained in them.
std::vector<Record> m_streams; //we own these objects, and the streams contained in them.
std::queue<EQStreamInterface *> m_identified; //we own these objects
};
@@ -35,7 +35,7 @@ public:
virtual const uint32 GetBytesRecieved() const { return 0; }
virtual const uint32 GetBytesSentPerSecond() const { return 0; }
virtual const uint32 GetBytesRecvPerSecond() const { return 0; }
virtual const EQClientVersion ClientVersion() const { return EQClientUnknown; }
virtual const ClientVersion GetClientVersion() const { return ClientVersion::Unknown; }
};
#endif /*EQSTREAMINTF_H_*/
@@ -1,11 +1,11 @@
#include "debug.h"
#include "EQStreamProxy.h"
#include "EQStream.h"
#include "StructStrategy.h"
#include "global_define.h"
#include "eq_stream_proxy.h"
#include "eq_stream.h"
#include "struct_strategy.h"
EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes)
EQStreamProxy::EQStreamProxy(std::shared_ptr<EQStream> &stream, const StructStrategy *structs, OpcodeManager **opcodes)
: m_stream(stream),
m_structs(structs),
m_opcodes(opcodes)
@@ -15,16 +15,15 @@ EQStreamProxy::EQStreamProxy(EQStream *&stream, const StructStrategy *structs, O
}
EQStreamProxy::~EQStreamProxy() {
//delete m_stream; //released by the stream factory.
}
std::string EQStreamProxy::Describe() const {
return(m_structs->Describe());
}
const EQClientVersion EQStreamProxy::ClientVersion() const
const ClientVersion EQStreamProxy::GetClientVersion() const
{
return m_structs->ClientVersion();
return m_structs->GetClientVersion();
}
void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
@@ -85,12 +84,6 @@ const uint32 EQStreamProxy::GetBytesRecvPerSecond() const
void EQStreamProxy::ReleaseFromUse() {
m_stream->ReleaseFromUse();
//this is so ugly, but I cant think of a better way to deal with
//it right now...
if(!m_stream->IsInUse()) {
delete this;
}
}
void EQStreamProxy::RemoveData() {
@@ -3,9 +3,10 @@
#include "types.h"
#include "EQStreamIntf.h"
#include "eq_stream_intf.h"
#include "eq_stream.h"
#include <memory>
class EQStream;
class StructStrategy;
class OpcodeManager;
class EQApplicationPacket;
@@ -13,7 +14,7 @@ class EQApplicationPacket;
class EQStreamProxy : public EQStreamInterface {
public:
//takes ownership of the stream.
EQStreamProxy(EQStream *&stream, const StructStrategy *structs, OpcodeManager **opcodes);
EQStreamProxy(std::shared_ptr<EQStream> &stream, const StructStrategy *structs, OpcodeManager **opcodes);
virtual ~EQStreamProxy();
//EQStreamInterface:
@@ -27,7 +28,7 @@ public:
virtual void RemoveData();
virtual bool CheckState(EQStreamState state);
virtual std::string Describe() const;
virtual const EQClientVersion ClientVersion() const;
virtual const ClientVersion GetClientVersion() const;
virtual const uint32 GetBytesSent() const;
virtual const uint32 GetBytesRecieved() const;
@@ -35,7 +36,7 @@ public:
virtual const uint32 GetBytesRecvPerSecond() const;
protected:
EQStream *const m_stream; //we own this stream object.
std::shared_ptr<EQStream> const m_stream; //we own this stream object.
const StructStrategy *const m_structs; //we do not own this object.
//this is a pointer to a pointer to make it less likely that a packet will
//reference an invalid opcode manager when they are being reloaded.
+2 -2
View File
@@ -15,8 +15,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "EQDB.h"
#include "global_define.h"
#include "eqdb.h"
#include "database.h"
#include <mysql.h>
#include <cstring>
+1 -1
View File
@@ -22,7 +22,7 @@
#include <vector>
#include <map>
#include "types.h"
#include "EQDBRes.h"
#include "eqdb_res.h"
#include <mysql.h>
//this is the main object exported to perl.
+2 -2
View File
@@ -15,8 +15,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "EQDBRes.h"
#include "global_define.h"
#include "eqdb_res.h"
#include <mysql.h>
std::vector<std::string> EQDBRes::fetch_row_array() {
+498
View File
@@ -0,0 +1,498 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/global_define.h"
#include "eqemu_config.h"
#include "misc_functions.h"
#include <iostream>
#include <sstream>
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
EQEmuConfig *EQEmuConfig::_config = nullptr;
void EQEmuConfig::do_world(TiXmlElement *ele)
{
_eqp
const char *text;
TiXmlElement * sub_ele;;
text = ParseTextBlock(ele, "shortname");
if (text) {
ShortName = text;
}
text = ParseTextBlock(ele, "longname");
if (text) {
LongName = text;
}
text = ParseTextBlock(ele, "address", true);
if (text) {
WorldAddress = text;
}
text = ParseTextBlock(ele, "localaddress", true);
if (text) {
LocalAddress = text;
}
text = ParseTextBlock(ele, "maxclients", true);
if (text) {
MaxClients = atoi(text);
}
// Get the <key> element
text = ParseTextBlock(ele, "key", true);
if (text) {
SharedKey = text;
}
// Get the <loginserver> element
sub_ele = ele->FirstChildElement("loginserver");
if (sub_ele) {
text = ParseTextBlock(sub_ele, "host", true);
if (text) {
LoginHost = text;
}
text = ParseTextBlock(sub_ele, "port", true);
if (text) {
LoginPort = atoi(text);
}
text = ParseTextBlock(sub_ele, "account", true);
if (text) {
LoginAccount = text;
}
text = ParseTextBlock(sub_ele, "password", true);
if (text) {
LoginPassword = text;
}
} else {
char str[32];
do {
sprintf(str, "loginserver%i", ++LoginCount);
sub_ele = ele->FirstChildElement(str);
if (sub_ele) {
LoginConfig* loginconfig = new LoginConfig;
text = ParseTextBlock(sub_ele, "host", true);
if (text) {
loginconfig->LoginHost = text;
}
text = ParseTextBlock(sub_ele, "port", true);
if (text) {
loginconfig->LoginPort = atoi(text);
}
text = ParseTextBlock(sub_ele, "account", true);
if (text) {
loginconfig->LoginAccount = text;
}
text = ParseTextBlock(sub_ele, "password", true);
if (text) {
loginconfig->LoginPassword = text;
}
loginlist.Insert(loginconfig);
}
} while (sub_ele);
}
// Check for locked
sub_ele = ele->FirstChildElement("locked");
if (sub_ele != nullptr) {
Locked = true;
}
// Get the <tcp> element
sub_ele = ele->FirstChildElement("tcp");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("ip");
if (text) {
WorldIP = text;
}
text = sub_ele->Attribute("port");
if (text) {
WorldTCPPort = atoi(text);
}
text = sub_ele->Attribute("telnet");
if (text && !strcasecmp(text, "enabled")) {
TelnetEnabled = true;
}
}
// Get the <http> element
sub_ele = ele->FirstChildElement("http");
if (sub_ele != nullptr) {
// text = sub_ele->Attribute("ip");
// if (text)
// WorldIP=text;
text = sub_ele->Attribute("mimefile");
if (text) {
WorldHTTPMimeFile = text;
}
text = sub_ele->Attribute("port");
if (text) {
WorldHTTPPort = atoi(text);
}
text = sub_ele->Attribute("enabled");
if (text && !strcasecmp(text, "true")) {
WorldHTTPEnabled = true;
}
}
}
void EQEmuConfig::do_chatserver(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
ChatHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
ChatPort = atoi(text);
}
}
void EQEmuConfig::do_mailserver(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
MailHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
MailPort = atoi(text);
}
}
void EQEmuConfig::do_database(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
DatabaseHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
DatabasePort = atoi(text);
}
text = ParseTextBlock(ele, "username", true);
if (text) {
DatabaseUsername = text;
}
text = ParseTextBlock(ele, "password", true);
if (text) {
DatabasePassword = text;
}
text = ParseTextBlock(ele, "db", true);
if (text) {
DatabaseDB = text;
}
}
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "host", true);
if (text) {
QSDatabaseHost = text;
}
text = ParseTextBlock(ele, "port", true);
if (text) {
QSDatabasePort = atoi(text);
}
text = ParseTextBlock(ele, "username", true);
if (text) {
QSDatabaseUsername = text;
}
text = ParseTextBlock(ele, "password", true);
if (text) {
QSDatabasePassword = text;
}
text = ParseTextBlock(ele, "db", true);
if (text) {
QSDatabaseDB = text;
}
}
void EQEmuConfig::do_zones(TiXmlElement *ele)
{
_eqp
const char *text;
TiXmlElement *sub_ele;
// TiXmlNode *node,*sub_node;
text = ParseTextBlock(ele, "defaultstatus", true);
if (text) {
DefaultStatus = atoi(text);
}
// Get the <ports> element
sub_ele = ele->FirstChildElement("ports");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("low");
if (text) {
ZonePortLow = atoi(text);
};
text = sub_ele->Attribute("high");
if (text) {
ZonePortHigh = atoi(text);
}
}
}
void EQEmuConfig::do_files(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "spells", true);
if (text) {
SpellsFile = text;
}
text = ParseTextBlock(ele, "opcodes", true);
if (text) {
OpCodesFile = text;
}
text = ParseTextBlock(ele, "eqtime", true);
if (text) {
EQTimeFile = text;
}
}
void EQEmuConfig::do_directories(TiXmlElement *ele)
{
_eqp
const char *text;
text = ParseTextBlock(ele, "maps", true);
if (text) {
MapDir = text;
}
text = ParseTextBlock(ele, "quests", true);
if (text) {
QuestDir = text;
}
text = ParseTextBlock(ele, "plugins", true);
if (text) {
PluginDir = text;
}
}
void EQEmuConfig::do_launcher(TiXmlElement *ele)
{
_eqp
const char *text;
TiXmlElement *sub_ele;
text = ParseTextBlock(ele, "logprefix", true);
if (text) {
LogPrefix = text;
}
text = ParseTextBlock(ele, "logsuffix", true);
if (text) {
LogSuffix = text;
}
// Get the <exe> element
text = ParseTextBlock(ele, "exe", true);
if (text) {
ZoneExe = text;
}
// Get the <timers> element
sub_ele = ele->FirstChildElement("timers");
if (sub_ele != nullptr) {
text = sub_ele->Attribute("restart");
if (text) {
RestartWait = atoi(text);
}
text = sub_ele->Attribute("reterminate");
if (text) {
TerminateWait = atoi(text);
}
text = sub_ele->Attribute("initial");
if (text) {
InitialBootWait = atoi(text);
}
text = sub_ele->Attribute("interval");
if (text) {
ZoneBootInterval = atoi(text);
}
}
}
std::string EQEmuConfig::GetByName(const std::string &var_name) const
{
_eqp
if (var_name == "ShortName") {
return (ShortName);
}
if (var_name == "LongName") {
return (LongName);
}
if (var_name == "WorldAddress") {
return (WorldAddress);
}
if (var_name == "LoginHost") {
return (LoginHost);
}
if (var_name == "LoginAccount") {
return (LoginAccount);
}
if (var_name == "LoginPassword") {
return (LoginPassword);
}
if (var_name == "LoginPort") {
return (itoa(LoginPort));
}
if (var_name == "Locked") {
return (Locked ? "true" : "false");
}
if (var_name == "WorldTCPPort") {
return (itoa(WorldTCPPort));
}
if (var_name == "WorldIP") {
return (WorldIP);
}
if (var_name == "TelnetEnabled") {
return (TelnetEnabled ? "true" : "false");
}
if (var_name == "WorldHTTPPort") {
return (itoa(WorldHTTPPort));
}
if (var_name == "WorldHTTPMimeFile") {
return (WorldHTTPMimeFile);
}
if (var_name == "WorldHTTPEnabled") {
return (WorldHTTPEnabled ? "true" : "false");
}
if (var_name == "ChatHost") {
return (ChatHost);
}
if (var_name == "ChatPort") {
return (itoa(ChatPort));
}
if (var_name == "MailHost") {
return (MailHost);
}
if (var_name == "MailPort") {
return (itoa(MailPort));
}
if (var_name == "DatabaseHost") {
return (DatabaseHost);
}
if (var_name == "DatabaseUsername") {
return (DatabaseUsername);
}
if (var_name == "DatabasePassword") {
return (DatabasePassword);
}
if (var_name == "DatabaseDB") {
return (DatabaseDB);
}
if (var_name == "DatabasePort") {
return (itoa(DatabasePort));
}
if (var_name == "QSDatabaseHost") {
return (QSDatabaseHost);
}
if (var_name == "QSDatabaseUsername") {
return (QSDatabaseUsername);
}
if (var_name == "QSDatabasePassword") {
return (QSDatabasePassword);
}
if (var_name == "QSDatabaseDB") {
return (QSDatabaseDB);
}
if (var_name == "QSDatabasePort") {
return (itoa(QSDatabasePort));
}
if (var_name == "SpellsFile") {
return (SpellsFile);
}
if (var_name == "OpCodesFile") {
return (OpCodesFile);
}
if (var_name == "EQTimeFile") {
return (EQTimeFile);
}
if (var_name == "MapDir") {
return (MapDir);
}
if (var_name == "QuestDir") {
return (QuestDir);
}
if (var_name == "PluginDir") {
return (PluginDir);
}
if (var_name == "LogPrefix") {
return (LogPrefix);
}
if (var_name == "LogSuffix") {
return (LogSuffix);
}
if (var_name == "ZoneExe") {
return (ZoneExe);
}
if (var_name == "ZonePortLow") {
return (itoa(ZonePortLow));
}
if (var_name == "ZonePortHigh") {
return (itoa(ZonePortHigh));
}
if (var_name == "DefaultStatus") {
return (itoa(DefaultStatus));
}
// if(var_name == "DynamicCount")
// return(itoa(DynamicCount));
return ("");
}
void EQEmuConfig::Dump() const
{
_eqp
std::cout << "ShortName = " << ShortName << std::endl;
std::cout << "LongName = " << LongName << std::endl;
std::cout << "WorldAddress = " << WorldAddress << std::endl;
std::cout << "LoginHost = " << LoginHost << std::endl;
std::cout << "LoginAccount = " << LoginAccount << std::endl;
std::cout << "LoginPassword = " << LoginPassword << std::endl;
std::cout << "LoginPort = " << LoginPort << std::endl;
std::cout << "Locked = " << Locked << std::endl;
std::cout << "WorldTCPPort = " << WorldTCPPort << std::endl;
std::cout << "WorldIP = " << WorldIP << std::endl;
std::cout << "TelnetEnabled = " << TelnetEnabled << std::endl;
std::cout << "WorldHTTPPort = " << WorldHTTPPort << std::endl;
std::cout << "WorldHTTPMimeFile = " << WorldHTTPMimeFile << std::endl;
std::cout << "WorldHTTPEnabled = " << WorldHTTPEnabled << std::endl;
std::cout << "ChatHost = " << ChatHost << std::endl;
std::cout << "ChatPort = " << ChatPort << std::endl;
std::cout << "MailHost = " << MailHost << std::endl;
std::cout << "MailPort = " << MailPort << std::endl;
std::cout << "DatabaseHost = " << DatabaseHost << std::endl;
std::cout << "DatabaseUsername = " << DatabaseUsername << std::endl;
std::cout << "DatabasePassword = " << DatabasePassword << std::endl;
std::cout << "DatabaseDB = " << DatabaseDB << std::endl;
std::cout << "DatabasePort = " << DatabasePort << std::endl;
std::cout << "QSDatabaseHost = " << QSDatabaseHost << std::endl;
std::cout << "QSDatabaseUsername = " << QSDatabaseUsername << std::endl;
std::cout << "QSDatabasePassword = " << QSDatabasePassword << std::endl;
std::cout << "QSDatabaseDB = " << QSDatabaseDB << std::endl;
std::cout << "QSDatabasePort = " << QSDatabasePort << std::endl;
std::cout << "SpellsFile = " << SpellsFile << std::endl;
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
std::cout << "EQTimeFile = " << EQTimeFile << std::endl;
std::cout << "MapDir = " << MapDir << std::endl;
std::cout << "QuestDir = " << QuestDir << std::endl;
std::cout << "PluginDir = " << PluginDir << std::endl;
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
// std::cout << "DynamicCount = " << DynamicCount << std::endl;
}
+217
View File
@@ -0,0 +1,217 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEmuConfig_H
#define __EQEmuConfig_H
#include "xml_parser.h"
#include "linked_list.h"
struct LoginConfig {
std::string LoginHost;
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
};
class EQEmuConfig : public XMLParser
{
public:
virtual std::string GetByName(const std::string &var_name) const;
// From <world/>
std::string ShortName;
std::string LongName;
std::string WorldAddress;
std::string LocalAddress;
std::string LoginHost;
std::string LoginAccount;
std::string LoginPassword;
uint16 LoginPort;
uint32 LoginCount;
LinkedList<LoginConfig*> loginlist;
bool Locked;
uint16 WorldTCPPort;
std::string WorldIP;
bool TelnetEnabled;
int32 MaxClients;
bool WorldHTTPEnabled;
uint16 WorldHTTPPort;
std::string WorldHTTPMimeFile;
std::string SharedKey;
// From <chatserver/>
std::string ChatHost;
uint16 ChatPort;
// From <mailserver/>
std::string MailHost;
uint16 MailPort;
// From <database/>
std::string DatabaseHost;
std::string DatabaseUsername;
std::string DatabasePassword;
std::string DatabaseDB;
uint16 DatabasePort;
// From <qsdatabase> // QueryServ
std::string QSDatabaseHost;
std::string QSDatabaseUsername;
std::string QSDatabasePassword;
std::string QSDatabaseDB;
uint16 QSDatabasePort;
// From <files/>
std::string SpellsFile;
std::string OpCodesFile;
std::string EQTimeFile;
// From <directories/>
std::string MapDir;
std::string QuestDir;
std::string PluginDir;
// From <launcher/>
std::string LogPrefix;
std::string LogSuffix;
std::string ZoneExe;
uint32 RestartWait;
uint32 TerminateWait;
uint32 InitialBootWait;
uint32 ZoneBootInterval;
// From <zones/>
uint16 ZonePortLow;
uint16 ZonePortHigh;
uint8 DefaultStatus;
// uint16 DynamicCount;
// map<string,uint16> StaticZones;
protected:
static EQEmuConfig *_config;
static std::string ConfigFile;
#define ELEMENT(name) \
void do_##name(TiXmlElement *ele);
#include "eqemu_config_elements.h"
EQEmuConfig()
{
// import the needed handler prototypes
#define ELEMENT(name) \
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
#include "eqemu_config_elements.h"
// Set sane defaults
// Login server
LoginHost = "eqemulator.net";
LoginPort = 5998;
// World
Locked = false;
WorldTCPPort = 9000;
TelnetEnabled = false;
WorldHTTPEnabled = false;
WorldHTTPPort = 9080;
WorldHTTPMimeFile = "mime.types";
SharedKey = ""; //blank disables authentication
// Mail
ChatHost = "eqchat.eqemulator.net";
ChatPort = 7778;
// Mail
MailHost = "eqmail.eqemulator.net";
MailPort = 7779;
// Mysql
DatabaseHost = "localhost";
DatabasePort = 3306;
DatabaseUsername = "eq";
DatabasePassword = "eq";
DatabaseDB = "eq";
// QueryServ Database
QSDatabaseHost = "localhost";
QSDatabasePort = 3306;
QSDatabaseUsername = "eq";
QSDatabasePassword = "eq";
QSDatabaseDB = "eq";
// Files
SpellsFile = "spells_us.txt";
OpCodesFile = "opcodes.conf";
EQTimeFile = "eqtime.cfg";
// Dirs
MapDir = "Maps";
QuestDir = "quests";
PluginDir = "plugins";
// Launcher
LogPrefix = "logs/zone-";
LogSuffix = ".log";
RestartWait = 10000; //milliseconds
TerminateWait = 10000; //milliseconds
InitialBootWait = 20000; //milliseconds
ZoneBootInterval = 2000; //milliseconds
#ifdef WIN32
ZoneExe = "zone.exe";
#else
ZoneExe = "./zone";
#endif
// Zones
ZonePortLow = 7000;
ZonePortHigh = 7999;
DefaultStatus = 0;
// For where zones need to connect to.
WorldIP = "127.0.0.1";
// Dynamics to start
//DynamicCount=5;
MaxClients = -1;
LoginCount = 0;
}
virtual ~EQEmuConfig() {}
public:
// Produce a const singleton
static const EQEmuConfig *get()
{
if (_config == nullptr) {
LoadConfig();
}
return (_config);
}
// Allow the use to set the conf file to be used.
static void SetConfigFile(std::string file)
{
EQEmuConfig::ConfigFile = file;
}
// Load the config
static bool LoadConfig()
{
if (_config != nullptr) {
delete _config;
}
_config = new EQEmuConfig;
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(), "server");
}
void Dump() const;
};
#endif
+353
View File
@@ -0,0 +1,353 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "eqemu_logsys.h"
#include "platform.h"
#include "string_util.h"
#include "database.h"
#include "misc.h"
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <time.h>
#include <sys/stat.h>
std::ofstream process_log;
#ifdef _WINDOWS
#include <direct.h>
#include <conio.h>
#include <iostream>
#include <dos.h>
#include <windows.h>
#include <process.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#endif
/* Linux ANSI console color defines */
#define LC_RESET "\033[0m"
#define LC_BLACK "\033[30m" /* Black */
#define LC_RED "\033[31m" /* Red */
#define LC_GREEN "\033[32m" /* Green */
#define LC_YELLOW "\033[33m" /* Yellow */
#define LC_BLUE "\033[34m" /* Blue */
#define LC_MAGENTA "\033[35m" /* Magenta */
#define LC_CYAN "\033[36m" /* Cyan */
#define LC_WHITE "\033[37m" /* White */
namespace Console {
enum Color {
Black = 0,
Blue = 1,
Green = 2,
Cyan = 3,
Red = 4,
Magenta = 5,
Brown = 6,
LightGray = 7,
DarkGray = 8,
LightBlue = 9,
LightGreen = 10,
LightCyan = 11,
LightRed = 12,
LightMagenta = 13,
Yellow = 14,
White = 15
};
}
EQEmuLogSys::EQEmuLogSys()
{
on_log_gmsay_hook = [](uint16 log_type, const std::string&) {};
bool file_logs_enabled = false;
int log_platform = 0;
}
EQEmuLogSys::~EQEmuLogSys()
{
}
void EQEmuLogSys::LoadLogSettingsDefaults()
{
/* Get Executable platform currently running this code (Zone/World/etc) */
log_platform = GetExecutablePlatformInt();
/* Zero out Array */
memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID);
/* Set Defaults */
log_settings[Logs::LoginServer].log_to_console = Logs::General;
log_settings[Logs::World_Server].log_to_console = Logs::General;
log_settings[Logs::Zone_Server].log_to_console = Logs::General;
log_settings[Logs::QS_Server].log_to_console = Logs::General;
log_settings[Logs::UCS_Server].log_to_console = Logs::General;
log_settings[Logs::Crash].log_to_console = Logs::General;
log_settings[Logs::MySQLError].log_to_console = Logs::General;
/* Declare process file names for log writing
If there is no process_file_name declared, no log file will be written, simply
*/
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld)
platform_file_name = "world";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformQueryServ)
platform_file_name = "query_server";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
platform_file_name = "zone";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformUCS)
platform_file_name = "ucs";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
platform_file_name = "login";
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLaunch)
platform_file_name = "launcher";
}
std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message)
{
std::string category_string;
if (log_category > 0 && Logs::LogCategoryName[log_category])
category_string = StringFormat("[%s] ", Logs::LogCategoryName[log_category]);
return StringFormat("%s%s", category_string.c_str(), in_message.c_str());
}
void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message)
{
/* Check if category enabled for process */
if (log_settings[log_category].log_to_gmsay == 0)
return;
/* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */
if (log_category == Logs::LogCategory::Netcode)
return;
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_gmsay < debug_level)
return;
/* Check to see if the process that actually ran this is zone */
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone)
on_log_gmsay_hook(log_category, message);
}
void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message)
{
if (log_category == Logs::Crash) {
char time_stamp[80];
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
std::ofstream crash_log;
EQEmuLogSys::MakeDirectory("logs/crashes");
crash_log.open(StringFormat("logs/crashes/crash_%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
crash_log << time_stamp << " " << message << "\n";
crash_log.close();
}
/* Check if category enabled for process */
if (log_settings[log_category].log_to_file == 0)
return;
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_file < debug_level)
return;
char time_stamp[80];
EQEmuLogSys::SetCurrentTimeStamp(time_stamp);
if (process_log)
process_log << time_stamp << " " << message << std::endl;
}
uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) {
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return Console::Color::Yellow;
case Logs::MySQLError:
case Logs::Error:
return Console::Color::LightRed;
case Logs::MySQLQuery:
case Logs::Debug:
return Console::Color::LightGreen;
case Logs::Quests:
return Console::Color::LightCyan;
case Logs::Commands:
case Logs::Mercenaries:
return Console::Color::LightMagenta;
case Logs::Crash:
return Console::Color::LightRed;
default:
return Console::Color::Yellow;
}
}
std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) {
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return LC_YELLOW;
case Logs::MySQLError:
case Logs::Error:
return LC_RED;
case Logs::MySQLQuery:
case Logs::Debug:
return LC_GREEN;
case Logs::Quests:
return LC_CYAN;
case Logs::Commands:
case Logs::Mercenaries:
return LC_MAGENTA;
case Logs::Crash:
return LC_RED;
default:
return LC_YELLOW;
}
}
uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) {
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return 15; /* Yellow */
case Logs::MySQLError:
case Logs::Error:
return 13; /* Red */
case Logs::MySQLQuery:
case Logs::Debug:
return 14; /* Light Green */
case Logs::Quests:
return 258; /* Light Cyan */
case Logs::Commands:
case Logs::Mercenaries:
return 5; /* Light Purple */
case Logs::Crash:
return 13; /* Red */
default:
return 15; /* Yellow */
}
}
void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message)
{
/* Check if category enabled for process */
if (log_settings[log_category].log_to_console == 0)
return;
/* Make sure the message inbound is at a debug level we're set at */
if (log_settings[log_category].log_to_console < debug_level)
return;
#ifdef _WINDOWS
HANDLE console_handle;
console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_FONT_INFOEX info = { 0 };
info.cbSize = sizeof(info);
info.dwFontSize.Y = 12; // leave X as zero
info.FontWeight = FW_NORMAL;
wcscpy(info.FaceName, L"Lucida Console");
SetCurrentConsoleFontEx(console_handle, NULL, &info);
SetConsoleTextAttribute(console_handle, EQEmuLogSys::GetWindowsConsoleColorFromCategory(log_category));
std::cout << message << "\n";
SetConsoleTextAttribute(console_handle, Console::Color::White);
#else
std::cout << EQEmuLogSys::GetLinuxConsoleColorFromCategory(log_category) << message << LC_RESET << std::endl;
#endif
}
void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...)
{
_eqp
const bool log_to_console = log_settings[log_category].log_to_console > 0;
const bool log_to_file = log_settings[log_category].log_to_file > 0;
const bool log_to_gmsay = log_settings[log_category].log_to_gmsay > 0;
const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay;
if (nothing_to_log)
return;
va_list args;
va_start(args, message);
std::string output_message = vStringFormat(message.c_str(), args);
va_end(args);
std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, output_message);
if (log_to_console) EQEmuLogSys::ProcessConsoleMessage(debug_level, log_category, output_debug_message);
if (log_to_gmsay) EQEmuLogSys::ProcessGMSay(debug_level, log_category, output_debug_message);
if (log_to_file) EQEmuLogSys::ProcessLogWrite(debug_level, log_category, output_debug_message);
}
void EQEmuLogSys::SetCurrentTimeStamp(char* time_stamp)
{
time_t raw_time;
struct tm * time_info;
time(&raw_time);
time_info = localtime(&raw_time);
strftime(time_stamp, 80, "[%m-%d-%Y :: %H:%M:%S]", time_info);
}
void EQEmuLogSys::MakeDirectory(const std::string &directory_name)
{
#ifdef _WINDOWS
struct _stat st;
if (_stat(directory_name.c_str(), &st) == 0) // exists
return;
_mkdir(directory_name.c_str());
#else
struct stat st;
if (stat(directory_name.c_str(), &st) == 0) // exists
return;
mkdir(directory_name.c_str(), 0755);
#endif
}
void EQEmuLogSys::CloseFileLogs()
{
if (process_log.is_open()) {
process_log.close();
}
}
void EQEmuLogSys::StartFileLogs(const std::string &log_name)
{
EQEmuLogSys::CloseFileLogs();
/* When loading settings, we must have been given a reason in category based logging to output to a file in order to even create or open one... */
if (file_logs_enabled == false)
return;
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) {
if (!log_name.empty())
platform_file_name = log_name;
if (platform_file_name.empty())
return;
EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid());
EQEmuLogSys::MakeDirectory("logs/zone");
process_log.open(StringFormat("logs/zone/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
} else {
if (platform_file_name.empty())
return;
EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid());
process_log.open(StringFormat("logs/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out);
}
}
+208
View File
@@ -0,0 +1,208 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQEMU_LOGSYS_H
#define EQEMU_LOGSYS_H
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <functional>
#include "types.h"
namespace Logs {
enum DebugLevel {
General = 1, /* 1 - Low-Level general debugging, useful info on single line */
Moderate, /* 2 - Informational based, used in functions, when particular things load */
Detail /* 3 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */
};
/*
If you add to this, make sure you update LogCategoryName
NOTE: Only add to the bottom of the enum because that is the type ID assignment
*/
enum LogCategory {
None = 0,
AA,
AI,
Aggro,
Attack,
Client_Server_Packet,
Combat,
Commands,
Crash,
Database,
Debug,
Doors,
Error,
Guilds,
Inventory,
Launcher,
LoginServer,
Netcode,
Normal,
Object,
Pathing,
QS_Server,
Quests,
Rules,
Skills,
Spawns,
Spells,
Status,
TCP_Connection,
Tasks,
Tradeskills,
Trading,
Tribute,
UCS_Server,
WebInterface_Server,
World_Server,
Zone_Server,
MySQLError,
MySQLQuery,
Mercenaries,
QuestDebug,
Server_Client_Packet,
Client_Server_Packet_Unhandled,
Server_Client_Packet_With_Dump,
Client_Server_Packet_With_Dump,
MaxCategoryID /* Don't Remove this*/
};
/* If you add to this, make sure you update LogCategory */
static const char* LogCategoryName[LogCategory::MaxCategoryID] = {
"",
"AA",
"AI",
"Aggro",
"Attack",
"Packet :: Client -> Server",
"Combat",
"Commands",
"Crash",
"Database",
"Debug",
"Doors",
"Error",
"Guilds",
"Inventory",
"Launcher",
"LoginServer",
"Netcode",
"Normal",
"Object",
"Pathing",
"QS Server",
"Quests",
"Rules",
"Skills",
"Spawns",
"Spells",
"Status",
"TCP Connection",
"Tasks",
"Tradeskills",
"Trading",
"Tribute",
"UCS Server",
"WebInterface Server",
"World Server",
"Zone Server",
"MySQLError",
"MySQLQuery",
"Mercenaries",
"Quest Debug",
"Packet :: Server -> Client",
"Packet :: Client -> Server Unhandled",
"Packet :: Server -> Client (Dump)",
"Packet :: Client -> Server (Dump)",
};
}
class EQEmuLogSys {
public:
EQEmuLogSys();
~EQEmuLogSys();
void CloseFileLogs(); /* Close File Logs wherever necessary, either at zone shutdown or entire process shutdown for everything else. This should be handled on deconstructor but to be safe we use it anyways. */
void LoadLogSettingsDefaults(); /* Initializes log_settings and sets some defaults if DB is not present */
void MakeDirectory(const std::string &directory_name); /* Platform independent way of performing a MakeDirectory based on name */
/*
The one and only Logging function that uses a debug level as a parameter, as well as a log_category
log_category - defined in Logs::LogCategory::[]
log_category name resolution works by passing the enum int ID to Logs::LogCategoryName[category_id]
Example: EQEmuLogSys::Out(Logs::General, Logs::Guilds, "This guild has no leader present");
- This would pipe the same category and debug level to all output formats, but the internal memory reference of log_settings would
be checked against to see if that piped output is set to actually process it for the category and debug level
*/
void Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...);
void SetCurrentTimeStamp(char* time_stamp); /* Used in file logs to prepend a timestamp entry for logs */
void StartFileLogs(const std::string &log_name = ""); /* Used to declare the processes file log and to keep it open for later use */
/*
LogSettings Struct
This struct is the master reference for all settings for each category, and for each output
log_to_file[category_id] = [1-3] - Sets debug level for category to output to file
log_to_console[category_id] = [1-3] - Sets debug level for category to output to console
log_to_gmsay[category_id] = [1-3] - Sets debug level for category to output to gmsay
*/
struct LogSettings {
uint8 log_to_file;
uint8 log_to_console;
uint8 log_to_gmsay;
uint8 is_category_enabled; /* When any log output in a category > 0, set this to 1 as (Enabled) */
};
/* Internally used memory reference for all log settings per category.
These are loaded via DB and have defaults loaded in LoadLogSettingsDefaults.
Database loaded via Database::LoadLogSettings(log_settings)
*/
LogSettings log_settings[Logs::LogCategory::MaxCategoryID];
bool file_logs_enabled; /* Set when log settings are loaded to determine if keeping a file open is necessary */
int log_platform; /* Sets Executable platform (Zone/World/UCS) etc. */
std::string platform_file_name; /* File name used in writing logs */
uint16 GetGMSayColorFromCategory(uint16 log_category); /* GMSay Client Message colors mapped by category */
void OnLogHookCallBackZone(std::function<void(uint16 log_type, const std::string&)> f) { on_log_gmsay_hook = f; }
private:
std::function<void(uint16 log_category, const std::string&)> on_log_gmsay_hook; /* Callback pointer to zone process for hooking logs to zone using GMSay */
std::string FormatOutMessageString(uint16 log_category, const std::string &in_message); /* Formats log messages like '[Category] This is a log message' */
std::string GetLinuxConsoleColorFromCategory(uint16 log_category); /* Linux console color messages mapped by category */
uint16 GetWindowsConsoleColorFromCategory(uint16 log_category); /* Windows console color messages mapped by category */
void ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessConsoleMessage called via Log.Out */
void ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessGMSay called via Log.Out */
void ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessLogWrite called via Log.Out */
};
extern EQEmuLogSys Log;
#endif
+5 -6
View File
@@ -17,7 +17,8 @@
*/
#include <fstream>
#include "../common/debug.h"
#include "../common/global_define.h"
#include "../common/eqemu_logsys.h"
#include "../common/eqtime.h"
#include "../common/eq_packet_structs.h"
#include <memory.h>
@@ -140,11 +141,10 @@ bool EQTime::saveFile(const char *filename)
of.open(filename);
if(!of)
{
LogFile->write(EQEMuLog::Error, "EQTime::saveFile failed: Unable to open file '%s'", filename);
Log.Out(Logs::General, Logs::Error, "EQTime::saveFile failed: Unable to open file '%s'", filename);
return false;
}
//Enable for debugging
//std::cout << "SAVE: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
of << EQT_VERSION << std::endl;
of << (long)eqTime.start_eqtime.day << std::endl;
of << (long)eqTime.start_eqtime.hour << std::endl;
@@ -164,14 +164,14 @@ bool EQTime::loadFile(const char *filename)
in.open(filename);
if(!in)
{
LogFile->write(EQEMuLog::Error, "Could not load EQTime file %s", filename);
Log.Out(Logs::General, Logs::Error, "Could not load EQTime file %s", filename);
return false;
}
in >> version;
in.ignore(80, '\n');
if(version != EQT_VERSION)
{
LogFile->write(EQEMuLog::Error, "'%s' is NOT a valid EQTime file. File version is %i, EQTime version is %i", filename, version, EQT_VERSION);
Log.Out(Logs::General, Logs::Error, "'%s' is NOT a valid EQTime file. File version is %i, EQTime version is %i", filename, version, EQT_VERSION);
return false;
}
//in >> eqTime.start_eqtime.day;
@@ -194,7 +194,6 @@ bool EQTime::loadFile(const char *filename)
in.ignore(80, '\n');
in >> eqTime.start_realtime;
//Enable for debugging...
//std::cout << "LOAD: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
in.close();
return true;
}
+2 -1
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "global_define.h"
#include "extprofile.h"
//Set defaults in the extended profile...
@@ -26,6 +26,7 @@ void InitExtendedProfile(ExtendedProfile_Struct *p) {
}
bool SetExtendedProfile(ExtendedProfile_Struct *to, char *old, unsigned int len) {
_eqp
if(len == 0 || old == nullptr) {
//handle old chars without an extended profile...
InitExtendedProfile(to);
+18 -19
View File
@@ -19,8 +19,7 @@
#define EXTENDED_PROFILE_H
#include "eq_packet_structs.h"
#include "Item.h"
#include "item.h"
#pragma pack(1)
@@ -37,24 +36,24 @@
*/
struct ExtendedProfile_Struct {
// Pet stuff
uint16 pet_id;
uint16 old_pet_hp;
uint16 old_pet_mana;
SpellBuff_Struct pet_buffs[BUFF_COUNT];
uint32 pet_items[_MaterialCount];
char merc_name[64];
uint16 pet_id; /* Not Used */
uint16 old_pet_hp; /* Not Used */
uint16 old_pet_mana; /* Not Used */
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
uint32 pet_items[_MaterialCount]; /* Not Used */
char merc_name[64]; /* Used */
uint32 aa_effects;
uint32 perAA; //% of exp going to AAs
uint32 expended_aa; // Total of expended AA
uint32 pet_hp;
uint32 pet_mana;
uint32 mercTemplateID;
uint32 mercSuspendedTime;
bool mercIsSuspended;
uint32 mercTimerRemaining;
uint8 mercGender;
int32 mercState;
uint32 aa_effects; /* Used */
uint32 perAA; /* Used: % of exp going to AAs */
uint32 expended_aa; /* Used: Total of expended AA */
uint32 pet_hp; /* Not Used */
uint32 pet_mana; /* Not Used */
uint32 mercTemplateID; /* Not Used */
uint32 mercSuspendedTime; /* Not Used */
bool mercIsSuspended; /* Not Used */
uint32 mercTimerRemaining; /* Not Used */
uint8 mercGender; /* Not Used */
int32 mercState; /* Not Used */
};
#pragma pack()
+120 -89
View File
@@ -1,4 +1,4 @@
/* EQEMu: Everquest Server Emulator
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
This program is free software; you can redistribute it and/or modify
@@ -15,126 +15,157 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "debug.h"
#include "faction.h"
#include "races.h"
const char *FactionValueToString(FACTION_VALUE fv) {
switch(fv) {
case FACTION_ALLY:
return("Ally");
case FACTION_WARMLY:
return("Warmly");
case FACTION_KINDLY:
return("Kindly");
case FACTION_AMIABLE:
return("Amiable");
case FACTION_INDIFFERENT:
return("Indifferent");
case FACTION_APPREHENSIVE:
return("Apprehensive");
case FACTION_DUBIOUS:
return("Dubious");
case FACTION_THREATENLY:
return("Threatenly");
case FACTION_SCOWLS:
return("Scowls, ready to attack.");
default:
break;
const char *FactionValueToString(FACTION_VALUE fv)
{
_eqp
switch (fv) {
case FACTION_ALLY:
return ("Ally");
case FACTION_WARMLY:
return ("Warmly");
case FACTION_KINDLY:
return ("Kindly");
case FACTION_AMIABLE:
return ("Amiable");
case FACTION_INDIFFERENT:
return ("Indifferent");
case FACTION_APPREHENSIVE:
return ("Apprehensive");
case FACTION_DUBIOUS:
return ("Dubious");
case FACTION_THREATENLY:
return ("Threatenly");
case FACTION_SCOWLS:
return ("Scowls, ready to attack.");
default:
break;
}
return("Unknown Faction Con");
return ("Unknown Faction Con");
}
//o--------------------------------------------------------------
//| Name: CalculateFaction; rembrant, Dec. 16, 2001
//| Name: CalculateFaction; Dec. 16, 2001
//o--------------------------------------------------------------
//| Notes: Returns the faction message value.
//| Modify these values to taste.
//o--------------------------------------------------------------
FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value)
{
_eqp
int32 character_value = tmpCharacter_value;
if (fm)
if (fm) {
character_value += fm->base + fm->class_mod + fm->race_mod + fm->deity_mod;
if(character_value >= 1101) return FACTION_ALLY;
if(character_value >= 701 && character_value <= 1100) return FACTION_WARMLY;
if(character_value >= 401 && character_value <= 700) return FACTION_KINDLY;
if(character_value >= 101 && character_value <= 400) return FACTION_AMIABLE;
if(character_value >= 0 && character_value <= 100) return FACTION_INDIFFERENT;
if(character_value >= -100 && character_value <= -1) return FACTION_APPREHENSIVE;
if(character_value >= -700 && character_value <= -101) return FACTION_DUBIOUS;
if(character_value >= -999 && character_value <= -701) return FACTION_THREATENLY;
if(character_value <= -1000) return FACTION_SCOWLS;
}
if (character_value >= 1101) {
return FACTION_ALLY;
}
if (character_value >= 701 && character_value <= 1100) {
return FACTION_WARMLY;
}
if (character_value >= 401 && character_value <= 700) {
return FACTION_KINDLY;
}
if (character_value >= 101 && character_value <= 400) {
return FACTION_AMIABLE;
}
if (character_value >= 0 && character_value <= 100) {
return FACTION_INDIFFERENT;
}
if (character_value >= -100 && character_value <= -1) {
return FACTION_APPREHENSIVE;
}
if (character_value >= -700 && character_value <= -101) {
return FACTION_DUBIOUS;
}
if (character_value >= -999 && character_value <= -701) {
return FACTION_THREATENLY;
}
if (character_value <= -1000) {
return FACTION_SCOWLS;
}
return FACTION_INDIFFERENT;
}
// neotokyo: this function should check if some races have more than one race define
// this function should check if some races have more than one race define
bool IsOfEqualRace(int r1, int r2)
{
if (r1 == r2)
_eqp
if (r1 == r2) {
return true;
}
// TODO: add more values
switch(r1)
{
case DARK_ELF:
if (r2 == 77)
return true;
break;
case BARBARIAN:
if (r2 == 90)
return true;
switch (r1) {
case DARK_ELF:
if (r2 == 77) {
return true;
}
break;
case BARBARIAN:
if (r2 == 90) {
return true;
}
}
return false;
}
// neotokyo: trolls endure ogres, dark elves, ...
// trolls endure ogres, dark elves, ...
bool IsOfIndiffRace(int r1, int r2)
{
if (r1 == r2)
_eqp
if (r1 == r2) {
return true;
}
// TODO: add more values
switch(r1)
{
case DARK_ELF:
case OGRE:
case TROLL:
if (r2 == OGRE || r2 == TROLL || r2 == DARK_ELF)
switch (r1) {
case DARK_ELF:
case OGRE:
case TROLL:
if (r2 == OGRE || r2 == TROLL || r2 == DARK_ELF) {
return true;
}
break;
case HUMAN:
case BARBARIAN:
case HALF_ELF:
case GNOME:
case HALFLING:
case WOOD_ELF:
if (r2 == HUMAN ||
r2 == BARBARIAN ||
r2 == ERUDITE ||
r2 == HALF_ELF ||
r2 == GNOME ||
r2 == HALFLING ||
r2 == DWARF ||
r2 == HIGH_ELF ||
r2 == WOOD_ELF) {
return true;
}
break;
case ERUDITE:
if (r2 == HUMAN || r2 == HALF_ELF) {
return true;
}
break;
case DWARF:
if (r2 == HALFLING || r2 == GNOME) {
return true;
}
break;
case HIGH_ELF:
if (r2 == WOOD_ELF) {
return true;
}
break;
case VAHSHIR:
return true;
break;
case HUMAN:
case BARBARIAN:
case HALF_ELF:
case GNOME:
case HALFLING:
case WOOD_ELF:
if (r2 == HUMAN ||
r2 == BARBARIAN ||
r2 == ERUDITE ||
r2 == HALF_ELF ||
r2 == GNOME ||
r2 == HALFLING ||
r2 == DWARF ||
r2 == HIGH_ELF ||
r2 == WOOD_ELF)
return true;
break;
case ERUDITE:
if (r2 == HUMAN || r2 == HALF_ELF)
return true;
break;
case DWARF:
if (r2 == HALFLING || r2 == GNOME)
return true;
break;
case HIGH_ELF:
if (r2 == WOOD_ELF)
return true;
break;
case VAHSHIR:
return true;
case IKSAR:
return false;
case IKSAR:
return false;
}
return false;
}
+7 -6
View File
@@ -163,7 +163,7 @@ enum { //timer settings, all in milliseconds
CombatEventTimer_expire = 12000,
Tribute_duration = 600000,
ZoneTimerResolution = 3, //sleep time between zone main loop runs (milliseconds)
FeignMemoryDuration = 120000, // EverHood - Duration player must feign death to clear zonewide agro.
FeignMemoryDuration = 120000, // Duration player must feign death to clear zonewide agro.
EnragedTimer = 360000,
EnragedDurationTimer = 10000
};
@@ -208,12 +208,12 @@ enum { //some random constants
//chance ratio that a
#define THREATENLY_ARRGO_CHANCE 32 // 32/128 (25%) chance that a mob will arrgo on con Threatenly
// max factions per npc faction list
//max factions per npc faction list
#define MAX_NPC_FACTIONS 20
//value caps
#define MAX_FACTION 1500
#define MIN_FACTION -1500
//individual faction pool
#define MAX_PERSONAL_FACTION 1200
#define MIN_PERSONAL_FACTION -3000
//The Level Cap:
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
@@ -261,7 +261,8 @@ enum {
commandChangeFlags = 200, //ability to set/refresh flags
commandBanPlayers = 100, //can set bans on players
commandChangeDatarate = 201, //edit client's data rate
commandZoneToCoords = 0 //can #zone with coords
commandZoneToCoords = 0, //can #zone with coords
commandInterrogateInv = 100 //below this == only log on error state and self-only target dump
};
//default states for logging flag on NPCs and clients (having NPCs on by default is prolly a bad idea)
+7 -5
View File
@@ -30,11 +30,13 @@ source_group("GTX Files" FILES ${GTX_HEADER})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
add_executable(${NAME} ${ROOT_TEXT}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
if(GLM_TEST_ENABLE)
add_executable(${NAME} ${ROOT_TEXT}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
endif(GLM_TEST_ENABLE)
#add_library(glm STATIC glm.cpp)
#add_library(glm_shared SHARED glm.cpp)
+5 -4
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,9 +30,6 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_COMMON_INCLUDED
#define GLM_COMMON_INCLUDED
#pragma once
#include "detail/func_common.hpp"
#endif//GLM_COMMON_INCLUDED
+8 -7
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,13 +25,12 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/_features.hpp
/// @file glm/detail/_features.hpp
/// @date 2013-02-20 / 2013-02-20
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_features
#define glm_core_features
#pragma once
// #define GLM_CXX98_EXCEPTIONS
// #define GLM_CXX98_RTTI
@@ -281,7 +284,7 @@
# define GLM_CXX11_STATIC_ASSERT
# endif
#elif(GLM_COMPILER & GLM_COMPILER_CLANG)
#elif(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(__has_feature(cxx_exceptions))
# define GLM_CXX98_EXCEPTIONS
# endif
@@ -422,6 +425,4 @@
# define GLM_CXX11_VARIADIC_TEMPLATES
# endif
#endif//(GLM_COMPILER & GLM_COMPILER_CLANG)
#endif//glm_core_features
#endif//(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
+5 -1
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/_fixes.hpp
/// @file glm/detail/_fixes.hpp
/// @date 2011-02-21 / 2011-11-22
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
+16 -10
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,8 +30,12 @@
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_DETAIL_NOISE_INCLUDED
#define GLM_DETAIL_NOISE_INCLUDED
#pragma once
#include "../vec2.hpp"
#include "../vec3.hpp"
#include "../vec4.hpp"
#include "../common.hpp"
namespace glm{
namespace detail
@@ -75,19 +83,19 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> taylorInvSqrt(detail::tvec2<T, P> const & r)
GLM_FUNC_QUALIFIER tvec2<T, P> taylorInvSqrt(tvec2<T, P> const & r)
{
return T(1.79284291400159) - T(0.85373472095314) * r;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> taylorInvSqrt(detail::tvec3<T, P> const & r)
GLM_FUNC_QUALIFIER tvec3<T, P> taylorInvSqrt(tvec3<T, P> const & r)
{
return T(1.79284291400159) - T(0.85373472095314) * r;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> taylorInvSqrt(detail::tvec4<T, P> const & r)
GLM_FUNC_QUALIFIER tvec4<T, P> taylorInvSqrt(tvec4<T, P> const & r)
{
return T(1.79284291400159) - T(0.85373472095314) * r;
}
@@ -100,19 +108,19 @@ namespace detail
*/
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> fade(detail::tvec2<T, P> const & t)
GLM_FUNC_QUALIFIER tvec2<T, P> fade(tvec2<T, P> const & t)
{
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> fade(detail::tvec3<T, P> const & t)
GLM_FUNC_QUALIFIER tvec3<T, P> fade(tvec3<T, P> const & t)
{
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> fade(detail::tvec4<T, P> const & t)
GLM_FUNC_QUALIFIER tvec4<T, P> fade(tvec4<T, P> const & t)
{
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
}
@@ -126,5 +134,3 @@ namespace detail
}//namespace detail
}//namespace glm
#endif//GLM_DETAIL_NOISE_INCLUDED
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,13 +25,12 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/_swizzle_func.hpp
/// @file glm/detail/_swizzle_func.hpp
/// @date 2011-10-16 / 2011-10-16
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_swizzle_func
#define glm_core_swizzle_func
#pragma once
#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \
SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST \
@@ -720,5 +723,3 @@
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)
#endif//glm_core_swizzle_func
+113 -170
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,197 +25,136 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/_vectorize.hpp
/// @file glm/detail/_vectorize.hpp
/// @date 2011-10-14 / 2011-10-14
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_CORE_DETAIL_INCLUDED
#define GLM_CORE_DETAIL_INCLUDED
#pragma once
#include "type_vec1.hpp"
#include "type_vec2.hpp"
#include "type_vec3.hpp"
#include "type_vec4.hpp"
#define VECTORIZE1_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec1<T, P> func( \
detail::tvec1<T, P> const & v) \
{ \
return detail::tvec1<T, P>( \
func(v.x)); \
}
#define VECTORIZE2_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func( \
detail::tvec2<T, P> const & v) \
{ \
return detail::tvec2<T, P>( \
func(v.x), \
func(v.y)); \
}
#define VECTORIZE3_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func( \
detail::tvec3<T, P> const & v) \
{ \
return detail::tvec3<T, P>( \
func(v.x), \
func(v.y), \
func(v.z)); \
}
#define VECTORIZE4_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec4<T, P> func( \
detail::tvec4<T, P> const & v) \
{ \
return detail::tvec4<T, P>( \
func(v.x), \
func(v.y), \
func(v.z), \
func(v.w)); \
}
#define VECTORIZE_VEC(func) \
VECTORIZE1_VEC(func) \
VECTORIZE2_VEC(func) \
VECTORIZE3_VEC(func) \
VECTORIZE4_VEC(func)
#define VECTORIZE1_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec1<T, P> func \
( \
detail::tvec1<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec1<T, P>( \
func(x.x, y)); \
}
#define VECTORIZE2_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func \
( \
detail::tvec2<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec2<T, P>( \
func(x.x, y), \
func(x.y, y)); \
}
#define VECTORIZE3_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func \
( \
detail::tvec3<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec3<T, P>( \
func(x.x, y), \
func(x.y, y), \
func(x.z, y)); \
}
#define VECTORIZE4_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec4<T, P> func \
( \
detail::tvec4<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec4<T, P>( \
func(x.x, y), \
func(x.y, y), \
func(x.z, y), \
func(x.w, y)); \
}
#define VECTORIZE_VEC_SCA(func) \
VECTORIZE1_VEC_SCA(func) \
VECTORIZE2_VEC_SCA(func) \
VECTORIZE3_VEC_SCA(func) \
VECTORIZE4_VEC_SCA(func)
#define VECTORIZE2_VEC_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func \
( \
detail::tvec2<T, P> const & x, \
detail::tvec2<T, P> const & y \
) \
{ \
return detail::tvec2<T, P>( \
func(x.x, y.x), \
func(x.y, y.y)); \
}
#define VECTORIZE3_VEC_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func \
( \
detail::tvec3<T, P> const & x, \
detail::tvec3<T, P> const & y \
) \
{ \
return detail::tvec3<T, P>( \
func(x.x, y.x), \
func(x.y, y.y), \
func(x.z, y.z)); \
}
#define VECTORIZE4_VEC_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec4<T, P> func \
( \
detail::tvec4<T, P> const & x, \
detail::tvec4<T, P> const & y \
) \
{ \
return detail::tvec4<T, P>( \
func(x.x, y.x), \
func(x.y, y.y), \
func(x.z, y.z), \
func(x.w, y.w)); \
}
#define VECTORIZE_VEC_VEC(func) \
VECTORIZE2_VEC_VEC(func) \
VECTORIZE3_VEC_VEC(func) \
VECTORIZE4_VEC_VEC(func)
namespace glm{
namespace detail
{
template<bool C>
struct If
template <typename R, typename T, precision P, template <typename, precision> class vecType>
struct functor1{};
template <typename R, typename T, precision P>
struct functor1<R, T, P, tvec1>
{
template<typename F, typename T>
static GLM_FUNC_QUALIFIER T apply(F functor, const T& val)
GLM_FUNC_QUALIFIER static tvec1<R, P> call(R (*Func) (T x), tvec1<T, P> const & v)
{
return functor(val);
return tvec1<R, P>(Func(v.x));
}
};
template<>
struct If<false>
template <typename R, typename T, precision P>
struct functor1<R, T, P, tvec2>
{
template<typename F, typename T>
static GLM_FUNC_QUALIFIER T apply(F, const T& val)
GLM_FUNC_QUALIFIER static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
{
return val;
return tvec2<R, P>(Func(v.x), Func(v.y));
}
};
template <typename R, typename T, precision P>
struct functor1<R, T, P, tvec3>
{
GLM_FUNC_QUALIFIER static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
{
return tvec3<R, P>(Func(v.x), Func(v.y), Func(v.z));
}
};
template <typename R, typename T, precision P>
struct functor1<R, T, P, tvec4>
{
GLM_FUNC_QUALIFIER static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
{
return tvec4<R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
}
};
template <typename T, precision P, template <typename, precision> class vecType>
struct functor2{};
template <typename T, precision P>
struct functor2<T, P, tvec1>
{
GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, tvec1<T, P> const & b)
{
return tvec1<T, P>(Func(a.x, b.x));
}
};
template <typename T, precision P>
struct functor2<T, P, tvec2>
{
GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, tvec2<T, P> const & b)
{
return tvec2<T, P>(Func(a.x, b.x), Func(a.y, b.y));
}
};
template <typename T, precision P>
struct functor2<T, P, tvec3>
{
GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, tvec3<T, P> const & b)
{
return tvec3<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
}
};
template <typename T, precision P>
struct functor2<T, P, tvec4>
{
GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, tvec4<T, P> const & b)
{
return tvec4<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
}
};
template <typename T, precision P, template <typename, precision> class vecType>
struct functor2_vec_sca{};
template <typename T, precision P>
struct functor2_vec_sca<T, P, tvec1>
{
GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, T b)
{
return tvec1<T, P>(Func(a.x, b));
}
};
template <typename T, precision P>
struct functor2_vec_sca<T, P, tvec2>
{
GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, T b)
{
return tvec2<T, P>(Func(a.x, b), Func(a.y, b));
}
};
template <typename T, precision P>
struct functor2_vec_sca<T, P, tvec3>
{
GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, T b)
{
return tvec3<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
}
};
template <typename T, precision P>
struct functor2_vec_sca<T, P, tvec4>
{
GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, T b)
{
return tvec4<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
}
};
}//namespace detail
}//namespace glm
#endif//GLM_CORE_DETAIL_INCLUDED
+33 -1
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -29,7 +33,6 @@
/// dummy.cpp exist only a wordaround for CMake file.
///////////////////////////////////////////////////////////////////////////////////
#define GLM_FORCE_RADIANS
#define GLM_MESSAGES
#include "../glm.hpp"
#include <limits>
@@ -42,6 +45,7 @@ struct material
glm::vec4 specular; // Scm
float shininess; // Srm
};
struct light
{
glm::vec4 ambient; // Acli
@@ -60,6 +64,7 @@ struct light
float quadraticAttenuation;// K2
};
// Sample 1
#include <glm/vec3.hpp>// glm::vec3
#include <glm/geometric.hpp>// glm::cross, glm::normalize
@@ -184,7 +189,34 @@ glm::vec3 lighting
return Color;
}
*/
template <typename T, glm::precision P, template<typename, glm::precision> class vecType>
T normalizeDotA(vecType<T, P> const & x, vecType<T, P> const & y)
{
return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
}
#define GLM_TEMPLATE_GENTYPE typename T, glm::precision P, template<typename, glm::precision> class
template <GLM_TEMPLATE_GENTYPE vecType>
T normalizeDotB(vecType<T, P> const & x, vecType<T, P> const & y)
{
return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
}
template <typename vecType>
typename vecType::value_type normalizeDotC(vecType const & a, vecType const & b)
{
return glm::dot(a, b) * glm::inversesqrt(glm::dot(a, a) * glm::dot(b, b));
}
int main()
{
glm::vec4 v(1);
float a = normalizeDotA(v, v);
float b = normalizeDotB(v, v);
float c = normalizeDotC(v, v);
return 0;
}
+76 -92
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_common.hpp
/// @file glm/detail/func_common.hpp
/// @date 2008-03-08 / 2010-01-26
/// @author Christophe Riccio
///
@@ -33,8 +37,7 @@
/// These all operate component-wise. The description is per component.
///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_FUNC_COMMON_INCLUDED
#define GLM_FUNC_COMMON_INCLUDED
#pragma once
#include "setup.hpp"
#include "precision.hpp"
@@ -53,7 +56,10 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType abs(genType const & x);
GLM_FUNC_DECL genType abs(genType x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> abs(vecType<T, P> const & x);
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
///
@@ -61,17 +67,17 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType sign(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> sign(vecType<T, P> const & x);
/// Returns a value equal to the nearest integer that is less then or equal to x.
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType floor(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> floor(vecType<T, P> const & x);
/// Returns a value equal to the nearest integer to x
/// whose absolute value is not larger than the absolute value of x.
@@ -80,8 +86,8 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType trunc(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> trunc(vecType<T, P> const & x);
/// Returns a value equal to the nearest integer to x.
/// The fraction 0.5 will round in a direction chosen by the
@@ -93,9 +99,9 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType round(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> round(vecType<T, P> const & x);
/// Returns a value equal to the nearest integer to x.
/// A fractional part of 0.5 will round toward the nearest even
/// integer. (Both 3.5 and 4.5 for x will return 4.0.)
@@ -105,8 +111,8 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
template <typename genType>
GLM_FUNC_DECL genType roundEven(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> roundEven(vecType<T, P> const & x);
/// Returns a value equal to the nearest integer
/// that is greater than or equal to x.
@@ -115,8 +121,8 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType ceil(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> ceil(vecType<T, P> const & x);
/// Return x - floor(x).
///
@@ -125,7 +131,10 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType fract(genType const & x);
GLM_FUNC_DECL genType fract(genType x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> fract(vecType<T, P> const & x);
/// Modulus. Returns x - y * floor(x / y)
/// for each component in x using the floating point value y.
@@ -135,21 +144,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType mod(
genType const & x,
genType const & y);
GLM_FUNC_DECL genType mod(genType x, genType y);
/// Modulus. Returns x - y * floor(x / y)
/// for each component in x using the floating point value y.
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType mod(
genType const & x,
typename genType::value_type const & y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, T y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns the fractional part of x and sets i to the integer
/// part (as a whole number floating point value). Both the
@@ -161,25 +162,22 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType modf(
genType const & x,
genType & i);
GLM_FUNC_DECL genType modf(genType x, genType & i);
/// Returns y if y < x; otherwise, it returns x.
///
/// @tparam genType Floating-point or integer; scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType min(
genType const & x,
genType const & y);
GLM_FUNC_DECL genType min(genType x, genType y);
template <typename genType>
GLM_FUNC_DECL genType min(
genType const & x,
typename genType::value_type const & y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> min(vecType<T, P> const & x, T y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> min(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns y if x < y; otherwise, it returns x.
///
@@ -188,14 +186,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType max(
genType const & x,
genType const & y);
GLM_FUNC_DECL genType max(genType x, genType y);
template <typename genType>
GLM_FUNC_DECL genType max(
genType const & x,
typename genType::value_type const & y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> max(vecType<T, P> const & x, T y);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> max(vecType<T, P> const & x, vecType<T, P> const & y);
/// Returns min(max(x, minVal), maxVal) for each component in x
/// using the floating-point values minVal and maxVal.
@@ -205,16 +202,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType clamp(
genType const & x,
genType const & minVal,
genType const & maxVal);
GLM_FUNC_DECL genType clamp(genType x, genType minVal, genType maxVal);
template <typename genType, precision P>
GLM_FUNC_DECL genType clamp(
genType const & x,
typename genType::value_type const & minVal,
typename genType::value_type const & maxVal);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> clamp(vecType<T, P> const & x, T minVal, T maxVal);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> clamp(vecType<T, P> const & x, vecType<T, P> const & minVal, vecType<T, P> const & maxVal);
/// If genTypeU is a floating scalar or vector:
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
@@ -259,40 +253,34 @@ namespace glm
/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
/// @endcode
template <typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mix(
vecType<T, P> const & x,
vecType<T, P> const & y,
vecType<U, P> const & a);
GLM_FUNC_DECL vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a);
template <typename T, typename U, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> mix(
vecType<T, P> const & x,
vecType<T, P> const & y,
U const & a);
GLM_FUNC_DECL vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, U a);
template <typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT mix(
genTypeT const & x,
genTypeT const & y,
genTypeU const & a);
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType step(
genType const & edge,
genType const & x);
GLM_FUNC_DECL genType step(genType edge, genType x);
/// Returns 0.0 if x < edge, otherwise it returns 1.0.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, typename T, precision P>
GLM_FUNC_DECL vecType<T, P> step(
T const & edge,
vecType<T, P> const & x);
GLM_FUNC_DECL vecType<T, P> step(T edge, vecType<T, P> const & x);
/// Returns 0.0 if x < edge, otherwise it returns 1.0.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <template <typename, precision> class vecType, typename T, precision P>
GLM_FUNC_DECL vecType<T, P> step(vecType<T, P> const & edge, vecType<T, P> const & x);
/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
/// performs smooth Hermite interpolation between 0 and 1
@@ -309,16 +297,13 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL genType smoothstep(
genType const & edge0,
genType const & edge1,
genType const & x);
GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x);
template <typename genType>
GLM_FUNC_DECL genType smoothstep(
typename genType::value_type const & edge0,
typename genType::value_type const & edge1,
genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> smoothstep(T edge0, T edge1, vecType<T, P> const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> smoothstep(vecType<T, P> const & edge0, vecType<T, P> const & edge1, vecType<T, P> const & x);
/// Returns true if x holds a NaN (not a number)
/// representation in the underlying implementation's set of
@@ -332,8 +317,8 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL typename genType::bool_type isnan(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> isnan(vecType<T, P> const & x);
/// Returns true if x holds a positive infinity or negative
/// infinity representation in the underlying implementation's
@@ -345,8 +330,8 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template <typename genType>
GLM_FUNC_DECL typename genType::bool_type isinf(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<bool, P> isinf(vecType<T, P> const & x);
/// Returns a signed integer value representing
/// the encoding of a floating-point value. The floating-point
@@ -469,4 +454,3 @@ namespace glm
#include "func_common.inl"
#endif//GLM_FUNC_COMMON_INCLUDED
File diff suppressed because it is too large Load Diff
+31 -31
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_exponential.hpp
/// @file glm/detail/func_exponential.hpp
/// @date 2008-08-08 / 2011-06-14
/// @author Christophe Riccio
///
@@ -33,8 +37,7 @@
/// These all operate component-wise. The description is per component.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_exponential
#define glm_core_func_exponential
#pragma once
#include "type_vec1.hpp"
#include "type_vec2.hpp"
@@ -49,84 +52,81 @@ namespace glm
/// Returns 'base' raised to the power 'exponent'.
///
/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param base Floating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type precision.
/// @param exponent Floating point value representing the 'exponent'.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> pow(vecType<T, P> const & base, vecType<T, P> const & exponent);
/// Returns the natural exponentiation of x, i.e., e^x.
///
/// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param v exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType exp(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> exp(vecType<T, P> const & v);
/// Returns the natural logarithm of x, i.e.,
/// Returns the natural logarithm of v, i.e.,
/// returns the value y which satisfies the equation x = e^y.
/// Results are undefined if x <= 0.
/// Results are undefined if v <= 0.
///
/// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.
/// @param v log function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType log(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> log(vecType<T, P> const & v);
/// Returns 2 raised to the x power.
/// Returns 2 raised to the v power.
///
/// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.
/// @param v exp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType exp2(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> exp2(vecType<T, P> const & v);
/// Returns the base 2 log of x, i.e., returns the value y,
/// which satisfies the equation x = 2 ^ y.
///
/// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.
/// @param v log2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType log2(genType x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> log2(vecType<T, P> const & v);
/// Returns the positive square root of x.
/// Returns the positive square root of v.
///
/// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.
/// @param v sqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
//template <typename genType>
//GLM_FUNC_DECL genType sqrt(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & x);
GLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & v);
/// Returns the reciprocal of the positive square root of x.
/// Returns the reciprocal of the positive square root of v.
///
/// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.
/// @param v inversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template <typename genType>
GLM_FUNC_DECL genType inversesqrt(genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> inversesqrt(vecType<T, P> const & v);
/// @}
}//namespace glm
#include "func_exponential.inl"
#endif//glm_core_func_exponential
+51 -137
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_exponential.inl
/// @file glm/detail/func_exponential.inl
/// @date 2008-08-03 / 2011-06-15
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
@@ -29,25 +33,28 @@
#include "func_vector_relational.hpp"
#include "_vectorize.hpp"
#include <limits>
#include <cmath>
#include <cassert>
namespace glm{
namespace detail
{
template <bool isFloat>
# if GLM_HAS_CXX11_STL
using std::log2;
# else
template <typename genType>
genType log2(genType Value)
{
return std::log(Value) * static_cast<genType>(1.4426950408889634073599246810019);
}
# endif
template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true>
struct compute_log2
{
template <typename T>
T operator() (T const & Value) const;
};
template <>
struct compute_log2<true>
{
template <typename T>
GLM_FUNC_QUALIFIER T operator() (T const & Value) const
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & vec)
{
return static_cast<T>(::std::log(Value)) * static_cast<T>(1.4426950408889634073599246810019);
return detail::functor1<T, T, P, vecType>::call(log2, vec);
}
};
@@ -78,170 +85,77 @@ namespace detail
}//namespace detail
// pow
template <typename genType>
GLM_FUNC_QUALIFIER genType pow
(
genType const & x,
genType const & y
)
using std::pow;
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> pow(vecType<T, P> const & base, vecType<T, P> const & exponent)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'pow' only accept floating-point inputs");
return std::pow(x, y);
return detail::functor2<T, P, vecType>::call(pow, base, exponent);
}
VECTORIZE_VEC_VEC(pow)
// exp
template <typename genType>
GLM_FUNC_QUALIFIER genType exp
(
genType const & x
)
using std::exp;
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> exp(vecType<T, P> const & x)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'exp' only accept floating-point inputs");
return std::exp(x);
return detail::functor1<T, T, P, vecType>::call(exp, x);
}
VECTORIZE_VEC(exp)
// log
template <typename genType>
GLM_FUNC_QUALIFIER genType log
(
genType const & x
)
using std::log;
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> log(vecType<T, P> const & x)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'log' only accept floating-point inputs");
return std::log(x);
return detail::functor1<T, T, P, vecType>::call(log, x);
}
VECTORIZE_VEC(log)
//exp2, ln2 = 0.69314718055994530941723212145818f
template <typename genType>
GLM_FUNC_QUALIFIER genType exp2(genType const & x)
GLM_FUNC_QUALIFIER genType exp2(genType x)
{
GLM_STATIC_ASSERT(
std::numeric_limits<genType>::is_iec559,
"'exp2' only accept floating-point inputs");
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'exp2' only accept floating-point inputs");
return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);
}
VECTORIZE_VEC(exp2)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> exp2(vecType<T, P> const & x)
{
return detail::functor1<T, T, P, vecType>::call(exp2, x);
}
// log2, ln2 = 0.69314718055994530941723212145818f
template <typename genType>
GLM_FUNC_QUALIFIER genType log2(genType x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,
"GLM core 'log2' only accept floating-point inputs. Include <glm/gtx/integer.hpp> for additional integer support.");
assert(x > genType(0)); // log2 is only defined on the range (0, inf]
return detail::compute_log2<std::numeric_limits<genType>::is_iec559>()(x);
return log2(tvec1<genType>(x)).x;
}
VECTORIZE_VEC(log2)
namespace detail
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> log2(vecType<T, P> const & x)
{
template <template <class, precision> class vecType, typename T, precision P>
struct compute_sqrt{};
template <typename T, precision P>
struct compute_sqrt<detail::tvec1, T, P>
{
GLM_FUNC_QUALIFIER static detail::tvec1<T, P> call(detail::tvec1<T, P> const & x)
{
return detail::tvec1<T, P>(std::sqrt(x.x));
}
};
template <typename T, precision P>
struct compute_sqrt<detail::tvec2, T, P>
{
GLM_FUNC_QUALIFIER static detail::tvec2<T, P> call(detail::tvec2<T, P> const & x)
{
return detail::tvec2<T, P>(std::sqrt(x.x), std::sqrt(x.y));
}
};
template <typename T, precision P>
struct compute_sqrt<detail::tvec3, T, P>
{
GLM_FUNC_QUALIFIER static detail::tvec3<T, P> call(detail::tvec3<T, P> const & x)
{
return detail::tvec3<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z));
}
};
template <typename T, precision P>
struct compute_sqrt<detail::tvec4, T, P>
{
GLM_FUNC_QUALIFIER static detail::tvec4<T, P> call(detail::tvec4<T, P> const & x)
{
return detail::tvec4<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z), std::sqrt(x.w));
}
};
}//namespace detail
return detail::compute_log2<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x);
}
// sqrt
GLM_FUNC_QUALIFIER float sqrt(float x)
{
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
detail::tvec1<float, highp> tmp(detail::compute_sqrt<detail::tvec1, float, highp>::call(x));
return tmp.x;
# else
return detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;
# endif
}
GLM_FUNC_QUALIFIER double sqrt(double x)
{
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
detail::tvec1<double, highp> tmp(detail::compute_sqrt<detail::tvec1, double, highp>::call(x));
return tmp.x;
# else
return detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;
# endif
}
using std::sqrt;
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs");
return detail::compute_sqrt<vecType, T, P>::call(x);
return detail::functor1<T, T, P, vecType>::call(sqrt, x);
}
// inversesqrt
GLM_FUNC_QUALIFIER float inversesqrt(float const & x)
template <typename genType>
GLM_FUNC_QUALIFIER genType inversesqrt(genType x)
{
return 1.0f / sqrt(x);
return static_cast<genType>(1) / sqrt(x);
}
GLM_FUNC_QUALIFIER double inversesqrt(double const & x)
{
return 1.0 / sqrt(x);
}
template <template <class, precision> class vecType, typename T, precision P>
GLM_FUNC_QUALIFIER vecType<T, P> inversesqrt
(
vecType<T, P> const & x
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> inversesqrt(vecType<T, P> const & x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs");
return detail::compute_inversesqrt<vecType, T, P>::call(x);
}
VECTORIZE_VEC(inversesqrt)
}//namespace glm
+21 -30
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_geometric.hpp
/// @file glm/detail/func_geometric.hpp
/// @date 2008-08-03 / 2011-06-14
/// @author Christophe Riccio
///
@@ -33,8 +37,7 @@
/// These operate on vectors as vectors, not component-wise.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_geometric
#define glm_core_func_geometric
#pragma once
#include "type_vec3.hpp"
@@ -49,9 +52,9 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
GLM_FUNC_DECL typename genType::value_type length(
genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T length(
vecType<T, P> const & x);
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
///
@@ -59,10 +62,10 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
GLM_FUNC_DECL typename genType::value_type distance(
genType const & p0,
genType const & p1);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL T distance(
vecType<T, P> const & p0,
vecType<T, P> const & p1);
/// Returns the dot product of x and y, i.e., result = x * y.
///
@@ -75,17 +78,6 @@ namespace glm
vecType<T, P> const & x,
vecType<T, P> const & y);
/// Returns the dot product of x and y, i.e., result = x * y.
///
/// @tparam genType Floating-point vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
GLM_FUNC_DECL genType dot(
genType const & x,
genType const & y);
/// Returns the cross product of x and y.
///
/// @tparam valType Floating-point scalar types.
@@ -93,17 +85,18 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename T, precision P>
GLM_FUNC_DECL detail::tvec3<T, P> cross(
detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y);
GLM_FUNC_DECL tvec3<T, P> cross(
tvec3<T, P> const & x,
tvec3<T, P> const & y);
/// Returns a vector in the same direction as x but with length of 1.
/// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template <typename genType>
GLM_FUNC_DECL genType normalize(
genType const & x);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> normalize(
vecType<T, P> const & x);
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
///
@@ -141,11 +134,9 @@ namespace glm
GLM_FUNC_DECL vecType<T, P> refract(
vecType<T, P> const & I,
vecType<T, P> const & N,
T const & eta);
T eta);
/// @}
}//namespace glm
#include "func_geometric.inl"
#endif//glm_core_func_geometric
+46 -191
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_geometric.inl
/// @file glm/detail/func_geometric.inl
/// @date 2008-08-03 / 2011-06-15
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
@@ -39,45 +43,40 @@ namespace detail
struct compute_dot{};
template <typename T, precision P>
struct compute_dot<detail::tvec1, T, P>
struct compute_dot<tvec1, T, P>
{
GLM_FUNC_QUALIFIER static T call(detail::tvec1<T, P> const & x, detail::tvec1<T, P> const & y)
GLM_FUNC_QUALIFIER static T call(tvec1<T, P> const & a, tvec1<T, P> const & b)
{
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
detail::tvec1<T, P> tmp(x * y);
return tmp.x;
# else
return detail::tvec1<T, P>(x * y).x;
# endif
return a.x * b.x;
}
};
template <typename T, precision P>
struct compute_dot<detail::tvec2, T, P>
struct compute_dot<tvec2, T, P>
{
GLM_FUNC_QUALIFIER static T call(detail::tvec2<T, P> const & x, detail::tvec2<T, P> const & y)
GLM_FUNC_QUALIFIER static T call(tvec2<T, P> const & x, tvec2<T, P> const & y)
{
detail::tvec2<T, P> tmp(x * y);
tvec2<T, P> tmp(x * y);
return tmp.x + tmp.y;
}
};
template <typename T, precision P>
struct compute_dot<detail::tvec3, T, P>
struct compute_dot<tvec3, T, P>
{
GLM_FUNC_QUALIFIER static T call(detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & y)
GLM_FUNC_QUALIFIER static T call(tvec3<T, P> const & x, tvec3<T, P> const & y)
{
detail::tvec3<T, P> tmp(x * y);
tvec3<T, P> tmp(x * y);
return tmp.x + tmp.y + tmp.z;
}
};
template <typename T, precision P>
struct compute_dot<detail::tvec4, T, P>
struct compute_dot<tvec4, T, P>
{
GLM_FUNC_QUALIFIER static T call(detail::tvec4<T, P> const & x, detail::tvec4<T, P> const & y)
GLM_FUNC_QUALIFIER static T call(tvec4<T, P> const & x, tvec4<T, P> const & y)
{
detail::tvec4<T, P> tmp(x * y);
tvec4<T, P> tmp(x * y);
return (tmp.x + tmp.y) + (tmp.z + tmp.w);
}
};
@@ -85,144 +84,58 @@ namespace detail
// length
template <typename genType>
GLM_FUNC_QUALIFIER genType length
(
genType const & x
)
GLM_FUNC_QUALIFIER genType length(genType x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'length' only accept floating-point inputs");
genType sqr = x * x;
return sqrt(sqr);
return abs(x);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T length(detail::tvec2<T, P> const & v)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T length(vecType<T, P> const & v)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' only accept floating-point inputs");
T sqr = v.x * v.x + v.y * v.y;
return sqrt(sqr);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T length(detail::tvec3<T, P> const & v)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' only accept floating-point inputs");
T sqr = v.x * v.x + v.y * v.y + v.z * v.z;
return sqrt(sqr);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T length(detail::tvec4<T, P> const & v)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' only accept floating-point inputs");
T sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w;
return sqrt(sqr);
return sqrt(dot(v, v));
}
// distance
template <typename genType>
GLM_FUNC_QUALIFIER genType distance
(
genType const & p0,
genType const & p1
)
GLM_FUNC_QUALIFIER genType distance(genType const & p0, genType const & p1)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'distance' only accept floating-point inputs");
return length(p1 - p0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T distance
(
detail::tvec2<T, P> const & p0,
detail::tvec2<T, P> const & p1
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T distance(vecType<T, P> const & p0, vecType<T, P> const & p1)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance' only accept floating-point inputs");
return length(p1 - p0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T distance
(
detail::tvec3<T, P> const & p0,
detail::tvec3<T, P> const & p1
)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance' only accept floating-point inputs");
return length(p1 - p0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T distance
(
detail::tvec4<T, P> const & p0,
detail::tvec4<T, P> const & p1
)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance' only accept floating-point inputs");
return length(p1 - p0);
}
// dot
template <typename T>
GLM_FUNC_QUALIFIER T dot
(
T const & x,
T const & y
)
GLM_FUNC_QUALIFIER T dot(T x, T y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
return detail::compute_dot<detail::tvec1, T, highp>::call(x, y);
return x * y;
}
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T dot
(
vecType<T, P> const & x,
vecType<T, P> const & y
)
GLM_FUNC_QUALIFIER T dot(vecType<T, P> const & x, vecType<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
return detail::compute_dot<vecType, T, P>::call(x, y);
}
/* // SSE3
GLM_FUNC_QUALIFIER float dot(const tvec4<float>& x, const tvec4<float>& y)
{
float Result;
__asm
{
mov esi, x
mov edi, y
movaps xmm0, [esi]
mulps xmm0, [edi]
haddps( _xmm0, _xmm0 )
haddps( _xmm0, _xmm0 )
movss Result, xmm0
}
return Result;
}
*/
// cross
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> cross
(
detail::tvec3<T, P> const & x,
detail::tvec3<T, P> const & y
)
GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const & x, tvec3<T, P> const & y)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' only accept floating-point inputs");
return detail::tvec3<T, P>(
return tvec3<T, P>(
x.y * y.z - y.y * x.z,
x.z * y.x - y.z * x.x,
x.x * y.y - y.x * x.y);
@@ -230,111 +143,53 @@ namespace detail
// normalize
template <typename genType>
GLM_FUNC_QUALIFIER genType normalize
(
genType const & x
)
GLM_FUNC_QUALIFIER genType normalize(genType const & x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'normalize' only accept floating-point inputs");
return x < genType(0) ? genType(-1) : genType(1);
}
// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> normalize
(
detail::tvec2<T, P> const & x
)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' only accept floating-point inputs");
T sqr = x.x * x.x + x.y * x.y;
return x * inversesqrt(sqr);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> normalize
(
detail::tvec3<T, P> const & x
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> normalize(vecType<T, P> const & x)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' only accept floating-point inputs");
T sqr = x.x * x.x + x.y * x.y + x.z * x.z;
return x * inversesqrt(sqr);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> normalize
(
detail::tvec4<T, P> const & x
)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' only accept floating-point inputs");
T sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;
return x * inversesqrt(sqr);
return x * inversesqrt(dot(x, x));
}
// faceforward
template <typename genType>
GLM_FUNC_QUALIFIER genType faceforward
(
genType const & N,
genType const & I,
genType const & Nref
)
GLM_FUNC_QUALIFIER genType faceforward(genType const & N, genType const & I, genType const & Nref)
{
return dot(Nref, I) < 0 ? N : -N;
return dot(Nref, I) < static_cast<genType>(0) ? N : -N;
}
// reflect
template <typename genType>
GLM_FUNC_QUALIFIER genType reflect
(
genType const & I,
genType const & N
)
GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N)
{
return I - N * dot(N, I) * genType(2);
return I - N * dot(N, I) * static_cast<genType>(2);
}
// refract
template <typename genType>
GLM_FUNC_QUALIFIER genType refract
(
genType const & I,
genType const & N,
genType const & eta
)
GLM_FUNC_QUALIFIER genType refract(genType const & I, genType const & N, genType const & eta)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'refract' only accept floating-point inputs");
genType dotValue = dot(N, I);
genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue);
if(k < genType(0))
return genType(0);
else
return eta * I - (eta * dotValue + sqrt(k)) * N;
genType const dotValue(dot(N, I));
genType const k(static_cast<genType>(1) - eta * eta * (static_cast<genType>(1) - dotValue * dotValue));
return (eta * I - (eta * dotValue + sqrt(k)) * N) * static_cast<genType>(k >= static_cast<genType>(0));
}
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> refract
(
vecType<T, P> const & I,
vecType<T, P> const & N,
T const & eta
)
GLM_FUNC_QUALIFIER vecType<T, P> refract(vecType<T, P> const & I, vecType<T, P> const & N, T eta)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'refract' only accept floating-point inputs");
T dotValue = dot(N, I);
T k = T(1) - eta * eta * (T(1) - dotValue * dotValue);
if(k < T(0))
return vecType<T, P>(0);
else
return eta * I - (eta * dotValue + std::sqrt(k)) * N;
T const dotValue(dot(N, I));
T const k(static_cast<T>(1) - eta * eta * (static_cast<T>(1) - dotValue * dotValue));
return (eta * I - (eta * dotValue + std::sqrt(k)) * N) * static_cast<T>(k >= static_cast<T>(0));
}
}//namespace glm
+85 -56
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_integer.hpp
/// @file glm/detail/func_integer.hpp
/// @date 2010-03-17 / 2011-06-18
/// @author Christophe Riccio
///
@@ -35,10 +39,12 @@
/// b, inclusive. The lowest-order bit is bit 0.
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_func_integer
#define glm_core_func_integer
#pragma once
#include "setup.hpp"
#include "precision.hpp"
#include "func_common.hpp"
#include "func_vector_relational.hpp"
namespace glm
{
@@ -53,11 +59,11 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
GLM_FUNC_DECL genUType uaddCarry(
genUType const & x,
genUType const & y,
genUType & carry);
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<uint, P> uaddCarry(
vecType<uint, P> const & x,
vecType<uint, P> const & y,
vecType<uint, P> & carry);
/// Subtracts the 32-bit unsigned integer y from x, returning
/// the difference if non-negative, or pow(2, 32) plus the difference
@@ -67,12 +73,12 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
GLM_FUNC_DECL genUType usubBorrow(
genUType const & x,
genUType const & y,
genUType & borrow);
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<uint, P> usubBorrow(
vecType<uint, P> const & x,
vecType<uint, P> const & y,
vecType<uint, P> & borrow);
/// Multiplies 32-bit integers x and y, producing a 64-bit
/// result. The 32 least-significant bits are returned in lsb.
/// The 32 most-significant bits are returned in msb.
@@ -81,12 +87,12 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genUType>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL void umulExtended(
genUType const & x,
genUType const & y,
genUType & msb,
genUType & lsb);
vecType<uint, P> const & x,
vecType<uint, P> const & y,
vecType<uint, P> & msb,
vecType<uint, P> & lsb);
/// Multiplies 32-bit integers x and y, producing a 64-bit
/// result. The 32 least-significant bits are returned in lsb.
@@ -96,12 +102,12 @@ namespace glm
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIType>
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL void imulExtended(
genIType const & x,
genIType const & y,
genIType & msb,
genIType & lsb);
vecType<int, P> const & x,
vecType<int, P> const & y,
vecType<int, P> & msb,
vecType<int, P> & lsb);
/// Extracts bits [offset, offset + bits - 1] from value,
/// returning them in the least significant bits of the result.
@@ -114,15 +120,15 @@ namespace glm
/// offset and bits is greater than the number of bits used
/// to store the operand.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldExtract(
genIUType const & Value,
int const & Offset,
int const & Bits);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> bitfieldExtract(
vecType<T, P> const & Value,
int Offset,
int Bits);
/// Returns the insertion the bits least-significant bits of insert into base.
///
@@ -134,70 +140,93 @@ namespace glm
/// offset and bits is greater than the number of bits used to
/// store the operand.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldInsert(
genIUType const & Base,
genIUType const & Insert,
int const & Offset,
int const & Bits);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> bitfieldInsert(
vecType<T, P> const & Base,
vecType<T, P> const & Insert,
int Offset,
int Bits);
/// Returns the reversal of the bits of value.
/// The bit numbered n of the result will be taken from bit (bits - 1) - n of value,
/// where bits is the total number of bits used to represent value.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType>
GLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<T, P> bitfieldReverse(vecType<T, P> const & v);
/// Returns the number of bits set to 1 in the binary representation of value.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genType>
GLM_FUNC_DECL int bitCount(genType v);
/// Returns the number of bits set to 1 in the binary representation of value.
///
/// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);
/// @tparam T Signed or unsigned integer scalar or vector types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<int, P> bitCount(vecType<T, P> const & v);
/// Returns the bit number of the least significant bit set to
/// 1 in the binary representation of value.
/// If value is zero, -1 will be returned.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType>
GLM_FUNC_DECL int findLSB(genIUType x);
/// Returns the bit number of the least significant bit set to
/// 1 in the binary representation of value.
/// If value is zero, -1 will be returned.
///
/// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);
/// @tparam T Signed or unsigned integer scalar types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<int, P> findLSB(vecType<T, P> const & v);
/// Returns the bit number of the most significant bit in the binary representation of value.
/// For positive integers, the result will be the bit number of the most significant bit set to 1.
/// For negative integers, the result will be the bit number of the most significant
/// bit set to 0. For a value of zero or negative one, -1 will be returned.
///
/// @tparam genIUType Signed or unsigned integer scalar or vector types.
/// @tparam T Signed or unsigned integer scalar types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename genIUType>
GLM_FUNC_DECL int findMSB(genIUType x);
/// Returns the bit number of the most significant bit in the binary representation of value.
/// For positive integers, the result will be the bit number of the most significant bit set to 1.
/// For negative integers, the result will be the bit number of the most significant
/// bit set to 0. For a value of zero or negative one, -1 will be returned.
///
/// @todo Clarify the declaration to specify that scalars are suported.
template <typename T, template <typename> class genIUType>
GLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);
/// @tparam T Signed or unsigned integer scalar types.
///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_DECL vecType<int, P> findMSB(vecType<T, P> const & v);
/// @}
}//namespace glm
#include "func_integer.inl"
#endif//glm_core_func_integer
+251 -512
View File
@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -21,7 +25,7 @@
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/func_integer.inl
/// @file glm/detail/func_integer.inl
/// @date 2010-03-17 / 2011-06-15
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
@@ -39,73 +43,186 @@
#endif//(GLM_ARCH != GLM_ARCH_PURE)
#include <limits>
namespace glm
namespace glm{
namespace detail
{
template <typename T>
GLM_FUNC_QUALIFIER T mask(T Bits)
{
return Bits >= sizeof(T) * 8 ? ~static_cast<T>(0) : (static_cast<T>(1) << Bits) - static_cast<T>(1);
}
template <bool EXEC = false>
struct compute_bitfieldReverseStep
{
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
{
return v;
}
};
template <>
struct compute_bitfieldReverseStep<true>
{
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
{
return (v & Mask) << Shift | (v & (~Mask)) >> Shift;
}
};
template <bool EXEC = false>
struct compute_bitfieldBitCountStep
{
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
{
return v;
}
};
template <>
struct compute_bitfieldBitCountStep<true>
{
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
{
return (v & Mask) + ((v >> Shift) & Mask);
}
};
template <typename genIUType, size_t Bits>
struct compute_findLSB
{
GLM_FUNC_QUALIFIER static int call(genIUType Value)
{
if(Value == 0)
return -1;
return glm::bitCount(~Value & (Value - static_cast<genIUType>(1)));
}
};
# if GLM_HAS_BITSCAN_WINDOWS
template <typename genIUType>
struct compute_findLSB<genIUType, 32>
{
GLM_FUNC_QUALIFIER static int call(genIUType Value)
{
unsigned long Result(0);
unsigned char IsNotNull = _BitScanForward(&Result, *reinterpret_cast<unsigned long*>(&Value));
return IsNotNull ? int(Result) : -1;
}
};
# if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
template <typename genIUType>
struct compute_findLSB<genIUType, 64>
{
GLM_FUNC_QUALIFIER static int call(genIUType Value)
{
unsigned long Result(0);
unsigned char IsNotNull = _BitScanForward64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
return IsNotNull ? int(Result) : -1;
}
};
# endif
# endif//GLM_HAS_BITSCAN_WINDOWS
template <typename T, glm::precision P, template <class, glm::precision> class vecType, bool EXEC = true>
struct compute_findMSB_step_vec
{
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, T Shift)
{
return x | (x >> Shift);
}
};
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
struct compute_findMSB_step_vec<T, P, vecType, false>
{
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, T)
{
return x;
}
};
template <typename T, glm::precision P, template <typename, glm::precision> class vecType, int>
struct compute_findMSB_vec
{
GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & vec)
{
vecType<T, P> x(vec);
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 8>::call(x, static_cast<T>( 1));
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 8>::call(x, static_cast<T>( 2));
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 8>::call(x, static_cast<T>( 4));
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 16>::call(x, static_cast<T>( 8));
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 32>::call(x, static_cast<T>(16));
x = compute_findMSB_step_vec<T, P, vecType, sizeof(T) * 8 >= 64>::call(x, static_cast<T>(32));
return vecType<int, P>(sizeof(T) * 8 - 1) - glm::bitCount(~x);
}
};
# if GLM_HAS_BITSCAN_WINDOWS
template <typename genIUType>
GLM_FUNC_QUALIFIER int compute_findMSB_32(genIUType Value)
{
unsigned long Result(0);
unsigned char IsNotNull = _BitScanReverse(&Result, *reinterpret_cast<unsigned long*>(&Value));
return IsNotNull ? int(Result) : -1;
}
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
struct compute_findMSB_vec<T, P, vecType, 32>
{
GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & x)
{
return detail::functor1<int, T, P, vecType>::call(compute_findMSB_32, x);
}
};
# if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
template <typename genIUType>
GLM_FUNC_QUALIFIER int compute_findMSB_64(genIUType Value)
{
unsigned long Result(0);
unsigned char IsNotNull = _BitScanReverse64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
return IsNotNull ? int(Result) : -1;
}
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
struct compute_findMSB_vec<T, P, vecType, 64>
{
GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & x)
{
return detail::functor1<int, T, P, vecType>::call(compute_findMSB_64, x);
}
};
# endif
# endif//GLM_HAS_BITSCAN_WINDOWS
}//namespace detail
// uaddCarry
template <>
GLM_FUNC_QUALIFIER uint uaddCarry
(
uint const & x,
uint const & y,
uint & Carry
)
GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry)
{
uint64 Value64 = static_cast<uint64>(x) + static_cast<uint64>(y);
uint32 Result = static_cast<uint32>(Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32)));
Carry = (Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32))) > 1 ? static_cast<uint32>(1) : static_cast<uint32>(0);
return Result;
uint64 const Value64(static_cast<uint64>(x) + static_cast<uint64>(y));
uint64 const Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
Carry = Value64 > Max32 ? 1 : 0;
return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
}
template <>
GLM_FUNC_QUALIFIER uvec2 uaddCarry
(
uvec2 const & x,
uvec2 const & y,
uvec2 & Carry
)
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<uint, P> uaddCarry(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & Carry)
{
return uvec2(
uaddCarry(x[0], y[0], Carry[0]),
uaddCarry(x[1], y[1], Carry[1]));
}
template <>
GLM_FUNC_QUALIFIER uvec3 uaddCarry
(
uvec3 const & x,
uvec3 const & y,
uvec3 & Carry
)
{
return uvec3(
uaddCarry(x[0], y[0], Carry[0]),
uaddCarry(x[1], y[1], Carry[1]),
uaddCarry(x[2], y[2], Carry[2]));
}
template <>
GLM_FUNC_QUALIFIER uvec4 uaddCarry
(
uvec4 const & x,
uvec4 const & y,
uvec4 & Carry
)
{
return uvec4(
uaddCarry(x[0], y[0], Carry[0]),
uaddCarry(x[1], y[1], Carry[1]),
uaddCarry(x[2], y[2], Carry[2]),
uaddCarry(x[3], y[3], Carry[3]));
vecType<uint64, P> Value64(vecType<uint64, P>(x) + vecType<uint64, P>(y));
vecType<uint64, P> Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
Carry = mix(vecType<uint32, P>(0), vecType<uint32, P>(1), greaterThan(Value64, Max32));
return vecType<uint32,P>(Value64 % (Max32 + static_cast<uint64>(1)));
}
// usubBorrow
template <>
GLM_FUNC_QUALIFIER uint usubBorrow
(
uint const & x,
uint const & y,
uint & Borrow
)
GLM_FUNC_QUALIFIER uint usubBorrow(uint const & x, uint const & y, uint & Borrow)
{
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
@@ -116,57 +233,17 @@ namespace glm
return static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + (static_cast<int64>(y) - static_cast<int64>(x)));
}
template <>
GLM_FUNC_QUALIFIER uvec2 usubBorrow
(
uvec2 const & x,
uvec2 const & y,
uvec2 & Borrow
)
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<uint, P> usubBorrow(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & Borrow)
{
return uvec2(
usubBorrow(x[0], y[0], Borrow[0]),
usubBorrow(x[1], y[1], Borrow[1]));
}
template <>
GLM_FUNC_QUALIFIER uvec3 usubBorrow
(
uvec3 const & x,
uvec3 const & y,
uvec3 & Borrow
)
{
return uvec3(
usubBorrow(x[0], y[0], Borrow[0]),
usubBorrow(x[1], y[1], Borrow[1]),
usubBorrow(x[2], y[2], Borrow[2]));
}
template <>
GLM_FUNC_QUALIFIER uvec4 usubBorrow
(
uvec4 const & x,
uvec4 const & y,
uvec4 & Borrow
)
{
return uvec4(
usubBorrow(x[0], y[0], Borrow[0]),
usubBorrow(x[1], y[1], Borrow[1]),
usubBorrow(x[2], y[2], Borrow[2]),
usubBorrow(x[3], y[3], Borrow[3]));
Borrow = mix(vecType<uint, P>(1), vecType<uint, P>(0), greaterThanEqual(x, y));
vecType<uint, P> const YgeX(y - x);
vecType<uint, P> const XgeY(vecType<uint32, P>((static_cast<int64>(1) << static_cast<int64>(32)) + (vecType<int64, P>(y) - vecType<int64, P>(x))));
return mix(XgeY, YgeX, greaterThanEqual(y, x));
}
// umulExtended
template <>
GLM_FUNC_QUALIFIER void umulExtended
(
uint const & x,
uint const & y,
uint & msb,
uint & lsb
)
GLM_FUNC_QUALIFIER void umulExtended(uint const & x, uint const & y, uint & msb, uint & lsb)
{
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
@@ -177,57 +254,18 @@ namespace glm
lsb = *PointerLSB;
}
template <>
GLM_FUNC_QUALIFIER void umulExtended
(
uvec2 const & x,
uvec2 const & y,
uvec2 & msb,
uvec2 & lsb
)
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER void umulExtended(vecType<uint, P> const & x, vecType<uint, P> const & y, vecType<uint, P> & msb, vecType<uint, P> & lsb)
{
umulExtended(x[0], y[0], msb[0], lsb[0]);
umulExtended(x[1], y[1], msb[1], lsb[1]);
}
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
template <>
GLM_FUNC_QUALIFIER void umulExtended
(
uvec3 const & x,
uvec3 const & y,
uvec3 & msb,
uvec3 & lsb
)
{
umulExtended(x[0], y[0], msb[0], lsb[0]);
umulExtended(x[1], y[1], msb[1], lsb[1]);
umulExtended(x[2], y[2], msb[2], lsb[2]);
}
template <>
GLM_FUNC_QUALIFIER void umulExtended
(
uvec4 const & x,
uvec4 const & y,
uvec4 & msb,
uvec4 & lsb
)
{
umulExtended(x[0], y[0], msb[0], lsb[0]);
umulExtended(x[1], y[1], msb[1], lsb[1]);
umulExtended(x[2], y[2], msb[2], lsb[2]);
umulExtended(x[3], y[3], msb[3], lsb[3]);
vecType<uint64, P> Value64(vecType<uint64, P>(x) * vecType<uint64, P>(y));
msb = vecType<uint32, P>(Value64 >> static_cast<uint64>(32));
lsb = vecType<uint32, P>(Value64);
}
// imulExtended
template <>
GLM_FUNC_QUALIFIER void imulExtended
(
int const & x,
int const & y,
int & msb,
int & lsb
)
GLM_FUNC_QUALIFIER void imulExtended(int x, int y, int & msb, int & lsb)
{
GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");
@@ -238,417 +276,118 @@ namespace glm
lsb = *PointerLSB;
}
template <>
GLM_FUNC_QUALIFIER void imulExtended
(
ivec2 const & x,
ivec2 const & y,
ivec2 & msb,
ivec2 & lsb
)
template <precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER void imulExtended(vecType<int, P> const & x, vecType<int, P> const & y, vecType<int, P> & msb, vecType<int, P> & lsb)
{
imulExtended(x[0], y[0], msb[0], lsb[0]),
imulExtended(x[1], y[1], msb[1], lsb[1]);
}
GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");
template <>
GLM_FUNC_QUALIFIER void imulExtended
(
ivec3 const & x,
ivec3 const & y,
ivec3 & msb,
ivec3 & lsb
)
{
imulExtended(x[0], y[0], msb[0], lsb[0]),
imulExtended(x[1], y[1], msb[1], lsb[1]);
imulExtended(x[2], y[2], msb[2], lsb[2]);
}
template <>
GLM_FUNC_QUALIFIER void imulExtended
(
ivec4 const & x,
ivec4 const & y,
ivec4 & msb,
ivec4 & lsb
)
{
imulExtended(x[0], y[0], msb[0], lsb[0]),
imulExtended(x[1], y[1], msb[1], lsb[1]);
imulExtended(x[2], y[2], msb[2], lsb[2]);
imulExtended(x[3], y[3], msb[3], lsb[3]);
vecType<int64, P> Value64(vecType<int64, P>(x) * vecType<int64, P>(y));
lsb = vecType<int32, P>(Value64 & static_cast<int64>(0xFFFFFFFF));
msb = vecType<int32, P>((Value64 >> static_cast<int64>(32)) & static_cast<int64>(0xFFFFFFFF));
}
// bitfieldExtract
template <typename genIUType>
GLM_FUNC_QUALIFIER genIUType bitfieldExtract
(
genIUType const & Value,
int const & Offset,
int const & Bits
)
GLM_FUNC_QUALIFIER genIUType bitfieldExtract(genIUType Value, int Offset, int Bits)
{
int GenSize = int(sizeof(genIUType)) << int(3);
assert(Offset + Bits <= GenSize);
genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0);
genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits);
return ShiftBack;
return bitfieldExtract(tvec1<genIUType>(Value), Offset, Bits).x;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldExtract
(
detail::tvec2<T, P> const & Value,
int const & Offset,
int const & Bits
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> bitfieldExtract(vecType<T, P> const & Value, int Offset, int Bits)
{
return detail::tvec2<T, P>(
bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1], Offset, Bits));
}
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldExtract' only accept integer inputs");
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldExtract
(
detail::tvec3<T, P> const & Value,
int const & Offset,
int const & Bits
)
{
return detail::tvec3<T, P>(
bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1], Offset, Bits),
bitfieldExtract(Value[2], Offset, Bits));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldExtract
(
detail::tvec4<T, P> const & Value,
int const & Offset,
int const & Bits
)
{
return detail::tvec4<T, P>(
bitfieldExtract(Value[0], Offset, Bits),
bitfieldExtract(Value[1], Offset, Bits),
bitfieldExtract(Value[2], Offset, Bits),
bitfieldExtract(Value[3], Offset, Bits));
return (Value >> static_cast<T>(Offset)) & static_cast<T>(detail::mask(Bits));
}
// bitfieldInsert
template <typename genIUType>
GLM_FUNC_QUALIFIER genIUType bitfieldInsert
(
genIUType const & Base,
genIUType const & Insert,
int const & Offset,
int const & Bits
)
GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldInsert' only accept integer values");
assert(Offset + Bits <= sizeof(genIUType));
return bitfieldInsert(tvec1<genIUType>(Base), tvec1<genIUType>(Insert), Offset, Bits).x;
}
if(Bits == 0)
return Base;
genIUType Mask = 0;
for(int Bit = Offset; Bit < Offset + Bits; ++Bit)
Mask |= (1 << Bit);
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> bitfieldInsert(vecType<T, P> const & Base, vecType<T, P> const & Insert, int Offset, int Bits)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldInsert' only accept integer values");
T const Mask = static_cast<T>(detail::mask(Bits) << Offset);
return (Base & ~Mask) | (Insert & Mask);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldInsert
(
detail::tvec2<T, P> const & Base,
detail::tvec2<T, P> const & Insert,
int const & Offset,
int const & Bits
)
{
return detail::tvec2<T, P>(
bitfieldInsert(Base[0], Insert[0], Offset, Bits),
bitfieldInsert(Base[1], Insert[1], Offset, Bits));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldInsert
(
detail::tvec3<T, P> const & Base,
detail::tvec3<T, P> const & Insert,
int const & Offset,
int const & Bits
)
{
return detail::tvec3<T, P>(
bitfieldInsert(Base[0], Insert[0], Offset, Bits),
bitfieldInsert(Base[1], Insert[1], Offset, Bits),
bitfieldInsert(Base[2], Insert[2], Offset, Bits));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldInsert
(
detail::tvec4<T, P> const & Base,
detail::tvec4<T, P> const & Insert,
int const & Offset,
int const & Bits
)
{
return detail::tvec4<T, P>(
bitfieldInsert(Base[0], Insert[0], Offset, Bits),
bitfieldInsert(Base[1], Insert[1], Offset, Bits),
bitfieldInsert(Base[2], Insert[2], Offset, Bits),
bitfieldInsert(Base[3], Insert[3], Offset, Bits));
}
// bitfieldReverse
template <typename genIUType>
GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)
template <typename genType>
GLM_FUNC_QUALIFIER genType bitfieldReverse(genType x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitfieldReverse' only accept integer values");
return bitfieldReverse(glm::tvec1<genType, glm::defaultp>(x)).x;
}
genIUType Out = 0;
std::size_t BitSize = sizeof(genIUType) * 8;
for(std::size_t i = 0; i < BitSize; ++i)
if(Value & (genIUType(1) << i))
Out |= genIUType(1) << (BitSize - 1 - i);
return Out;
}
VECTORIZE_VEC(bitfieldReverse)
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> bitfieldReverse(vecType<T, P> const & v)
{
vecType<T, P> x(v);
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 2>::call(x, T(0x5555555555555555ull), static_cast<T>( 1));
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 4>::call(x, T(0x3333333333333333ull), static_cast<T>( 2));
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 8>::call(x, T(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4));
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 16>::call(x, T(0x00FF00FF00FF00FFull), static_cast<T>( 8));
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 32>::call(x, T(0x0000FFFF0000FFFFull), static_cast<T>(16));
x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 64>::call(x, T(0x00000000FFFFFFFFull), static_cast<T>(32));
return x;
}
// bitCount
template <typename genIUType>
GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value)
template <typename genType>
GLM_FUNC_QUALIFIER int bitCount(genType x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'bitCount' only accept integer values");
int Count = 0;
for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i)
{
if(Value & (1 << i))
++Count;
}
return Count;
return bitCount(glm::tvec1<genType, glm::defaultp>(x)).x;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<int, P> bitCount
(
detail::tvec2<T, P> const & value
)
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
GLM_FUNC_QUALIFIER vecType<int, P> bitCount(vecType<T, P> const & v)
{
return detail::tvec2<int, P>(
bitCount(value[0]),
bitCount(value[1]));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<int, P> bitCount
(
detail::tvec3<T, P> const & value
)
{
return detail::tvec3<int, P>(
bitCount(value[0]),
bitCount(value[1]),
bitCount(value[2]));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<int, P> bitCount
(
detail::tvec4<T, P> const & value
)
{
return detail::tvec4<int, P>(
bitCount(value[0]),
bitCount(value[1]),
bitCount(value[2]),
bitCount(value[3]));
vecType<typename detail::make_unsigned<T>::type, P> x(*reinterpret_cast<vecType<typename detail::make_unsigned<T>::type, P> const *>(&v));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 2>::call(x, typename detail::make_unsigned<T>::type(0x5555555555555555ull), typename detail::make_unsigned<T>::type( 1));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 4>::call(x, typename detail::make_unsigned<T>::type(0x3333333333333333ull), typename detail::make_unsigned<T>::type( 2));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 8>::call(x, typename detail::make_unsigned<T>::type(0x0F0F0F0F0F0F0F0Full), typename detail::make_unsigned<T>::type( 4));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 16>::call(x, typename detail::make_unsigned<T>::type(0x00FF00FF00FF00FFull), typename detail::make_unsigned<T>::type( 8));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 32>::call(x, typename detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename detail::make_unsigned<T>::type(16));
x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 64>::call(x, typename detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename detail::make_unsigned<T>::type(32));
return vecType<int, P>(x);
}
// findLSB
template <typename genIUType>
GLM_FUNC_QUALIFIER int findLSB
(
genIUType const & Value
)
GLM_FUNC_QUALIFIER int findLSB(genIUType Value)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findLSB' only accept integer values");
if(Value == 0)
return -1;
genIUType Bit;
for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){}
return Bit;
return detail::compute_findLSB<genIUType, sizeof(genIUType) * 8>::call(Value);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<int, P> findLSB
(
detail::tvec2<T, P> const & value
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<int, P> findLSB(vecType<T, P> const & x)
{
return detail::tvec2<int, P>(
findLSB(value[0]),
findLSB(value[1]));
}
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findLSB' only accept integer values");
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<int, P> findLSB
(
detail::tvec3<T, P> const & value
)
{
return detail::tvec3<int, P>(
findLSB(value[0]),
findLSB(value[1]),
findLSB(value[2]));
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<int, P> findLSB
(
detail::tvec4<T, P> const & value
)
{
return detail::tvec4<int, P>(
findLSB(value[0]),
findLSB(value[1]),
findLSB(value[2]),
findLSB(value[3]));
return detail::functor1<int, T, P, vecType>::call(findLSB, x);
}
// findMSB
#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC))
template <typename genIUType>
GLM_FUNC_QUALIFIER int findMSB
(
genIUType const & Value
)
GLM_FUNC_QUALIFIER int findMSB(genIUType x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
if(Value == 0)
return -1;
unsigned long Result(0);
_BitScanReverse(&Result, Value);
return int(Result);
}
/*
// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000
#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40))
template <typename genIUType>
GLM_FUNC_QUALIFIER int findMSB
(
genIUType const & Value
)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
if(Value == 0)
return -1;
// clz returns the number or trailing 0-bits; see
// http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html
//
// NoteBecause __builtin_clz only works for unsigned ints, this
// implementation will not work for 64-bit integers.
//
return 31 - __builtin_clzl(Value);
}
*/
#else
/* SSE implementation idea
__m128i const Zero = _mm_set_epi32( 0, 0, 0, 0);
__m128i const One = _mm_set_epi32( 1, 1, 1, 1);
__m128i Bit = _mm_set_epi32(-1, -1, -1, -1);
__m128i Tmp = _mm_set_epi32(Value, Value, Value, Value);
__m128i Mmi = Zero;
for(int i = 0; i < 32; ++i)
{
__m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One);
Tmp = _mm_srai_epi32(Tmp, One);
Bit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i));
Mmi = _mm_and_si128(Mmi, One);
}
return Bit;
*/
template <typename genIUType>
GLM_FUNC_QUALIFIER int findMSB
(
genIUType const & Value
)
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
if(Value == genIUType(0) || Value == genIUType(-1))
return -1;
else if(Value > 0)
{
genIUType Bit = genIUType(-1);
for(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){}
return Bit;
}
else //if(Value < 0)
{
int const BitCount(sizeof(genIUType) * 8);
int MostSignificantBit(-1);
for(int BitIndex(0); BitIndex < BitCount; ++BitIndex)
MostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex;
assert(MostSignificantBit >= 0);
return MostSignificantBit;
}
}
#endif//(GLM_COMPILER)
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<int, P> findMSB
(
detail::tvec2<T, P> const & value
)
{
return detail::tvec2<int, P>(
findMSB(value[0]),
findMSB(value[1]));
return findMSB(tvec1<genIUType>(x)).x;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<int, P> findMSB
(
detail::tvec3<T, P> const & value
)
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<int, P> findMSB(vecType<T, P> const & x)
{
return detail::tvec3<int, P>(
findMSB(value[0]),
findMSB(value[1]),
findMSB(value[2]));
}
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findMSB' only accept integer values");
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<int, P> findMSB
(
detail::tvec4<T, P> const & value
)
{
return detail::tvec4<int, P>(
findMSB(value[0]),
findMSB(value[1]),
findMSB(value[2]),
findMSB(value[3]));
return detail::compute_findMSB_vec<T, P, vecType, sizeof(T) * 8>::call(x);
}
}//namespace glm

Some files were not shown because too many files have changed in this diff Show More