Compare commits

...

4494 Commits

Author SHA1 Message Date
KimLS 46cb96a026 Merchant buying in flux but it works better now 2015-06-22 23:50:39 -07:00
KimLS bbc3733c3a Compiles again, had to disable a new piece of code though 2015-06-21 01:45:42 -07:00
KimLS 5995afa1b8 Merge from master, probably wont compile but will fix that soon 2015-06-21 01:38:19 -07:00
Michael Cook (mackal) 32e880f571 Identified the extra byte at the end of OP_TargetBuffs/OP_BuffCreate 2015-06-20 14:05:32 -04:00
Michael Cook (mackal) 5481847987 Merge pull request #430 from KinglyKrab/master
Added Combat:BackstabBonus rule.
2015-06-19 20:28:35 -04:00
Kinglykrab 6503e6371a Added Combat:BackstabBonus rule.
- 0 = 0%, 5 = 5%, 50 = 50%, 200 = 200%
2015-06-19 19:55:10 -04:00
Natedog2012 ca311c8990 Merge pull request #429 from KinglyKrab/master
Bot changes.
2015-06-19 13:10:41 -07:00
Kinglykrab c5609db8d1 Preferential bot formatting changes. 2015-06-19 15:53:20 -04:00
Kinglykrab 6ffe7a9563 More bot changes.
- Added #bot showhelm [on|off]
- Allows you to disable your bot's helmet showing up
2015-06-19 05:25:48 -04:00
Kinglykrab 0dcf34d62b Bot changes.
- Added support for Powersource.
- Changed all messages to group messages (Defaults to say if they are not in a group)
2015-06-19 04:46:29 -04:00
Michael Cook (mackal) 08f8e2e55c Fix some RoF2 ops 2015-06-19 01:56:58 -04:00
Michael Cook (mackal) 34655e7753 Merge pull request #428 from KinglyKrab/master
Fixed more possible nullptr related bot crashes.
2015-06-19 01:46:35 -04:00
Kinglykrab 56e064751b Fixed more possible nullptr related bot crashes. 2015-06-19 01:42:01 -04:00
Natedog2012 a583391319 Merge pull request #427 from KinglyKrab/master
Fixed possible bot crashes due to nullptr conflict.
2015-06-18 21:02:33 -07:00
Kinglykrab de81850dd9 Fixed possible bot crashes due to nullptr conflict. 2015-06-18 23:42:59 -04:00
Uleat b1829e929e Updated SessionStats methodology 2015-06-12 19:25:43 -04:00
Michael Cook (mackal) 8dccc8bf90 Fix Pseudo Rooted for runspeed 2015-06-10 23:52:56 -04:00
Michael Cook (mackal) 8174428189 Export SetPseudoRoot to Lua 2015-06-10 23:10:00 -04:00
Michael Cook (mackal) 5186d3a2ef Make filtering out OP_ClientUpdate less aggressive to fix spinning toons
If we are too aggressive filtering out the same position packets it's
possible for toons to continue to spin indefinitely. Instead of
just not sending the update when the position is the same we keep a
tally of how many we get and stop once a threshold (6) is reached.
2015-06-08 18:04:08 -04:00
Michael Cook (mackal) 226bb4f3b2 Fix delete statement 2015-06-08 02:08:32 -04:00
Michael Cook (mackal) 6229b90451 Fix exploit with expendable AAs 2015-06-08 02:00:44 -04:00
Michael Cook (mackal) db307d865b And SQL for last commit 2015-06-07 23:42:28 -04:00
Michael Cook (mackal) 4bb2bb1438 AA packet work mostly and small fix to expendable AAs 2015-06-07 23:41:54 -04:00
Michael Cook (mackal) f198ab714f Make inspect buffs LAA optional for target buffs 2015-06-07 22:31:21 -04:00
Uleat c2e4365214 Implemented rule-based disenchanted bag use 2015-06-07 22:07:40 -04:00
Michael Cook (mackal) 4a036bede2 Merge pull request #426 from clucksoft/expfix
Full group was being excluded from group exp bonus
2015-06-07 20:06:27 -04:00
Russell Kinasz f35594947c Full group was being excluded from group exp bonus 2015-06-07 16:53:38 -07:00
Alex f57734e591 Merge pull request #425 from clucksoft/encounters
More encounter timers support
2015-06-07 15:07:35 -07:00
Michael Cook (mackal) 42a5ddcf77 Cut down on some HP update spam
This increases the timer that mobs will send out updates
(It could probably be increased more)
This will also reset the timer every time SendHPUpdate is called
to prevent sending like 3+ completely useless updates at once
Also skip sending the update to the client if we're sending an
OP_Damage with the damage since the client will apply this number
2015-06-06 17:46:53 -04:00
Michael Cook (mackal) 03bc245318 Fix fleeing when zones have map files 2015-06-05 21:30:35 -04:00
Michael Cook (mackal) a9b98ed057 Add 64-bit ntoh/hton functions for Linux
BSD macros aren't tested, but should work. These should already
be defined on Windows.
2015-06-05 19:07:01 -04:00
Russell Kinasz b45f0f9dbc Lua_Encounter doesn't need to expose constructor 2015-06-05 12:57:53 -07:00
Russell Kinasz 6cb1861c91 Update to encounter timers so they can actually work from hooked events 2015-06-05 12:32:58 -07:00
Russell Kinasz 0b17dc73f1 Update to encounter timers so they can actually work from hooked events 2015-06-05 12:23:42 -07:00
Alex fafbecb055 Merge pull request #424 from clucksoft/encounters
Encounter timers
2015-06-04 13:44:14 -07:00
Michael Cook (mackal) a5d9faf8ea Allow bard DOTs to get random extra tick
This extra tick business needs to be figured out more ...
bard invul and crescendo songs DO NOT get this extra tick, but DOTs do
2015-06-04 01:02:48 -04:00
Natedog2012 00d258a952 Bot pets will now scale with focus effects. Pets will not scale passed 3x their normal size and stay within 10 levels of their base level unless changed with the rule PetPowerLevelCap 2015-06-03 14:21:38 -07:00
Natedog2012 64caf298fb Only return if the target was a Bot member 2015-06-03 10:18:01 -07:00
Natedog2012 7f30950fdb More group related bot crashes fixed. Bots can now be targeted in the group window and kicked from party. They are also no longer raid_targets when conned. 2015-06-03 10:10:17 -07:00
Russell Kinasz dbd07106d7 Updated zone cmakelists.txt 2015-06-02 17:17:40 -07:00
Russell Kinasz 328b7bb93c Add encounters header to lua_general.cpp 2015-06-02 16:32:42 -07:00
Russell Kinasz c351a9b54f Removed unnecessary commented code. 2015-06-02 15:27:57 -07:00
Russell Kinasz 6ff06ded43 Fix for extra_pointers in Encounter methods 2015-06-02 15:21:27 -07:00
Russell Kinasz 2c6fd44811 Implemented encounter timers - no spawn required 2015-06-02 12:25:09 -07:00
Akkadius 66d37cabe4 Merge pull request #423 from KinglyKrab/master
Added GetGlobal() support for all Mobs.
2015-06-01 22:58:14 -05:00
Kinglykrab 9a5ff58213 Added GetGlobal() support for all Mobs.
- Uses memory (no database hits)
- Allows entity-based quest global checks
2015-06-01 22:25:02 -04:00
Michael Cook (mackal) c3c6d18979 Fix RoF+ AA clientver bug 2015-06-01 16:02:55 -04:00
Michael Cook (mackal) aacd288ad7 Update comment [skip ci] 2015-06-01 15:47:04 -04:00
Michael Cook (mackal) 46dd1511af Fix DoBuffTic crash 2015-06-01 14:15:45 -04:00
Michael Cook (mackal) 7011395d4c Pet target in UF+
I think older clients might have something like this that sets
some spawn data, but these are the only clients that display something
2015-05-31 00:09:59 -04:00
Michael Cook (mackal) 03c006bef5 Implement ST_AEClientV1
This should at least be as correct as ST_AEBard is, unsure of the differences
2015-05-30 15:43:16 -04:00
Michael Cook (mackal) bfb40f6c5f Add failure messages for RNG focus 2015-05-30 03:08:02 -04:00
Michael Cook (mackal) 38cdea7d7e Furious Bash focus message 2015-05-30 02:57:03 -04:00
Michael Cook (mackal) d9cab4820a More focus messages 2015-05-29 21:16:30 -04:00
Michael Cook (mackal) 96264cb688 Send the BEGIN_TO_GLOW message after OP_BeginCast when casting a clicky 2015-05-29 15:26:32 -04:00
Michael Cook (mackal) b0d85e3558 More focus messages thanks to Google 2015-05-29 14:55:32 -04:00
Michael Cook (mackal) 0348c0817d Make ResistSpell aware of the level_override nerf 2015-05-29 14:39:09 -04:00
Michael Cook (mackal) a41fd122bc Add PetType petNone so IsCharmed stops lying 2015-05-29 13:18:04 -04:00
Michael Cook (mackal) 8646791d1d Proc buffs like the shissar rogue poisons have a level override
This corrects the level in those cases. Probably should
propagate the level overrides a bit more, but this fixes the
main issues right now.
2015-05-29 03:26:35 -04:00
Michael Cook (mackal) 070183789b More focus messages 2015-05-29 01:58:38 -04:00
Michael Cook (mackal) 36de3879f8 There is a variety to focus messages
I'm not 100% sure these are classic, but Tit+ at least.
I was able to verify these messages -- crap ton more though.
2015-05-29 00:40:34 -04:00
Uleat e588af2e79 Merge pull request #419 from EQEmu/app_pack_fix
Application packet size fix for high byte opcodes (fix #418)
2015-05-28 18:49:08 -04:00
Michael Cook (mackal) 2416960818 Merge pull request #420 from regneq/master
readded previous commit smoother pathing.
2015-05-28 18:41:36 -04:00
regneq be210950d7 readded previous commit smoother pathing. 2015-05-28 15:05:45 -07:00
Michael Cook (mackal) 5917052a6d I guess short duration buffs needed the extra tick 2015-05-28 18:00:25 -04:00
Natedog2012 d7b9d7c990 Forgot the Regen caps oops! 2015-05-28 14:09:14 -07:00
Natedog2012 235d6b6c48 Bots will not benefit from heroic stats, focus effects like a client 2015-05-28 13:58:17 -07:00
Natedog2012 95243fd6ce Modified ZippZipp's bot name fix from the forums. Limited bot name length to fix a crash. Added Filter check too if you use the Name Filter. 2015-05-28 11:48:03 -07:00
Natedog2012 e5f979665d Merge branch 'master' of https://github.com/EQEmu/Server 2015-05-28 11:27:59 -07:00
Natedog2012 22ef16947c Bots will no longer crash when disbanding on death or normal disbanding.. HP values on bots will no longer roll over when checking STAMINA 2015-05-28 11:27:03 -07:00
Michael Cook (mackal) dbbae0e735 Crash for no zonemap 2015-05-28 13:26:55 -04:00
Uleat 24917257e6 Application packet size fix for high byte opcodes 2015-05-27 22:24:00 -04:00
Uleat dbd615572c Revert "Fix for character select screen client crashes (fix #418)"
This reverts commit 92c756c820.
2015-05-26 21:19:48 -04:00
Uleat 92c756c820 Fix for character select screen client crashes (fix #418) 2015-05-26 15:51:18 -04:00
SecretsOTheP 76d7fe1586 Fixes for mobs on pause waypoints dancing around.
Fixes for runspeed <= 0 as reported by demonstar55
2015-05-26 02:27:48 -04:00
SecretsOTheP 4424afac94 Merge branch 'master' of https://github.com/EQEmu/Server 2015-05-26 01:20:06 -04:00
SecretsOTheP 2b495cea5a bot fixes for compiling 2015-05-26 01:19:49 -04:00
Michael Cook (mackal) e7902342dd EQ seems to round the ticks weird ...
A few examples in the comments ...
2015-05-26 00:59:48 -04:00
Akkadius 5c194c7087 Some syntax adjustments to eqtime.cpp [skip ci] 2015-05-25 23:57:48 -05:00
Akkadius b6091c1960 Update changelog descriptor cause prob not clear enough [skip ci] 2015-05-25 23:51:23 -05:00
Akkadius d2a1fb7acf Add file 2015_05_25_npc_types_texture_fields.sql 2015-05-25 23:49:11 -05:00
Akkadius ee136881c8 Implemented disjointed zone based time, this can be triggered via quest methods
Added parameter to LUA and Perl method settime(hour, minute, [update_world = true])
	- If update_world is false, the zone will then unsubscribe itself from regular worldserver time synchronizations
Added DB ver 9082 with update to add npc_types texture columns if table does not currently have them
2015-05-25 23:48:11 -05:00
Michael Cook (mackal) b06e1c2041 Merge pull request #417 from EQEmu/revert-416-master
Revert "Making $npc->RemoveFromHateList actually work"
2015-05-25 13:20:50 -04:00
Michael Cook (mackal) 41ca23eb7c Revert "Making $npc->RemoveFromHateList actually work" 2015-05-25 13:20:26 -04:00
SecretsOTheP 5c4389effb Revert custom changes that came with my code load 2015-05-25 12:39:36 -04:00
SecretsOTheP 788959a5e2 Haynar's movement fixes.
Changes Speed from float to int. EQ client deals with int step locs better than it does floats according to Haynar's testing.

This also contains mob runspeed changes. I recommend you set runspeeds to start in the DB 1.25 for NPCs below 1.25 which will match player runspeeds almost equally. Existing DBs will need to be updated.

General Cleanup of MobAI functions. Mobs now change their heading on AIMovement timers if their targets' heading has changed since that time. This prevents players from being able to land backstabs inbetween mob swings.

Charmed/feared players now send the appropriate packet, there was a missing CastToClient() in spells that was missing.

Mob runspeed can no longer be snared to 0%, instead, 1% of their base runspeed is the maximum. Roots apply as roots instead of a modifier under this code.

There is going to be bugs with this code. It's better we push through it than revert it. Sanctuary has been running this for a good week and we've worked through the issues.

Misc updates:
Exported some variables to perl, including:

EVENT_ITE_CLICK_CAST:
EVENT_ITEM_CLICK:
spell_id - returns the spell_id of the click effect.
return value - cancels the cast.

EVENT_DROP_ITEM:
quantity - returns the # of items dropped in the packet. If the item has charges, charges are returned here instead.
itemname - name of the item being dropped
itemid - id of the item being droppped
spell_id - spell_id associated with the item's click effect.
slotid - the inventory slot id of the item being dropped.
return value - cancels the item from being dropped.

Added Perl function: CalcEXP. Calculates the experience you would gain for an NPC that cons a specific con value to you.

Fixed a bug where you would receive the group experience bonus and group experience messages for simply being in a group, regardless of the player being in the same zone as you.
2015-05-25 12:35:53 -04:00
JJ aaca6fd2d9 Merge pull request #416 from hateborne/master
Making $npc->RemoveFromHateList actually work
2015-05-25 11:20:37 -04:00
hateborne 1bcb5c72a5 Making $npc->RemoveFromHateList actually work
$npc->RemoveFromHateList is a mob function, not an NPC function. Casting
to Mob to let it work.
2015-05-25 10:44:15 -04:00
Michael Cook (mackal) 249d67a1c3 Bards get a bonus tic at some point
Not sure what level but it's between 53 and 85 ...
(although I remember reading something about around 60)

I also didn't notice any of the odd effects the comments speak of ...
I suspect they were fighting each other?
2015-05-25 02:01:51 -04:00
Michael Cook (mackal) 85bdcf413b Bard songs go negative for some reason?
Hot fix for now, I don't think they really need to be extended,
but I need to investigate more.
2015-05-24 18:50:33 -04:00
Uleat 93942fa82b Merge branch 'master' of https://github.com/EQEmu/Server 2015-05-23 18:59:14 -04:00
Uleat 8922c72452 Added a name block memset to the server character select code and a few comments to the OP_CharInfo encodes 2015-05-23 18:59:03 -04:00
KimLS ec8e7139ec errant else statements 2015-05-23 15:54:33 -07:00
KimLS a882397eb6 errant semi-colon, doesn't matter but still 2015-05-23 15:53:56 -07:00
KimLS 7d61934ce6 Add db manifest for dbstr_us.txt stuff 2015-05-23 15:52:42 -07:00
KimLS 7041db7480 Adding dbstr_us.txt support to client files 2015-05-23 15:50:58 -07:00
Michael Cook (mackal) 70048eb6e1 SE_IllusionPersistence affects self only 2015-05-23 17:45:51 -04:00
Michael Cook (mackal) a46b1ac18b Need to actually copy the bard mod too! 2015-05-23 17:36:05 -04:00
Michael Cook (mackal) 00721f4a96 Fix pet instrument mod issue 2015-05-23 17:14:08 -04:00
Michael Cook (mackal) 8aadc36320 Rework buff duration formulas
These are derived from the client

SE_IllusionPresistence will also set the duration to 10k tics like live
2015-05-23 02:20:36 -04:00
Uleat 351e63ae72 Possible fix for some 'random' character select crashes 2015-05-22 19:15:51 -04:00
Michael Cook (mackal) 9cbda0f81b Unlink Tiger Claw from other monk skills for RoF2+
Tiger Claw has its own reuse now, which the client expects

pTimerCombatAbility2 should be able to be used if they do something
similar for other classes.
2015-05-21 18:15:34 -04:00
Michael Cook (mackal) ea44b4b3b1 Fix manifest 2015-05-21 17:25:59 -04:00
Michael Cook (mackal) ea5a1dd6f1 Bard instrument mods should be more consistent with live
Changes:
	Mods are now saved for in the DB so they are loaded on zone
	This allows long duration buffs from bards that get mods to keep their mods
	Ex. Selo's, Symphony of Battle

	Instrument mods are applied to basically anything that is an instrument skill
	The only exception to this is discs (ex. Puretone is Singing but always 10)

	Singing spells from procs (Ex. Storm Blade) that are instrument skills should
	inherit their buffs instrument mod. Doom effects should also. This isn't
	implemented yet.
2015-05-20 02:01:43 -04:00
KimLS 2ef0fc9342 Change to fishing water location algorithim 2015-05-18 21:46:19 -07:00
Alex 02c3fd0905 Merge pull request #414 from hateborne/master
GM Output for Casting Blocked Spells via Logging System
2015-05-18 21:45:07 -07:00
Uleat 4266f45295 Added merc pointer initialization to avoid an invalid pointer condition 2015-05-18 20:40:57 -04:00
Michael Cook (mackal) 553b7c9f8c Move the extra appearance packet guard to SetAppearance 2015-05-18 00:04:55 -04:00
Michael Cook (mackal) 79a87fac1d Guard against eaStanding spam 2015-05-17 23:51:24 -04:00
Uleat 2308d3e880 Fix for EntityList::CheckSpawnQueue() debug assertion failure crash 2015-05-15 22:49:59 -04:00
hateborne cbcaead8df GM Output for Casting Blocked Spells
Utilizing the logging system to display an alert when a GM casts a
blocked spell, giving some notification instead of silent successes on
cast.
2015-05-13 18:41:18 -04:00
Alex 4b7871a665 Merge pull request #411 from regneq/master
smoother NPC pathing. (credit to Haynar from EQMacEmu)
2015-05-11 22:52:13 -07:00
regneq 052f343e4d smoother NPC pathing. (credit to Haynar from EQMacEmu) 2015-05-11 21:42:48 -07:00
Michael Cook (mackal) e6f6da7845 Merge pull request #410 from regneq/master
* change the kill faction hits display before the xp message not after.
2015-05-11 21:49:44 -04:00
regneq cc2a60feb2 * change the kill faction hits display before the xp message not after.
* removed the double level gain messages to display once either the level gained or the level.
* implement the message "You will now lose experience when you die" and "Your items will no longer stay with you..." when reach a certain level already sets in the rule table.
2015-05-11 16:34:46 -07:00
Michael Cook (mackal) d5eeaf4f47 Merge pull request #409 from regneq/master
Fully implemented QuestReward.  (credit to Cavedude on EQMacEmu)
2015-05-11 16:57:53 -04:00
regneq 6fad93aeee QuestReward now accepts a single bool (true or false) for faction instead of 2 int32s. If true, it will pull the faction hits assigned to the NPC in the DB (reversed, of course) and give you that as part of the reward.
Example usage:
e.other:QuestReward(e.self,copper,silver,gold,platinum,itemid,exp,faction)

(Credit to Cavedude)
2015-05-11 12:42:13 -07:00
regneq d1fbd086d7 Fully implemented QuestReward. (credit to Cavedude on EQMacEmu)
Syntax on NPC is:
e.other:QuestReward(e.self,copper,silver,gold,platinum,item,experience,factionid,factionvalue);

This will give you any or all of the rewards and their messages with one call, including the quest ding sound. Any item is sent to your inventory, like SummonItem does now. The coin message is generated by the client, and will give you a message for each coin type (You recieve 5 copper...). No way around that, but it's still useful if the reward only calls for a single type.
2015-05-11 11:35:54 -07:00
Michael Cook (mackal) c360aa9b0f Make use of Aggressive/Weapon PlayerStates
I HAVE NO IDEA WHAT THIS DOES, BUT LIVE DOES IT

Something to do with the animation system, all I know
2015-05-08 22:42:45 -04:00
JJ f68952c168 Update to some spell duration formulas (Shendare).
Filename fixes.
2015-05-08 22:23:50 -04:00
Michael Cook (mackal) bf4ff03641 Use PlayerState to generate stun particles 2015-05-08 00:59:38 -04:00
Michael Cook (mackal) 103d808925 Whoops, we do want to ignore the sender 2015-05-07 22:15:43 -04:00
Michael Cook (mackal) 53a139256d Merge pull request #408 from hateborne/master
Exporting ConnectNodeToNode and AddNode (from Pathing) to Perl
2015-05-07 18:39:27 -04:00
Michael Cook (mackal) 7bcfaf60ab Save PlayerState server side
We now send the PlayerState in the spawn struct to allow clients
to see other bard animations with instrument to be played if they
zone in after the bard equipped the instrument

OP_WeaponEquip2 and OP_WeaponUnequip2 renamed to OP_PlayerStateAdd
and OP_PlayerStateRemove

Still needs work: Get AI controlled mobs sending the correct
PlayerStates. (stunned, attacking, etc)
2015-05-07 18:34:19 -04:00
hateborne ebe2ea697e Exporting ConnectNodeToNode and AddNode (from Pathing) to Perl
Exporting ConnectNodeToNode and AddNode from pathing to Perl so devs can
more quickly build grids with Perl script(s).
2015-05-07 16:06:06 -04:00
Michael Cook (mackal) 8224a9e776 Fix bards not playing their instruments
This is a rather naive implementation, we should really save the
PlayerState server side so we can have newly zoned in clients
after the equip happened to see the animation. But until we find
all the places the PlayerState is sent, this is fine.
2015-05-06 23:40:01 -04:00
Alex be0507c4d3 Merge pull request #407 from noudess/master
The mob AT_Anim (as set in spawn2) was not working in some cases.
2015-05-06 17:30:56 -07:00
SecretsOTheP cfedf53dc0 *cone of shame* forgot a file 2015-05-06 18:53:41 -04:00
SecretsOTheP 4a4a0c5e8b * -Exported additional entity IDs for dropped items to perl upon EVENT_CLICK_OBJECT (clicker_id) and EVENT_PLAYER_PICKUP ($picked_up_entity_id)
-Identified Size / SolidType fields in newer clients and properly exported it to EQEmu for use in UF, RoF, RoF2 via perl accessors. (Should work in LUA, no testing was done though for LUA)
-Added a sanity check for size to objects. Any size over 5000.f seems to crash the newer clients' graphical engines and PEQ has some containers filled in with bogus values.
-Added the ability to return a value on perl function EVENT_PLAYER_PICKUP which sends a fake dropped item ID to the client to generate the appropriate client response so the item can stay on the ground and not be 'picked up'. Should also work in LUA, didn't test LUA.
-Renamed unknown008 and unknown010 to size and solidtype respectively for objects.
2015-05-06 18:50:08 -04:00
Paul Coene 77dca484fe The mob AT_Anim (as set in spawn2) was not correctly displaying in
various situations.

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

Repop also did not work, as no code was being called reliably to set
appearance and update the client based on code path and various flags.  This is also fixed.
2015-05-06 15:39:36 -04:00
JJ 690274338d Merge pull request #406 from noudess/master
Beginnings of fix to SendBuffDuration.
2015-05-02 10:15:21 -04:00
Paul Coene 59ab7071b7 Beginnings of fix to SendBuffDuration. 2015-05-02 07:00:52 -04:00
Michael Cook (mackal) 1438c1a9c3 Merge pull request #404 from noudess/master
Mobs that were blinded were being included in every use of IsFeared()
2015-05-02 02:59:39 -04:00
Michael Cook (mackal) 72702be820 Merge pull request #405 from gpanula/master
maxServerID null check (mysql)
2015-05-02 02:58:04 -04:00
GPanula 1ab3cf53e2 if ServerID is null, it will crash the loginserver when it tries to add the new server to tblWorldServerRegistration table 2015-05-01 22:53:36 -05:00
gpanula 79928c190b Merge pull request #1 from EQEmu/master
sync fork up with source
2015-05-01 22:49:57 -05:00
Paul Coene 6c8dfbdc4d Mobs that were blinded were being included in every use of IsFeared() which
was bad.  Blinded mobs can still cast spells when in melee range.  The
original fear code had no blind rolled into it, I added that.  This was an
overright.  I changed the macro to use bonues and fleemode instead of
looking at curfp.  Testing looks good to me.
2015-05-01 20:40:46 -04:00
Michael Cook (mackal) 1f56c7476e Merge pull request #403 from noudess/master
Fix proc messages for undead proc against non-undead.
2015-05-01 20:27:41 -04:00
Paul Coene eda74e66e0 Fix proc messages for undead proc against non-undead. 2015-05-01 19:22:06 -04:00
Alex 80fd71a406 Merge pull request #402 from noudess/master
Allow Kerran race illusions to be either gender.
2015-05-01 15:44:44 -07:00
Paul Coene 399942f6f4 Allow Kerran race illusions to be either gender. 2015-05-01 07:02:23 -04:00
Alex 3846dc2bbc Merge pull request #401 from noudess/master
Check to make sure we're a client before a CastToClient().
2015-04-30 16:59:39 -07:00
Michael Cook (mackal) 06f4fd49ef Implement mob and client melee push
New rules:
Combat:MeleePush turns melee push on/off
Combat:MeleePushChance is the chance that an NPC will be pushed
Clients are pushed every successful hit, need to verify or disprove this
2015-04-30 19:36:21 -04:00
Paul Coene eea667e22d Check to make sure we're a client before a CastToClient(). Missed this
on first patch.
2015-04-30 09:33:11 -04:00
Alex 8b4d601027 Merge pull request #400 from noudess/master
Now Npcs won't respond to hails if they can't see you.
2015-04-30 06:04:06 -07:00
Paul Coene a1960d4a4a Npcs won't respond to hails if they can't see you. 2015-04-30 08:00:36 -04:00
Alex d7c556c672 Merge pull request #399 from noudess/master
Monk wearing magical gloves can hit creatures that need a magical weapon
2015-04-29 18:55:29 -07:00
Paul Coene 2c4ca77ffc Monk wearing magical gloves can hit creatures that need a magical weapon
when fighting hand to hand.
2015-04-29 19:18:17 -04:00
Alex 7bde00c63b Merge pull request #398 from noudess/master
Noexpend spells like flame lick were expending.
2015-04-29 15:30:53 -07:00
Paul Coene 46d7019909 Spells like flame_lick were not requiring flame lick. Noexpend for
flame lick was not working.

Also fixed a log message with arguments reversed.
2015-04-29 08:26:59 -04:00
Alex 41f3b721d6 Merge pull request #395 from noudess/master
Some illusions and some NPC gear not showing up on zone-in & initial spawn if in zone when it occurs
2015-04-28 16:34:01 -07:00
Alex cafac36bed Merge pull request #397 from gpanula/master
Handle nulls in trusted server lookup(mysql)
2015-04-28 16:33:34 -07:00
Michael Cook (mackal) 0d84ede3d6 Allow /pet attack by mob name to work
ex. /pet attack a_snake
2015-04-26 13:35:36 -04:00
GPanula d7e3a33179 opps, lets use a valid ServeLisTypeID 2015-04-26 09:56:46 -05:00
GPanula c84f56f1f5 Avoid returning nulls when looking up if the server is trusted. Nulls will in the query results will cause the loginserver to crash 2015-04-26 09:43:05 -05:00
JJ 47c9690a32 Don't garble # commands. 2015-04-25 11:46:43 -04:00
JJ de57c94d3e Blocked spell negation fix. 2015-04-23 18:42:17 -04:00
Uleat c974b30192 Probable fix for 'Debug Assertion Failure' in Client::GarbleMessage() 2015-04-22 12:29:35 -04:00
JJ 23dd560a72 Don't delete packet when it is still referenced. Create a new packet instead for deconfliction. 2015-04-20 19:48:52 -04:00
Natedog2012 0eda3efe6a Ignore procs when setting recast timers 2015-04-11 22:49:29 -07:00
Michael Cook (mackal) a4ac2b3831 Added some comments about powersource [skip ci] 2015-04-10 21:23:29 -04:00
Michael Cook (mackal) ea240f7814 Fix sign issue with hate redux spells 2015-04-10 03:06:05 -04:00
JJ 0d4775a9df Adjust to safe_delete packets. 2015-04-07 19:57:36 -04:00
KimLS ff3cb9fc54 Merge branch 'master' into inv2 2015-04-07 16:29:07 -07:00
KimLS 56e7d1b0dc Okay finally merchant buying works -.- 2015-04-07 16:28:28 -07:00
JJ 0321bf72a5 Attempt to catch rare crash in zoneserver process. See http://www.eqemulator.org/forums/showthread.php?t=39549 2015-04-07 10:22:47 -04:00
Michael Cook (mackal) 739a7b6f75 Add decoder for OP_Animation for RoF/RoF2 2015-04-06 21:46:37 -04:00
KimLS 979590db9f Fix for lower than intended drop rates for drop limit loot tables after the min drop changes 2015-04-06 17:42:15 -07:00
KimLS 7341ecc185 Some work on implementing slot selection 2015-04-06 16:53:12 -07:00
Michael Cook (mackal) 7bd185b7b7 Fix RoF+ OP_Animation handling
That's handled in the patch file
2015-04-06 16:13:58 -04:00
Natedog2012 7662eaf983 All animation structs were backwards and poorly named.. RoF+ animations work properly 2015-04-06 03:11:04 -07:00
KimLS 78eb8747aa Merge branch 'master' of github.com:EQEmu/Server 2015-04-04 17:03:42 -07:00
KimLS fc1d6c0676 Fix for mindrop on drop tables sometimes not being fully respected 2015-04-04 17:03:28 -07:00
Natedog2012 7e1c296ecf Fix for RoF2 Bow shoot animation struct was off 2015-04-04 05:04:46 -07:00
Michael Cook (mackal) 51a314fa31 for whatever reason spell based procs generate casting messages 2015-04-02 14:54:11 -04:00
Michael Cook (mackal) b3efd8a817 Quick fix for RoF2 discs showing in song window
This is just a hack until someone does a proper solution
2015-04-02 13:42:47 -04:00
Paul Coene bf93d72a43 Added more changes so mobs armor will appear correctly (pc races only)
when the spawn vie gm command or normally with loot tables that equip.

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

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

The NPC gear thing.  Same story with BulkZoneSpawn,  Not sure why.  The data
is sent correctly.  So now we update the client zoning in (only them) with
what the NPCs are wearing.  Every othe client already is up to date.
2015-04-01 13:00:38 -04:00
Natedog2012 8bd22e8c38 2nd part to Alternate currency fix forgot to paste this back in 2015-03-29 02:16:23 -07:00
Natedog2012 e304e67cf1 Fix how Alternate Currency Reclaim and Create works if the player has 0 currency available 2015-03-29 01:00:57 -07:00
KimLS b6a01871d8 Fix for another bazaar problem 2015-03-28 23:38:41 -07:00
Alex a569e20110 Merge pull request #388 from iequalshane/master
Enable multiple NPC equipment materials
2015-03-28 23:34:43 -07:00
Alex 75146350fc Merge pull request #393 from noudess/master
Vendor message for rejection based on Deity
2015-03-28 23:34:23 -07:00
KayenEQ 2635d37095 Merge pull request #394 from KayenEQ/Development
sympathetic proc fix
2015-03-29 02:11:49 -04:00
KayenEQ a75f4e70a1 sympathetic proc fix 2015-03-29 02:11:02 -04:00
SecretsOTheP b6cc070633 Identified the Target Ring fields for RoF/RoF2 and added a perl accessor for the last target ring position received from the client.
Usage: $client->GetTargetRingX(), $client->GetTargetRingY(), $client->GetTargetRingZ()
2015-03-29 01:35:24 -04:00
Paul Coene 94d118fdf8 Some vendors would decide not to see based on deity, but messages were
picking the next best reason.  Added a message choice that seemed to make
sense for deity.
2015-03-27 17:12:39 -04:00
JJ 4dcb679c53 Manual merge of #387. 2015-03-27 16:40:02 -04:00
Alex ad9e9ba2d6 Merge pull request #392 from N0ctrnl/master
Added individual tradeskill skillup settings rules
2015-03-27 13:32:06 -07:00
KimLS 279ed8d86c Merge branch 'master' into inv2 2015-03-25 15:55:16 -07:00
N0ctrnl c4a7acb6d1 Update tradeskills.cpp 2015-03-25 12:04:03 -05:00
N0ctrnl e6835804af Update ruletypes.h 2015-03-25 12:00:14 -05:00
KimLS 9598ce45c9 Merge branch 'master' of github.com:EQEmu/Server 2015-03-24 16:37:25 -07:00
KimLS 9ef4825a72 Fix for gaps in path files during add 2015-03-24 16:37:12 -07:00
KayenEQ eed57ddf97 Merge pull request #391 from KayenEQ/Development
More sympathetic proc fixes
2015-03-24 07:13:58 -04:00
KayenEQ 202c59eb48 More sympathetic proc fixes 2015-03-24 07:13:22 -04:00
KayenEQ f86c6d9c5e Merge pull request #390 from KayenEQ/Development
Fix for sympathetic proc code to allow for it to be properly checked fro...
2015-03-24 01:43:26 -04:00
KayenEQ 340ed6c59d Fix for sympathetic proc code to allow for it to be properly checked from spell buffs. 2015-03-24 01:42:34 -04:00
KimLS 0cf5cca415 Other half of bazaar exploit 2015-03-22 23:18:08 -07:00
KimLS f021ee5491 Fix for traders not correctly setting price 2015-03-22 14:47:45 -07:00
KimLS 6c26bc9c8f Fix for alt currency reclaim exploit and fix for exploit in trader code where price != set price 2015-03-20 13:10:36 -07:00
KayenEQ 93eb727ade Merge pull request #389 from KayenEQ/Development
Fix for pets not receiving group buffs cast on them correctly.
2015-03-19 16:23:23 -04:00
KayenEQ 1c454d9569 Fix for pets not receiving group buffs cast on them correctly. 2015-03-19 16:22:17 -04:00
JJ 3b9f62f0a1 Exported ReloadZoneStaticData to perl and lua.
Usage:
(perl) quest::reloadzonestaticdata();
(lua) eq.reloadzonestaticdata();
2015-03-18 02:49:00 -04:00
KimLS 21ce5c6daa Merge plus some work on fixing stacking for merchants. 2015-03-15 14:02:13 -07:00
Akkadius cd82aae183 [eqemu_update.pl] Small line adjustment [skip ci] 2015-03-12 11:40:46 -05:00
Akkadius d08d50f4b5 [eqemu_update.pl] Set version back to 7... [skip ci] 2015-03-12 11:19:41 -05:00
Akkadius c5fb9ba6dd [eqemu_update.pl] Make it so script is still useable when eqemu_config.xml is not present with no DB configurations [skip ci] 2015-03-12 01:05:25 -05:00
Akkadius 2bcb964326 [eqemu_update.pl V7] Add Option 9) LUA Modules - Download latest LUA Modules (Required for Lua) [skip ci] 2015-03-12 00:33:52 -05:00
Akkadius b3a0370e71 [eqemu_update.pl] Linux compatibility adjustments [skip ci] 2015-03-12 00:08:10 -05:00
Akkadius 9344cfb4e3 [eqemu_update.pl] Add Option 20) to self update script [skip ci] 2015-03-11 21:06:58 -05:00
Akkadius bcf8b1af8e [eqemu_update.pl] Add Option 7) Plugins - Download latest Perl plugins
[eqemu_update.pl] Add Option 8) Quests - Download latest PEQ quests and stage updates
[eqemu_update.pl] Set version 5 of script
[skip ci]
2015-03-11 21:01:43 -05:00
Shane Lynch 2003efb5ab Enable multiple NPC equipment materials (part2)
Adding missing header from previous commit.
2015-03-10 21:59:31 -07:00
Shane Lynch 13743caf19 Enable multiple NPC equipment materials
This change allows #npcedit
armtexture/bracertexture/handtexture/legtexture/feettexture to work
properly and sets individual armor slot materials for NPCs.
2015-03-10 21:33:44 -07:00
Akkadius 6a241d44cc Fix small issue where eqemu_update.pl script would bomb at the very end of the maps download because of blank string [skip ci] 2015-03-10 22:59:07 -05:00
Akkadius b36d9fe115 Update world binary with eqemu_update.pl script version [skip ci] 2015-03-10 22:44:30 -05:00
Akkadius c313bd8d07 Re-rename UF.conf again [skip ci] 2015-03-10 22:40:20 -05:00
Akkadius be9066235b [eqemu_update.pl] Add Option 6) Download Latest map and water files 2015-03-10 22:37:17 -05:00
KayenEQ 1f540666f8 Merge pull request #386 from KayenEQ/Development
Fix to check if weapon actually has a valid proc before trying to proc.
2015-03-10 00:34:01 -04:00
KayenEQ 2cf2ef4fac Fix to check if weapon actually has a valid proc before trying to proc it. 2015-03-10 00:33:11 -04:00
KayenEQ c305582c77 Merge pull request #385 from KayenEQ/Development
perl $npc->GetCombatState
2015-03-09 06:40:55 -04:00
KayenEQ 69d02b7e72 perl $npc->GetCombatState 2015-03-09 06:40:13 -04:00
KimLS 00af95502e Wip merchant stuff, summoning should work now. 2015-03-06 15:53:15 -08:00
Uleat c96ee79b1e Added ';' to safe_delete_array(data) in ~BulkZoneSpawnPacket() 2015-03-06 04:26:26 -05:00
KimLS dda8ae4803 Basic item summoning, fix for saving not working 100 pct, deletion works, cursor queue should work too. 2015-03-05 18:03:37 -08:00
Alex bd9665e35b Merge pull request #381 from noudess/master
Allow server customization of swimming start value.
2015-03-04 19:37:01 -08:00
KimLS 316aa5ef73 Added current table to utils sql, though not formatted correctly yet since it's heavily wip 2015-03-04 19:35:10 -08:00
KimLS 9fcdf5367e Swap saving now works correctly except for cursor items which wont be reloaded correctly as we don't send cursor on login yet. Also added check for bag into another bag src bag needs to have nothing in it first. 2015-03-04 19:33:01 -08:00
Akkadius 0210d6f6bf Fix Spell Book Deletion 2015-03-04 02:40:49 -06:00
Uleat fe294e60b5 Fix for 'Invalid Slot ID' messages, item loss during corpse looting, and possible item loss during LDoN/Adventure merchant purchases 2015-03-03 04:08:52 -05:00
KimLS 972d3d8874 Fix for swapping a stack with another item that is not of the same stack size. Added some console visualization for testing and added basics of data modeling for inventory, saving soon. 2015-03-02 19:38:57 -08:00
Michael Cook (mackal) f95806b47b Move item caps that depend on spells/aas to be done after those are valid
Also fix Sleeper's Tomb avatar proc to be counted towards item ATK
2015-03-02 16:23:46 -05:00
KimLS abc5ddc5f8 Inventory Swap implemented and passes tests, though still want to verify it a bit more also does not yet save but that's next. Fixed a crash in memory buffer too. 2015-03-02 00:44:28 -08:00
KayenEQ 10f1e69ad8 Merge pull request #384 from KayenEQ/Development
fix to prior commit
2015-02-28 23:41:43 -05:00
KayenEQ d3249397f3 fix to prior commit 2015-02-28 23:39:44 -05:00
KayenEQ 69e9adf796 Merge pull request #383 from KayenEQ/Development
PERL remove proc functions
2015-02-28 23:25:23 -05:00
KayenEQ 4835b7063c PERL remove proc functions
$npc->RemoveMeleeProc(spell_id)
$npc->RemoveDefensiveProc(spell_id)
$npc->RemoveDefensiveProc(spell_id)
2015-02-28 23:24:19 -05:00
KimLS 14b5a8d817 Merge from master 2015-02-28 17:59:32 -08:00
KimLS 20cbe4af44 More work on swapping, almost there just need to write code for stack split/move/combining 2015-02-28 17:56:01 -08:00
Uleat 8dfa0a7220 Final tweak for light sources 2015-02-27 19:28:28 -05:00
KimLS 7870bf103a Working on can equip, putting it in the general inventory class. 2015-02-27 02:40:44 -08:00
KayenEQ 2b8bdb9158 Merge pull request #382 from KayenEQ/Development
Fix for ModSkillDmgTaken to once again work with (-1 = ALL skills)
2015-02-27 03:12:36 -05:00
KayenEQ 7851f272e5 Fix for ModSkillDmgTaken to once again work with (-1 = ALL skills)
Fix for perl GetModSkillDmgTaken
2015-02-27 03:11:04 -05:00
KimLS 18b4d068ea Early stages of swapping requirements in, should check for basic validity and equipable status 2015-02-26 22:09:29 -08:00
Uleat e15ee6e320 Change for 'general' slot range light source behavior 2015-02-26 21:05:06 -05:00
Uleat 1f0b86a0d5 Changes to how valid light sources are critiqued 2015-02-26 18:46:12 -05:00
KimLS 568938d003 Merge from master 2015-02-25 19:39:48 -08:00
KimLS 215861dd86 Added serialization differentiation 2015-02-25 19:36:10 -08:00
Michael Cook (mackal) e47f9d95b0 Fix title/suffix for RoF/RoF2 2015-02-24 16:26:25 -05:00
KimLS c62cff1ce7 Fixed test again. 2015-02-24 00:38:49 -08:00
KimLS 69612b44d4 OP_MoveItem encode/decode for RoF2, disabled other patches for now (until i get rof2 packets and mechanics working well enough to go back and fix those) 2015-02-23 22:45:50 -08:00
Uleat 0b6d71181f Added safety check to DraggedCorpses list iteration in Client::DraggedCorpses() 2015-02-24 00:52:18 -05:00
KimLS 8bce7893ed BulkSendItems now works on RoF2 2015-02-23 17:33:21 -08:00
JJ 318a664b09 No "sigs". [skip ci] 2015-02-23 19:57:47 -05:00
Paul Coene 180c4c3286 Merge remote-tracking branch 'upstream/master'
Conflicts:
	changelog.txt
2015-02-23 19:11:35 -05:00
Paul Coene 221c1f17c7 Streamline changes for Swimming Rule and add Sense Heading rules 2015-02-23 19:03:28 -05:00
Uleat d601a70546 Fix for RoF+ clients showing active 'Return Home' button when action is not available 2015-02-23 18:42:12 -05:00
Paul Coene ba49e5f696 Allow servers to set starting value for swimming instead of the hard coded
value.
2015-02-23 13:32:10 -05:00
Paul Coene 19fc02c284 Merge remote-tracking branch 'upstream/master'
Conflicts:
	changelog.txt
	world/worlddb.cpp
2015-02-23 08:13:09 -05:00
KimLS 4e4168852b Going to start work on SerializingItems for bulk inv sends 2015-02-23 01:50:50 -08:00
KayenEQ b05581499a Merge pull request #380 from KayenEQ/Development
perl npc last name related functions.
2015-02-23 03:53:41 -05:00
KayenEQ 9d866c1889 perl $npc->ChangeLastName(name)
perl $npc->ClearLastName()
Modifies NPC last names.
2015-02-23 03:52:43 -05:00
KayenEQ a567812f35 Merge pull request #379 from KayenEQ/Development
perl NPC function RemoveFromHateList(mob)
2015-02-23 00:41:13 -05:00
KayenEQ 167b6f5ebf perl NPC function RemoveFromHateList(mob) 2015-02-23 00:39:06 -05:00
KimLS ca278d029e Fix for Memory Buffer stuff, have yet to compile so not sure if that's enough. Partial work on RoF inventory bulk send 2015-02-22 19:38:44 -08:00
Uleat 2bed129037 Fix for tutorial button kicking client when re-entering tutorial (return home button for RoF/RoF2 issue still at large) 2015-02-22 22:27:58 -05:00
KimLS 273574d4db Added memory buffer plus tests to project, going to use it for item serialization 2015-02-22 15:37:11 -08:00
KimLS c71a5888ff Merge branch 'master' into inv2 2015-02-22 14:27:49 -08:00
KayenEQ a0ea6066ed Merge pull request #378 from KayenEQ/Development
Fix for perl defensive/ranged proc function
2015-02-21 23:06:19 -05:00
KayenEQ c8c2209617 Fix for perl defensive/ranged proc function
Minor fix to NPC ranged attack.
2015-02-21 23:04:24 -05:00
JJ eff818ca42 Manual merge of #376 for Erudite starting zones. 2015-02-21 20:46:19 -05:00
KimLS b3c53e5907 Merge master, fix conflicts 2015-02-21 15:30:15 -08:00
KimLS f511862004 Working working working on getting the basics setup 2015-02-21 15:21:45 -08:00
KayenEQ a537981ad0 Merge pull request #377 from KayenEQ/Development
Fix to allow for mana drain spells to work if client is full mana.
2015-02-21 06:52:14 -05:00
KayenEQ 32cb219e64 Fix to allow for mana drain spells to work if client is full mana. 2015-02-21 06:32:41 -05:00
Michael Cook (mackal) 4f3360aa49 More VS compile fixes (curse you clang/gcc!) 2015-02-21 01:51:41 -05:00
Uleat e61f647bf2 Fix for non-compliant assignment of non-integral type array 2015-02-21 01:20:13 -05:00
KimLS a90e9cf4c6 Refactoring 2015-02-20 20:15:58 -08:00
Michael Cook (mackal) 7afb29cf02 Fix another memleak in Client::TryReward 2015-02-20 21:10:53 -05:00
Michael Cook (mackal) 0a351bf6e1 VS didn't like this (it was illegal though, stupid gcc/clang) 2015-02-20 20:51:21 -05:00
KimLS 2d617f0ea7 Get/Put item implementation + tests 2015-02-20 16:24:32 -08:00
Michael Cook (mackal) 9a19d59cf7 Fix memory leak in Client::TryRewards 2015-02-20 18:47:46 -05:00
Michael Cook (mackal) c5a217842f Fix issues with claims and implement for RoF/RoF2 2015-02-20 16:29:56 -05:00
KimLS 551c0ef368 Basic arch work, doesn't make a ton of sense yet but it will 2015-02-19 23:34:43 -08:00
Uleat 921a292f5b Fix for new Titanium to UF client accounts not allowing character creation 2015-02-19 21:56:14 -05:00
KimLS a5274b9b6e InventoryOld in client has been unhooked from loading/saving 2015-02-18 20:29:58 -08:00
Trevius 3b45a66498 Fix for potential recursive loops if using RemoveFromHateList() within EVENT_HATE_LIST.
Some work on Bazaar searching, but not functional yet.
2015-02-18 21:32:18 -06:00
Uleat 414db873b7 Fix for tints not showing up at character select (world server) 2015-02-18 19:18:53 -05:00
Michael Cook (mackal) 7deb4d5e78 Fix potion belt loading 2015-02-18 18:28:46 -05:00
Paul Coene fe77c6fb3f Updated change log and made changes to worlddb.cpp so paineel characters
start in paineel again on Titanium.
2015-02-18 16:26:48 -05:00
KimLS fc2492a859 Merge from master, fixed conflicts 2015-02-18 13:18:21 -08:00
Alex aaa9595b59 Merge pull request #372 from noudess/master
A non magical weapon with an augment tagged as magic now hits as magic
2015-02-18 12:52:56 -08:00
KimLS 2d40adcf66 Partial revert/rewrite of b6dd604, should be possible to get things on a hate list that have zero hate again 2015-02-18 12:39:28 -08:00
KayenEQ 57ccddbb36 Merge pull request #375 from KayenEQ/Development
Fix for taunt.
2015-02-18 02:47:37 -05:00
KayenEQ b6dd604de2 Fix for taunt.
Added additional check to prevent recourse spells from recoursing themselves and crashing.
2015-02-18 02:46:13 -05:00
Uleat 911a515923 Fix for MySQL query failure 2015-02-18 00:22:05 -05:00
KimLS 701e194ece Renamed Item_Struct to ItemData 2015-02-17 18:06:22 -08:00
Uleat ea38fd2421 Merge pull request #374 from EQEmu/character_limit
Variable per-client character creation limits
2015-02-17 19:59:05 -05:00
Uleat e7fc6420f2 Added changelog entry for character limit 2015-02-17 19:35:50 -05:00
KimLS b75e6308dd Renamed Inventory to InventoryOld 2015-02-17 13:42:21 -08:00
Uleat 766641cd15 Implemented per-client character creation limits 2015-02-17 13:58:27 -05:00
Uleat e4be4d6895 Pre-purposed clean-up 2015-02-17 13:58:26 -05:00
Uleat 53a1faa36f Constant name and eqdictionary entry addition prior to per-client version limit activation 2015-02-17 13:58:25 -05:00
Uleat 20249cec67 Pre-purposed prep-work 2015-02-17 13:58:25 -05:00
Uleat dedbb3f6c8 Implemented higher bandolier and potion belt counts 2015-02-17 13:58:24 -05:00
Uleat 5a3b10a11c Constant name re-alignments prior to extended bandolier/potion belt activation 2015-02-17 13:58:23 -05:00
Uleat f1a25da065 Pre-purposed clean-up 2015-02-17 13:58:19 -05:00
Paul Coene f9dbea531c Added note about augs to changelog 2015-02-16 17:14:29 -05:00
Michael Cook (mackal) b48a712887 Send bard effect stuff for RoF2
Server side we still use the old system
Servers will need to update their items, PEQ's DB appears fine

RoF2 wasn't show anything, so we have to send it for them
2015-02-16 15:40:44 -05:00
Trevius 28be3b87b7 (RoF2) Bazaar Trading (Buying/Selling) is now fully functional. Bazaar (/bazaar) search is not yet functional. 2015-02-16 11:56:23 -06:00
KimLS db3feafe48 Fix for returning to bound zone you're already in 2015-02-14 20:05:54 -08:00
KimLS 9a78bac0d0 Changed save items back to true to be like old encode, no point tempting fate on that not breaking anything 2015-02-14 18:46:03 -08:00
KimLS f95e211d9b Fixes to OP_ZonePlayerToBind code, esp for RoF clients. 2015-02-14 18:32:49 -08:00
Michael Cook (mackal) 75809fc3bb Fix RoF2 Strategy 2015-02-14 14:21:50 -05:00
Trevius 811e8809cc (RoF2) Bazaar is now partially functional. RoF2 clients can start/end trader mode and other clients can purchase from them. No other functionality yet. 2015-02-14 11:09:36 -06:00
Paul Coene eaf5cea908 Fixed a comment 2015-02-14 10:29:43 -05:00
Akkadius 7ac7914f33 Set door zone to 32 bytes for consistency in copy [skip ci] 2015-02-13 03:50:01 -06:00
Akkadius da425195f9 Missed .sql file [skip ci] 2015-02-12 22:32:36 -06:00
Akkadius a544c681c7 Implement zone based gravity, required SQL DB change
- To test `zone` table `gravity` values, change the value and use #zheader <zoneshortname> to test
2015-02-12 22:09:17 -06:00
Akkadius fd45e8d21d Merge branch 'master' of https://github.com/EQEmu/Server 2015-02-12 20:52:24 -06:00
Akkadius 1966324112 Changed NPCTypes Data to bulk load when the zone loads or Repops, this bulk loading is stored in the npc_types cache 2015-02-12 19:57:24 -06:00
Michael Cook (mackal) d1be53bef2 Fix RoF2 disc stuff 2015-02-12 14:02:14 -05:00
Akkadius 16002eb62e ClientTaskState::GetTaskActivityDoneCountFromTaskID invalid Index return (Crash fix) 2015-02-12 01:54:41 -06:00
KimLS 2774d8e761 AddToHateList will no longer assert on other = nullptr, it will now just do nothing. Since the function can be called from perl/lua it's inapprops to let them just crash the server with an abort() from assert. 2015-02-11 21:56:58 -08:00
Trevius e07704e36b (RoF+) Bandolier no longer displays a Treasure Chest Icon when no Bandoliers are set. 2015-02-11 19:02:52 -06:00
Uleat 9f400c8d14 SharedBank Plat and Item HotKey fixes for RoF 2015-02-11 17:10:45 -05:00
Michael Cook (mackal) 2c31b348c3 RoF2 shared bank plat 2015-02-11 16:26:55 -05:00
Michael Cook (mackal) cefff6506f Fix issue with corpse spawn packets
Historically PC corpses used 3; it doesn't appear true with Tit+

Test case target a corpse and /ttell it :P
2015-02-11 13:20:32 -05: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
Paul Coene 8cde649e39 A non magical weapon with an augment tagged as magical now registers
as a magig weapon when attacking a creature requiring magic
2015-02-09 17:04:44 -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
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
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
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
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
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
Michael Cook (mackal) b590eb2dc4 Send item recast timestamps picking up ground spawns 2015-01-31 20:54:56 -05: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
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
KimLS 308562f939 Work around for msvc tuple bug 2014-06-16 15:09:17 -07:00
Michael Cook 64784be57e Merge pull request #159 from KayenEQ/Development
Additional functionality for damage shield and skill damage taken effects via npc_spell_effects  table.
2014-06-14 01:14:44 -04:00
KayenEQ f0e8d88178 Implemented 'special_abilities' 38 ALLOW_BENEFICIAL (Allows an NPC to recieve player buffs/heals)
Implemented 'special_abilities' 39 DISABLE_MELEE (Prevents NPC from auto attacking, will still aggro)
2014-06-13 17:46:34 -04:00
KayenEQ 5137b84ba8 Implemented SE_AlterNPCLevel 2014-06-13 14:51:26 -04:00
KayenEQ 216113e14b Additional functionality for damage shield and skill damage taken
effects va the npc_spell_effects table. See change log and wiki.
2014-06-13 05:32:41 -04:00
KimLS a1adda36fa Experimental changes to lua get_qglobal implementation to try to see if we can figure out this gcc x86 bug. 2014-06-08 15:18:48 -07:00
Michael Cook 5d074ea998 Update LS default entry in example config 2014-06-05 02:57:56 -04:00
KimLS e9c4613368 Merge branch 'master' into water_map_v2 2014-06-04 18:32:48 -07:00
KimLS 3690f93302 Fix for fear failing, removed #fear command because it was blank anyway, added a cmake command to change the default map/water/path directory 2014-05-31 16:32:15 -07:00
Arthur Dene Ice 97e1963674 Merge remote-tracking branch 'upstream/master' 2014-05-28 09:19:26 -07:00
KimLS dd73b82ec2 Fix for a problem with global player quests and hasquestsub 2014-05-27 16:16:06 -07:00
KimLS 8a5405060f Fix for string.h missing in water map 2014-05-23 17:39:16 -07:00
KimLS 83270d0983 Merge from master stuff 2014-05-23 16:10:23 -07:00
KimLS fd4343702f Merge branch 'master' into water_map_v2 2014-05-23 16:09:46 -07:00
KimLS 0483e8bd1b Removed the logging now that the issue is resolved 2014-05-23 16:08:02 -07:00
KimLS 39cbdbd5c2 Debug logs for map, also can actually turn perl off on zone 2014-05-23 15:54:26 -07:00
Michael Cook (mackal) 5af47c5951 Fix for Technique of Master Wu triple attack 2014-05-23 17:21:47 -04:00
Michael Cook (mackal) c447c251cd Fix issue with avoidance discs 2014-05-22 13:45:44 -04:00
KimLS 3a2ccd7521 Added loading of v2 regular maps, also #bestz will report water info even if a reg map failed to load. 2014-05-21 17:30:54 -07:00
KimLS 8c92271804 Initial v2 water map format. 2014-05-20 00:14:26 -07:00
Michael Cook (mackal) cd7b5e4dce Merge branch 'KayenEQ-Development' 2014-05-20 00:49:06 -04:00
Michael Cook (mackal) ecc3459d93 Merge branch 'Development' of github.com:KayenEQ/Server into KayenEQ-Development
Conflicts:
	changelog.txt
2014-05-20 00:48:44 -04:00
SecretsOTheP cc6dce25ad Identified the opcode/struct for guild ranks in Rain of Fear+ clients and created a temporary workaround for permissions until full DB support is added for the new permissions system. 2014-05-17 23:33:35 -04:00
KayenEQ 87ecdd38e5 Update for spell effect SE_LimitHPPercent, SE_LimitManaPercent, SE_LimitEndPercent
to utilize limit values. These effects cap your hp/end/mana at a set percent (base)
OR flat value (limit) which is ever is lower.
2014-05-14 09:27:47 -04:00
KayenEQ fc79521dd3 Rooted NPC's will no longer target players with Divine Aura effect if
they are the closest target and other targets exist on the hate list.
2014-05-14 08:40:18 -04:00
KayenEQ 7d8f1bef87 Missing rule SQL from prior update. 2014-05-14 07:59:12 -04:00
Uleat 10c43bfa51 Re-arranged Item.cpp functions to match their declaration order in Item.h (prep for upcoming changes) 2014-05-12 03:06:13 -04:00
Michael Cook f50b83b293 Merge pull request #152 from KinglyKrab/master
Command.cpp
2014-05-11 13:39:43 -04:00
Alex f89357f3c8 WIS fix.
WIS was actually setting MR.
2014-05-11 13:27:33 -04:00
Alex 1f43e69b4c Updated with fix. 2014-05-10 12:02:48 -04:00
KimLS 670c5e2e1a Fix for crash in loading loot drops when you hit the actual lootdrop entry limit of 1260 2014-05-09 15:06:33 -07:00
KinglyKrab e097722ec6 Update command.cpp
Removed an accidental repetition of atoi.
2014-05-08 13:42:21 -04:00
Michael Cook b54c50ba7a Merge pull request #151 from KayenEQ/AAupdates
Swarm pet critical/flurry bonuses
2014-05-07 23:14:33 -04:00
KayenEQ 7b1a084d39 AA/Item/Spell that allow pets to flurry and critical will now
also apply to owners swarm pets consistent with live.
2014-05-07 22:46:00 -04:00
Uleat 6477de8c4f Fix for test... (conn_state != client_state) 2014-05-05 21:59:21 -04:00
JJ 5c0a75071c SQL file rename (added '0') 2014-05-05 21:18:08 -04:00
Uleat 391eee4289 Test fix for 'random' zone crashes..particularly relating to MGB use. 2014-05-05 20:42:31 -04:00
Arthur Dene Ice 2d6670cfe5 Merge remote-tracking branch 'upstream/master' 2014-05-05 16:26:40 -07:00
Michael Cook (mackal) 2cf546accd Fix #150 2014-05-05 18:23:55 -04:00
KinglyKrab ffa8e5ff62 Update command.cpp 2014-05-05 15:58:36 -04:00
Michael Cook (mackal) 84f99b6d6b Added pointer check 2014-05-05 15:48:19 -04:00
Michael Cook (mackal) eb33e8ae11 Melee 'facing' code updated to client derived function
These new functions are derived from the client
The need was because the old function sometimes didn't line
up with the client generated messages.
2014-05-05 15:29:29 -04:00
JJ 5af0cb2844 Merge pull request #148 from KayenEQ/AAupdates
SlowMItigation sql fix
2014-05-05 09:58:06 -04:00
KinglyKrab 26255b79db Added new abilites to #npcedit.
I added the ability to modify stats, version, maxlevel, PhR, no_target_hotkey, adventure_template_id, npc_spell_effects_id, trap_template, special_abilities, scalerate, healscale, spellscale, and color.
2014-05-04 10:30:52 -04:00
KayenEQ f6e6f10716 Fix for npc_types table error setting SlowMitigation to null by default.
If you already ran the 4-12 update you do not need to run it again,
just run the new one.
2014-05-04 01:02:04 -04:00
Michael Cook b5ca3219a1 Merge pull request #146 from KayenEQ/AAupdates
Fix for AA stacking where first AA in series has only 1 rank.
2014-05-01 02:59:54 -04:00
KayenEQ fb1d4109a9 Fix for AA stacking where first AA in series has only 1 rank. 2014-04-29 22:23:25 -04:00
KimLS a2e86ebec5 Some compile fixes for older versions of C++ on windows 2014-04-29 17:49:17 -07:00
KimLS c6b637e5a5 Changelog 2014-04-29 13:05:45 -07:00
KimLS 0c9d640683 Merge branch 'master' into raycast 2014-04-29 13:01:26 -07:00
Michael Cook db63c947b8 Merge pull request #145 from KayenEQ/AISpellEffects
AI Spell Effects
2014-04-28 17:34:24 -04:00
KayenEQ 649f363917 fix sql 2014-04-28 17:18:23 -04:00
KimLS 6ad4a95cc6 And of course memset too way to not include the whole error message the first time jerk 2014-04-28 13:15:43 -07:00
KimLS d652cc8ea4 Raycastmesh missing malloc, free, NULL refs 2014-04-28 13:10:11 -07:00
KimLS 989bffee81 Merge branch 'master' into raycast 2014-04-27 14:36:05 -07:00
KayenEQ cd9cf9f52f sql hot fix 2014-04-27 04:27:02 -04:00
KayenEQ d3a9d509a8 remove old sql 2014-04-27 04:02:41 -04:00
KayenEQ 380cf8691a Implemented new table 'npc_spells_effects' and 'npc_spells_effects_entires'.
Implemented new field in 'npc_spell_effects_id' in npc_types.

These are used to directly apply spell effect bonuses to NPC's without requirings spells/buffs.
Example: Allow an npc to spawn with an innate 50 pt damage shield and a 5% chance to critical hit.

Please see the wiki page: http://wiki.eqemulator.org/p?npc_spell_effects_entries for details.

*NPC's can now do critical heals / damage spells if bonus is applied from table.

Required SQL: utils/sql/git/required/2014_04_27_AISpellEffects.sql
Note: 30 examples of spell effects have been included by default in this sql. Edited/removed as needed.
2014-04-27 03:57:14 -04:00
KayenEQ 62e48e7701 Merge git://github.com/EQEmu/Server into AISpellEffects 2014-04-27 03:29:15 -04:00
KimLS 5e81848445 Darwin caused ipc mutex to stop working for non-darwin, non-windows systems. Hopefully fixed 2014-04-25 18:45:19 -07:00
Alex e047d99a6c Merge pull request #138 from Corysia/master
Changes for intel Mac OSX build
2014-04-25 13:47:48 -07:00
cavedude00 d8ad337c0e Fixed a zone crash in spawn_conditions.
spawn_events changes, fixes, and additions.
2014-04-25 12:40:25 -07:00
KayenEQ 391b6ed515 fix 2014-04-25 09:07:48 -04:00
KayenEQ d64f762277 Developement Branch AISpellEffects.
Debug crash on NPC death.
2014-04-25 08:52:49 -04:00
Michael Cook 4d3ba5087d Merge pull request #143 from KayenEQ/master
Focus limit changes/additions
2014-04-25 02:39:19 -04:00
KayenEQ aba1acea9c Merge branch 'master' of git://github.com/EQEmu/Server 2014-04-24 04:30:31 -04:00
SecretsOTheP 9502f0aadf Revert "It's never ogre with these hatelist crashes.."
This reverts commit dffee38dc6.
2014-04-23 12:50:25 -04:00
KayenEQ 564c31c54d Improved SE_LimitCombatSkills will now more accurately determine if a spell is a combat proc.
SE_LimitInstant will now also work when set to include instant spells.

Optional SQL: utils/sql/git/optional/2014_04_23_FocusComabtProcs.sql
Note: Set to false, if enabled will allow all combat procs to receive spell focuses.
2014-04-23 03:54:54 -04:00
SecretsOTheP 6aa0c9d694 hatelist fixes to fixes to fixes 2014-04-22 13:37:35 -04:00
SecretsOTheP e726a82cc3 Merge branch 'master' of https://github.com/EQEmu/Server 2014-04-22 13:24:57 -04:00
SecretsOTheP dd1f5f6a11 More hatelist fixes. Trying to nail the crash :S 2014-04-22 13:24:07 -04:00
Michael Cook (mackal) f08799f7ff Add mez break message 2014-04-22 00:48:46 -04:00
SecretsOTheP dffee38dc6 It's never ogre with these hatelist crashes.. 2014-04-21 22:19:12 -04:00
SecretsOTheP fe542deb89 indentation is important 2014-04-20 21:00:50 -04:00
SecretsOTheP 8aa13b51f4 Hatelist crash fix 2014-04-20 20:54:21 -04:00
KimLS c16fe3c810 CMake flags to defining what is logged and where 2014-04-20 17:46:43 -07:00
KimLS 635d28cd65 Change to how quest signals work 2014-04-20 17:26:51 -07:00
Corysia Taware f915eed0f4 Apparently 0 is a vaid file descriptor in OSX 2014-04-19 21:45:54 -07:00
SecretsOTheP 87994ebfba smoke commits everyday 2014-04-20 00:26:54 -04:00
Akkadius 0b2281967b Added #command error message suppression for those who don't want to see 'Command is not recognized' constantly
- You need to have rule 'Chat:SuppressCommandErrors' set to true, this is set to false by default
	- Required SQL: 2014_04_18_Suppress_Command_Error.sql
2014-04-18 19:37:26 -05:00
Michael Cook (mackal) fc9e7a3a3b Fix linux compile issue with 884b0291 2014-04-16 12:44:02 -04:00
Akkadius 884b0291f7 Exported $client->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, msg) - Will be available for simple plugin use
Exported $client->ExpeditionMessage(THIS, ExpdID, Message) - In use with custom expedition mod that will be released soon
2014-04-15 12:00:33 -05:00
Michael Cook 8d8b3241d1 Merge pull request #141 from KayenEQ/master
Revision of SE_PercentHeal
2014-04-14 02:37:08 -04:00
KayenEQ 272bbdb4d2 Revision of SE_PercentHeal
Will now apply focus properly
Can now do damage if set to negative value
2014-04-12 21:15:13 -04:00
Michael Cook 168183201a Merge pull request #140 from KayenEQ/master
Revision of slow mitigation code.
2014-04-12 12:41:50 -04:00
KayenEQ aedd70f5fa removed commented out code. 2014-04-12 03:31:30 -04:00
KayenEQ f9b46b46b1 Revision of slow mitigation code.
Fix for the slow mitigation spam messages
Converted value from FLOAT to INT
Use SQL to update your npc_types table
2014-04-12 00:18:19 -04:00
Michael Cook 983c7a9c91 Merge pull request #139 from KayenEQ/master
-Implemented the ability to properly use live spell projectile graphics.
2014-04-10 14:06:53 -04:00
KayenEQ 48a9f05efb SQL 2014-04-10 00:55:31 -04:00
KayenEQ f0a0f0677f Rule to make player cast swarm pets untargetable with F8.
New npc_types field to allow any NPC to be untargetable with F8
Swarm pets will now be heal/buffable like live.
See change log for more details.

Note: The method used here to prevent
targeting is a hack but the only side
effect it turns affected NPC's names Yellow.
2014-04-10 00:47:20 -04:00
KayenEQ 35cd98c7a7 -Implemented the ability to properly use live spell projectile graphics.
This data is found in the player_1 field of the spells_new table.
-Rule for this set to be disabled by default.
-Enable IF your server uses an UF+ spell file
and your players use UF+ clients
-Otherwise your better off with alternative method/rules
already implemented so that all players can see the effect.
-Added ability for PERL ProjectileAnim function to only
need an IT#### and not an actual item id.
-If you want it in LUA somebody needs to add it.
- Change to wizard innate critical ratios based on parse data.
2014-04-09 05:17:36 -04:00
Michael Cook (mackal) 8b2f325cd0 Fix wiz innate crit issue 2014-04-07 21:21:08 -04:00
Corysia Taware 4d70cb20e7 Merge remote-tracking branch 'upstream/master' 2014-04-07 10:05:46 -07:00
Uleat 8e55b6618e Dual Wield changes - see posting linked in changelog.txt 2014-04-06 05:39:37 -04:00
Michael Cook (mackal) 7e75f7559a Fix issue with optional SQL 2014-04-06 03:03:18 -04:00
Akkadius 8ad1c1d8a9 changelog.txt 2014-04-05 18:12:58 -05:00
Akkadius fb03db8980 Merge branch 'master' of https://github.com/EQEmu/Server 2014-04-05 18:11:05 -05:00
Akkadius 11d5e4b6ca Fix for the Fix for the Fix: Rule Combat:OneProcPerWeapon was created so that you can revert to the original proc functionality
for custom servers that have balanced their content around having more than 1 aug proc on weapons. By having this rule set to 'false' you revert this functionality.
	This rule is set to 'true' by default as the original functionality from Live was intended to be
2014-04-05 18:09:12 -05:00
KimLS 8db6060089 Renamed errant sql file. 2014-04-05 16:07:13 -07:00
Michael Cook (mackal) 07625336fd Allow multiple aug procs if Combat:OneProcPerWeapon is false 2014-04-05 18:47:14 -04:00
SecretsOTheP 35fad4d5a7 Added a rule to enable multiple procs from the same weapon's other slots if a proc is deemed to trigger, Defaults to true. 2014-04-05 17:18:19 -04:00
Corysia Taware 0f67e93a0f Backward port to OSX 10.6 (Snow Leopard) 2014-04-05 10:24:28 -07:00
Michael Cook (mackal) 628a5764cc Merge branch 'master' of github.com:KayenEQ/Server into KayenEQ-master
Conflicts:
	changelog.txt
2014-04-05 13:00:19 -04:00
Akkadius 7cfc5b085e (Performance Adjustment) Removed AsyncLoadVariables from InterserverTimer.Check() in both zone and world. By watching the MySQL general.log file on mass zone idle activity, you can
see that the query 'SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= timestamp' is called every 10 seconds. This function is loading
	variables that are initially loaded on World and Zone bootup. When running a large amount of zone servers, the amount of MySQL chatter that is produced is enormous and
	unnecessary. For example, if I ran 400 zone servers, I would see 3,456,000 unnecessary queries from all idle or active zone processes in a 24 hour interval.
2014-04-05 03:38:58 -05:00
Akkadius fb3c6365e1 Test 2014-04-05 01:58:16 -05:00
KayenEQ 2c69dd7c93 Implemented proper functionality of SE_Screech
If you have a buff with SE_Screech with value of 1
it will block any other buff with SE_Screen that has
a value of -1, giving you an immunity message.
Example: 1383 Screech and 2785 Screech Immunity
2014-04-04 22:03:32 -04:00
KayenEQ 1d6e947387 Change log correction. 2014-04-04 21:32:56 -04:00
KayenEQ c26637de53 Merge branch 'master' of git://github.com/EQEmu/Server 2014-04-04 18:12:02 -04:00
KimLS d1ecb32652 Fix for crash in EntityList::MobInZone(Mob *who) when a dangling pointer is passed to the function. Which used to work without crashing but was changed at some point which can be triggered by quests in some situations. 2014-04-04 12:27:18 -07:00
KayenEQ 4b14ec53f1 Implemented Physical Resists consistent with live.
SQL to add new column 'PhR' to npc_types
Values to populate table based on extensive parsing.
Fixes for spell projectile code.
2014-04-04 01:59:55 -04:00
Corysia Taware f6046477b4 Changes for intel Mac OSX build 2014-04-03 14:10:03 -07:00
KayenEQ 2cdd50b9e9 -Implemented live like spell projectiles (ie mage bolts).
-See function in spells.cpp for more info on bolt behavior.
-This works reasonably well, but still room for improvements.
-Rules are for setting what item id is used for the projectile
since live uses an item id from SOF+ I added alternate item graphic
for titanium clients.
-Note: Max number of projectiles (set at 10) is a made up value in most
situations it would be nearly impossible to have more than 3 bolts
in the air at the same time. This values gives enough wiggle room that no
server should have an issue though.
-Small fix to SE_CompleteHeal
2014-04-03 04:25:45 -04:00
Trevius bb541eeb60 Fixed potential endless quest loop with EVENT_COMBAT and WipeHateList(). 2014-04-01 23:00:15 -05:00
Michael Cook (mackal) 8866b3170e Implement ability for NPC Merchants to open and close shop 2014-04-01 21:03:49 -04:00
Trevius 174cb1876a Prevented an endless loop crash related to EVENT_TASK_STAGE_COMPLETE. 2014-03-31 22:03:11 -05:00
Uleat 955f164efb Added optional rule for allowing bots to auto-update with their owner.
(Run the optional sql script to activate this feature)
2014-03-31 09:31:49 -04:00
Uleat d939820918 Fix for unconscious ability skillups.
Fix for zone crash related to item==nullptr in Client::SummonItem().
2014-03-31 03:21:22 -04:00
Michael Cook 12f8357373 Merge pull request #136 from KayenEQ/master
Spell Effect Updates.
2014-03-28 02:42:22 -04:00
KayenEQ cbe0e94ca7 Implemented SE_NegateIfCombat 2014-03-27 23:23:15 -04:00
KayenEQ 079d1ca870 String updates
Level requirment for Summon Corpse spells
2014-03-27 19:17:05 -04:00
KayenEQ 41903e8f09 Spell Effect Updates.
Implemented fail chances for SE, Gate, Succor, FeignDeath.
Minor fixes to haste bonuses to allow for negatives.
Rule added for Succor failure rate.
2014-03-27 05:14:54 -04:00
Michael Cook (mackal) 6906125725 Fix for wizard innate crits when they have no chance otherwise 2014-03-27 02:41:39 -04:00
Arthur Ice 11fbb86f8b merging upstream 2014-03-26 15:17:08 -07:00
Uleat cfdd48b2a3 Fix for bot guild script failures.
MOVED 'load_bots.sql' and 'drop_bots.sql' into this repository. (They are updated)
2014-03-22 05:17:38 -04:00
Michael Cook 2cef299775 Merge pull request #135 from KayenEQ/master
Further refinements to root, charm, mez and fear behaviors.
2014-03-21 14:00:37 -04:00
KayenEQ 02e291d4e8 Further refinements to root, charm, mez and fear behaviors.
Updates to a few rule due to new/corrected parse data.

All behaviors defined from weeks of extensive live parsing

Root Break Chance from DD now will scale based on level difference.

Root has a baseline aproximately 6% chance to break per check when target has
at 0% chance to resist spells.(ie green cons 60 levels lower with tash).

Fear has an approximately 70% chance to trigger a resist check each tick
to determine if it will fade early. (no baseline break chance)

Charisma less than 100, gives -20 resist mod to intial fear casts
Charisma from 100 to 255 will progressively reduce this mod to 0.
Charisma DOES NOT effect UNDEAD fears

Charmisma less than 75 significantly increase CHARM/MEZ/LULL resist rates.

Mez spells will now also use charisma resist check, as they do on live.
2014-03-20 00:53:49 -04: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
Uleat a84862897a 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 06:00:46 -04:00
Alex 2781f82d29 Merge pull request #134 from addtheice/master
Tests for hextoi, hextoi64, atobool
2014-03-17 22:34:58 -07:00
Alex f809f503c9 Merge pull request #131 from Siroro/master
Pull Request from Siroro/Server
2014-03-17 22:34:20 -07:00
Uleat 4170434b96 ** 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-17 04:53:47 -04:00
Michael Cook 65e8c2ffde Merge pull request #133 from KayenEQ/master
Rune revisions and fixes
2014-03-14 01:55:45 -04:00
Arthur Ice c239964427 Tests for hextoi, hextoi64, atobool
const hextoi / hextoi64 / atobool. null check for each. tests for each.
2014-03-13 14:45:54 -07:00
KayenEQ 21bdc8c5b6 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-12 05:14:19 -04:00
KimLS 39abb4f50c Changed how item faction bonuses are cleared. 2014-03-10 16:43:33 -07:00
KimLS 93105966b6 Added some missing bufffadebyx functions to lua mob 2014-03-09 18:41:50 -07:00
KimLS 2e4b4b94ed Memory leak work around for perl, should play better with events that call other events now. 2014-03-09 17:55:24 -07:00
Michael Cook bad963ddbc Merge pull request #132 from KayenEQ/master
Lull spell effect revisions
2014-03-08 12:49:23 -05:00
KayenEQ 9ecf98195c Lull spell effect revisions 2014-03-08 05:35:22 -05:00
KimLS 1476ebdfe6 Merge branch 'timer' 2014-03-07 20:00:11 -08:00
KimLS e25fd47828 Added some other timer functions to lua, removed perl memory leak stop gap for the moment until i decide how to fix it... 2014-03-07 19:59:44 -08:00
ukmeth0d d559a9ac0d Merge branch 'master' of git://github.com/Siroro/Server 2014-03-07 09:03:07 +01:00
Michael Cook e8394c2b01 Merge pull request #130 from KayenEQ/master
SE_Root and SE_RootBreakChance updates
2014-03-07 03:00:14 -05:00
ukmeth0d 3ec1c894ee 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-07 01:34:30 +01:00
KayenEQ fb3e3c8447 fix 2014-03-06 07:52:10 -05:00
KayenEQ 496f8151c9 root related bonuses for negate effect. 2014-03-06 07:44:39 -05:00
KayenEQ 55f5d4affa SE_Root and SE_RootBreakChance updates 2014-03-06 07:36:47 -05:00
Michael Cook (mackal) d22c8832f7 Renamed optional SQL 2014-03-06 02:39:54 -05:00
Michael Cook (mackal) d8138d2c56 Merge branch 'master' of github.com:EQEmu/Server 2014-03-06 02:38:53 -05:00
Michael Cook (mackal) 6c00eb9344 Renamed optional SQL 2014-03-06 02:38:22 -05:00
sorvani b0e24b346e Fixes #119 2014-03-05 22:19:55 -06:00
Michael Cook (mackal) 822a1b1003 Fix NPC swarm pets despawning on owner death
Fix NPC swarm pets IsAttackAllowed logic
2014-03-05 23:02:57 -05:00
Michael Cook (mackal) 3d5f99e14a Merge branch 'master' of github.com:KayenEQ/Server into KayenEQ-master
Conflicts:
	changelog.txt
2014-03-05 19:49:59 -05:00
Michael Cook (mackal) 0e8f62b480 Fixes #129 - Initialize pointer to nullptr. 2014-03-05 01:52:41 -05:00
Michael Cook (mackal) d70c4d7bbe Fix rogue's evade to be single target
This is also a lot nice performance wise
2014-03-05 01:34:17 -05:00
Michael Cook (mackal) 05df6c5b21 Fix QuestManager::RemoveAllFromInstance 2014-03-05 01:09:18 -05:00
sorvani 3f6036a512 missed a couple MT_Say 2014-03-04 23:11:33 -06:00
sorvani 58f42f1af1 Created RemoveFromInstance and RemoveAllFromInstance and exported to lua_general.cpp 2014-03-04 22:39:52 -06:00
KayenEQ 0ef95d8fe6 Root rule optional SQL 2014-03-04 06:43:57 -05:00
KayenEQ ea677389ad Root spell revision
Optional SQL
2014-03-04 06:42:41 -05:00
Michael Cook (mackal) 057e4603db Optimized EntityList::AddHealAggro 2014-03-03 15:01:52 -05:00
Michael Cook (mackal) a67aed9538 Implemented deadly strikes and increase rogue throwing crit rate
New rules:
	Combat:RogueCritThrowingChance, Combat:RogueDeadlyStrikeChance, Combat:RogueDeadlyStrikeMod
Rogue throwing crit rate is rather ridiculous. These rules might need tweaking
but they gave me fairly live-like results, even with AA added
2014-03-03 14:59:39 -05:00
Michael Cook (mackal) 00068158c1 Melee Crits, HoTs, DoTs messages should now filter correctly
Clients that also support seeing others DoTs will now see them
if they don't filter them.

    Note: HoTs 'mine only' doesn't seem to be different from 'show'
2014-03-02 22:10:32 -05:00
Michael Cook 9e4cf19e0c Merge pull request #125 from KayenEQ/master
Added lower bounds for chance of charm fading.
2014-03-02 20:40:34 -05:00
KayenEQ 84c85a4605 Added lower bounds for chance of charm fading.
Parsed on live to be approximately no lower
than 5% regardless of level difference.
2014-03-02 19:44:42 -05:00
Michael Cook c02ba17845 Merge pull request #124 from KayenEQ/master
Fix for SQL
2014-03-02 17:43:33 -05:00
KayenEQ f4b30c5861 Fix for SQL 2014-03-02 17:36:18 -05:00
Michael Cook 5d9e400e86 Merge pull request #122 from KayenEQ/master
Revisions to how charm works.
2014-03-02 12:55:41 -05:00
KayenEQ 39914c8eb4 debug msg removed 2014-03-02 04:24:51 -05:00
KayenEQ 7133357b1a Revisions to how charm works.
Optional SQL for rules
2014-03-02 03:46:51 -05:00
KimLS 629f9863ae Merge branch 'master' into raycast 2014-03-01 17:49:21 -08:00
Michael Cook (mackal) be57c66256 Add FilteredMessage do nothing mob virtuals 2014-03-01 14:02:57 -05:00
Michael Cook (mackal) e0edd7a290 Added FilteredMessage functions that better use ServerFilters
These functions are currently unused, but should work nicely.
I didn't add overloads to separate them from the others for now
2014-03-01 00:16:37 -05:00
Michael Cook (mackal) d46912fcdf Fix issue with mob procing 2014-02-28 22:06:10 -05:00
Michael Cook (mackal) 5c7484cea2 Switched some heal messages to StringIDs 2014-02-28 17:43:37 -05:00
Michael Cook (mackal) d525d23217 Shielding now uses StringIDs 2014-02-28 02:57:43 -05:00
Michael Cook (mackal) c030cfe0ad Fix zone crash with TryWeaponProc 2014-02-28 02:56:36 -05:00
Michael Cook (mackal) cb633e4b6a Crit Spells to StringIDs
Some minor clean up
Fix an mlog message
2014-02-28 02:25:17 -05:00
cavedude00 16afa277de Exported TrainDisc to Lua.
Updated idle timer names.
2014-02-27 23:21:57 -08:00
Michael Cook c18e9d9503 Merge pull request #121 from Siroro/master
Added rule Merchant:EnableAltCurrencySell
2014-02-27 13:11:40 -05:00
Siroro a490b2ff22 Fixed augs having 100% proc rate 2014-02-27 12:00:06 +00:00
Siroro f32a30fb9a Merge remote-tracking branch 'remotes/Eqemu/master' 2014-02-27 11:44:52 +00:00
Siroro 0f60fb06e3 Added rule Merchant: EnableAltCurrencySell - defaults to true, allows servers to disable the ability to resell items to alternate currency merchants. 2014-02-27 09:41:57 +00:00
Michael Cook (mackal) 01bd8bd9fa Reworked Weapon Procing
Broke up the logic to be a bit easier to follow
Procs should happen in the order that they do on live
Proc rates for spell buff procs should be more consistent with live
2014-02-27 03:19:25 -05:00
Uleat 489a6ffd16 Fix for 'sqrt' failures on vs2010 clients 2014-02-26 21:27:30 -05:00
cavedude00 f89d783308 Corrected 2014_02_26_virulentvenomAA.sql 2014-02-26 18:20:16 -08:00
cavedude00 1d6bd3cc5e Better flee runspeed calculation.
Added two new NPC special_abilities, ALWAYS_FLEE and FLEE_PERCENT.
Fixed an issue where a NPC could get stuck on a single coord in a rectangular roambox.
Added mindelay to spawngroup to allow for greater control of the roambox delay. SQL is required.
2014-02-26 18:06:16 -08:00
Michael Cook ea31a29f8a Merge pull request #120 from KayenEQ/master
Spell effect addition / fixes
2014-02-26 14:15:17 -05:00
KayenEQ 205dd8a1e5 Clean up and revision of proc chance bonuses
Combat Effects and WeaponProc bonuses will no longer affect melee spell procs
2014-02-26 05:16:37 -05:00
KayenEQ 8caac162b2 Spell effect addition / fixes 2014-02-26 00:09:59 -05:00
Michael Cook (mackal) 970b30b467 Added entity_list::IsMobSpawnedByNpcTypeID
Exported to both lua and perl
2014-02-25 23:15:14 -05:00
Michael Cook 746569b471 Fix HOTs timer when they're in the song window 2014-02-24 17:25:49 -05:00
Michael Cook (mackal) 20869a0aec Mobs will now face their target they are casting on
Note: they do not switch their target, this is how live does it
2014-02-24 02:31:40 -05:00
Michael Cook (mackal) 88ec04e5ca Merge branch 'master' of github.com:EQEmu/Server 2014-02-24 01:25:03 -05:00
Michael Cook (mackal) 33a8a398fe Add SpellType_Root to EngagedCast check 2014-02-24 01:24:27 -05:00
sorvani d887c77a1b Updated GetUnusedInstanceID to not recycle instance ID's unless it has reached max (65535) 2014-02-24 00:20:18 -06:00
Michael Cook (mackal) 60c280a521 Debuff/Slow on random mob on hatelist 2014-02-24 00:43:24 -05:00
Michael Cook (mackal) 837c02ffd6 Mobs cast root on random person on hatelist 2014-02-24 00:37:38 -05:00
Michael Cook (mackal) 6b94e08404 Make the random addition to time_cancast actually useful
It was in ms so adding 0-4 ms doesn't really do much
2014-02-24 00:27:26 -05:00
Michael Cook (mackal) 1f471aa9f9 Remove dist in Mob casting AI for roots 2014-02-24 00:22:02 -05:00
KimLS 951c321ba6 Partial port of der's map rewrite, no new azone format yet but it's coming. Will convert legacy map formats on the fly atm. 2014-02-23 21:17:28 -08:00
KimLS eabea6ea16 RaycastMesh work der started I'm going to pick up... 2014-02-23 17:14:50 -08:00
SecretsOTheP 14649ce611 Exported the client object SendTargetCommand to Perl. 2014-02-23 19:48:46 -05:00
cavedude00 c6377b93d5 Merchants will now keep track of charges sold to them properly so it is no longer possible to recharge items using merchants. 2014-02-23 15:55:26 -08:00
KimLS 5a6c25887a Export of eq.clock(), os.clock() isn't a good option on unix 2014-02-22 15:26:18 -08:00
KimLS 0e44a3625c Merge branch 'master' of github.com:EQEmu/Server 2014-02-22 15:04:18 -08:00
KimLS 476dc6e783 SetDestructibleObject exported to lua 2014-02-22 15:04:01 -08:00
Michael Cook 4ad2e5f9b5 Merge pull request #118 from KayenEQ/master
Spell effects , buff table changes
2014-02-22 02:40:00 -05:00
KayenEQ 2a28e88bcf not_reflectable -> reflectable 2014-02-22 02:23:37 -05:00
KayenEQ 44c833fbe6 fixes
Re implemented deathsavechanceAA ect as ExtraDIChance
Confirmed on live that this effect persists even if caster not in zone.
2014-02-22 01:34:16 -05:00
Michael Cook 026f019f58 Changed SE_SingingSkill to SE_Amplificatoin
This effect will now stack with other singing spell/item mods
like it does on live.
2014-02-21 22:57:15 -05:00
Michael Cook (mackal) 451d422b8a Keep track of base spell id for SpellProcs/PermaProcs
This will fix numhits issue for procs from spells
2014-02-21 04:04:18 -05:00
Michael Cook (mackal) 808977f69a (Performance) Corpse drag will now fetch entity by ID 2014-02-20 01:35:59 -05:00
KayenEQ 402a10c488 change log 2014-02-20 01:05:44 -05:00
KayenEQ 0caa1fd40b new spell effects
buff struct/tables - required sql
Removed: death_save_chance and deathsave_aa_chance (no longer used)
Added: dot_rune, caston_x, caston_y, caston_z
minor fixes
2014-02-20 01:04:34 -05:00
Michael Cook (mackal) 754d70d513 Merge branch 'master' of github.com:EQEmu/Server 2014-02-19 20:37:26 -05:00
Michael Cook (mackal) eb3a11b49a NPC vs Client damage revamp
Shot list of things that changed:
AC Softcap is based on your defensive skill (the scaling factors
are based on at least previously stated dev quotes)
The over AC Softcap returns are now based on exact calculations
made with the Armor of Wisdom AA.
Shielding item bonus and Melee mitigation spell bonus (nerfs)
NPCs damage will now correctly follow the
"damage base + (damage interval * [1, 20])" formula.

These changes might seem a little weird but I didn't want to change
any of the other damage situations since they were fairly good, but
they still could use a revamp as well.

New rules:
RULE_BOOL ( Combat, OldACSoftcapRules, false) // use old softcaps
RULE_BOOL ( Combat, UseOldDamageIntervalRules, false) // use old damage formulas for everything
RULE_REAL ( Combat, WarACSoftcapReturn, 0.3448) // new AC returns
RULE_REAL ( Combat, ClrRngMnkBrdACSoftcapReturn, 0.3030)
RULE_REAL ( Combat, PalShdACSoftcapReturn, 0.3226)
RULE_REAL ( Combat, DruNecWizEncMagACSoftcapReturn, 0.2000)
RULE_REAL ( Combat, RogShmBstBerACSoftcapReturn, 0.2500)
RULE_REAL ( Combat, SoftcapFactor, 1.88)

If you want to use the old calculations only, set
Combat:OldACSoftcapRules and Combat:UseOldDamageIntervalRules to true
2014-02-19 20:29:19 -05:00
Michael Cook 916b33f714 Merge pull request #116 from KayenEQ/master
Spell Effect additions / Minor fixes
2014-02-18 23:38:03 -05:00
KayenEQ 58c5003ad5 fix 2014-02-18 23:26:09 -05:00
KayenEQ 0ca01641ff fix 2014-02-18 23:24:14 -05:00
KayenEQ 0fc7dade47 Spell Effect additions
Minor fixes
2014-02-18 21:59:33 -05:00
Michael Cook (mackal) ab4c9581ad Fix NPC rampage to be more in-line with live
New rules:
RuleI: Combat, DefaultRampageTargets
	Set to 1
	If the specatk db entry has no extra param it will use this
RuleB: Combat, RampageHitsTargets
	Defaults to false
	If true, if number hit is still less than RampageTargets, try tank

If you want the old behavior still set DefaultRampageTargets to 3 and
RampageHitsTargets to true
2014-02-18 18:22:19 -05:00
Michael Cook (mackal) 6e474f22a2 Added single target HalveAggro and DoubleAggro
Both exported to perl/lua
pass the target you wish to change their hate.
2014-02-18 16:52:51 -05:00
Michael Cook 068bd57fbc Merge pull request #115 from gpanula/patch-1
Update tblWorldServerRegistration.sql
2014-02-17 23:37:26 -05:00
gpanula d7f9cdf6b6 Update tblWorldServerRegistration.sql
login server expects a "ServerTrusted" column
2014-02-17 19:45:47 -06:00
Michael Cook (mackal) a503c1af97 Fix Mob double/triple/quad check to work if a lower one isn't set 2014-02-17 20:38:40 -05:00
Michael Cook (mackal) 53a14381ba Only build flurry attack opts on success 2014-02-17 19:38:37 -05:00
Michael Cook (mackal) 169b9161b9 Performance: Changed RampageArray to be a vector of IDs 2014-02-17 17:34:02 -05:00
Michael Cook (mackal) 85f2b46fe9 Fix mod_spell_resist to be no-op by default ... 2014-02-16 23:58:18 -05:00
SecretsOTheP 0dfa1e192d Merge branch 'master' of https://github.com/EQEmu/Server 2014-02-16 19:16:45 -05:00
SecretsOTheP 88eb0dcdfc potential crash issue involving backstab & missing primary weapons resolved. 2014-02-16 19:16:18 -05:00
Michael Cook (mackal) bb8a82030f Post-inc to pre-inc 2014-02-16 00:17:25 -05:00
Michael Cook 16a6fc7d2c Merge pull request #114 from KayenEQ/master
Numhits update, additional spell table fields utilized.
2014-02-16 00:07:24 -05:00
SecretsOTheP 1ebf88abbb Fixed a performance issue involving std::string and EQStream identification.
Fixed a denial-of-service exploit in EQStream.
2014-02-15 23:50:32 -05:00
KayenEQ 93e9f29c77 update 2014-02-15 23:25:09 -05:00
KayenEQ 1b7271359e fix for LimitCombatSkills
fix for Extended Inginuity table data
2014-02-15 22:34:48 -05:00
KayenEQ 49df0a5d33 fixes 2014-02-15 08:16:41 -05:00
SecretsOTheP 46f8723314 Fixed an order-of-operations crash within the Quest Parser classes 2014-02-14 12:30:50 -05:00
JJ 5f02de1c95 Remove db name from sql. 2014-02-13 21:14:05 -05:00
sorvani 9d938cdd58 Cleaned up GetUnusedInstanceID logic and renamed instance_lockout* tables to instance_list* 2014-02-13 11:24:54 -06:00
SecretsOTheP e5fd0f5d75 Merge branch 'master' of https://github.com/EQEmu/Server 2014-02-13 12:02:37 -05:00
SecretsOTheP a3f9d5e707 bot.cpp was missing nullptr instead of NULL, that is now fixed.
hate_list.cpp potential crash fix related to center being nullptr
2014-02-13 12:02:26 -05:00
KayenEQ 5344679c7c Fixes for numhits system
Implementation of new spell table fields
Update and further implemention of CastRestriction
2014-02-13 07:41:57 -05:00
KimLS e09adbd13d Added cmake options to alter eqstream settings if one would so wish. 2014-02-12 15:51:20 -08:00
KimLS 275f9d6aaf Changed SpecialAttacks to an array instead of a map. Basic access was causing a hotspot. Brief testing doesn't show any obvious bugs but let me know if any prop up. 2014-02-12 15:26:08 -08:00
Michael Cook 9461067fdb Merge pull request #113 from KayenEQ/master
Bot fixes
2014-02-12 02:56:02 -05:00
KayenEQ 7623770613 Bot fixes for previous update. 2014-02-11 22:47:57 -05:00
KayenEQ 584278bf20 change log change test 2014-02-11 22:34:00 -05:00
KimLS 1ec0add76f Make sure some strings coming from the client are actually null terminated. 2014-02-10 21:00:25 -08:00
sorvani 51dff22b93 fix for npcthis crash in new spawn condition case. 2014-02-10 15:13:54 -06:00
Michael Cook (mackal) c85c4a969d Fix corpse_list check in remove mob 2014-02-10 13:41:55 -05:00
Michael Cook (mackal) 6a8a6e530b Some clean up related to the entity_list changes 2014-02-10 12:16:14 -05:00
Michael Cook (mackal) ce4f4995b5 Merge with master 2014-02-10 12:04:35 -05:00
SecretsOTheP a4260e54fe Merge branch 'master' of https://github.com/EQEmu/Server 2014-02-10 10:39:48 -05:00
SecretsOTheP f074ead7f6 demonstar55's entity list changes (slightly modified) and a crash fix for the #repop command used in rapid succession. 2014-02-10 10:39:12 -05:00
sorvani b819137e35 Merge branch 'master' of https://github.com/EQEmu/Server 2014-02-10 09:24:04 -06:00
sorvani 4d653caca3 Typos in spawn condition log messages 2014-02-10 09:22:55 -06:00
SecretsOTheP 75663774fe Fix for crashes related to #repop force and not clearing quest timers, resulting in a zone crash. Quest timers are now cleared on zone repop. 2014-02-10 06:45:33 -05:00
SecretsOTheP 5ec5b398ac tasks crash fix 2014-02-09 12:05:47 -05:00
sorvani 24c70a04ca Enhanced spawn conditions with new onchange option DoRepopIfReady 2014-02-09 00:08:09 -06:00
Michael Cook a602f70bf4 Merge pull request #111 from af4t/master
Resolve SQL error on attempt to insert Consumption of the Soul values
2014-02-03 07:51:03 -08:00
af4t 5733124c40 Resolve "unknown identifiers" in Bot::GetActSpellDamage 2014-02-03 10:37:11 -05:00
af4t 5216532e96 Resolve SQL error on attempt to insert Consumption of the Soul values 2014-02-03 09:45:22 -05:00
Michael Cook c8bead6bdd Merge pull request #110 from KayenEQ/master
Revision to spell damage calculations
2014-02-02 20:54:50 -08:00
KayenEQ 72cec5608d Revision to spell damage calculations 2014-02-02 23:23:41 -05:00
KimLS 8b1262b198 Export clear_npctype_cache as both lua/perl general functions. 2014-02-01 14:55:51 -08:00
KimLS 6e0a214bcc Compiler option for playing with npctype_cache as was requested for a feature. Not entirely tested may need some work. Currently defaults to old behavior on #repop. 2014-01-31 20:38:32 -08:00
Michael Cook 1ab19920f4 Merge pull request #109 from KayenEQ/master
Hot fix for issue with numhits not fading
2014-01-28 19:29:52 -08:00
KayenEQ 751d51c4d0 Hot fix for issue with numhits not fading 2014-01-28 22:27:45 -05:00
Michael Cook (mackal) 4a54e262f6 Bash/Kick stun will respect UNSTUNABLE now 2014-01-28 22:14:31 -05:00
Michael Cook (mackal) bd0c325762 Revamped Kick/Bash stun a little
Before bash/kick's ability to stun was completely useless
at higher levels, it also never stunned for any duration.

Bash/Kick will always stun if the target is under the
base immunity level (kick the attacker needs to be over 55 as well)

If over base immunity, there is a chance to stun, defaults to
Combat:NPCBashKickStunChance  (15%)

A Kick/Bash stun will last for 0-2 seconds
2014-01-28 17:14:27 -05:00
Michael Cook (mackal) de55f99174 Send the stun effect that goes around their head 2014-01-28 00:42:48 -05:00
Michael Cook 044cf8da1a Fix aaid for new req SQL 2014-01-27 20:55:11 -05:00
Michael Cook aa57642103 Merge pull request #108 from KayenEQ/master
New spell effects
2014-01-27 17:54:32 -08:00
KayenEQ d98ed8f419 New spell effects 2014-01-27 05:17:52 -05:00
Michael Cook (mackal) 4b07f4ffc5 Use the first overwritten buff slot like live does
Very minor change, but some people can be rather anal
about their buff orders, so this should help them out,
and its more live like :P
2014-01-26 13:38:12 -05:00
Michael Cook 5a526a89aa Merge pull request #107 from KayenEQ/master
Revised how dispel works.
2014-01-26 10:00:19 -08:00
KayenEQ 3dbf863255 Revised how dispel works. 2014-01-26 04:41:45 -05:00
Michael Cook (mackal) 17f0cffca6 Do not trip hacker detection if target is on their XTargets 2014-01-24 18:48:47 -05:00
Michael Cook (mackal) d51e60cf8b Mostly cosmetic changes to CheckAggroAmount funcs
Also changed some silliness
2014-01-24 15:28:54 -05:00
Michael Cook (mackal) 85d6db1de1 Switched some things to StringID defines 2014-01-24 02:05:26 -05:00
Michael Cook (mackal) 1bf794c29f Create hate on immune to fear due to level 2014-01-24 01:28:09 -05:00
Michael Cook (mackal) 0e8f7a4542 Correct Fear level immunity message 2014-01-24 01:26:47 -05:00
Michael Cook (mackal) b72fe81e28 Correct CheckAggroAmount calls in IsImmumeToSpell 2014-01-24 01:24:08 -05:00
Michael Cook a76889959f Merge pull request #106 from KayenEQ/master
Minor fix to numhits update / + new spell effect
2014-01-23 18:51:09 -08:00
KayenEQ 0166486e07 Minor fix to numhits update
New spell effect
2014-01-23 21:34:47 -05:00
Michael Cook (mackal) bb793e5582 Moved Assisting Exemption check up
This is just so assisting to a client will clear the flag
2014-01-22 01:41:26 -05:00
Michael Cook (mackal) a55c095d1b Forgot to make m_AssistExemption default to 0 2014-01-22 01:08:42 -05:00
Michael Cook (mackal) 3d47d912fd Fix /assist to only care about range to assistee 2014-01-22 01:00:48 -05:00
Michael Cook (mackal) cc02d94bdf Implemented ST_TargetAETap 2014-01-21 14:50:22 -05:00
Michael Cook 5121cc25a4 Merge pull request #105 from KayenEQ/master
Numhits system revised
2014-01-20 19:03:05 -08:00
KayenEQ e78d91104c Removal of test msg 2014-01-20 21:46:13 -05:00
KayenEQ 38c5c79218 Numhits system revised 2014-01-20 21:27:53 -05:00
Michael Cook (mackal) b065f973c4 Updated changelog.txt 2014-01-20 16:26:51 -05:00
Michael Cook (mackal) 13609c4f09 Move Mez Mastery to DB 2014-01-20 16:24:17 -05:00
Michael Cook (mackal) a93116aa19 Merge branch 'master' of github.com:EQEmu/Server 2014-01-20 15:58:39 -05:00
Michael Cook (mackal) 95a5c7d4cc Move Spell Casting Reinforcement to aa_effects 2014-01-20 15:57:44 -05:00
cavedude00 5d0136a4b6 Merge branch 'master' of https://github.com/EQEmu/Server 2014-01-20 10:58:33 -08:00
cavedude00 2c74b4f1ac Forgot changelog.txt in previous commit. 2014-01-20 10:58:08 -08:00
Michael Cook (mackal) 6bb8d87225 Fix name of SQL file 2014-01-20 13:55:52 -05:00
Michael Cook (mackal) 935ce8f968 Implement not_extendable spell field 2014-01-20 13:34:18 -05:00
cavedude00 70f994cda5 Live-Like weather. Big thanks to Robregen for figuring out the system!
Included in the required SQL is weather data pulled from NewZone live packets for up to PoP. An update to EQExtractor will be made to grab the rest of the data from existing collects.

Please note: Until weather data is grabbed for zones later than PoP, weather will not work in those zones.
2014-01-20 10:10:39 -08:00
Michael Cook (mackal) 3970bb5955 Export death event variables to Perl (Kingly Krab)
http://www.eqemulator.org/forums/showpost.php?p=227770&postcount=9
2014-01-20 02:01:52 -05:00
Michael Cook (mackal) 3159453e75 Fix OP_MobEnduranceUpdate for UF 2014-01-19 16:18:38 -05:00
Michael Cook (mackal) a1cb8d7ae7 Turn on NPC charm casting 2014-01-19 00:45:50 -05:00
sorvani 4191c195c1 added GetCharactersInInstance 2014-01-18 23:34:16 -06:00
Michael Cook (mackal) b16ce6f809 Tweaked down SE_CurrentHP aggro from buffs 2014-01-17 22:09:41 -05:00
KimLS 88ba962a4c Merge branch 'master' of github.com:EQEmu/Server 2014-01-16 13:08:24 -08:00
KimLS 0315d15ce8 Reversed event_command return value, may cause visual issues if you already updated your code but easy to fix. Return 1 instead of return 0 on event_command dispatch 2014-01-16 13:08:04 -08:00
Michael Cook (mackal) 12681f4623 Improve feign_memory_list thanks to C++11 2014-01-15 21:06:18 -05:00
Michael Cook (mackal) a7a4f9373d Revert change to SE_LimitEffect
Also fix for SE_SummonItem for unstackable charged items
(Still need to verify on live though)
2014-01-15 17:10:15 -05:00
Michael Cook (mackal) d2e66214f4 Add numhitstype to the spell structure 2014-01-15 01:19:03 -05:00
Michael Cook (mackal) 0a6d98b5e1 Fix mod rods 2014-01-14 22:24:01 -05:00
Michael Cook 497c10e513 Updated URL 2014-01-14 15:16:29 -05:00
Michael Cook (mackal) 53765ebc62 Fix some potential null pointer dereferences
I don't think there were any instances of these causing problems
but it's better to be safe than sorry.
2014-01-14 02:38:49 -05:00
Michael Cook (mackal) 4216627604 Prefer prefix ++/-- on non-primitive types
Postfix ++/-- might cause the creation of a tmp instance
that might be optimized out. Mights are bad. Prefix doesn't
have this problem.
2014-01-13 22:14:02 -05:00
Michael Cook 47c33f3b31 Merge pull request #104 from KayenEQ/master
Spell effect updates
2014-01-13 10:35:15 -08:00
KayenEQ 32359da1cc Spell effect updates 2014-01-13 05:03:21 -05:00
Michael Cook (mackal) f4e085c121 Some clean up in questmgr.cpp 2014-01-12 21:26:31 -05:00
KimLS 7972937072 /MP now set by default on windows. Option to turn it off for people who want/need eg: people with slower lower core systems. 2014-01-12 14:54:58 -08:00
Michael Cook (mackal) 5a6f2467f8 Added fclose to ExportBaseData 2014-01-12 00:58:47 -05:00
Michael Cook (mackal) 1822347a46 Add lua_say_link overloads 2014-01-11 15:07:11 -05:00
Michael Cook (mackal) 821ba8b701 Change faction messages to use String IDs. 2014-01-11 13:20:01 -05:00
Michael Cook (mackal) fdced53be1 Add pet size preservation like live
Run the SQL!!
2014-01-09 14:25:29 -05:00
Michael Cook (mackal) a394bf25b2 SE_SummonItem and SE_SummonItemIntoBag should work like live now
This isn't exactly like live since they seem to use something
else to decide how many to summon, but this should act the same
as live currently does.
2014-01-08 16:11:29 -05:00
Michael Cook (mackal) f2c1c9f70e Added required SQL for previous changes 2014-01-08 14:06:39 -05:00
Michael Cook (mackal) 5199364091 Make use of the suspendable spell flag 2014-01-08 00:24:33 -05:00
Michael Cook (mackal) 50caef0086 Implement persist death spell field 2014-01-07 23:29:46 -05:00
Michael Cook 8a04d8e2b7 Moved pet target checking to the attack command, which is more live like
Also, probably a little better than attacking then backing off :P
2014-01-07 17:02:35 -05:00
Michael Cook (mackal) e7032bc2c2 Implemented SE_SongModCap
Bard AAs Ayonaes Tutelage and Echo of Taelosia implemented as bonuses
Remember to run the SQL!
2014-01-04 19:20:59 -05:00
Michael Cook (mackal) d128ef1b97 Forgot an unknown 2014-01-04 14:54:18 -05:00
Michael Cook (mackal) 0645908762 Renamed all Unknown Spell Effects based on live
Note: These are all still commented out and I did not check for
any collisions. Feel free to rename these as they're implemented
2014-01-04 14:42:13 -05:00
Michael Cook (mackal) abbd0558a0 Added links to full spell effect list from a dev 2014-01-04 13:41:41 -05:00
KimLS c725ee84bb Fix for a potential buffer overflow on login server under very rare circumstances via Rogean. Fix for perl parser not clearing errors via sorvani 2014-01-03 23:41:11 -08:00
Michael Cook (mackal) a9b4e7819f Add some overflow protection for emotes
Clients crash if the emote is too large, despite the client
using a 1024 char buffer...
2014-01-04 01:34:58 -05:00
Michael Cook (mackal) ae68deb4f8 Added overload to Lua entity list RemoveFromTargets 2014-01-03 19:20:52 -05:00
Michael Cook (mackal) e4108d089f Fix missing paren. 2014-01-02 18:19:59 -05:00
Michael Cook (mackal) 4d9d50c9ac Fix stuns from beneficial spells (ex. Harvest) 2014-01-02 03:08:59 -05:00
KimLS b727cbbfe9 Luabind updated to be able to be compiled with Lua 5.2. Didn't really test it with 5.2 though since I'm still on 5.1. In theory it should work now though. 2013-12-28 18:19:12 -08:00
Alex 864338a881 Merge pull request #102 from nhaggmark/FixLoH
LoH and Harm Touch Fix
2013-12-27 21:19:54 -08:00
Nicholas Haggmark 6dc444d2d1 Committing update to zone/client_packet.pp which fixes a bug with Lay
on Hands and Harm Touch. Basically what is happening is that because
LoH and Harm Touch come in on spell slot 9 (ABILITY_SLOT), and because
ABILITY_SLOT is handled in the same block of code as standard memorized
spells, it was failing the MAX_PP_MEMSPELL check and always getting
silently interrupted. I broke DISCIPLINE_SLOT and ABILITY_SLOT processing
out into separate blocks which not only resolves this problem, but also
cleans up that processing a little bit.
2013-12-27 22:28:54 -05:00
Michael Cook (mackal) 13fcccefd5 Added support for merchant item filtering by class
Added column classes_required to merchantlist to allow
the merchant to only sell items to specified classes

Ex. (only example I know from live) To only allow poison supplies
to be sell able to only rogues, you would set classes_required
to 256.
classes_required defaults to 65535 (all/any class)

Remember to run the new SQL!
2013-12-26 16:29:09 -05:00
KimLS 30e8eac46e Hopefully this is a fix for issue #100 -- Uninitialized alt currency variable causing db corruption. 2013-12-24 13:21:11 -08:00
KimLS 646e1f541c Added lua export for Client:PlayMP3 2013-12-24 00:27:57 -08:00
SecretsOTheP a7c15ef598 Secrets: Added functionality to Perl/Server for $client->PlayMP3("name of file"). 2013-12-24 01:28:32 -05:00
SecretsOTheP bddb03ba3b Akkadius: Perl $client->SilentMessage("Message"); addition, this is a pre-req for a Perl plugin I've shared with EQEmu. This function essentially mimics a player speaking with an NPC - which is used in popup window responses 2013-12-24 01:09:35 -05:00
KimLS 2ac1f37b02 More work on Client Marquee messages. 2013-12-23 17:35:58 -08:00
KimLS a96f10b6aa More work on OP_Marquee. Should be enough to implement a function with it. Anyone wants to fiddle around with the unknowns and get them better documented they are free to. 2013-12-23 15:42:13 -08:00
KimLS ccf6b5ff68 Added prelim work on OP_Marquee incase anyone else wants to also have a go at it. Packet and opcode for SoD client figured out partially. 2013-12-22 22:37:41 -08:00
Michael Cook (mackal) 0d661204ed Fix MakeRandomInt for flurry and extraattack 2013-12-20 18:45:33 -05:00
Michael Cook (mackal) b0e50f13c9 Switched some stuff that made sense to Mob::InFrontMob 2013-12-20 18:43:52 -05:00
Michael Cook (mackal) d3ad253b51 Switched bard check in auto attack to IsBardSong 2013-12-20 18:43:16 -05:00
Michael Cook (mackal) 5ac23a2f8f Added facing check to auto attack LoS code
The Mob::InFrontMob check uses 56 degrees which is where the
client will generate the "You cannon see your target." message.
There were still a few weird angles that I was able to still
attack, but in like 99% of the cases it should work ...
2013-12-20 17:47:28 -05:00
JJ 9fff694382 Update per discussion on bfb17a2fb5 2013-12-19 19:39:34 -05:00
JJ 4512326fe8 Merge pull request #98 from KayenEQ/fixes
Spell effect additions... (will update further per notes)
2013-12-19 16:30:11 -08:00
KayenEQ bfb17a2fb5 Kayen: Implemented SE_ArcheryDoubleAttack (Chance to do an extra archery attack)
Kayen: Implemented SE_ShieldEquipDmgMod (Increase damage in primary hand if shield equiped)
Kayen: Implemented SE_ShieldEquipHateMod (Increase hate generated if shield equiped)
Kayen: Implemented SE_TriggerOnAmountValue (Trigger spell if HP/Mana/End bellow X value or num pet on target)
2013-12-17 21:51:13 -05:00
Michael Cook 53c124526c Merge pull request #97 from KayenEQ/fixes
Fix SE_BlockNextSpellFocus
2013-12-15 23:17:21 -08:00
KayenEQ 8007097aae Kayen: Fix to SE_BlockNextSpellFocus to make it functional again. 2013-12-16 00:53:00 -05:00
Michael Cook (mackal) 32e5ed5ad8 Merge branch 'master' of github.com:KayenEQ/Server into KayenEQ-master
Conflicts:
	changelog.txt
2013-12-15 23:51:21 -05:00
Michael Cook 65afbd4147 Moved BlockedBuffs check down for spell effects 2013-12-15 18:44:45 -05:00
Michael Cook 81e04ee185 Fix some indentation 2013-12-15 03:21:57 -05:00
KayenEQ 52722dc0c8 Kayen: Implemented SE_ReduceHealing (Reduces amount of healing on target by X amount)
Kayen: Implemented SE_CastonFocusEffect (Triggers spell as part of a focus, when that focus effect is used)
Kayen: Implemented SE_IncreaseHitDmgTaken (Effect is triggered when X amount of damage is taken)
Kayen: More fixes for various spell triggers/procs to now properly use their resist modifier.
2013-12-15 03:15:39 -05:00
Michael Cook b9c270fab6 Merge branch 'master' of github.com:EQEmu/Server
Conflicts:
	changelog.txt
2013-12-14 16:44:04 -05:00
Michael Cook 48db481fbb Fix blocked buffs from failing
When a buff is blocked it should just fail to be applied
instead of interrupting. Mana should also be eaten.
2013-12-14 16:42:12 -05:00
JJ 37cacd27b1 Changed enable/disable recipe to confirm change made. 2013-12-14 09:55:46 -05:00
Alex 466f541798 Merge pull request #95 from KayenEQ/master
Spell Effect fixes and additions
2013-12-13 20:48:24 -08:00
KayenEQ 9781af5696 Merge branch 'master' of github.com:KayenEQ/Server
Conflicts:
	changelog.txt
2013-12-13 22:47:04 -05:00
KayenEQ f6d5e8031f Kayen: Implemented additional functionality for SE_CurrentHP utilizing base2 values. (ie limit to body type)
Kayen: Implemented SE_MitigateMeleeDamageSP (Partial Melee Rune that only is lowered if melee hits are over X amount of damage)
Kayen: Implemented SE_SpellOnAmtDmgTaken (Effect is triggered when X amount of damage is taken)
Kayen: Fix for various spell triggers/procs to now properly use their resist modifier.
Kayen: Fix to mob->ModSkillDmgTaken(skill_num, value), setting value to -1 will now properly effect all skills.
2013-12-13 21:29:35 -05:00
Michael Cook c70ea4a621 Fix haste caps
Before these were mostly guess work, now based on what clients report
since they do their own calculations so are most likely correct.
2013-12-11 15:44:59 -05:00
Michael Cook 76ec6e4da2 Fixed crippling blow issues with berserker frenzy
Also added two rules to control when to enter/exit berserker frenzy
2013-12-11 01:49:51 -05:00
Michael Cook (mackal) cd2825288d Fix issue with SpellType_Charm case in AICastSpell 2013-12-04 00:52:12 -05:00
Michael Cook d95fdda30f Fix procing off of unattackable things
This /might/ be a little restrictive, but it should prevent easy
farming of bone chips from Boneshear etc
2013-12-03 16:12:13 -05:00
Michael Cook 4fdcf604f2 Added #showspellslist command to show us a mob's spells 2013-12-03 15:57:50 -05:00
JJ 02c9007765 Bandaid fix to CopyCharacter function. 2013-12-02 22:20:46 -05:00
Michael Cook 0f54830bc5 Stacking issues should be resolved now
I have a feeling this could be slightly better, but it works correctly.
2013-11-29 18:32:30 -05:00
Michael Cook d329fe0c12 Revert "Fixed issue with SE_StackingCommand_Overwrite"
This reverts commit a7ce852ca5.
2013-11-29 15:35:51 -05:00
Michael Cook a7ce852ca5 Fixed issue with SE_StackingCommand_Overwrite
SE_StackingCommand_Overwite uses the calc to figure out the slot to check.
Seems that calc 202 is slot 1 and 201 is actually something special. It
could be any slot, but need further investigation, for now, just ignore it.
2013-11-27 16:05:09 -05:00
Michael Cook b4fce37c14 Quick fix to issue with self buffs
casting_spell_targetid isn't guaranteed to be correct at that point in the code
Quick fix for now
2013-11-27 14:38:03 -05:00
SecretsOTheP 51181c8c8b AA fixes for PEQ's reported crash 2013-11-23 21:42:22 -05:00
KimLS 1c07ae9172 Fix for non-standard eqemu options in cmake, please don't do this in the future. Thank you. 2013-11-23 17:26:41 -08:00
SecretsOTheP 2f8cbb3a9d Fixes to the following crashes seen on PEQ:
http://www.peqtgc.com/phpBB3/viewtopic.php?f=1&t=14293&p=67404#p67404
http://www.peqtgc.com/phpBB3/viewtopic.php?f=1&t=14293&p=67105#p67105
2013-11-22 15:32:02 -05:00
Alex 093af6af0b Merge pull request #92 from clucksoft/master
suspend/ban kick fix
2013-11-20 02:36:27 -08:00
Michael Cook 0567073ca0 Quick fix for dot issue introduced in 765b5ee8
This could probably be done better
2013-11-19 18:34:20 -05:00
Michael Cook e33eb9d7b0 Partially implement dot_stacking_exempt
When it is 1 the spell will block it from other casters
Not 100% sure on when it's -1 so not currently used
2013-11-19 17:43:40 -05:00
clucksoft fd10ddf86d suspend/ban kick fix 2013-11-19 12:48:59 -08:00
SecretsOTheP edd4d47929 Merge branch 'master' of https://github.com/EQEmu/Server 2013-11-19 09:58:18 -05:00
SecretsOTheP f31b9ad98b Made the variable for disabling the logging system always default to ON instead of OFF. Changed the wording so it's less confusing.
This means that the debug logging information will not display at all by default, but the GM command logging will display enabled. If you need to diagnose the logs, simply turn them on at the expense of added CPU/Disk I/O
2013-11-19 09:57:52 -05:00
Michael Cook (mackal) 10ee3ea346 Fixed shared memory read me 2013-11-19 00:09:41 -05:00
Michael Cook (mackal) 62b7eda9e9 Added read me to shared_memory 2013-11-19 00:08:22 -05:00
SecretsOTheP 8b7984cf7d Merge branch 'master' of https://github.com/EQEmu/Server 2013-11-18 23:56:11 -05:00
SecretsOTheP 4a0e07a54c Fixes to actually use the cmake defs added in the previous revision 2013-11-18 23:54:24 -05:00
SecretsOTheP 6e520c8476 Added options to CMake to disable GM command logging or disable logging entirely while keeping GM commands enabled.
Cleaned up some logging
2013-11-18 23:49:12 -05:00
Michael Cook (mackal) 917a8ed389 Fix some errors in comments 2013-11-18 16:21:10 -05:00
Sorvani 86bba4ff0e changed aggro_range to leach_range and tether_range appropriately 2013-11-18 13:53:21 -06:00
Michael Cook (mackal) 300799fdc8 Added npc_types.assistradius, defaults to npc_types.aggroradius if set to 0 2013-11-18 12:44:39 -05:00
Sorvani 65e36e02fb fixed leash and tether to correctly used specified range. 2013-11-17 20:55:44 -06:00
Michael Cook 09dd3c1b37 Fixed an issue that arose from 78ab3471
Reworked how Mob::_GetMovementSpeed worked to fix an issue of walking
with a sufficiently high movemod.

Added a rule Character:BaseRunSpeedCap (default 158) to control the
cap on runspeed from buffs. Hardcapped to 225 for sanity's sake.
2013-11-17 19:37:49 -05:00
Michael Cook (mackal) 36233538fd Some whitespace fixes in zone/spells.cpp 2013-11-17 00:34:58 -05:00
Michael Cook 3d5b3d1e8c Added Mob::DoCastingChecks() which checks for various casting fail conditions while casting 2013-11-17 00:31:17 -05:00
Michael Cook 3c2ae8250f Merge pull request #91 from Leere/drink_message
Fix for auto-consume drinking message
2013-11-15 19:23:02 -08:00
Leere 6a95abb01f Fix for auto-consume drinking message 2013-11-16 03:40:35 +01:00
JJ 4c6fce5d5c Add a little more debug info to MQGate hack detection. 2013-11-15 19:31:43 -05:00
Michael Cook 08b5225a13 Merge pull request #90 from Leere/stacking_issue
Fix for a stacking issue with SE_StackingCommand_Block for druid skins
2013-11-15 13:15:53 -08:00
Leere 765b5ee826 Fix for a stacking issue with SE_StackingCommand_Block for druid skins 2013-11-15 18:03:13 +01:00
Michael Cook a40a34d2e8 Fixed Mob::CalcFocusEffect()'s SE_LimitEffect 2013-11-15 01:17:27 -05:00
Michael Cook (mackal) 983ee2d39b Merge branch 'master' of github.com:EQEmu/Server 2013-11-14 20:28:01 -05:00
Michael Cook (mackal) e1255af708 Fix Spell level restrictions
I made an incorrect assumption, fixed now
2013-11-14 20:26:58 -05:00
JJ b99d476754 Change INSERT to REPLACE 2013-11-13 21:59:38 -05:00
Michael Cook 23ab896dfc Fix last commit .... 2013-11-13 18:04:11 -05:00
Michael Cook d094a09ded Implemented Singing/Instrument Mastery as an AA bonus
Don't forget to source the SQL file!
2013-11-13 18:03:08 -05:00
Michael Cook 3f8ee533d3 Implement bard song instrument mod caps
The maximum bard songs can be effected by instrument mods is 3.6.
This is set by the rule Character:BaseInstrumentSoftCap which defaults to 36
Also fix Echo of Taelosia and Ayonae's Tutelage to increase the mod cap.
2013-11-13 15:07:34 -05:00
Michael Cook 0c3c84d711 Merge branch 'master' of github.com:EQEmu/Server 2013-11-12 22:32:44 -05:00
Michael Cook 79c53a41a8 Add some sanity for bard songs in snares ... 2013-11-12 22:32:03 -05:00
cavedude00 2ffa13c993 Compile fix. 2013-11-12 16:08:31 -08:00
Ludwig 8af48bbe48 Merge pull request #89 from httm/master
Update exp.cpp
2013-11-12 15:22:47 -08:00
httm 65c0772d37 Update exp.cpp
Replaced elseif statements in group experience calculation with single if statement for calculation when membercount between 2 and 5
2013-11-12 18:06:24 -05:00
Michael Cook 78ab347171 Fix walk speed calculation
Walk speed should be calculated as a movement speed reduction that
stacks with snares so it's possible to snare a mob FD and have it
not be able to walk back.
2013-11-11 23:55:43 -05:00
Michael Cook d83b94d231 Revert "Fixed non-attacking related movement while mobs are snared"
Did some testing, this isn't exactly the case on live.

This reverts commit ed6c46f7ff.
2013-11-11 21:06:48 -05:00
Michael Cook (mackal) ed6c46f7ff Fixed non-attacking related movement while mobs are snared
On live a nec/shd normal splitting involved snaring the mob you want
and FDing after they moved enough. The non-snared mobs would return home
and the snared mob would just sit there until it was no longer snared.
There is even a nice flash video! http://www.dzert.com/downloads/eq/fd02.swf
This might need some tweaking, but I'm not sure of any instances where it would
break things...
2013-11-11 18:18:12 -05:00
Michael Cook (mackal) 925e19b15c Fix database scheme comments that got clobbered on nullptr conversion 2013-11-11 15:37:20 -05:00
Michael Cook 2be71fc2ec Cleaned up common/spdat.cpp
There was a lot of stuff that I found that the level of readability.
I cleaned up a lot of the stuff, no functionality should be changed
unless where noted below.

* IsPartialDeathSaveSpell is now generic and no longer uses a hardcoded spell id
* IsFullDeathSaveSpell is now generic and no longer uses a hardcoded spell id

If these functions were actually used in the spell effects it would probably
fix issues with newer spells (which there are on live)
2013-11-10 21:37:01 -05:00
Ludwig bc2ee8dce8 Merge pull request #88 from Leere/bardmana_fix
Fix for bard mana regen
2013-11-09 11:20:44 -08:00
Leere 1deef77f07 Fix for bard mana regen 2013-11-09 19:36:32 +01:00
KimLS e00c57bc47 Fix to changelog conflict in merge. 2013-11-07 12:44:13 -08:00
JJ da3ba12560 Fix for #npcedit qglobal 2013-11-06 21:12:57 -05:00
KimLS f68b89b7d9 Prerelease commit 2013-11-06 13:48:35 -08:00
KimLS c944aafb39 Merge branch 'master' into base_data 2013-11-06 13:18:20 -08:00
KimLS 0e6c9820cd Importing client files works now 2013-11-06 13:17:44 -08:00
JJ b8d1838dcc Added in-game commands to enable/disable tradeskill recipes
-Commands: #enablerecipe recipe_id, #disablerecipe recipe_id
-Perl: quest::enablerecipe(recipe_id), quest::disablerecipe(recipe_id)
-Lua: eq.enable_recipe(recipe_id), eq.disable_recipe(recipe_id)
2013-11-01 23:55:17 -04:00
JJ aba535b589 Merge pull request #87 from Leere/recipe_disable
Add the ability to disable a tradeskill recipe
2013-11-01 08:33:13 -07:00
Leere cf117b1a4d Add the ability to disable a tradeskill recipe 2013-10-31 17:58:44 +01:00
Uleat 1bae570b68 Merge pull request #86 from EQEmu/uleat_cleanup_1
Uleat cleanup 1 - Note: The player profile blob struct code has been changed, but it does not affect the actual database blob size or alignment. That said, it probably wouldn't be a bad idea to backup at least the character_ table.
2013-10-30 14:39:26 -07:00
Uleat 1f0e263b6e Fix for compile failure in deity.h - Thanks V! (I should write a book on gcc:vs differences..I have found almost all of them...) 2013-10-30 03:49:32 -04:00
Uleat 08706055af Final prep for extending skill use range - client patch and database are ready..just need the code in-between 2013-10-28 13:06:49 -04:00
Uleat 28bcf074fc Client patch prep work for extending usable skill range 2013-10-28 05:00:49 -04:00
Uleat 1c8aaf97bc Changelog entry clarification..did not explain the issue clearly... 2013-10-27 13:41:39 -04:00
Uleat a891597f4c Prepped the client patch files for larger skill buffer size (not active) 2013-10-27 13:30:45 -04:00
Uleat e3805d5920 Converted SkillType typedef enumeration to SkillUseTypes enumeration 2013-10-27 13:03:41 -04:00
Uleat 3e6be197e6 Changed ItemTypes to ItemUseTypes 2013-10-27 09:04:52 -04:00
Uleat 0d5fc26841 Converted MATERIAL defines to MaterialUseSlots enumeration 2013-10-27 08:01:37 -04:00
Uleat df47e17c8e Changed ItemClass enumeration to ItemClassTypes enumeration 2013-10-27 06:38:34 -04:00
Uleat e53fa1d873 Changed ItemUseType enumeration to ItemInstTypes enumeration - naming conflicted with definition 2013-10-27 05:45:52 -04:00
Uleat d5152a0e59 Moved and expanded Deity-related code 2013-10-27 05:08:53 -04:00
Uleat 78e04dee99 Enforced naming standard on my recent changes 2013-10-27 04:17:08 -04:00
Uleat b3d117f8c1 Improper skill in use allowing riposte fix (Archery and Throwing allowing riposte check..no known bug reports) 2013-10-27 03:25:27 -04:00
Uleat cab77e83da High level debug (12) compile failure fix - I searched for as many as I could find with GrepWin, so there may be a few out there still 2013-10-27 03:13:10 -04:00
Michael Cook b4068823ed Merge pull request #85 from vexyl/fix1
Fix for healing unconscious players.
2013-10-26 14:13:00 -07:00
vexyl a694cf3079 Fix for healing unconscious players. 2013-10-26 13:46:03 -07:00
Michael Cook 3c09613d01 Changed the MT_Shout to MT_SpellFailure in Mob::SpellOnTarget 2013-10-24 17:38:46 -04:00
Michael Cook 36d336e69c Fix some memory leaks in Mob::SpellOnTarget
This should fix the memory leak introduced in the last commit and
a few lingering memory leaks, don't think they should break anything
2013-10-24 17:35:21 -04:00
KimLS 4270d77692 Merge branch 'master' into base_data 2013-10-21 16:42:32 -07:00
KimLS ec6c5519a5 More work on importing... I need my escape stuff from other branch for this though 2013-10-21 16:41:34 -07:00
Michael Cook a06fe1d02e Implemented buff level restrictions
Higher level buffs can't be cast on lower level toons.
The formula was based on information found here: http://samanna.net/eq.general/buffs.shtml
This behavior is controlled by the rule Spells:BuffLevelRestrictions which defaults to true.
2013-10-21 19:13:55 -04:00
Michael Cook 56ba87577b GetMinLevel will now return 0 for more cases
For some reason EQ uses 127 (melee classes), 254 (some AAs), and 255
in the class level for spells a class doesn't have
2013-10-21 19:10:01 -04:00
KimLS cdb29be4f3 Merge branch 'master' into base_data 2013-10-18 21:44:18 -07:00
KimLS 4ef9732e37 Compile fix 2013-10-18 21:43:47 -07:00
KimLS f2f4e55818 Import/Export util start 2013-10-18 21:23:45 -07:00
Uleat 403ac53a9e Renamed/expanded 'BagTypes' enumeration 2013-10-18 20:33:41 -04:00
KimLS cdcda943be Base data for hp/mana/end calcs, mostly but not completely correct 2013-10-18 00:09:00 -07:00
KimLS 2c25241763 Fix for lua say links, other branch taking longer than thought so making this its own commit 2013-10-16 15:47:08 -07:00
Sorvani 17729365db Merge pull request #84 from clucksoft/master
Update to spell timers fix
2013-10-13 09:34:04 -07:00
clucksoft 5d5dc1b544 update to spell fix 2013-10-11 22:54:35 -07:00
badcaptain 244c7e019c Changed dates due to time of commit. 2013-10-12 00:52:02 -04:00
badcaptain a7fea4fc69 Merge branch 'master' of https://github.com/EQEmu/Server 2013-10-12 00:47:55 -04:00
badcaptain 809925dc3e Bots- added out of combat bard songs & #bot bardoutofcombat on|off command to turn them on/off. 2013-10-12 00:47:15 -04:00
Michael Cook 98c835e470 Fix Titanium clients from not being able to start in Tutorial zone. 2013-10-12 00:29:44 -04:00
badcaptain 8ac4845930 Merge branch 'master' of https://github.com/EQEmu/Server
Initial check-in of bard bot in combat song code.
2013-10-11 23:43:38 -04:00
badcaptain 765f23febc Initial check-in of bard bot in combat song code. 2013-10-11 23:37:46 -04:00
badcaptain f1b70b3340 Fix Merc crash bugs. 2013-10-11 23:27:55 -04:00
JJ 549dfc9781 Allow use of Go Home button when Tutorial still selected in RoF. 2013-10-11 22:40:49 -04:00
Michael Cook 2019379a42 bool* foo = false should probably be an error, GCC 4.8+ at least warns about it, clang I think fails on it. 2013-10-11 00:00:21 -04:00
Michael Cook 15335509c2 Merge branch 'master' of github.com:EQEmu/Server
Conflicts:
	changelog.txt
2013-10-10 23:45:15 -04:00
Michael Cook da401acdb2 Fix mana and timer being used on single target buffs failing
Single target buffs shouldn't have their mana consumed or their
reuse timers set if they fail the Mob::SpellOnTarget call in
Mob::SpellFinished. Ex. Night's Dark Terror not taking hold
(no free slots) or Target running out of range.
Debuffs do not get this nice behavior.
2013-10-10 23:17:02 -04:00
JJ 8327f22f6f Revert change to EnterWorldPacket introduced on 22 April 2013 to fix inability to enter Tutorial or Go Home from character select screen. 2013-10-10 22:38:23 -04:00
SecretsOTheP 6154cfce99 Fixed zone shutdown (or #reloadqst) reinitalization of Perl. This should allow for Perl 5.14 and later to work on Windows under the new quest system. 2013-10-10 05:15:38 -07:00
Michael Cook c13c039721 Merge pull request #83 from AMDmi3/patch-1
Simplify conditional linking with libdl
2013-10-09 08:33:27 -07:00
Dmitry Marakasov 7ee417ab05 Simplify conditional linking with libdl 2013-10-09 19:27:52 +04:00
Michael Cook 3a95f81196 Fixed more instances of AA timers being eaten
Every time I touch zone/AA.cpp to fix timers it gets uglier.
This should fix the bug reported here: http://www.peqtgc.com/phpBB3/viewtopic.php?f=17&t=14125
It should also fix AAs not being reset when it when you have no buff slots free (confirmed on live)
2013-10-09 02:00:49 -04:00
Michael Cook 9a19a00bdc Added IsBuffSpell(spell_id). This will return true if the spell would end up having a duration, which will mean it would end up in one of the many buff windows on the client. This just makes sure the spell has a buffduration or buffdurationformula, which means the calculation will return a duration
Replaced all instances of CalcBuffDuration being used to determine if a spell was a buff with IsBuffSpell
Removed Mob::HasBuffIcon since it does the same thing IsBuffSpell does in a more convoluted way and had a rather missing leading name
Fixed issues that arose from the 10/03/2013 changes
2013-10-08 17:24:07 -04:00
Sorvani 24308aec6c fixed issue with stackable items summoning with 0 charges 2013-10-05 21:55:21 -05:00
Michael Cook 6b4b259753 Fix when the random +1 tick is added to nerf extension focus effects to where they should be 2013-10-03 23:04:58 -04:00
Alex bf77bc47d1 Merge pull request #81 from vexyl/master
Fix for segfault in Database::CheckStatus() when using MariaDB.
2013-10-02 21:19:59 -07:00
Michael Cook 2bde0b40bb Fixed issue with #showstats window, should probably be refactored to completely use stringstream or to_string whenever VS2010 support is dropped 2013-09-30 22:17:34 -04:00
Sorvani 478f7b8e49 Changed SummonItem to no longer recharge 0 charge items 2013-09-30 20:57:12 -05:00
Vexyl f289dffc48 Fix for segfault in Database::CheckStatus() when using MariaDB. 2013-09-28 10:38:50 -07:00
Michael Cook (mackal) d119ed058b Add /pet hold on and /pet hold off support for UF/RoF 2013-09-13 15:20:45 -04:00
KimLS fdb6f0fe84 Fix for training skill bailout when you can train the skill but not at the current level. 2013-08-29 15:52:17 -07:00
KimLS bef02b3511 Merge branch 'master' of https://github.com/EQEmu/Server 2013-08-29 15:46:56 -07:00
KimLS fcd9b525a8 Removed Common Profiler and Zone Profiler. They're well past outdated status and are just code bloat. 2013-08-29 15:46:40 -07:00
Uleat 590d8f4043 Fix for bot pet spell buff corruption 2013-08-20 20:55:19 -04:00
KimLS 406e2f84eb Fix for special atk sql missing a type.
Fix for a crash in quest manager setanim.
Fix for pfs_list not compiling on x64 windows.
2013-08-10 14:17:06 -07:00
josheb 926e2f7939 Merge pull request #80 from josheb/master
Fixed a regression with level 10 and 20 hit caps.
Added rules for aggro and hunger as well as script commands for manipulating hunger.
2013-08-06 14:55:25 -07:00
Tabasco b92a009539 Fixed some lua stuff I bork. 2013-08-01 19:37:16 -05:00
Tabasco cfab1c4649 Removed redundant Innate Metabolism checks. 2013-08-01 19:34:27 -05:00
Tabasco fc03ee94e2 Added rules for what int mobs need to not attack red cons and how much food and drink is taken per stamina update.
Added mod hooks for food/drink values and mob aggro.
Added quest functions for getting/setting hunger and thirst.
2013-08-01 19:24:15 -05:00
Tabasco 936c8cce4b Fixed a regression with level 10 and 20 hit caps. 2013-08-01 14:41:27 -05:00
KimLS 1f2145a45d Fix for special_abilities crash dealing with std::string in struct that was then memcpyed 2013-07-18 00:24:43 -07:00
Uleat 2331678312 fix for tortoisegit commit and overlay issues in dependencies/.gitignore 2013-07-15 23:22:17 -04:00
Sorvani c216ece72c fir for lua get_spawn_condition 2013-07-15 00:35:46 -05:00
KimLS 36e12110d5 Memset SpecialAbility before putting it into map. 2013-07-14 14:47:22 -07:00
KimLS aa5ac1518b Changelog for lua_packet 2013-07-13 14:03:55 -07:00
KimLS d472c05f5d Lua packet handler dispatch 2013-07-13 13:53:41 -07:00
KimLS 485fc2b2b7 Fix for bot compile 2013-07-13 13:53:13 -07:00
KimLS bdc83f4f37 Basic lua packet api, and it works too. Exciting I must say. 2013-07-12 22:21:43 -07:00
KimLS da178c9fba Compile error in AA.cpp 2013-07-12 18:57:49 -07:00
KimLS a1dc390f49 Windows compile error again, why wasn't this fixed on the second pass. I brought it up last time grr 2013-07-12 15:01:12 -07:00
Alex dfe63f87c3 Merge pull request #78 from j883376/cleanups
Code cleanups, take two
2013-07-12 13:36:02 -07:00
KimLS 239d4afb13 NPC Special Attacks should all work right: also huge explanation in changelog.txt 2013-07-11 13:44:45 -07:00
KimLS ab2c184b54 Merge branch 'master' of https://github.com/EQEmu/Server 2013-07-10 14:33:06 -07:00
j883376 31ede315f2 Fix Database::GetZoneID() 2013-07-08 19:02:54 -04:00
KimLS 3992ac02bb Rampage, Area Rampage, Flurry got new customizable effects. Part of that was adding a new set of stuff to attack. 2013-07-08 14:37:01 -07:00
SecretsOTheP e6ad26f03c Logfile cleanups. See changelog.txt. 2013-07-07 21:44:31 -07:00
KimLS 2f335372a0 Few warning and lua fixes, fix for summon not working on new system. Need to look at enrage as it doesn't appear to work right either and think it's timing related 2013-07-07 15:22:20 -07:00
KimLS 63d678ce29 Replaced npcspecialatk with special_attacks, needs more testing also gotta export new api for it as I can't remove the legacy one. Too many quests rely on the legacy functionality. 2013-07-06 03:45:06 -07:00
KimLS 0c675c33e2 Changelog too 2013-07-05 13:25:19 -07:00
KimLS 3c8d83f2a8 Perl will now capture return values (lua style), yeah I said I wouldn't be improving much of perl from here on but I said if I found a way I'd do it. 2013-07-05 02:56:53 -07:00
KimLS b11ed32bcf Removed quest queue from perl parser, should do events properly recursively 2013-07-05 01:46:24 -07:00
KimLS 9a63ee65c9 Added functions to eq to get the internals of the current quest_manager quest, also bug fix to a lua client function 2013-07-05 00:33:45 -07:00
KimLS 8b8742b242 Fix for Spell(int) not working in lua... 2013-07-03 15:20:42 -07:00
KimLS bccbc0f064 Merge branch 'master' of https://github.com/EQEmu/Server 2013-07-02 14:20:04 -07:00
KimLS b7fcd5b02a eq.follow() and eq.stop_follow() 2013-07-02 14:16:16 -07:00
Alex 56b9dda60b Update README.md 2013-07-01 14:12:31 -07:00
KimLS 1868d0e7a3 Lua changelog entry 2013-07-01 14:06:20 -07:00
KimLS 38b3433406 Merge branch 'master' into lua 2013-07-01 13:32:47 -07:00
Michael Cook 6d21823959 Prevent Monster Summoning from summoning a portal in bothunder 2013-07-01 16:03:04 -04:00
Michael Cook 02eb56a696 Fix Monster Summoning related to giants/cyclops 2013-07-01 15:22:07 -04:00
KimLS 6fe5c06fa0 Fix for trade being retained on logout/zone 2013-06-29 12:18:40 -07:00
KimLS 2c68e813e9 More selective filtering of lua libs, seed random set for lua interpreter, Release Canidate 2013-06-29 01:43:56 -07:00
KimLS e42c7a38a5 eq.attack_npc(npc_id) and eq.attack_npc_type(npc_type) added. 2013-06-28 16:43:57 -07:00
KimLS 7b5b1b2583 Added eq.attack(client_name) to lua. 2013-06-28 16:30:27 -07:00
j883376 0578f45490 Revert "Revert "Merge pull request #77 from j883376/cleanups""
This reverts commit d25205d9d3.
2013-06-28 04:25:44 -04:00
KimLS f46f7bd528 event_death_complete 2013-06-27 15:07:28 -07:00
KimLS 945cc2117f Fix for perl not loading events if they're chained, fix for items not being removed from inventory at an intuitive time in event_trade 2013-06-27 14:14:10 -07:00
KimLS a5db4310c6 Merge branch 'master' into lua
Conflicts:
	zone/merc.cpp
2013-06-27 12:53:47 -07:00
KimLS d25205d9d3 Revert "Merge pull request #77 from j883376/cleanups"
This reverts commit 4ff2efea43, reversing
changes made to e811e3975b.
2013-06-27 12:50:20 -07:00
KimLS d12c700bbf missing lua mob function 2013-06-26 22:23:31 -07:00
KimLS db70ad37dd Fix for quest::depop and quest::respawn not functioning 2013-06-26 15:43:55 -07:00
KimLS 9e1115f899 Merge master, pretty close to RC atm 2013-06-26 12:52:00 -07:00
Alex 82f4b4ee53 Merge pull request #76 from Zaela/respawn
RespawnFromHover scriptable framework
2013-06-26 10:13:56 -07:00
Alex 4ff2efea43 Merge pull request #77 from j883376/cleanups
Various code cleanups
2013-06-26 10:06:07 -07:00
KimLS d2a3c051e5 Added custom find lua cmake module to make building on windows easier 2013-06-26 09:57:06 -07:00
KimLS 16d3825df4 Fixed translocate, dispatch event now returns values properly, embparser now stores errors (what few it has) 2013-06-26 09:26:19 -07:00
KimLS 602b17f0e8 Fix for msvc compile, lua_bit.cpp wont try to compile if lua isn't set to build 2013-06-26 08:05:36 -07:00
j883376 488b2888a8 Fix uses of uninitialized variables
- Replace unknown008 array with two separate variables in Object code

- Fix mismatched safe_delete() of an array
2013-06-25 23:40:05 -04:00
KimLS 1480b8911f Sorta hacky work around for doing nukeitem in item quests. Added lua bitop library. Made excluding io/os optional 2013-06-25 14:51:06 -07:00
Zaela 72ef7f6557 Made default-on-error a little less bad. 2013-06-25 11:05:03 -07:00
Zaela f35afed89a one eof newline 2013-06-25 10:45:07 -07:00
KimLS ffe6494147 Forgot a semicolon in an important spot. 2013-06-24 13:00:50 -07:00
KimLS 342a4c1b17 Fix for clickies not working, changed order of dispatch events to allow nuking items from regular item events. Changed the lua modules path. 2013-06-24 12:42:42 -07:00
KimLS b904689a98 Added Spawn object to lua and functions to manipulate them 2013-06-23 14:48:36 -07:00
KimLS 0dc66b3dd7 Added quest areas (only accessable in lua) which work similar to proximities except are not attached to any one npc. Also fixed up the proximity code a bit to comply and got rid of my stupid ass fix for the deleting lists thing 2013-06-22 20:47:11 -07:00
KimLS bb1282de30 encounter events can now watch all events by all npcs/items/quests by registering themselves to watch -1, fix #74 2013-06-22 14:23:07 -07:00
Zaela c5e4cf35c0 Reworked RespawnFromHover framework to allow future customization (scripting) of respawn options.
Added event_respawn to be triggered when a client respawns from hover into the current zone (may not be set up correctly!).
2013-06-22 08:35:33 -07:00
KimLS 2529a7700e Fix for luabind not compiling (jumbers), bunch of api upgrades for lua, changed where spells and items load quests from, removed some old code. etc etc. 2013-06-22 01:32:41 -07:00
j883376 7e2806119b Fix some improper uses of printf formats 2013-06-22 00:55:54 -04:00
j883376 536e31d771 Change binary output path to use CMake variable
Tools that use CMake's EXECUTABLE_OUTPUT_PATH variable to
determine which binary to launch for debugging may be confused
by a relative path, so use CMake variable PROJECT_BINARY_DIR
instead.
2013-06-21 23:21:57 -04:00
j883376 2a39449f6e Fix exit code values
- Change all exit codes to match the standard of 0 for success
and 1 for error

- Add empty shared folder to utils/defaults for shared_memory
2013-06-21 22:54:28 -04:00
KimLS 7af04798fb Augment item events 2013-06-21 14:20:30 -07:00
j883376 76e25f75fa Fix a few memory leaks
- Rewrite zonename_array to use std::map rather than a pointer to an array
of character pointers

- Properly delete ZoneConfig on Zone shutdown

- Delete AdventureTemplates in AdventureManager destructor
2013-06-21 17:09:46 -04:00
KimLS 7b894a7c61 Added direct inventory access, and event_loot for items and event_weapon_proc for items 2013-06-20 14:03:22 -07:00
KimLS d8a1d84a49 Regression fixes, support for new lua arguments for many events 2013-06-19 22:56:46 -07:00
KimLS bb8d11a57b Merge from master 2013-06-17 11:47:45 -07:00
KimLS e811e3975b Mod functions should respect perl being turned off. 2013-06-16 21:04:36 -07:00
SecretsOTheP 68261e0308 Fixed an issue with RoF items that have Rec/Req above 100. Forgot commit message/changelog.txt. 2013-06-16 13:07:48 -07:00
SecretsOTheP d03e8d05ec 2013-06-16 13:04:48 -07:00
Alex 3f2815e30c Merge pull request #73 from hateborne/master
spell.max conversion from int16 to int32.  Make sure to re-run your shared_memory program.
2013-06-15 17:44:34 -07:00
KimLS 91b01c2fcc Image fix for OP_CastSpell exploit. 2013-06-15 13:08:32 -07:00
Hateborne 179063c863 spell.max convert int16 to int32
Converting the spell.max field to int32 to handle larger numbers in the
PercentalHeal field.
2013-06-13 17:59:24 -04:00
Uleat 28eb80e27f Added changelog message for predated commit (Bot procs and AE buff casting) 2013-06-12 22:04:07 -04:00
KimLS c0d37b2e04 Many fixes to regressions in perl and cleaning up the final interface 2013-06-12 15:04:26 -07:00
KimLS 0dbd0478c0 Merge of hatebourne's stuff 2013-06-12 12:11:56 -07:00
KimLS 56b41c882b Redoing event item api 2013-06-07 02:26:17 -07:00
KimLS 8c3cce822a Added three new events 2013-06-06 14:29:45 -07:00
KimLS b87d4a3e5f Removed perl stuff from mod stuff 2013-06-05 17:00:59 -07:00
KimLS cec60feba9 Merge master 2013-06-05 16:58:11 -07:00
Alex 29c0c4801c Merge pull request #70 from josheb/master
Mod functions updates and fixes
2013-06-05 16:54:36 -07:00
KimLS a3738dc131 Changed EVENT_TRADE to pass iteminst instead of variable ids, perl will not have changed at all but lua now passes the iteminsts in the trade object. Also redid a bunch of the spell quest stuff 2013-06-05 16:47:49 -07:00
KimLS 6d0c0aee7d Last work to make lua parser feature complete, time to start fixing bugs and cleaning up design and maybe adding some features here and there. 2013-06-04 23:22:03 -07:00
KimLS 1b290b577d Fix for potential nullptr when using base lua class constructors in debug mode, also added eq.get_qglobals and removed automatic export of them (will do this for a lot of other automatic exports) 2013-06-04 16:48:32 -07:00
KimLS 85c7e1b059 Player event export plus lua_object api 2013-06-03 16:49:47 -07:00
root a8de7e9ffc Removed comments from mod_client.cpp for erroneous 255 stat cap. 2013-06-03 17:08:58 -05:00
KimLS bc82bff4b4 Lua doors api 2013-06-03 00:08:41 -07:00
Tabasco ff091e940c Lua corpse API 2013-06-02 19:05:40 -05:00
KimLS 55a964267e Raid/Group lua stuff, renamed corpses 2013-06-02 13:47:52 -07:00
KimLS d14608356d Added all lua objects i need for now, a ton of API too 2013-06-02 00:15:26 -07:00
root 7fca5a7a89 Merge branch 'master' of https://github.com/EQEmu/Server into EQEmu-master
Conflicts:
	zone/client.h
	zone/mod_functions.cpp
	zone/mod_functions_base.cpp
2013-06-01 19:17:23 -05:00
josheb ac5926bdfe Merge pull request #7 from josheb/dungeoncrawl
Sync mod_functions updates
2013-06-01 08:56:19 -07:00
root b16cf57510 Cautionary XP mod update. 2013-06-01 10:49:58 -05:00
root 851c842529 Updated mod_functions and mod_functions_base with new hooks and descriptions 2013-06-01 10:44:32 -05:00
KimLS a1080fdb2d Merge branch 'master' into lua 2013-05-31 16:41:44 -07:00
KimLS 344feb7484 Finished exporting lua general functions for now, also had to fix some const char* stuff 2013-05-31 16:40:55 -07:00
root 567c17cc9e Berserker updates. 2013-05-28 20:27:17 -05:00
root 0ee54f1117 Added mod_spell_cast and various mod_functions fixes. 2013-05-28 19:58:40 -05:00
KimLS 69f1187722 Small amount of general lua functions 2013-05-28 13:12:42 -07:00
Alex 39426789f4 Merge pull request #69 from j883376/login-db-crash
Fix loginserver crash on DB connect failure
2013-05-27 17:33:57 -07:00
KimLS 49c3a81e18 More lua work, client should be completely exported barring any more bugs that crop up. Starting work on getting the rest of the general functions 2013-05-27 17:24:31 -07:00
Tabasco fa0196b987 Fixed some mod function bugs and stat caps. 2013-05-27 15:32:59 -05:00
j883376 44477a0d47 Fix loginserver crash on DB connect failure 2013-05-27 12:35:45 -04:00
root 510ce16f0e Added reloadworld console command 2013-05-27 08:46:50 -05:00
KimLS 1e7c5bb9b7 Bug fix in event_trade export, exported augments too. Also need to fix overloads 2013-05-26 15:56:55 -07:00
KimLS 850fa5aecc Exported client functions to lua, going to work on npc next 2013-05-26 12:44:33 -07:00
KimLS 79a9d2112a Retransmit support added back in (stupid compile flags), prelim work on lua_client stuff, took out a few redundant or non-working functions 2013-05-25 01:08:30 -07:00
KimLS d25d8187b6 Failed merge on a specific file also fix for std and string changes in my embparser 2013-05-24 01:41:33 -07:00
KimLS e47de5deed Merge with master 2013-05-24 01:23:58 -07:00
Alex 52b8c0e078 Merge pull request #66 from j883376/gcc-changes
GCC Changes
2013-05-24 01:16:10 -07:00
KimLS 3c7f7beb6d Red. include string 2013-05-24 01:10:19 -07:00
KimLS ee7d7c6f24 Merge branch 'small_stage_cleanup' of git://github.com/addtheice/Server into addtheice-small_stage_cleanup 2013-05-24 00:56:20 -07:00
KimLS a66ef1b778 Function for retrieving a qglobal or list of them 2013-05-24 00:52:28 -07:00
j883376 b47597b813 Merge branch 'master' of git://github.com/EQEmu/Server into gcc-changes 2013-05-23 21:12:07 -04:00
j883376 d6ff01d63c Fix several GCC warnings 2013-05-23 20:22:42 -04:00
KimLS a3e24b6854 Merge from master 2013-05-23 12:50:34 -07:00
Arthur Ice fcb769e353 Merge branch 'master' into small_stage_cleanup
Conflicts:
	common/EQStream.cpp
	zone/client.h
2013-05-23 12:49:22 -07:00
KimLS ce63503bab Changed a bunch of lua stuff, as well as modified a bunch of generic item quest stuff 2013-05-23 12:43:21 -07:00
KimLS 815c3dc73f Merge branch 'master' of https://github.com/EQEmu/Server into string 2013-05-23 12:35:21 -07:00
KimLS efe7092995 Merge and a few cleanup / bug fixes 2013-05-23 12:35:00 -07:00
Alex 12ddd30f67 Merge pull request #64 from af4t/master
Windows compile fix: bots
2013-05-23 12:30:06 -07:00
af4t 879ddb208b Windows compile fixes (bots) 2013-05-23 12:17:30 -04:00
Kemmler 70dab7d920 Merge pull request #6 from EQEmu/master
Sync 2013-05-23
2013-05-23 03:53:22 -07:00
KimLS 2840e32853 Merge branch 'master' into string 2013-05-23 00:56:27 -07:00
KimLS 320494c83d Windows compile fix 2013-05-23 00:55:29 -07:00
KimLS e6fba5ba82 Merging 2013-05-23 00:31:02 -07:00
Arthur Ice 5255c236c3 added std:: to a lot of locations which where
missed and added NOMINMAX to cmakelist
2013-05-22 23:55:49 -07:00
Arthur Ice e5d4b35a32 Spelling fix in a comment. Nothing else. 2013-05-22 22:21:28 -07:00
Arthur Ice b4e65a8840 tabbify and cleaned up std issues and min/max problems. 2013-05-22 21:27:37 -07:00
Arthur Ice ac78841e55 Removed MakeUpperString since it's not used anywhere. 2013-05-22 19:41:16 -07:00
Arthur Ice 54914a970e Merge branch 'StringFormatting' into small_stage_cleanup
Conflicts:
	common/Item.cpp
	world/client.cpp
	zone/net.cpp
2013-05-22 18:55:06 -07:00
Arthur Ice ea2a1651d5 Merge branch 'master' into StringFormatting
Conflicts:
	common/debug.cpp
2013-05-22 18:07:39 -07:00
Arthur Ice 5c6e95f921 Merge branch 'master' of https://github.com/EQEmu/Server 2013-05-22 17:38:26 -07:00
Kemmler 555e21c3c7 Merge pull request #5 from EQEmu/master
Sync 2013-05-22
2013-05-22 16:31:52 -07:00
Michael Cook 0fdfe025cb Remove 'using namespaces std' fixes #61 2013-05-22 16:17:19 -04:00
root 930fda07c9 Added exp for level mod, misc fixes. 2013-05-22 07:19:09 -05:00
Arthur Ice 41dcd5bc29 Should only need dumpItemCollection and dumpBagContents internally so made them protected. 2013-05-21 23:34:55 -07:00
Arthur Ice d7546e09ee broke up dumpInventory into methods, changed it to dumpEntireInventory (dumpInventory now only dumps a small peice) 2013-05-21 22:53:22 -07:00
Arthur Ice e9577db9c2 removed DBMemLeak.cpp and DBMemLeak.h, unused. 2013-05-21 22:51:19 -07:00
Arthur Ice cdc7b2a000 weird #ifdef pattern, reorganized and cleaned it up. easier to understand now. 2013-05-21 00:36:34 -07:00
Arthur Ice a7084b4d6c reorganized includes to allow for consolidation and cleanup. 2013-05-21 00:36:34 -07:00
Arthur Ice 64212176ec removed unneeded defines. snprintf and friends are used within StringUtil.h 2013-05-21 00:36:34 -07:00
Arthur Ice 70eb226fea changed from using a preset char buffer to string. 2013-05-21 00:36:34 -07:00
Arthur Ice c18d868d03 set many pointers to nullptr instead of 0. 2013-05-21 00:36:34 -07:00
Arthur Ice 9002bfb9a0 corrected incorrect use of StringFormat and did basic indenting fix. 2013-05-21 00:36:00 -07:00
Arthur Ice 26143750f3 removed visual studio 5,6,7 specific code except in tinyxml and StackWalker. 2013-05-20 22:40:10 -07:00
Arthur Ice 3c11f8f26b simplified the includes to be a bit clearer. 2013-05-20 22:20:01 -07:00
Arthur Ice dcec112b91 reordering includes to make it easier to simplify. 2013-05-20 22:17:56 -07:00
Arthur Ice 7b0de551e1 removed char buffer in 'UpdateWindowTitle" 2013-05-20 22:15:33 -07:00
Arthur Ice d41331d948 Apparently the original implementation from facebook was incorrect.
Fixed it, sadly this does mean we need to call vsnprintf twice.
Once to find out the size involved, a second time to apply.
2013-05-20 17:51:08 -07:00
Tabasco 1e5d6b0e34 Chat filter tests 2013-05-20 16:24:10 -05:00
KimLS 1363d5d209 Lua fixes, need to get perl working again D= 2013-05-19 23:39:18 -07:00
Arthur Ice f1a487f606 Merge branch 'master' into StringFormatting.
Cleaned up the problems. Tested on Linux. Still need to test on windows.

Conflicts:
	common/CMakeLists.txt
	common/MiscFunctions.cpp
	common/MiscFunctions.h
	common/debug.cpp
	world/Adventure.cpp
2013-05-19 18:56:21 -07:00
Arthur Ice fca9c1458b Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	common/debug.cpp
	common/debug.h
	zone/PlayerCorpse.cpp
	zone/beacon.cpp
	zone/client.cpp
	zone/net.cpp
	zone/tribute.cpp
2013-05-19 16:19:22 -07:00
KimLS 69bad31019 Cleanup of some lua code, initial work on encounter_quests 2013-05-19 12:13:44 -07:00
KimLS 17954dd8fe Exported a ton of functions to mob 2013-05-18 14:42:54 -07:00
Tabasco 7b21e3be72 Added server man quest events and command parsing. 2013-05-18 11:21:19 -05:00
KimLS 7adcf6d3e5 Some quest item and spell work, took out that stupid multiquesting code -> use your brains that's completely doable entirely in quests even perl 2013-05-17 17:10:38 -07:00
KimLS bec6acc01e Hatelist will now use a std::list so i can avoid a list copy when exporting it to quests. Cause frankly two copies was absurd 2013-05-17 10:48:59 -07:00
root 1b9647f57e Updated mod_functions with DC examples 2013-05-17 12:27:18 -05:00
root 2d1805c983 Mod function updates - better documentation 2013-05-17 12:20:49 -05:00
KimLS 1f265af1e7 Hate list stuff, need to make it more efficient 2013-05-17 09:49:02 -07:00
KimLS 3ddc61420b Added id to spells so i can export them to lua correctly. Also made the lua_classes less messy by having them all derive from Lua_Ptr instead of reimplementing functionality 2013-05-16 23:24:47 -07:00
KimLS b10de6f4e7 More work on lua parser - gonna get all events firing correctly by end of week also put all arguments into an event table object 2013-05-16 15:35:55 -07:00
Kemmler 7185ff25be Merge pull request #4 from EQEmu/master
Sync 2013-05-16
2013-05-16 05:11:13 -07:00
KimLS f2e0f9cca5 Changed a bunch of event names, made event_death returning more seamless and fixed up trading quests to have them always face target outside the parser 2013-05-15 18:43:06 -07:00
josheb 55c66022eb Merge pull request #6 from EQEmu/master
sync
2013-05-15 17:00:08 -07:00
KimLS b26df187e6 Merge from master terrible 2013-05-15 16:01:13 -07:00
KimLS 312100e1c6 Azone fix for new compilers and possible fix for x64 2013-05-15 14:37:30 -07:00
j883376 f51f6e00c4 Add install paths to CMakeLists 2013-05-15 17:04:08 -04:00
KimLS 9e13a2271c Merge conflicts 2013-05-15 13:22:46 -07:00
KimLS 6887ae18ae Merge branch 'master' into lua 2013-05-15 13:07:30 -07:00
KimLS 2336aa0e4f Changed quests/templates to quests/global. Changed default location for plugins to quests/plugins instead of quests. Added a single interpreter for lua instead of multiple ones. 2013-05-15 13:00:46 -07:00
KimLS 3cc1065873 more lua, gonna work on single interpreter soon 2013-05-14 19:05:49 -07:00
KimLS 38521e0009 Lua - basic npc quests work and i need a damned break for a bit 2013-05-13 21:56:42 -07:00
KimLS 20fc585b5e Cleaned up lua glue macro a bit 2013-05-13 14:40:15 -07:00
KimLS 7b23c8dc75 Working on last of Mob:: that can be implemented atm, added safety checks to the lua functions that will be optional later in dev mode. Also changed quest return types to integers instead of doubles as that was non-intuitive 2013-05-13 14:29:50 -07:00
Kemmler b0fb8aa4be Merge pull request #3 from EQEmu/master
Sync 2013-05-12
2013-05-12 20:00:28 -07:00
josheb b9a32185d7 Merge pull request #60 from josheb/master
CHA scribe logic fix.
2013-05-12 19:44:07 -07:00
root 0f880177e4 Merge branch 'master' of https://github.com/josheb/Server 2013-05-12 21:36:13 -05:00
root 7683252896 CHA scribe rule logic fix 2013-05-12 21:35:21 -05:00
Kemmler ca9a1de44c Merge pull request #2 from EQEmu/master
Sync 2013-05-11
2013-05-11 21:49:12 -07:00
KimLS 2445576ae8 Merge branch 'master' into lua 2013-05-11 20:35:49 -07:00
KimLS 7648f071f1 More lua work - more mob implementation 2013-05-11 20:34:04 -07:00
KimLS 60c93595f5 Missed a file save 2013-05-11 16:39:22 -07:00
KimLS 70998d25e3 More lua work - changed how i get return values off the stack and do calls 2013-05-11 16:37:03 -07:00
KimLS fa908040ca Lua work on api - entity and mob, lots more to go 2013-05-11 13:51:57 -07:00
Michael Cook 73a4e87379 FreeBSD support and clean up of unnecessary ifdef FREEBSD 2013-05-11 14:32:14 -04:00
josheb 3a31ad55fb Merge pull request #5 from EQEmu/master
sync
2013-05-11 07:03:50 -07:00
KimLS d1f7935ee2 ...trying out boost with luabind 2013-05-11 01:29:58 -07:00
Arthur Ice b19755a313 For windows compile, moved definve of va_copy 2013-05-11 00:46:46 -07:00
Arthur Ice 9a139a7604 missed two string conversion functions. Moved them to StringUtil 2013-05-11 00:17:02 -07:00
Arthur Ice 373ff66240 moved string functions from MiscFunctions to StringUtil 2013-05-11 00:05:11 -07:00
Arthur Ice babd3949f6 Added StringUtil h/cpp which contains StringFormat 2013-05-10 23:18:00 -07:00
Arthur Ice 3521472942 Merge branch 'master' of https://github.com/EQEmu/Server 2013-05-10 22:55:15 -07:00
KimLS dc045591e4 Lua work - loading works, I think checking for sub works. Calling subs is in the beginning stages and binding is starting 2013-05-10 20:13:35 -07:00
Uleat 9ea71dd94f Merge pull request #58 from EQEmu/botproc
-- Added Bot primary weapon proc (secondary and ranged already exist)
2013-05-10 19:38:14 -07:00
Uleat 7a4cac84ac -- Added missing wrapper to bot update message
-- Added notes to AESpell() update
2013-05-10 22:24:56 -04:00
KimLS 43d0350870 Cleanup perl parsers 2013-05-09 21:25:50 -07:00
Uleat c98c115cb6 -- Added Bot primary weapon proc (secondary and ranged already exist)
-- Added Bard Bot Instrumentation bonuses
-- Added checks to avoid AE Buff casting on enemy mobs
-- Fixed a few typos in 'Vah Shir'-related code
2013-05-09 20:57:02 -04:00
KimLS 0e4ac63b6b Perl parser works, still needs a little cleanup 2013-05-09 14:52:20 -07:00
j883376 4bdd8b2502 Change space indentation to tabs 2013-05-09 11:37:51 -04:00
j883376 ffcff4aea1 Remove trailing whitespace 2013-05-09 11:13:16 -04:00
josheb 56b15f558c Merge pull request #4 from EQEmu/master
sync
2013-05-09 06:19:29 -07:00
af4t 6ea9c9218d Merge branch 'master' of git://github.com/EQEmu/Server 2013-05-09 09:07:16 -04:00
KimLS b6c0e7c302 perl changes 2013-05-09 03:22:56 -07:00
KimLS bdcb9d0c00 Merge branch 'master' into lua 2013-05-08 21:04:02 -07:00
KimLS 7a93966158 VS2012 fix + return 0 fix 2013-05-08 21:03:35 -07:00
KimLS b8adbee4ee Parser stuff, fix for GetSpawnKillCount + item_tick 2013-05-08 21:01:15 -07:00
KimLS feae79b417 Merge from master 2013-05-08 20:22:40 -07:00
KimLS bcf9546b2d Partial perl parser rewrite, want to make it cleaner and have it match the interface 2013-05-08 20:18:39 -07:00
Arthur Ice 273cb928bf removed using namespace std 2013-05-08 18:13:33 -07:00
Arthur Ice 7735639e57 Merge branch 'c_11_conversion' of https://github.com/addtheice/Server 2013-05-08 17:40:04 -07:00
Arthur Ice 23c524812d Removed the _MSC_VER special cases for Visual Studio 2008 and lower.
We no longer support 2008 and lower so these defines will never be used.
2013-05-08 17:09:13 -07:00
Arthur Ice c6ca89907c Converted a lot of the char[] stuff internally into std:string
in addition I switched over to <string> rather than <string.h>
2013-05-08 17:09:13 -07:00
Kemmler 87a75c6100 Merge pull request #1 from EQEmu/master
Sync 2013-05-08
2013-05-08 14:22:30 -07:00
mackal f6100ed834 Fixed NPC::GetScore and XS_NPC_GetScore 2013-05-08 17:07:49 -04:00
Derision 21a9434f89 Changed dummy strings written into the TaskSelector packet from nullptr to ABCD since the packet size calculation was based on the strings being 4 characters long. 2013-05-08 20:02:55 +01:00
josheb ea6e239d58 Merge pull request #54 from af4t/master
VS2010 compatibility adjusts
2013-05-08 05:46:49 -07:00
af4t 4ee4992330 Merge branch 'master' of git://github.com/EQEmu/Server 2013-05-08 06:07:11 -04:00
Michael Cook 059ecdb50b Fix NULL to nullptr for SQL queries take 2 2013-05-07 18:20:09 -04:00
Michael Cook 0838d4507a Fix NULL to nullptr for SQL queries 2013-05-07 17:41:05 -04:00
af4t 5cda797531 VS2010 compatibility 2013-05-07 15:19:27 -04:00
josheb 308a21e0e2 Merge pull request #51 from josheb/master
Quest events and customizations
2013-05-07 05:44:07 -07:00
tabasco a0a92587b4 Fixing some regressions 2013-05-06 16:24:44 -05:00
josheb 8e49ab9179 Merge pull request #3 from EQEmu/master
sync
2013-05-06 14:16:46 -07:00
KimLS ac1d931b5e Merge from master 2013-05-06 00:05:50 -07:00
Alex 90c7fab452 Merge pull request #50 from j883376/master
Fix Auto XTargets not clearing on death
2013-05-05 23:42:14 -07:00
Alex a4b985cd96 Merge pull request #49 from addtheice/master
NULL to nullptr
2013-05-05 23:41:47 -07:00
KimLS 6e9e81a890 Working on fixing up QuestInterface to make multiple parsers work together in harmony, need to fix up Embperl parser next 2013-05-05 23:36:15 -07:00
Arthur Ice d7dff7d7a6 Removed the _MSC_VER special cases for Visual Studio 2008 and lower.
We no longer support 2008 and lower so these defines will never be used.
2013-05-05 16:58:16 -07:00
Arthur Ice 37b7a49faf Converted a lot of the char[] stuff internally into std:string
in addition I switched over to <string> rather than <string.h>
2013-05-05 16:40:03 -07:00
Tabasco 05d7c12d38 Various customizations from DungeonCrawl 2013-05-05 18:20:22 -05:00
Tabasco f983d19e01 Removed my bookmark comments and cleaned up itemtick for cases where there are no tick items. 2013-05-05 18:04:22 -05:00
j883376 4a0749f811 Change NULL to nullptr in RemoveAutoXTargets() 2013-05-05 18:51:20 -04:00
j883376 e2fd78b510 Fix Auto XTargets not clearing on death 2013-05-05 06:47:53 -04:00
Arthur Ice 7560b6b0a7 NULL to nullptr 2013-05-04 18:06:58 -07:00
josheb 824b101831 Merge pull request #2 from EQEmu/master
sync
2013-05-04 07:30:46 -07:00
Derision e1c2657b11 NULL check in Merc::CalcItemBonuses 2013-05-03 09:36:16 +01:00
KimLS d3588d2c95 PERL ON BY DEFAULT - THANKS DALAYA 2013-05-02 23:24:52 -07:00
KimLS c5c945f0c3 Make perl truely optional (Dalaya) 2013-05-02 23:21:04 -07:00
Derision 022713996a Changed return type of CRC16 to uint16 2013-04-28 19:09:48 +01:00
PiB d2c7f23ec9 Implement CRC16 using CRC32. 2013-04-28 18:56:19 +01:00
Derision 232d1e2ca8 Verify minimum size of OP_Packet, OP_Fragment and OP_OutOfOrderAck 2013-04-27 16:22:29 +01:00
Derision 401e897019 Verify OP_Ack size & fix crash in BasePacket::build_raw_header_dump due to uninitialised timestamp 2013-04-27 15:45:24 +01:00
Derision 61f7009378 EQExtractor2 SQL gen support for current client. 2013-04-25 19:04:33 +01:00
josheb 43b91b5938 Merge pull request #1 from EQEmu/master
Sync
2013-04-25 05:34:17 -07:00
badcaptain e2f25d1c92 Fixed a couple of merc stat issues and a few bot aggro issues, removed unneeded bot pet AI. 2013-04-25 00:42:52 -04:00
Tabasco 56490400ca Dungeon Crawl custom code merge
Added numerous modding hooks.
Added rules:
	Character:KeepLevelOverMax - Don't delevel a character if they are found to be over max level rule.
	Spells:UseCHAScribeHack - Optionally omit spells with CHA in effect12 when using scribespells and traindiscs
	Combat:MonkACBonusWeight - Adjust the weight threshold for monk AC bonus
	Combat:ClientStunLevel - Adjust the level clients kicks and bashes start to roll for stuns
	Combat;QuiverWRHasteDiv - Adjust the divisor applied to weight reduction for haste calcs
	Combat:UseArcheryBonusRoll - Make archery stationary bonus a roll
	Combat:ArcheryBonusChance - Archery stationary bonus chance

Added account flags and associated perl wrappers
Added EVENT_ITEM_TICK for interactive items
Added EVENT_DUEL_WIN and EVENT_DUEL_LOSE, which exports $enemyname and $enemyid
Added timer and interval to console worldshutdown command
Added EQW interface for worldshutdown and server-wide messages
2013-04-24 15:58:51 -05:00
Derision b15cb08f54 EQExtractor2 update. 2013-04-24 19:31:13 +01:00
Derision 9b015a2975 Merge pull request #48 from addtheice/master
Cleaned up Packet Handling in world/Client
2013-04-23 13:16:25 -07:00
Arthur Dene Ice b09a3840eb Turn HandleZoneChangePacket into method. 2013-04-22 23:22:13 -07:00
Arthur Dene Ice 495510a02e Reorganized handling of Packets to be a bit cleaner. 2013-04-22 23:18:40 -07:00
Arthur Dene Ice ea606ef80d Turn DeleteCharacterPacket handling into a method. 2013-04-22 23:14:00 -07:00
Arthur Dene Ice 27493c3d75 Turn EnterWorldPacket handling into a method. 2013-04-22 23:10:57 -07:00
Arthur Dene Ice cc07d511a5 Turn CharacterCreatePacket handling into a method. 2013-04-22 23:00:44 -07:00
Arthur Dene Ice 5b3ec4fb7c Turn CharacterCreateRequestPacket handling into a method. 2013-04-22 22:56:55 -07:00
Arthur Dene Ice 18da8fe44d Turn GenerateRandomNamePacket handling into a method. 2013-04-22 22:52:29 -07:00
Arthur Dene Ice 211248b50e Turn SendLoginInfoPacket handling into a method. 2013-04-22 22:47:19 -07:00
Arthur Dene Ice 969f0c535e Turn NameApprovalPacket handling into a method. 2013-04-22 22:44:29 -07:00
JJ a7ce66856b Fix rare case where heals from buffs could be negative. 2013-04-20 14:04:08 -04:00
Derision 3b42f295d6 Moved entity_list.Clear() prior to destruction of Perl objects in zone shutdown 2013-04-12 19:20:43 +01:00
mackal b8febdd440 Realized there was a better way to do the DB entries for salvage, so I changed the script.
Run the optional 2013_04_09_SalvageCleanOld.sql if you ran the old script.
2013-04-09 14:50:51 -04:00
mackal f8795bcd72 Implemented Salvage AA.
Added a new coloumn to tradeskill_recipe_entires called salvagecount that works much in the same way to fail/success/componentcount
The code will default to the component list if nothing is found with a salvagecount
New script: generate_salvage.py will generate the entries for recipes with a failcount (make sure your config is vaild XML as well, it complains if it isn't)
2013-04-08 22:33:19 -04:00
mackal 53301289f5 Merge branch 'salvage' 2013-04-08 17:30:22 -04:00
mackal 51896050ed Fix XML Type Declaration in example configs 2013-04-08 17:20:03 -04:00
mackal 81ca7a1bfd More work on salvage, added some extra checks and won't return stacks of items 2013-04-08 14:16:08 -04:00
mackal 91c817d9dd Work on implementing salvage 2013-04-07 22:38:43 -04:00
JJ 88b9f96b91 Attempting manual merge for Nature's Bounty 2013-04-06 08:23:09 -04:00
JJ b2d5ad6904 Merge pull request #46 from mackal/pet_fixes_again
Switched rest of pet messages to MT_PetResponse
2013-04-05 17:16:19 -07:00
mackal 20f086dc37 Switched rest of pet messages to MT_PetResponse
Overloaded Mob::Say_StringID with a version that takes a message type
2013-04-03 16:09:44 -04:00
badcaptain 6fa93f243f Merged from Master & changelog. 2013-04-02 19:17:28 -04:00
badcaptain 15e31d1c03 Merge branch 'master' of https://github.com/EQEmu/Server 2013-04-02 19:10:18 -04:00
badcaptain a787a7ce72 Fixed Merc lack of use of heal over time spells (causing excessive healing), fixed pet mitigation/AC issues. 2013-04-02 19:09:32 -04:00
JJ 989d132423 Merge pull request #45 from mackal/aa_fix
Bards can now use instant cast AAs while singing (Fading Memories, Boast...
2013-04-01 15:49:19 -07:00
KimLS 757fc01b78 Patch for:
-Perl blessing of exported variables is causing the SVs to be overwritten but never freed by the Perl GC.  I'm not sure if this is a feature or a bug in Perl as the documentation sucks.

Addressed by setting the blessed SVs in question to be undefined at the end of every script.  Caused a noticeable drop in memory for zones with a lot of quest events firing but it's probably not perfect.
2013-04-01 14:23:54 -07:00
mackal 353d7cede0 Bards can now use instant cast AAs while singing (Fading Memories, Boastful Bellow)
AA reuse timers now start before the spell is cast and reset upon failure or canceling
2013-04-01 17:19:45 -04:00
Derision fb0add070b Merge pull request #43 from mackal/pet_fixes
Fix pet message to use StringIDs, most should be correct related to pet ...
2013-03-31 04:06:16 -07:00
mackal 96b42ed86f Fix pet message to use StringIDs, most should be correct related to pet "saying" or just the client getting a message
Added the pet taunting message
2013-03-30 22:57:20 -04:00
JJ 2dde4dce12 Merge pull request #42 from SecretsOTheP/master
Potential fix for a Merc deconstructor crash.
2013-03-26 18:15:50 -07:00
SecretsOTheP c7ff207017 Made Merc::AddMercToGroup handle cleaning up old groups as opposed to doing it in each location before AddMercToGroup. This should fix cases where the Merc's owner is invalid and being referenced, which causes the crash located in:
http://www.eqemulator.org/forums/showthread.php?t=36670&page=2
2013-03-25 13:07:58 -04:00
SecretsOTheP 23820a369e Moved around some data in Mercs to help prevent another crash... dunno if it actually will fix it but it can't hurt >_< 2013-03-24 18:08:03 -04:00
JJ 24d4eaf65d Merge pull request #41 from SecretsOTheP/master
Merc Group Crash Fix
2013-03-24 11:56:06 -07:00
SecretsOTheP e0b05e573e Merc group/depop crash fixes. 2013-03-24 14:31:03 -04:00
JJ e2b9efaf49 Fixed SQL 2013-03-24 08:36:53 -04:00
JJ 349eb371c6 Merge pull request #40 from af4t/master
Fix typos in utils/sql/git/required/2013_03_23_Escape_FadingMemories.sql
2013-03-24 05:20:29 -07:00
af4t afe3ba40cf Fix typos 2013-03-24 08:14:50 -04:00
Alex 5e618a1ca4 Merge pull request #39 from mackal/Fade_Escape_Fix
Fixed and cleaned up Client::Escape()
2013-03-24 01:13:54 -07:00
Alex d011332647 Merge pull request #38 from SecretsOTheP/master
Merc Fixes Again
2013-03-24 01:13:14 -07:00
SecretsOTheP bc73e9c4e3 Whoops. Fixed a small change I did. 2013-03-24 04:02:47 -04:00
SecretsOTheP e609ec1df6 Fix for a crash issue related to groups that both PEQ and Armm reported on the forums. 2013-03-24 04:01:49 -04:00
mackal 2073ca8d38 Fixed and cleaned up Client::Escape()
Fixed SE_FadingMemories to use Client::Escape()
Rogue AA Escape now uses a spell instead of AA Action
Bard AA Fading Memories now only uses the AA Action to eat mana
2013-03-23 18:34:06 -04:00
SecretsOTheP a6f2c1be8a Syntax error, better place for entity list removal 2013-03-23 10:13:29 -04:00
SecretsOTheP 18e9714273 Another safeguard against a dangling pointer. 2013-03-23 10:10:03 -04:00
SecretsOTheP fa18991917 Added a few checks to resolve dangling pointers involving Mercs. Similar to the AIYellForHelp crash fixed years ago by Rogean. 2013-03-23 10:04:49 -04:00
SecretsOTheP b0b342a020 Merge branch 'master' of https://github.com/SecretsOTheP/Server
Conflicts:
	common/patches/RoF.cpp
2013-03-23 05:05:16 -04:00
SecretsOTheP 8e604fd3db Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	zone/client_packet.cpp
	zone/merc.cpp
	zone/npc.cpp
2013-03-23 05:02:27 -04:00
SecretsOTheP abaad22eb4 -Merc upkeep timers fixed to display properly. They now persist through zones as well as save to the database properly.
-Merc unsuspend timers should now be more reliable across zone shutdown.
2013-03-23 04:58:03 -04:00
JJ ac040b5197 Added some pointer checks as discussed in issue #36 2013-03-22 21:48:57 -04:00
badcaptain 9b1a18d9a3 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	changelog.txt
2013-03-22 00:07:22 -04:00
badcaptain a20c7735e8 Fixed merc buffing bugs, added checks before dismissing merc to prevent possible bugged mercs, merged in Secret's merc memory leak fixes. 2013-03-22 00:03:50 -04:00
Derision c94822a2a1 Merge pull request #37 from mackal/stacking_SE_Limits
Fixed stacking issues with SE_Limit* (ex. Unholy Aura Discipline and Aur...
2013-03-21 13:13:14 -07:00
SecretsOTheP 2124b63982 -Fixed a memleak in inviting mercs to group.
-Fixed a duplicate merc in window bug.
2013-03-21 00:40:59 -04:00
mackal 886c7bf634 Fixed stacking issues with SE_Limit* (ex. Unholy Aura Discipline and Aura of Reverence) 2013-03-20 23:29:00 -04:00
SecretsOTheP 56825e9ed0 Two crash fixes reported on the forums are hopefully fixed. 2013-03-20 10:46:09 -04:00
SecretsOTheP 925ba2199e Whoops, forgot CMakeLists.txt 2013-03-20 07:19:20 -04:00
SecretsOTheP fd8650b8a0 Merge branch 'master' of https://github.com/SecretsOTheP/Server 2013-03-20 04:25:34 -04:00
SecretsOTheP 549455b3df Merc message removed.
VLD removed, oops.
2013-03-20 04:24:36 -04:00
SecretsOTheP f90a5b5b71 Merc message removed. 2013-03-20 04:02:33 -04:00
SecretsOTheP 5c76297e5f Merge branch 'master' of https://github.com/EQEmu/Server 2013-03-20 04:01:44 -04:00
SecretsOTheP cabf8631d4 Fixed mercenary memleaks in AI_Start and Unsuspend. 2013-03-20 04:00:08 -04:00
Derision 6ae8fbc0e4 Initialised some data in Mob/Merc constructors to stop valgrind complaining. 2013-03-19 20:44:22 +00:00
Derision f32a277643 Fixed memory leak in OP_VeteranRewardsAvailable 2013-03-19 19:22:16 +00:00
badcaptain 09df77b56e Changelog fix. 2013-03-19 01:03:15 -04:00
badcaptain f5e58e0125 Merge branch 'master' of https://github.com/EQEmu/Server into Mercs
Conflicts:
	changelog.txt
2013-03-19 00:57:15 -04:00
badcaptain 660ab53476 Fixed zone crash due to merc focus effects & tribute, merc aggro issues when client in melee range, spell recast timers. Added melee DPS spells/disciplines & support. 2013-03-19 00:53:01 -04:00
Derision 5c9f2c0d50 Fixed a couple of memory leaks. 2013-03-18 21:09:23 +00:00
Derision d036afee5b Fixed missing version parameter in DB select in GetZoneWeather. 2013-03-17 15:52:48 +00:00
SecretsOTheP 4ab7786828 Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	zone/client_packet.cpp
2013-03-17 10:14:25 -04:00
Derision 981cabe857 Fixed a couple of merc memory leaks and removed some commented out DumpPacket calls. 2013-03-17 13:52:43 +00:00
SecretsOTheP 8eef122cec Forgot changelog :x 2013-03-17 13:01:54 +00:00
SecretsOTheP 1dc1655891 Hopefully fixed that pesky merc memleak and cleaned up mercs a tad. 2013-03-17 13:01:54 +00:00
SecretsOTheP 0bc942f4d5 Test 2013-03-17 13:01:53 +00:00
SecretsOTheP 9fbf9abd47 Forgot changelog :x 2013-03-17 06:20:12 -04:00
SecretsOTheP b8170df498 Hopefully fixed that pesky merc memleak and cleaned up mercs a tad. 2013-03-17 06:18:32 -04:00
Derision d76a8bd34a EQExtractor2: Added SQL generation support for current Live client decoder. 2013-03-17 10:09:13 +00:00
SecretsOTheP 021faf68b3 Merge branch 'master' of https://github.com/EQEmu/Server 2013-03-17 04:52:52 -04:00
Derision 7c264ad097 EQExtractor2 update. 2013-03-16 19:56:09 +00:00
Derision 810fdf3cca Resurrection - Fix for RoF + fixed a couple of memory leaks. 2013-03-15 19:37:29 +00:00
SecretsOTheP c301b30c3a Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts:
	zone/client_packet.cpp
2013-03-15 03:32:43 -04:00
SecretsOTheP 735b4181fa Test 2013-03-15 03:27:45 -04:00
badcaptain a14fecaf78 Forgot to remove debugging. 2013-03-14 23:13:49 -04:00
badcaptain e12b06a9ad Merge branch 'master' of https://github.com/EQEmu/Server 2013-03-14 23:03:39 -04:00
badcaptain 9a82875ad4 Forgot changelog. 2013-03-14 22:56:45 -04:00
JJ 0b0ee921a5 Fix for hatelist random missing last member on hatelist. 2013-03-14 20:42:02 -04:00
badcaptain 7109a40637 Merge branch 'master' of https://github.com/EQEmu/Server 2013-03-14 20:03:48 -04:00
badcaptain 0a805feeec Fixed Merc spell recast timers, changed how Mercs add mobs to their hate lists (should prevent IsEngaged() issues), initial Caster DPS Merc spell casting AI, initial Merc stance implementation, Mercs now suspend when their owner dies to prevent them being bugged (until it can be fixed), added 2 seconds between spell casts to be live-like. 2013-03-14 19:51:29 -04:00
Derision 9fdb6862f8 Updated comment in Handle_OP_ItemPreview 2013-03-10 20:41:09 +00:00
Derision e53ae5f6d5 More compiler warning fixes. 2013-03-10 18:55:18 +00:00
Derision 0ad1044b2e Added some error logging into ZoneDatabase::NPCSpawnDB for #npcspawn create 2013-03-09 20:13:11 +00:00
Derision 64c53fe37b Merge pull request #29 from addtheice/master
consts on char*'s to remove the deprecation of const string to char* warning
2013-03-09 11:55:11 -08:00
Arthur Ice faa93c3739 Added some consts to remove 'deprecated string to char*' warnings. 2013-03-09 10:52:25 -08:00
Derision 0e6272e6d8 Removed _log message from zone/CatchSignal on Linux as it can deadlock on shutdown if another signal is received while the _log call is being processed. 2013-03-09 13:31:54 +00:00
Derision c363261d00 Fix from Zaela_S to stop mobs aggroing on dead players when using RespawnFromHover. 2013-03-09 13:18:36 +00:00
KimLS a2500ff814 Fix for DBCore crash 2013-03-08 18:07:28 -08:00
JJ 2af6e8cd16 Merge pull request #28 from af4t/master
Melee tomes named "Skill:  ", again
2013-03-08 08:42:54 -08:00
af4t eb1e88b38c Reword blurbs in changelog.txt. 2013-03-07 23:33:21 -05:00
af4t c81549a441 Melee tomes named "Skill: ...": had overlooked learn-by-right-click, updated. 2013-03-07 09:42:16 -05:00
KimLS adf42c8750 Changed some stuff to keep it consistent with old behavior: was seeing crashes related to ptimers on peq. 2013-03-06 11:19:44 -08:00
Alex 2ee8e17ac0 Merge pull request #27 from af4t/master
Fix NPCs aggro each other from beneficial spells
2013-03-05 23:06:52 -08:00
Alex f7469412f1 Merge pull request #23 from addtheice/master
Fixed missing include that blocked compile on linux.
2013-03-05 23:05:27 -08:00
af4t 55a72c86cf Merge branch 'master' of https://github.com/af4t/Server
Conflicts:
	zone/spells.cpp
2013-03-05 16:22:22 -05:00
af4t a80eb397d5 Stop NPCs from aggroing each other with buffs/beneficial spells. 2013-03-05 16:19:46 -05:00
af4t 7926362ab5 Stop NPCs from aggroing each other with buffs/beneficial spells. 2013-03-05 15:44:05 -05:00
Derision 7af51ff346 Merge pull request #24 from af4t/master
Forgot to update changelog.txt earlier
2013-03-04 12:56:32 -08:00
Derision c8ca362eba Few minor issues highlighted by cppcheck/valgrind. 2013-03-04 19:15:07 +00:00
af4t 4964c17abb Forgot to update changelog.txt earlier 2013-03-04 13:08:53 -05:00
Arthur Ice 0c6eee6d81 More warning clean ups (NULL to 0 on int, sprintf flags, typedef on enum) 2013-03-03 21:45:46 -08:00
Arthur Ice 950f00fae6 Fixed some warnings, like sprintf %i warnings (converted to %lu), fals vs NULL, etc 2013-03-03 16:17:06 -08:00
Arthur Ice d8628170b5 Fixed missing include that blocked compile on linux. 2013-03-03 15:26:40 -08:00
Arthur Ice 68338dace1 Merge branch 'master' of git://github.com/EQEmu/Server 2013-03-03 15:22:52 -08:00
Derision af1f87a00f Fixed uninitialised variabled tempBot in #bot stance command (cppcheck) 2013-03-03 22:26:57 +00:00
Derision 9a47e79e8e Fixed memleak in Client::Handle_OP_MercenaryDataRequest (cppcheck) 2013-03-03 22:22:04 +00:00
Derision aceaba0fb0 Fixed uninitialised mercOwner highlighted by cppcheck. 2013-03-03 22:12:14 +00:00
Arthur Ice e0887d81aa Merge branch 'master' of git://github.com/EQEmu/Server 2013-03-03 13:02:36 -08:00
Derision ff9e4e0780 Merge pull request #22 from addtheice/master
just removed a duplicate GNU License in test main
2013-03-02 12:30:26 -08:00
Arthur Ice 6a4f61d3a3 Merge branch 'master' of git://github.com/EQEmu/Server 2013-03-02 12:01:01 -08:00
Arthur Ice c8da17c664 Deleted the old and duplicated GNU license text 2013-03-02 11:58:39 -08:00
badcaptain 7c34a89ec5 Fixed Merc depop bug, added merc rest regen, fixed merc group spell casting bug where mercs would continue to try to cast group buffs on pets of caster who didn't have Pet Affinity AA. 2013-03-02 01:07:18 -05:00
Alex da4cddf1ef Update README.md 2013-03-01 16:45:10 -08:00
KimLS 9262c0895f Merge branch 'master' of https://github.com/EQEmu/Server 2013-02-28 22:33:31 -08:00
KimLS b5405c35e2 Tests fix + fix for certain factions not loading 2013-02-28 22:33:20 -08:00
Ludwig 0137a271cc Merge pull request #21 from af4t/master
Undo MAG pet targeting change.
2013-02-28 21:47:07 -08:00
badcaptain 5d8af58e57 Oops, it's not a leap year. 2013-03-01 00:34:25 -05:00
af4t c054cb3dd0 Merge branch 'master' of git://github.com/EQEmu/Server 2013-03-01 00:27:20 -05:00
af4t 8640a89323 Undo MAG pet targeting change 2013-03-01 00:23:21 -05:00
badcaptain ea72975e69 Fixed Merc duplicate save bug, focus items, spell_scale and heal_scale now work implemented, new merc equipment (with focus items), added checks during merc hire, unsuspend, & timer update for states where a merc can't be hired, unsuspended, or can't be retained due to insufficient funds, no room in group, in raid, invalid merc data, etc, and give appropriate feedback, added rules for charging of merc purchase and upkeep costs. 2013-03-01 00:01:27 -05:00
KimLS 7237c1f54c Shared Memory changelog + something with CMake to support rvalue refs 2013-02-27 16:16:20 -08:00
KimLS 92ed7e694f Merge branch 'master' into shared_mem 2013-02-26 21:29:34 -08:00
Alex ffe24cdfaa Merge pull request #19 from af4t/IHT_LT
Enhancement: Improved Harm Touch & Leech Touch
2013-02-26 21:29:01 -08:00
af4t 04dfe4512f SK AA Touch of the Wicked should reduce reuse timers for Improved Harm Touch & Leech Touch as well as regular HT. Add to aa_actions with same redux rate as regular HT 2013-02-26 09:48:36 -05:00
Alex a95205905e Merge pull request #16 from af4t/TomeFix
Melee tomes named "Skill: ..." can be handed to guildmasters and memoriz...
2013-02-26 01:09:33 -08:00
Alex 55347aeab6 Merge pull request #17 from af4t/SummonedPetTarget
Fix targeting for summoned pets in Mob::DetermineSpellTargets
2013-02-26 01:08:44 -08:00
af4t 945db17cb8 Fix targeting for summoned pets in Mob::DetermineSpellTargets 2013-02-25 10:38:03 -05:00
af4t e48d59b07b Melee tomes named "Skill: ..." can be handed to guildmasters and memorized. 2013-02-25 09:19:07 -05:00
KimLS aff4d53d7e Fix for sdrawkcab index in skill_caps 2013-02-24 22:08:10 -08:00
KimLS 5bb604248f Removed obsolete cleanipc program 2013-02-24 10:52:52 -08:00
KimLS 7e63135a3d Fix for linux ipc mutex 2013-02-24 10:51:04 -08:00
KimLS 3092286604 Fix for bad data on factions 2013-02-24 10:33:07 -08:00
KimLS d42ff6ce19 Merge branch 'master' into shared_mem 2013-02-23 22:43:24 -08:00
KimLS 26f965e251 Fix for shared memory loot: both the inconsistent tables and the not loading of tables with no items 2013-02-23 22:42:40 -08:00
Derision 34a4b2ab37 Misc fizes. 2013-02-23 23:12:10 +00:00
KimLS 9c1159837a Merge branch 'master' into shared_mem 2013-02-23 15:04:16 -08:00
KimLS 147c96970c Moved faction stuff around, removed stupid external item status stuff 2013-02-23 15:03:15 -08:00
Derision e7e1b46b36 Set #reloadlevelmods to status 255 2013-02-23 22:17:19 +00:00
Derision 299dc525d0 Set #reloadworld to 255 status 2013-02-23 22:00:43 +00:00
KimLS 5a69f41f4d Missing EOL 2013-02-23 13:48:05 -08:00
KimLS c31b2b65c1 NPC Faction lists to new shared memory scheme 2013-02-23 13:45:19 -08:00
KimLS 8937c5be86 Fix for mmf failing on linux (relies on size_ which wasn't init properly on one of the constructors, now is) 2013-02-23 01:32:05 -08:00
KimLS 54883b0795 mmf wont lock - programmer can handle that 2013-02-23 00:48:16 -08:00
KimLS 39a77a855e Stupid design choice in cppunit fixt -.- 2013-02-23 00:37:12 -08:00
KimLS 4c10d4dd2f c++11 linux compile conflicts with perl more 2013-02-23 00:07:47 -08:00
KimLS f32048808a c++11 linux compile conflicts with perl 2013-02-23 00:06:03 -08:00
KimLS 86c8b11102 IPCMutex needed to be rewritten for Linux due to an annoying limitation of posix semaphores that makes encapping them moronic 2013-02-22 23:40:16 -08:00
KimLS 8c425ff9d8 Merge branch 'master' into shared_mem 2013-02-22 22:36:30 -08:00
KimLS 1b44123551 Slight cleanup on recent pull req + changing versions up 2013-02-22 22:31:07 -08:00
Alex 306cf7a5f5 Merge pull request #14 from mackal/xtarget_feign_clear
Mobs will now be removed from XTarget when they clear their feign memory
2013-02-22 22:27:54 -08:00
mackal dd913de1a2 Mobs will now be removed from XTarget when they clear their feign memory aggro 2013-02-22 22:27:03 -05:00
KimLS 9eaa98675b Shared Memory Loot works 2013-02-22 18:25:17 -08:00
KimLS 6f13d0cfbc Partial work on loot tables (non-compiling) 2013-02-21 22:13:33 -08:00
KimLS 543ef3fb32 Merge branch 'master' into shared_mem 2013-02-21 08:58:53 -08:00
JJ 60172a7801 Merge pull request #10 from addtheice/master
Addtheice: Spelling fixes
2013-02-21 02:28:31 -08:00
Arthur Ice 998cfb6528 fixed miss spelling of 'recieved' to 'received' in ServerStats and in log messages. 2013-02-21 00:07:49 -08:00
KimLS 3e9c2a06a3 Items in shared memory 2013-02-20 22:36:30 -08:00
KimLS 0115b18e67 Delete some pointless files 2013-02-20 15:36:36 -08:00
KimLS ef9498b03a Got rid of rules global (ugh) and gonna start work on items loading next 2013-02-20 15:35:46 -08:00
KimLS 8eb7d0aaa8 Skill caps load with new smem scheme 2013-02-20 13:54:26 -08:00
KimLS 12bde7434a Starting on skill caps today 2013-02-20 11:26:23 -08:00
KimLS 23dbd00d40 Style + compile option for rvalue-move 2013-02-19 23:06:00 -08:00
KimLS f8bae86082 Spells via shared memory work, removal of blah, general fixes 2013-02-19 22:20:30 -08:00
KimLS acecff23f4 Almost have spells loaded 2013-02-19 16:50:05 -08:00
KimLS 7ce6f4de0d More shared memory work + moved spdat from zone to common 2013-02-19 15:33:21 -08:00
KimLS 78b2385785 Merge branch 'master' into shared_mem 2013-02-19 13:38:12 -08:00
Derision e0b38cf3cc World should no longer crash if the start_zone query fails at character creation. 2013-02-19 20:07:53 +00:00
Alex 74194cd38c Update .gitignore 2013-02-18 23:07:32 -08:00
KimLS d4dbf0042e Merge branch 'master' into shared_mem 2013-02-18 19:26:11 -08:00
KimLS e36eefc060 EVENT_DEATH changelog 2013-02-18 19:23:27 -08:00
KimLS cb01d245e6 EVENT_DEATH for PlayerQuests 2013-02-18 19:22:07 -08:00
KimLS 0d16361a40 Working on shared memory stuff - removed some stuff dealing with older code and loading spells from the non-database 2013-02-18 19:00:07 -08:00
KimLS 70543c2b8a Merge branch 'master' into shared_mem 2013-02-18 12:40:27 -08:00
Derision 04bad157f5 Merge pull request #5 from mackal/potionbelt
Potionbelt Tooltip
2013-02-18 11:35:52 -08:00
mackal 357646466a Changelog udpated 2013-02-18 14:22:09 -05:00
mackal 11d9838faa Added the item_name field to potionbelt to give the user the Tool Tip 2013-02-18 14:19:20 -05:00
Derision 9680c039f0 Charmed pets should no longer be targettable with F8. Charmed pets no longer get a surname of Soandso's Pet. 2013-02-18 18:58:26 +00:00
KLS 9f63498a64 Quest Interface wont attempt to keep loading GlobalQuest sub over and over and over... 2013-02-18 09:12:14 -08:00
Alex aa20e5b5e3 Issue where not having a global npc quest file may cause the server to crash on bootup 2013-02-18 09:01:49 -08:00
JJ c9d4816a88 Garble text for drunk characters. 2013-02-18 02:21:34 -05:00
joligario 3feeced884 Chat garbled for drunk characters. 2013-02-18 01:59:43 -05:00
KimLS edc4b4039b Optional Merc Spells fix for violation of commit rules. 2013-02-17 22:57:15 -08:00
KimLS a5ad05f274 Merge branch 'master' into shared_mem 2013-02-17 22:02:45 -08:00
badcaptain a41874b6a7 Moved merc save data from extended player profile to new merc table, save merc buffs, added cure and rez spells to healer merc. 2013-02-18 00:50:19 -05:00
KimLS a37211cb83 Forgot to take out my comment code - doh 2013-02-17 15:40:29 -08:00
KimLS 4e802921a5 Fix for sub checking on global npc quests 2013-02-17 15:36:53 -08:00
KimLS c6d8895b70 One fix to QuestParserCollection for global npc quests, HasSub is not working at all right with it. Need to check it out later tonight 2013-02-17 15:22:35 -08:00
KimLS 53d6e4000c Unit tests + cleanup 2013-02-17 13:36:39 -08:00
KimLS a192e726d4 Merge branch 'master' into shared_mem 2013-02-17 12:32:13 -08:00
KimLS 886fe5cc31 Working on tests, not there yet, added licensing stuff 2013-02-17 12:31:18 -08:00
Derision 23b2b599a7 Fixed bug where BecomeTrader packets were only being sent to the Trader, not all other clients in the bazaar. 2013-02-17 20:23:34 +00:00
KimLS c734708809 MMFs + a scaled down hash set to use them with 2013-02-17 11:51:32 -08:00
KimLS 1c0f35a945 Way to miss two files KLS - doh 2013-02-17 11:35:50 -08:00
KimLS 06a3873c9b IPC mutex 2013-02-17 11:35:03 -08:00
KimLS 7a2be102aa Exception classes & required C++11 stuff from GCC(still needs to be fixed) 2013-02-17 11:27:43 -08:00
Derision 07979ce2de Client version is now returned by the stream proxy as a number. 2013-02-17 18:09:31 +00:00
Derision d1afad47aa Added optional guildid and minstatus parameters to quest::gmsay(<messsage>, [color], [toworld], [guildid], [minstatus]) 2013-02-17 10:19:12 +00:00
KimLS 15dc9cfaf4 Some warning fixes, unreferenced local variables. 2013-02-16 22:07:32 -08:00
Alex 7c706d9871 Merge pull request #1 from mackal/master
AA reuse timer fix and Update filter system
2013-02-16 20:56:09 -08:00
KimLS 0a9642e776 utils/sql/git added 2013-02-16 18:05:41 -08:00
mackal 20fb899d5d Merge branch 'master' of https://github.com/EQEmu/Server.git 2013-02-16 20:21:53 -05:00
mackal 38d4fbc863 Remove old filters and change all remaining old to new (Also fix Auction filtering out OOC as well due to incorrect define) 2013-02-16 20:14:07 -05:00
KimLS b6010afa9c Ignore all files in dependencies. 2013-02-16 16:55:04 -08:00
mackal 234cd0c4ff Merge remote-tracking branch 'upstream/master' 2013-02-16 19:53:51 -05:00
mackal a510d2593f Update change log 2013-02-16 19:50:19 -05:00
KimLS 0aa958de8f Moved queryserv sql to svn so I can more easily have a git section without confusion 2013-02-16 16:47:28 -08:00
mackal 07950b7a58 Fix calc of resuse timers on multi-rank AAs 2013-02-16 19:47:12 -05:00
Alex 710554efcd Update .gitignore 2013-02-16 16:37:14 -08:00
KimLS b14519b1f5 Derision's revert from svn I missed. 2013-02-16 16:25:57 -08:00
1456 changed files with 289552 additions and 158241 deletions
+12
View File
@@ -23,3 +23,15 @@ CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
Build/
build/
Build32/
build32/
Build64/
build64/
Build_32/
build_32/
Build_64/
build_64/
log/
logs/
+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
+297 -106
View File
@@ -1,4 +1,36 @@
#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
#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,158 +39,317 @@ 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)
#Default build type is set to RelWithDebInfo for generators that honor that like makefiles
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
#Add our various windows definitions
IF(MSVC OR MINGW)
ADD_DEFINITIONS(-D_WINDOWS)
IF(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN64)
ELSE(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN32)
ENDIF(CMAKE_CL_64)
ADD_DEFINITIONS(-D_WINDOWS)
IF(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN64)
ELSE(CMAKE_CL_64)
ADD_DEFINITIONS(-DWIN32)
ENDIF(CMAKE_CL_64)
ENDIF(MSVC OR MINGW)
IF(MSVC)
#Set our default locations for zlib/mysql based on x86/x64
IF(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64")
ELSE(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86")
ENDIF(CMAKE_CL_64)
#disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere
OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON)
IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
#fast FP if you'd like it
OPTION(EQEMU_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF(EQEMU_FAST_FLOATINGPOINT)
#Set our default locations for zlib/mysql based on x86/x64
IF(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64")
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64")
ELSE(CMAKE_CL_64)
SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86")
SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86")
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86")
ENDIF(CMAKE_CL_64)
#disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere
OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON)
IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(EQEMU_DISABLE_CRT_SECURE_WARNINGS)
#fast FP if you'd like it
OPTION(EQEMU_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
IF(EQEMU_FAST_FLOATINGPOINT)
ADD_DEFINITIONS(/fp:fast)
ENDIF(EQEMU_FAST_FLOATINGPOINT)
#crash logging currently only works on windows x86/x64
OPTION(EQEMU_ENABLE_CRASH_LOGGING "Enable crash logging" ON)
IF(EQEMU_ENABLE_CRASH_LOGGING)
ADD_DEFINITIONS(-DCRASH_LOGGING)
ENDIF(EQEMU_ENABLE_CRASH_LOGGING)
#Disable safe SEH or not?
OPTION(EQEMU_DISABLE_SAFESEH "Disable Safe SEH (Needed for Strawberry Perl)" OFF)
IF(EQEMU_DISABLE_SAFESEH)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
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)
#We want to compile /MT not /MD so we change that
FOREACH(flag_var CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
IF(${flag_var} MATCHES "/MD")
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
#crash logging currently only works on windows x86/x64
OPTION(EQEMU_ENABLE_CRASH_LOGGING "Enable crash logging" ON)
IF(EQEMU_ENABLE_CRASH_LOGGING)
ADD_DEFINITIONS(-DCRASH_LOGGING)
ENDIF(EQEMU_ENABLE_CRASH_LOGGING)
#Disable safe SEH or not?
OPTION(EQEMU_DISABLE_SAFESEH "Disable Safe SEH (Needed for Strawberry Perl)" OFF)
IF(EQEMU_DISABLE_SAFESEH)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO")
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." ON)
IF(EQEMU_BUILD_MSVC_MP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF(EQEMU_BUILD_MSVC_MP)
#We want to compile /MT not /MD so we change that
FOREACH(flag_var CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
IF(${flag_var} MATCHES "/MD")
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.
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
#Normally set by perl but we don't use the perl flags anymore so we set it.
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
ENDIF(MSVC)
#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)
#FreeBSD support
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")
ADD_DEFINITIONS(-DDARWIN)
SET(DARWIN TRUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF(UNIX)
#debug level, 5 is default. Most people wont ever change this but it's there if you want to
#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
1 - Status and Normal to console, Errors to logfile
2 - Status, Normal, and Error to console and logfile
3 - Light debug release errors and status
4 - Moderate debug release errors and status
5 - Maximum debug release errors and status
10 - More errors than you ever wanted to see"
0 - Quiet mode Errors to file Status and Normal ignored
1 - Status and Normal to console, Errors to logfile
2 - Status, Normal, and Error to console and logfile
3 - Light debug release errors and status
4 - Moderate debug release errors and status
5 - Maximum debug release errors and status
10 - More errors than you ever wanted to see"
)
SET(EQEMU_LOG_LEVEL_STATUS 2 CACHE STRING "EQEmu logging level for [Status]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_NORMAL 3 CACHE STRING "EQEmu logging level for [Normal]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_ERROR 2 CACHE STRING "EQEmu logging level for [Error]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_DEBUG 3 CACHE STRING "EQEmu logging level for [Debug]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_QUEST 2 CACHE STRING "EQEmu logging level for [Quest]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_COMMANDS 1 CACHE STRING "EQEmu logging level for [Commands]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
SET(EQEMU_LOG_LEVEL_CRASH 3 CACHE STRING "EQEmu logging level for [Crash]:
0 - Disabled
1 - Ouput to File Enabled
2 - Output to stdout Enabled
3 - Output to File and stdout Enabled
8 - Output to stderr Enabled
9 - Output to File and stderr Enabled
11 - Output to File, stdout and stderr Enabled"
)
MARK_AS_ADVANCED(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)
SET(EQEMU_STREAM_SEND_RATE 1048576 CACHE STRING "Advanced: Base amount of data stream can send before throttle.")
SET(EQEMU_STREAM_DECAY_RATE 78642 CACHE STRING "Advanced: Base amount of data stream recovers per tic.")
SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL 3.0 CACHE STRING "Advanced: Multiplier on retransmit timeout.")
SET(EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX 5000 CACHE STRING "Advanced: Max in ms for retransmit timeout timer.")
SET(EQEMU_STREAM_AVERAGE_DELTA_MAX 2500 CACHE STRING "Advanced: The maximum average delta in ms allowed.")
SET(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS TRUE CACHE BOOL "Advanced: Whether or not acked packets can be retransmitted")
MARK_AS_ADVANCED(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)
#NPC Types Cache Behavior
OPTION(EQEMU_DEPOP_INVALIDATES_CACHE "#repop invalidates the npc_types cache (will cause a larger database hit on #repop but is more convienent)." ON)
#Bots are a compile time option so on/off
OPTION(EQEMU_ENABLE_BOTS "Enable Bots" OFF)
#Disable entire _mlog system (excludes trade/command logs)
OPTION(EQEMU_DISABLE_LOGSYS "Disable Logging INI System" ON)
#Enable GM Command log system
OPTION(EQEMU_COMMANDS_LOGGING "Enable GM Command logs" ON)
IF(EQEMU_COMMANDS_LOGGING)
ADD_DEFINITIONS(-DCOMMANDS_LOGGING)
ENDIF(EQEMU_COMMANDS_LOGGING)
IF(EQEMU_DISABLE_LOGSYS)
ADD_DEFINITIONS(-DDISABLE_LOGSYS)
ENDIF(EQEMU_DISABLE_LOGSYS)
IF(EQEMU_ENABLE_BOTS)
ADD_DEFINITIONS(-DBOTS)
ADD_DEFINITIONS(-DBOTS)
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." ON)
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
IF(UNIX)
#Whether to build cleanipc or not (probably a good idea if you build server)
OPTION(EQEMU_BUILD_CLEANIPC "Build cleanipc." ON)
#Use C++11 stuff, support for this is still it infancy
OPTION(EQEMU_CPP_ELEVEN "Enable C++11 extentions in g++" OFF)
IF(EQEMU_CPP_ELEVEN)
ADD_DEFINITIONS(-std=c++0x)
ENDIF(EQEMU_CPP_ELEVEN)
ENDIF(UNIX)
#C++11 stuff
IF(NOT MSVC)
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
ADD_DEFINITIONS(-DEMBPERL)
ADD_DEFINITIONS(-DEMBPERL_PLUGIN)
IF(EQEMU_BUILD_PERL)
ADD_DEFINITIONS(-DEMBPERL)
ADD_DEFINITIONS(-DEMBPERL_PLUGIN)
ENDIF(EQEMU_BUILD_PERL)
IF(EQEMU_BUILD_LUA)
ADD_DEFINITIONS(-DLUA_EQEMU)
ENDIF(EQEMU_BUILD_LUA)
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
ADD_DEFINITIONS(-DSHAREMEM)
ADD_DEFINITIONS(-DINVERSEXY)
ADD_DEFINITIONS(-DFIELD_ITEMS)
ADD_DEFINITIONS(-DMAP_DIR="./Maps")
ADD_DEFINITIONS(-DMAP_DIR="${EQEMU_MAP_DIR}")
ADD_DEFINITIONS(-DRATEBASE=${EQEMU_STREAM_SEND_RATE})
ADD_DEFINITIONS(-DDECAYBASE=${EQEMU_STREAM_DECAY_RATE})
ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MULT=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MUL})
ADD_DEFINITIONS(-DRETRANSMIT_TIMEOUT_MAX=${EQEMU_STREAM_RETRANSMIT_TIMEOUT_MAX})
ADD_DEFINITIONS(-DAVERAGE_DELTA_MAX=${EQEMU_STREAM_AVERAGE_DELTA_MAX})
ADD_DEFINITIONS(-DLOG_LEVEL_STATUS=${EQEMU_LOG_LEVEL_STATUS})
ADD_DEFINITIONS(-DLOG_LEVEL_NORMAL=${EQEMU_LOG_LEVEL_NORMAL})
ADD_DEFINITIONS(-DLOG_LEVEL_ERROR=${EQEMU_LOG_LEVEL_ERROR})
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)
ELSE(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
ADD_DEFINITIONS(-DRETRANSMIT_ACKED_PACKETS=false)
ENDIF(EQEMU_STREAM_RETRANSMIT_ACKED_PACKETS)
#Find everything we need
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(MySQL REQUIRED)
FIND_PACKAGE(PerlLibs REQUIRED)
INCLUDE_DIRECTORIES("${ZLIB_INCLUDE_DIRS}" "${PERL_INCLUDE_PATH}" "${MySQL_INCLUDE_DIR}")
IF(EQEMU_BUILD_PERL)
FIND_PACKAGE(PerlLibs REQUIRED)
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_STATIC_RUNTIME OFF)
SET(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/boost")
FIND_PACKAGE(Boost REQUIRED)
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(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_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(common)
ENDIF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS)
IF(EQEMU_BUILD_SERVER)
ADD_SUBDIRECTORY(EMuShareMem)
ADD_SUBDIRECTORY(world)
ADD_SUBDIRECTORY(zone)
ADD_SUBDIRECTORY(ucs)
ADD_SUBDIRECTORY(queryserv)
ADD_SUBDIRECTORY(eqlaunch)
ADD_SUBDIRECTORY(shared_memory)
ADD_SUBDIRECTORY(world)
ADD_SUBDIRECTORY(zone)
ADD_SUBDIRECTORY(ucs)
ADD_SUBDIRECTORY(queryserv)
ADD_SUBDIRECTORY(eqlaunch)
ENDIF(EQEMU_BUILD_SERVER)
IF(EQEMU_BUILD_LOGIN)
ADD_SUBDIRECTORY(loginserver)
ADD_SUBDIRECTORY(loginserver)
ENDIF(EQEMU_BUILD_LOGIN)
IF(EQEMU_BUILD_AZONE OR EQEMU_BUILD_CLEANIPC)
ADD_SUBDIRECTORY(utils)
ENDIF(EQEMU_BUILD_AZONE OR EQEMU_BUILD_CLEANIPC)
IF(EQEMU_BUILD_TESTS)
# Testing framework not quite ready for prime time.
# ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tests)
ENDIF(EQEMU_BUILD_TESTS)
IF(EQEMU_BUILD_CLIENT_FILES)
ADD_SUBDIRECTORY(client_files)
ENDIF(EQEMU_BUILD_CLIENT_FILES)
-46
View File
@@ -1,46 +0,0 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(sharedmem_src
DLLMain.cpp
Doors.cpp
Items.cpp
Loot.cpp
MMF.cpp
MMFMutex.cpp
NPCFactionLists.cpp
Opcodes.cpp
SkillCaps.cpp
Spells.cpp
)
SET(sharedmem_headers
Doors.h
Items.h
Loot.h
MMF.h
MMFMutex.h
NPCFactionLists.h
Opcodes.h
SkillCaps.h
Spells.h
)
SET(EQEMU_MAX_ITEMS 300000 CACHE STRING "Maxium number of items to load into memory. Make sure this is bigger than the total number of items in the server database")
SET(EQEMU_MAX_DOORS 30000 CACHE STRING "Maxium number of doors to load into memory. Make sure this is bigger than the total number of doors in the server database")
SET(EQEMU_MAX_FACTIONLIST_IDS 50000 CACHE STRING "Maxium number of FactionList IDs to load into memory. Make sure this is bigger than the total number of FactionList IDs in the server database")
ADD_DEFINITIONS(-DMMF_EQMAX_ITEMS=${EQEMU_MAX_ITEMS})
ADD_DEFINITIONS(-DMMF_MAX_Door_ID=${EQEMU_MAX_DOORS})
ADD_DEFINITIONS(-DMMF_MAX_NPCFactionList_ID=${EQEMU_MAX_FACTIONLIST_IDS})
ADD_LIBRARY(EMuShareMem SHARED ${sharedmem_src} ${sharedmem_headers})
TARGET_LINK_LIBRARIES(EMuShareMem Common)
IF(UNIX)
TARGET_LINK_LIBRARIES(EMuShareMem "dl")
TARGET_LINK_LIBRARIES(EMuShareMem "m")
TARGET_LINK_LIBRARIES(EMuShareMem "rt")
TARGET_LINK_LIBRARIES(EMuShareMem "pthread")
ENDIF(UNIX)
SET(LIBRARY_OUTPUT_PATH ../Bin)
-37
View File
@@ -1,37 +0,0 @@
/*
EMuShareMem.dll
by Quagmire
Released under GPL
This DLL's purpose it to hold a single shared copy of items, npctypes, spells, and other
stuff that's normally cached in memory, thus allowing all processes on the server to share
one copy of the data, greatly reducing the amount of RAM used.
*/
#ifdef _WINDOWS
#include <windows.h>
void CloseMemShare();
BOOL WINAPI DllMain(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpReserved ) // reserved
{
// Perform actions based on the reason for calling.
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH: {
break;
}
case DLL_THREAD_DETACH: {
break;
}
case DLL_PROCESS_DETACH: {
break;
}
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}
#endif //WIN32
-136
View File
@@ -1,136 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "Doors.h"
#include "../common/timer.h"
#include "MMF.h"
MMF DoorsMMF;
const MMFDoors_Struct* MMFDoorsData = 0;
MMFDoors_Struct* MMFDoorsData_Writable = 0;
#ifdef _WINDOWS
extern "C" __declspec(dllexport) const Door* GetDoor(uint32 id) {
return pGetDoor(id);
};
extern "C" __declspec(dllexport) bool AddDoor(uint32 id, const Door* door) {
return pAddDoor(id, door);
};
extern "C" __declspec(dllexport) bool DLLLoadDoors(CALLBACK_DBLoadDoors cbDBLoadDoors, uint32 iDoorstructSize, int32* iDoorsCount, uint32* iMaxDoorID) {
return pDLLLoadDoors(cbDBLoadDoors, iDoorstructSize, iDoorsCount, iMaxDoorID);
};
#else
extern "C" const Door* GetDoor(uint32 id) {
return pGetDoor(id);
};
extern "C" bool AddDoor(uint32 id, const Door* door) {
return pAddDoor(id, door);
};
extern "C" bool DLLLoadDoors(CALLBACK_DBLoadDoors cbDBLoadDoors, uint32 iDoorstructSize, int32* iDoorsCount, uint32* iMaxDoorID) {
return pDLLLoadDoors(cbDBLoadDoors, iDoorstructSize, iDoorsCount, iMaxDoorID);
};
#endif
bool pAddDoor(uint32 id, const Door* door) {
if (!MMFDoorsData_Writable)
return false;
if (id > MMF_MAX_Door_ID || MMFDoorsData_Writable->NextFreeIndex >= MMFDoorsData_Writable->DoorCount)
return false;
if (MMFDoorsData_Writable->DoorIndex[id] != 0xFFFFFFFF)
return false;
MMFDoorsData_Writable->DoorIndex[id] = MMFDoorsData_Writable->NextFreeIndex++;
memcpy(&MMFDoorsData_Writable->Doors[MMFDoorsData_Writable->DoorIndex[id]], door, sizeof(Door));
return true;
}
bool pDLLLoadDoors(CALLBACK_DBLoadDoors cbDBLoadDoors, uint32 iDoorstructSize, int32* iDoorsCount, uint32* iMaxDoorID) {
if (iDoorstructSize != sizeof(Door)) {
cout << "Error: EMuShareMem: DLLLoadDoors: iDoorstructSize != sizeof(Door)" << endl;
cout << "Door struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (*iMaxDoorID > MMF_MAX_Door_ID) {
cout << "Error: EMuShareMem: pDLLLoadDoors: iMaxDoorID > MMF_MAX_Door_ID" << endl;
cout << "You need to increase the define in Doors.h." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFDoors_Struct) + 256 + (sizeof(Door) * (*iDoorsCount));
if (DoorsMMF.Open("EQEMuDoors", tmpMemSize)) {
if (DoorsMMF.CanWrite()) {
MMFDoorsData_Writable = (MMFDoors_Struct*) DoorsMMF.GetWriteableHandle();
if (!MMFDoorsData_Writable) {
cout << "Error: EMuShareMem: DLLLoadDoors: !MMFDoorsData_Writable" << endl;
return false;
}
memset(MMFDoorsData_Writable, 0, tmpMemSize);
for(int i=0; i<MMF_MAX_Door_ID; i++)
MMFDoorsData_Writable->DoorIndex[i] = 0xFFFFFFFF;
MMFDoorsData_Writable->MaxDoorID = *iMaxDoorID;
MMFDoorsData_Writable->DoorCount = *iDoorsCount;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadDoors(*iDoorsCount, *iMaxDoorID)) {
cout << "Error: EMuShareMem: DLLLoadDoors: !cbDBLoadDoors" << endl;
return false;
}
MMFDoorsData_Writable = 0;
DoorsMMF.SetLoaded();
MMFDoorsData = (const MMFDoors_Struct*) DoorsMMF.GetHandle();
if (!MMFDoorsData) {
cout << "Error: EMuShareMem: DLLLoadDoors: !MMFDoorsData (CanWrite=true)" << endl;
return false;
}
return true;
}
else {
if (!DoorsMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!DoorsMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(10);
Timer::SetCurrentTime();
}
if (!DoorsMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadDoors: !DoorsMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFDoorsData = (const MMFDoors_Struct*) DoorsMMF.GetHandle();
if (!MMFDoorsData) {
cout << "Error: EMuShareMem: DLLLoadDoors: !MMFDoorsData (CanWrite=false)" << endl;
return false;
}
*iMaxDoorID = MMFDoorsData->MaxDoorID;
*iDoorsCount = MMFDoorsData->DoorCount;
return true;
}
}
else {
cout << "Error Loading Doors: Doors.cpp: pDLLLoadDoors: ret == 0" << endl;
return false;
}
return false;
};
const Door* pGetDoor(uint32 id) {
if (MMFDoorsData == 0 || (!DoorsMMF.IsLoaded()) || id > MMF_MAX_Door_ID || MMFDoorsData->DoorIndex[id] == 0xFFFFFFFF)
return 0;
return &MMFDoorsData->Doors[MMFDoorsData->DoorIndex[id]];
}
-22
View File
@@ -1,22 +0,0 @@
#include "../common/types.h"
#include "../zone/zonedump.h"
#include "../common/EMuShareMem.h"
// MMF_MAX_Door_ID: Make sure this is bigger than the highest Door ID#
#ifndef MMF_MAX_Door_ID
#define MMF_MAX_Door_ID 30000
#endif
// MMF_MAX_Door_MEM: Maxium number of Doors to load into memory. Make sure this is bigger
// than the total number of Doors in the server's database!
struct MMFDoors_Struct {
uint32 MaxDoorID;
uint32 NextFreeIndex;
uint32 DoorCount;
uint32 DoorIndex[MMF_MAX_Door_ID+1];
Door Doors[0];
};
bool pDLLLoadDoors(CALLBACK_DBLoadDoors cbDBLoadDoors, uint32 iDoorstructSize, int32* iDoorsCount, uint32* iMaxDoorID);
bool pAddDoor(uint32 id, const Door* door);
const Door* pGetDoor(uint32 id);
-152
View File
@@ -1,152 +0,0 @@
/*
Note: Do NOT change this to load items on an as-needed basis. Since this memory is
accessed from multiple threads, you'd need mutex's all over the place if it was
ever to be modified/updated/added to. The overhead of the mutexes would be alot more
in the long run than the delay in loading.
-Quagmire
*/
#ifdef _WINDOWS
#include <winsock2.h>
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "Items.h"
#include "../common/timer.h"
#include "MMF.h"
MMF ItemsMMF;
const MMFItems_Struct* MMFItemsData = 0;
MMFItems_Struct* MMFItemsData_Writable = 0;
DLLFUNC bool AddItem(uint32 id, const Item_Struct* item) {
if (!MMFItemsData_Writable) {
return false;
}
if (id > MMF_EQMAX_ITEMS || MMFItemsData_Writable->NextFreeIndex >= MMFItemsData_Writable->ItemCount) {
return false;
}
if (MMFItemsData_Writable->ItemIndex[id] != 0xFFFF) {
return false;
}
uint32 nextid = MMFItemsData_Writable->NextFreeIndex++;
MMFItemsData_Writable->ItemIndex[id] = nextid;
memcpy(&MMFItemsData_Writable->Items[nextid], item, sizeof(Item_Struct));
return true;
}
DLLFUNC bool DLLLoadItems(CALLBACK_DBLoadItems cbDBLoadItems, uint32 iItemStructSize, int32* iItemCount, uint32* iMaxItemID) {
if (iItemStructSize != sizeof(Item_Struct)) {
cout << "Error: EMuShareMem: DLLLoadItems: iItemStructSize != sizeof(Item_Struct)" << endl;
cout << "Item_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (*iMaxItemID > MMF_EQMAX_ITEMS) {
cout << "Error: EMuShareMem: pDLLLoadItems: iMaxItemID > MMF_EQMAX_ITEMS" << endl;
cout << "You need to increase the define in Items.h." << endl;
return false;
}
MMFItemsData_Writable = 0;
//Allocate the shared memory for the item structures
uint32 tmpMemSize = sizeof(MMFItems_Struct) + 256 + (sizeof(Item_Struct) * (*iItemCount));
//cout << tmpMemSize << endl;
if (ItemsMMF.Open("EQEMuItems", tmpMemSize)) {
if (ItemsMMF.CanWrite()) {
MMFItemsData_Writable = (MMFItems_Struct*) ItemsMMF.GetWriteableHandle();
if (!MMFItemsData_Writable) {
cout << "Error: EMuShareMem: DLLLoadItems: !MMFItemsData_Writable" << endl;
return false;
}
memset(MMFItemsData_Writable, 0, tmpMemSize);
for(int i=0; i<MMF_EQMAX_ITEMS; i++)
MMFItemsData_Writable->ItemIndex[i] = 0xFFFF;
MMFItemsData_Writable->MaxItemID = *iMaxItemID;
MMFItemsData_Writable->ItemCount = *iItemCount;
//the writable handle has been created, do the load below after we have the
//serialization handle as well.
} else {
if (!ItemsMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!ItemsMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(10);
Timer::SetCurrentTime();
}
if (!ItemsMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadItems: !ItemsMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFItemsData = (const MMFItems_Struct*) ItemsMMF.GetHandle();
if (!MMFItemsData) {
cout << "Error: EMuShareMem: DLLLoadItems: !MMFItemsData (CanWrite=false)" << endl;
return false;
}
*iMaxItemID = MMFItemsData->MaxItemID;
*iItemCount = MMFItemsData->ItemCount;
return true;
}
} else {
cout << "Error Loading Items: Items.cpp: pDLLLoadItems: Open() == false" << endl;
return false;
}
/*
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadItems(*iItemCount, *iMaxItemID)) {
cout << "Error: EMuShareMem: DLLLoadItems: !cbDBLoadItems" << endl;
return false;
}
*/
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadItems(*iItemCount, *iMaxItemID)) {
cout << "Error: EMuShareMem: DLLLoadItems: !cbDBLoadItems" << endl;
return false;
}
//Now, Disable the write handle and get the read handle.
//do this for both item struct and serialization data
MMFItemsData_Writable = 0;
ItemsMMF.SetLoaded();
MMFItemsData = (const MMFItems_Struct*) ItemsMMF.GetHandle();
if (!MMFItemsData) {
cout << "Error: EMuShareMem: DLLLoadItems: !MMFItemsData (CanWrite=true)" << endl;
return false;
}
return true;
};
DLLFUNC const Item_Struct* GetItem(uint32 id) {
if (MMFItemsData == 0 || (!ItemsMMF.IsLoaded()) || id > MMF_EQMAX_ITEMS || MMFItemsData->ItemIndex[id] == 0xFFFF)
return 0;
return &MMFItemsData->Items[MMFItemsData->ItemIndex[id]];
}
DLLFUNC const Item_Struct* IterateItems(uint32* NextIndex) {
if (MMFItemsData == 0 || (!ItemsMMF.IsLoaded()) || (*NextIndex) > MMF_EQMAX_ITEMS)
return 0;
do {
if (MMFItemsData->ItemIndex[*NextIndex] != 0xFFFF)
return &MMFItemsData->Items[MMFItemsData->ItemIndex[(*NextIndex)++]];
} while (++(*NextIndex) < MMF_EQMAX_ITEMS);
return 0;
}
-23
View File
@@ -1,23 +0,0 @@
#include "../common/types.h"
#include "../common/eq_packet_structs.h"
#include "../common/EMuShareMem.h"
// MMF_EQMAX_ITEMS: Make sure this is bigger than the highest item ID#
#ifndef MMF_EQMAX_ITEMS
#define MMF_EQMAX_ITEMS 300000
#endif
// MMF_MEMMAX_ITEMS: Maxium number of items to load into memory. Make sure this is bigger
// than the total number of items in the server's database!
struct MMFItems_Struct {
uint32 MaxItemID;
uint32 NextFreeIndex;
uint32 ItemCount;
uint32 ItemIndex[MMF_EQMAX_ITEMS+1];
Item_Struct Items[0];
};
//#define MMF_MAX_ITEMS_MEMSIZE sizeof(MMFItems_Struct) + 256
-214
View File
@@ -1,214 +0,0 @@
#include "../common/debug.h"
#include <memory.h>
#include <iostream>
using namespace std;
#include "Loot.h"
#include "../common/timer.h"
#include "MMF.h"
MMF LootMMF;
const MMFLoot_Struct* MMFLootData = 0;
MMFLoot_Struct* MMFLootData_Writable = 0;
uint32* LootTable;
uint32* LootDrop;
#ifdef _WINDOWS
#define exportfunc extern "C" __declspec(dllexport)
#else
#define exportfunc extern "C"
#endif
exportfunc const LootTable_Struct* GetLootTable(uint32 id) {
return pGetLootTable(id);
};
exportfunc const LootDrop_Struct* GetLootDrop(uint32 id) {
return pGetLootDrop(id);
};
exportfunc bool AddLootTable(uint32 id, const LootTable_Struct* lts) {
return pAddLootTable(id, lts);
};
exportfunc bool AddLootDrop(uint32 id, const LootDrop_Struct* lds) {
return pAddLootDrop(id, lds);
};
exportfunc bool DLLLoadLoot(CALLBACK_DBLoadLoot cbDBLoadLoot,
uint32 iLootTableStructsize, uint32 iLootTableCount, uint32 iMaxLootTable,
uint32 iLootTableEntryStructsize, uint32 iLootTableEntryCount,
uint32 iLootDropStructsize, uint32 iLootDropCount, uint32 iMaxLootDrop,
uint32 iLootDropEntryStructsize, uint32 iLootDropEntryCount
) {
return pDLLLoadLoot(cbDBLoadLoot,
iLootTableStructsize, iLootTableCount, iMaxLootTable,
iLootTableEntryStructsize, iLootTableEntryCount,
iLootDropStructsize, iLootDropCount, iMaxLootDrop,
iLootDropEntryStructsize, iLootDropEntryCount);
};
bool pAddLootTable(uint32 id, const LootTable_Struct* lts) {
if (!MMFLootData_Writable)
return false;
if (id > MMFLootData_Writable->MaxLootTableID)
return false;
if (!LootTable || LootTable[id] != 0)
return false;
uint32 tmp = sizeof(LootTable_Struct) + (sizeof(LootTableEntries_Struct) * lts->NumEntries);
if (MMFLootData_Writable->dataindex + tmp >= MMFLootData_Writable->datamax)
return false;
LootTable[id] = MMFLootData_Writable->dataindex;
memcpy(&MMFLootData_Writable->data[MMFLootData_Writable->dataindex], lts, tmp);
MMFLootData_Writable->dataindex += tmp;
return true;
}
bool pAddLootDrop(uint32 id, const LootDrop_Struct* lds) {
if (!MMFLootData_Writable)
return false;
if (id > MMFLootData_Writable->MaxLootDropID)
return false;
if (!LootDrop || LootDrop[id] != 0)
return false;
uint32 tmp = sizeof(LootDrop_Struct) + (sizeof(LootDropEntries_Struct) * lds->NumEntries);
if (MMFLootData_Writable->dataindex + tmp >= MMFLootData_Writable->datamax)
return false;
LootDrop[id] = MMFLootData_Writable->dataindex;
memcpy(&MMFLootData_Writable->data[MMFLootData_Writable->dataindex], lds, tmp);
MMFLootData_Writable->dataindex += tmp;
return true;
}
bool pDLLLoadLoot(CALLBACK_DBLoadLoot cbDBLoadLoot,
uint32 iLootTableStructsize, uint32 iLootTableCount, uint32 iMaxLootTable,
uint32 iLootTableEntryStructsize, uint32 iLootTableEntryCount,
uint32 iLootDropStructsize, uint32 iLootDropCount, uint32 iMaxLootDrop,
uint32 iLootDropEntryStructsize, uint32 iLootDropEntryCount
) {
#if 0
cout << "iLootTableCount: " << iLootTableCount << endl;
cout << "iMaxLootTable: " << iMaxLootTable << endl;
cout << "iLootTableEntryCount: " << iLootTableEntryCount << endl;
cout << "iLootDropCount: " << iLootDropCount << endl;
cout << "iMaxLootDrop: " << iMaxLootDrop << endl;
cout << "iLootDropEntryCount: " << iLootDropEntryCount << endl;
#endif
if (iLootTableStructsize != sizeof(LootTable_Struct)) {
cout << "Error: EMuShareMem: DLLLoadLoot: iLootTableStructsize != sizeof(LootTable_Struct)" << endl;
cout << "Item_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (iLootTableEntryStructsize != sizeof(LootTableEntries_Struct)) {
cout << "Error: EMuShareMem: DLLLoadLoot: iLootTableEntryStructsize != sizeof(LootTableEntries_Struct)" << endl;
cout << "Item_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (iLootDropStructsize != sizeof(LootDrop_Struct)) {
cout << "Error: EMuShareMem: DLLLoadLoot: iLootDropStructsize != sizeof(LootDrop_Struct)" << endl;
cout << "Item_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (iLootDropEntryStructsize != sizeof(LootDropEntries_Struct)) {
cout << "Error: EMuShareMem: DLLLoadLoot: iLootDropEntryStructsize != sizeof(LootDropEntries_Struct)" << endl;
cout << "Item_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFLoot_Struct) + 256
+ (sizeof(uint32) * (iMaxLootTable+1))
+ (sizeof(LootTable_Struct) * iLootTableCount) + (sizeof(LootTableEntries_Struct) * iLootTableEntryCount)
+ (sizeof(uint32) * (iMaxLootDrop+1))
+ (sizeof(LootDrop_Struct) * iLootDropCount) + (sizeof(LootDropEntries_Struct) * iLootDropEntryCount)
;
if (LootMMF.Open("EQEMuLoot", tmpMemSize)) {
if (LootMMF.CanWrite()) {
MMFLootData_Writable = (MMFLoot_Struct*) LootMMF.GetWriteableHandle();
if (!MMFLootData_Writable) {
cout << "Error: EMuShareMem: DLLLoadLoot: !MMFLootData_Writable" << endl;
return false;
}
memset(MMFLootData_Writable, 0, tmpMemSize);
MMFLootData_Writable->LootTableCount = iLootTableCount;
MMFLootData_Writable->MaxLootTableID = iMaxLootTable;
MMFLootData_Writable->LootDropCount = iLootDropCount;
MMFLootData_Writable->MaxLootDropID = iMaxLootDrop;
MMFLootData_Writable->datamax = tmpMemSize - sizeof(MMFLoot_Struct);
MMFLootData_Writable->dataindex = 0;
MMFLootData_Writable->LootTableOffset = MMFLootData_Writable->dataindex;
MMFLootData_Writable->dataindex += (sizeof(uint32) * (iMaxLootTable+1));
MMFLootData_Writable->LootDropOffset = MMFLootData_Writable->dataindex;
MMFLootData_Writable->dataindex += (sizeof(uint32) * (iMaxLootDrop+1));
LootTable = (uint32*) &MMFLootData_Writable->data[MMFLootData_Writable->LootTableOffset];
LootDrop = (uint32*) &MMFLootData_Writable->data[MMFLootData_Writable->LootDropOffset];
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadLoot()) {
cout << "Error: EMuShareMem: DLLLoadLoot: !cbDBLoadLoot" << endl;
return false;
}
MMFLootData_Writable = 0;
LootMMF.SetLoaded();
}
else {
if (!LootMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!LootMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(10);
Timer::SetCurrentTime();
}
if (!LootMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadLoot: !LootMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
}
}
else {
cout << "Error Loading Loot: Loot.cpp: pDLLLoadLoot: Open() == false" << endl;
return false;
}
MMFLootData = (const MMFLoot_Struct*) LootMMF.GetHandle();
if (!MMFLootData) {
cout << "Error: EMuShareMem: DLLLoadLoot: !MMFLootData" << endl;
MMFLootData = 0;
return false;
}
if (MMFLootData->LootTableCount != iLootTableCount
|| MMFLootData->MaxLootTableID != iMaxLootTable
|| MMFLootData->LootDropCount != iLootDropCount
|| MMFLootData->MaxLootDropID != iMaxLootDrop) {
cout << "Error: EMuShareMem: DLLLoadLoot: Count/Max mismatch" << endl;
MMFLootData = 0;
return false;
}
LootTable = (uint32*) &MMFLootData->data[MMFLootData->LootTableOffset];
LootDrop = (uint32*) &MMFLootData->data[MMFLootData->LootDropOffset];
return true;
};
const LootTable_Struct* pGetLootTable(uint32 id) {
if (MMFLootData == 0 || !LootMMF.IsLoaded())
return 0;
if (id > MMFLootData->MaxLootTableID || LootTable[id] == 0)
return 0;
return (LootTable_Struct*) &MMFLootData->data[LootTable[id]];
}
const LootDrop_Struct* pGetLootDrop(uint32 id) {
if (MMFLootData == 0 || !LootMMF.IsLoaded())
return 0;
if (id > MMFLootData->MaxLootDropID || LootDrop[id] == 0)
return 0;
return (LootDrop_Struct*) &MMFLootData->data[LootDrop[id]];
}
-29
View File
@@ -1,29 +0,0 @@
#include "../common/types.h"
#include "../common/eq_packet_structs.h"
#include "../common/EMuShareMem.h"
#pragma pack(1)
struct MMFLoot_Struct {
bool Loaded;
uint32 MaxLootTableID;
uint32 LootTableCount;
uint32 LootTableOffset;
uint32 MaxLootDropID;
uint32 LootDropCount;
uint32 LootDropOffset;
uint32 datamax;
uint32 dataindex;
uint8 data[0];
};
#pragma pack()
bool pDLLLoadLoot(CALLBACK_DBLoadLoot cbDBLoadLoot,
uint32 iLootTableStructsize, uint32 iLootTableCount, uint32 iMaxLootTable,
uint32 iLootTableEntryStructsize, uint32 iLootTableEntryCount,
uint32 iLootDropStructsize, uint32 iLootDropCount, uint32 iMaxLootDrop,
uint32 iLootDropEntryStructsize, uint32 iLootDropEntryCount
);
bool pAddLootTable(uint32 id, const LootTable_Struct* lts);
bool pAddLootDrop(uint32, const LootDrop_Struct* lds);
const LootTable_Struct* pGetLootTable(uint32 id);
const LootDrop_Struct* pGetLootDrop(uint32 id);
-353
View File
@@ -1,353 +0,0 @@
// start mingw
#ifdef __MINGW32__
#define __try
#define __finally
#endif
// end mingw
#include "MMF.h"
#include <iostream>
using namespace std;
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#ifdef _WINDOWS
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#include "MMFMutex.h"
#include "../common/unix.h"
#endif
MMF::MMF() {
SharedMemory = 0;
pCanWrite = false;
#ifdef _WINDOWS
hMapObject = NULL;
lpvMem = 0;
#else
lpvMem = 0;
pMMFMutex = 0;
m_alloc = false;
#endif
}
MMF::~MMF() {
Close();
}
bool MMF::Open(const char* iName, uint32 iSize) {
if (iSize < 1) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: iSize < 1" << endl;
return false;
}
if (strlen(iName) < 2) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: strlen(iName) < 2" << endl;
return false;
}
char MMFname[200];
memset(MMFname, 0, sizeof(MMFname));
snprintf(MMFname, sizeof(MMFname), "memfilemap_%s", iName);
uint32 tmpSize = sizeof(MMF_Struct) + iSize;
#ifdef _WINDOWS
char MMFMutexName[200];
memset(MMFMutexName, 0, sizeof(MMFMutexName));
snprintf(MMFMutexName, sizeof(MMFMutexName), "MutexToProtectOpenMMF_%s", iName);
HANDLE hMutex;
hMutex = CreateMutex(
NULL, // no security attributes
FALSE, // initially not owned
MMFMutexName); // name of mutex
if (hMutex == NULL) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: hMutex == Null" << endl;
return false;
}
DWORD dwWaitResult;
// Request ownership of mutex.
dwWaitResult = WaitForSingleObject(
hMutex, // handle to mutex
2000L); // two-second time-out interval
if (dwWaitResult != WAIT_OBJECT_0) {
// Mutex not aquired, crap out
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: dwWaitResult != WAIT_OBJECT_0" << endl;
return false;
}
// Finally, ready to rock.
bool fInit = false;
__try {
hMapObject = CreateFileMapping(
INVALID_HANDLE_VALUE, // use paging file
NULL, // default security attributes
PAGE_READWRITE, // read/write access
0, // size: high 32-bits
tmpSize, // size: low 32-bits
MMFname); // name of map object
if (hMapObject == NULL) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: hMapObject == Null" << endl;
return false;
}
// The first process to attach initializes memory.
fInit = (bool) (GetLastError() != ERROR_ALREADY_EXISTS);
// Get a pointer to the file-mapped shared memory.
lpvMem = MapViewOfFile(
hMapObject, // object to map view of
FILE_MAP_WRITE, // read/write access
0, // high offset: map from
0, // low offset: beginning
0); // default: map entire file
if (lpvMem == NULL) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: lpvMem == Null" << endl;
Close();
return false;
}
SharedMemory = (MMF_Struct*) lpvMem;
// Initialize memory if this is the first process.
if (fInit) {
memset(lpvMem, 0, sizeof(MMF_Struct));
pCanWrite = true;
SharedMemory->Loaded = false;
SharedMemory->datasize = iSize;
}
else {
pCanWrite = false;
if (SharedMemory->datasize != iSize) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: SharedMemory->datasize != iSize" << endl;
Close();
return false;
}
}
} // end of try block
__finally {
// Clean up the Mutex stuff
if (!ReleaseMutex(hMutex)) {
cout << "Error Loading MMF: " << __FILE__ << ":" << __LINE__ << " OpenMMF: !ReleaseMutex(hMutex)" << endl;
Close();
return false;
}
}
CloseHandle(hMutex);
return true;
#else //else, NOT WINDOWS
int load_share;
//int max_share = 7;
key_t share_key;
switch (MMFname[16]) {
case 'I': load_share = 0; break;
case 'N': load_share = 1; break;
case 'D': load_share = 2; break;
case 'S': load_share = 3; break;
case 'F': load_share = 4; break;
case 'L': load_share = 5; break;
case 'M': load_share = 6; break;
case 'O': load_share = 7; break;
case 'Z': load_share = 8; break;
case 'K': load_share = 9; break;
#ifdef CATCH_CRASH
default:
cerr<<"Failed to load shared memory segment="<<MMFname<<" ("<<MMFname[16]<<")"<<endl;
// malloc some memory here or something fancy
return false; // and make this return true
break;
#else
default: cerr<<"FATAL="<<(char)MMFname[16]<<endl; return false; break;
#endif
}
switch (load_share) {
// Item
case 0: share_key = ftok(".", 'I'); break;
// Npctype
case 1: share_key = ftok(".", 'N'); break;
// Door
case 2: share_key = ftok(".", 'D'); break;
// Spell
case 3: share_key = ftok(".", 'S'); break;
// Faction
case 4: share_key = ftok(".", 'F'); break;
// Loot
case 5: share_key = ftok(".", 'L'); break;
// ??
case 6: share_key = ftok(".", 'M'); break;
// Opcodes
case 7: share_key = ftok(".", 'O'); break;
// Item Serialization
case 8: share_key = ftok(".", 'Z'); break;
// Skills
case 9: share_key = ftok(".", 'K'); break;
// ERROR Fatal
default: cerr<<"Opps!"<<endl; share_key = 0xFF; break;
}
pMMFMutex = new MMFMutex(share_key);
if (!pMMFMutex){
assert(false);
}
//if (!tmpSize) {
int share_id = shmget(share_key, tmpSize, IPC_CREAT|IPC_EXCL|SHM_R|SHM_W);
if ( share_id <= 0) {
share_id = shmget(share_key, tmpSize, IPC_CREAT|IPC_NOWAIT);
if (share_id <= 0) {
shmid_ds mem_size;
share_id = shmget(share_key, 1, IPC_CREAT|IPC_NOWAIT|SHM_R|SHM_W);
if(share_id == -1) {
cerr << "failed to get 0-length shared mem: " << strerror(errno) << endl;
}
if ((lpvMem = shmat(share_id, NULL,SHM_RDONLY)) == (void *)-1) {
cerr << "shmat failed! " << strerror(errno) << endl;
}
if( (shmctl(share_id, IPC_STAT, &mem_size)) == 0){
if (mem_size.shm_segsz != int(tmpSize)){ //comparison between signed and unsigned integer expressions
cout<<"[Warning] requested shared memory of size:"<<tmpSize<<" but that Key is already in use with size:"<< mem_size.shm_segsz<<endl;
shmid_ds mem_users;
if( (shmctl(share_id, IPC_STAT, &mem_users)) == 0 && mem_users.shm_nattch == 1){
cout<<"[Warning] Attempting resize"<<endl;
shmctl(share_id, IPC_RMID, 0);
shmdt(lpvMem);
if ((share_id = shmget(share_key, tmpSize, IPC_CREAT|IPC_EXCL|SHM_R|SHM_W)) <= 0) {
// Failed proceed on malloc
cerr<<"[Error] Failed to resize" << strerror(errno) <<endl;
}
else{
cerr<<"[Error] Resize successful." << endl;
// Success
lpvMem = shmat(share_id, NULL, SHM_R|SHM_W);
memset(lpvMem, 0, sizeof(MMF_Struct));
pCanWrite = true;
SharedMemory = (MMF_Struct*) lpvMem;
SharedMemory->Loaded = false;
SharedMemory->datasize = iSize;
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
}
}
else{
cout<<"[Warning] Resize not possible"<<endl;
}
}
}
// Can not attatch to shared memory we'll malloc it here
if ((lpvMem == 0 || lpvMem == (void *)-1) && (lpvMem = malloc(tmpSize))) {
cout<<"[Warning] Could not attach to shared memory proceeding on isolated memory (share_id <= 0)"<<endl;
// Success!
m_alloc = true;
memset(lpvMem, 0, sizeof(MMF_Struct));
pCanWrite = true;
SharedMemory = (MMF_Struct*) lpvMem;
SharedMemory->datasize = iSize;
SharedMemory->Loaded = false;
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
} else if (!lpvMem){
//LogFile->write(EQEMuLog::Error, "Could not connect to shared memory and allocation of isolated memory failed.");
cout<<"Could not connect to shared memory and allocation of isolated memory failed."<<endl;
pMMFMutex->Release(this);
delete pMMFMutex;
exit(1);
}
pCanWrite = false;
SharedMemory = (MMF_Struct*) lpvMem;
if (SharedMemory->datasize != iSize) {
cerr<<"SharedMemory->datasize("<<SharedMemory->datasize<<") != iSize("<<iSize<<"), We can rebuild him faster better STRONGER!"<<endl;
cerr<<"Or not.. restart all servers on this machine"<<endl;
shmctl(share_id, IPC_RMID, 0);
pMMFMutex->Release(this);
exit(1);
}
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
}
shmid_ds mem_users;
if ((shmctl(share_id, IPC_STAT, &mem_users)) != 0) {
if ((lpvMem = malloc(tmpSize))) {
// Success!
cout<<"[Warning] Could not attach to shared memory proceeding on isolated memory"<<endl;
m_alloc = true;
memset(lpvMem, 0, sizeof(MMF_Struct));
pCanWrite = true;
SharedMemory = (MMF_Struct*) lpvMem;
SharedMemory->datasize = iSize;
SharedMemory->Loaded = false;
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
} else {
//LogFile->write(EQEMuLog::Error, "Could not connect to shared memory and allocation of isolated memory failed.");
cout<<"Could not connect to shared memory and allocation of isolated memory failed."<<endl;
pMMFMutex->Release(this);
delete pMMFMutex;
exit(1);
}
}
lpvMem = shmat(share_id, NULL,SHM_RDONLY);
pCanWrite = false;
SharedMemory = (MMF_Struct*) lpvMem;
//cerr << "lpvMem=" << (int)lpvMem << endl;
if (lpvMem==(void *)-1 || SharedMemory->datasize != iSize) {
cerr<<"SharedMemory->datasize("<<SharedMemory->datasize<<") != iSize("<<iSize<<"), or "<<((void *)lpvMem)<<"==-1, We can rebuild him faster better STRONGER!"<<endl;
cerr<<"Or not.. restart all servers on this machine"<<endl;
shmctl(share_id, IPC_RMID, 0);
pMMFMutex->Release(this);
exit(1);
}
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
}
lpvMem = shmat(share_id, NULL, SHM_R|SHM_W);
memset(lpvMem, 0, sizeof(MMF_Struct));
pCanWrite = true;
SharedMemory = (MMF_Struct*) lpvMem;
SharedMemory->Loaded = false;
SharedMemory->datasize = iSize;
//}
pMMFMutex->Release(this);
delete pMMFMutex;
return true;
#endif //end NOT WINDOWS
}
void MMF::Close() {
SharedMemory = 0;
pCanWrite = false;
#ifdef _WINDOWS
if (lpvMem) {
// Unmap shared memory from the process's address space.
UnmapViewOfFile(lpvMem);
lpvMem = 0;
}
if (hMapObject) {
// Close the process's handle to the file-mapping object.
CloseHandle(hMapObject);
hMapObject = NULL;
}
#else
if (lpvMem) {
if (m_alloc == true)
free(lpvMem);
else
if (shmdt(lpvMem) == -1)
//LogFile->write(EQEMuLog::Error, "Warning something odd happened freeing shared memory");
cout<<"Warning something odd happened freeing shared memory"<<endl;
lpvMem = 0;
}
#endif
}
-46
View File
@@ -1,46 +0,0 @@
#ifndef MMF_H
#define MMF_H
#include "../common/types.h"
#ifdef _WINDOWS
#include <windows.h>
#else
//#include "MMFMutex.h"
class MMFMutex;
#endif
class MMF {
public:
struct MMF_Struct {
bool Loaded;
uint32 datasize;
uint8 data[0];
};
MMF();
virtual ~MMF();
bool Open(const char* iName, uint32 iSize);
void Close();
const void* GetHandle() { if (IsLoaded()) { return SharedMemory->data; } return 0; }
void* GetWriteableHandle() { if (!IsLoaded() && CanWrite()) { return SharedMemory->data; } return 0; }
inline bool IsOpen() { return (bool) (SharedMemory != 0); }
inline bool IsLoaded() { if (SharedMemory) { return SharedMemory->Loaded; } return false; }
bool SetLoaded() { if (SharedMemory && CanWrite()) { SharedMemory->Loaded = true; return true; } return false; }
inline bool CanWrite() { if (SharedMemory) { return pCanWrite; } return false; }
#ifndef WIN32
bool m_alloc;
#endif
private:
bool pCanWrite;
MMF_Struct* SharedMemory;
#ifdef _WINDOWS
HANDLE hMapObject;
LPVOID lpvMem;
#else
void* lpvMem;
MMFMutex* pMMFMutex;
#endif
};
#endif
-126
View File
@@ -1,126 +0,0 @@
#include "MMFMutex.h"
#ifndef WIN32
MMFMutex::MMFMutex( int key )
{
m_key = key;
if( m_key == 0 )
{
// initialize POSIX semaphore
sem_init( &m_semaphore, 0, 1);
}
else
{
// currently, this thread does not own the semaphore
m_owner = 0;
m_recursive_count = 0;
// try to get an existing semaphore. the access permissions are "full access for everyone"
m_id = semget(m_key, 1, 0x1b6);
if( m_id == -1 )
{
// it doesn't exist yet, try to create a new one
m_id = semget(m_key, 1, IPC_CREAT | 0x1b6);
if( m_id != -1 )
{
// initialize it to 1
semun data;
data.val = 1;
semctl(m_id, 0, SETVAL, data);
}
}
}
}
MMFMutex::~MMFMutex()
{
if( m_key == 0 )
{
sem_destroy(&m_semaphore);
}
else
{
semctl(m_id, 0, IPC_RMID, 0);
}
}
bool MMFMutex::Lock( uint32 dwTimeout )
{
if( m_owner == pthread_self() )
{
m_recursive_count++;
return true;
}
bool bUseTimeout = (dwTimeout != 0);
while(true) {
bool bGotSemaphore = false;
if( m_key == 0 )
{
bGotSemaphore = (sem_trywait(&m_semaphore) == 0);
}
else
{
struct sembuf operations[1];
operations[0].sem_num = 0;
operations[0].sem_op = -1;
operations[0].sem_flg = SEM_UNDO|IPC_NOWAIT;
bGotSemaphore = (semop(m_id, operations, 1) >= 0);
}
if( bGotSemaphore )
{
m_owner = pthread_self();
m_recursive_count = 1;
return true;
}
sleep(1);
if( bUseTimeout )
{
if( dwTimeout > 1000 )
dwTimeout -= 1000;
else
dwTimeout = 0;
if( dwTimeout == 0 )
return false;
}
}
}
void MMFMutex::Release(const MMF* pMMF)
{
if( m_owner != pthread_self() && pMMF->m_alloc != true )
{
//We're supposed to explode here with an assert
//assert(false);
}
else if ( pMMF->m_alloc == true ){
// Just do it nothing is useing but us
return;
}
else if( m_recursive_count > 1 )
{
m_recursive_count--;
}
else
{
if( m_key == 0 )
{
sem_post(&m_semaphore);
}
else
{
struct sembuf operations[1];
operations[0].sem_num = 0;
operations[0].sem_op = 1;
operations[0].sem_flg = SEM_UNDO;
semop(m_id, operations, 1);
}
m_recursive_count = 0;
m_owner = 0;
}
}
#endif //!WIN32
-43
View File
@@ -1,43 +0,0 @@
#ifndef MMFMUTEX_H
#define MMFMUTEX_H
#ifndef WIN32
#include <sys/types.h> // moved before sys/shm.h for freeBSD
#include <sys/shm.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <semaphore.h>
#include <pthread.h>
#include <unistd.h>
#include <assert.h>
#include "../common/types.h"
#include "MMF.h"
// the manuals say you have to define this struct your self.
#if !defined FREEBSD || defined __NetBSD__ // for BSDs
union semun
{
int val;
struct semid_ds* buf;
unsigned short int *array;
struct seminfo *__buf;
};
#endif // for freeBSD
class MMFMutex
{
public:
MMFMutex(int iIndex);
virtual ~MMFMutex();
bool Lock( uint32 dwTimeout = 0 );
void Release(const MMF*);
protected:
int m_id;
key_t m_key;
pthread_t m_owner;
sem_t m_semaphore;
int m_recursive_count;
};
#endif //!WIN32
#endif
-178
View File
@@ -1,178 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "NPCFactionLists.h"
#include "../common/timer.h"
#include "MMF.h"
MMF NPCFactionListsMMF;
const MMFNPCFactionLists_Struct* MMFNPCFactionListsData = 0;
MMFNPCFactionLists_Struct* MMFNPCFactionListsData_Writable = 0;
#ifdef _WINDOWS
extern "C" __declspec(dllexport) const NPCFactionList* GetNPCFactionList(uint32 id) {
return pGetNPCFactionList(id);
};
extern "C" __declspec(dllexport) bool AddNPCFactionList(uint32 id, const NPCFactionList* nfl) {
return pAddNPCFactionList(id, nfl);
};
extern "C" __declspec(dllexport) bool DLLLoadNPCFactionLists(CALLBACK_DBLoadNPCFactionLists cbDBLoadNPCFactionLists, uint32 iNPCFactionListStructSize, int32* iNPCFactionListsCount, uint32* iMaxNPCFactionListID, uint8 iMaxNPCFactions) {
return pDLLLoadNPCFactionLists(cbDBLoadNPCFactionLists, iNPCFactionListStructSize, iNPCFactionListsCount, iMaxNPCFactionListID, iMaxNPCFactions);
};
extern "C" __declspec(dllexport) bool SetNPCFaction(uint32 id, uint32* factionid, int32* factionvalue, int8 *factionnpcvalue, uint8 *factiontemp) {
return pSetNPCFaction(id, factionid, factionvalue, factionnpcvalue, factiontemp);
}
#else
extern "C" const NPCFactionList* GetNPCFactionList(uint32 id) {
return pGetNPCFactionList(id);
};
extern "C" bool AddNPCFactionList(uint32 id, const NPCFactionList* nfl) {
return pAddNPCFactionList(id, nfl);
};
extern "C" bool DLLLoadNPCFactionLists(CALLBACK_DBLoadNPCFactionLists cbDBLoadNPCFactionLists, uint32 iNPCFactionListStructSize, int32* iNPCFactionListsCount, uint32* iMaxNPCFactionListID, uint8 iMaxNPCFactions) {
return pDLLLoadNPCFactionLists(cbDBLoadNPCFactionLists, iNPCFactionListStructSize, iNPCFactionListsCount, iMaxNPCFactionListID, iMaxNPCFactions);
};
extern "C" bool SetNPCFaction(uint32 id, uint32* factionid, int32* factionvalue, int8 *factionnpcvalue, uint8 *factiontemp) {
return pSetNPCFaction(id, factionid, factionvalue, factionnpcvalue, factiontemp);
}
#endif
bool pAddNPCFactionList(uint32 id, const NPCFactionList* nfl) {
if (!MMFNPCFactionListsData_Writable){
if (EQDEBUG>=1) cout<<"[Debug] !MMFNPCFactionListsData_Writable"<<endl;
return false;
}
if (id > MMF_MAX_NPCFactionList_ID || MMFNPCFactionListsData_Writable->NextFreeIndex >= MMFNPCFactionListsData_Writable->NPCFactionListCount){
if (EQDEBUG>=1) cout<<"[Debug] id > MMF_MAX_NPCFactionList_ID || MMFNPCFactionListsData_Writable->NextFreeIndex >= MMFNPCFactionListsData_Writable->NPCFactionListCount"<<endl;
return false;
}
if (MMFNPCFactionListsData_Writable->NPCFactionListIndex[id] != 0xFFFFFFFF){
if (EQDEBUG>=1) cout<<"[Debug] MMFNPCFactionListsData_Writable->NPCFactionListIndex[id] != 0xFFFFFFFF"<<endl;
return false;
}
MMFNPCFactionListsData_Writable->NPCFactionListIndex[id] = MMFNPCFactionListsData_Writable->NextFreeIndex++;
memcpy(&MMFNPCFactionListsData_Writable->NPCFactionLists[MMFNPCFactionListsData_Writable->NPCFactionListIndex[id]], nfl, sizeof(NPCFactionList));
return true;
}
bool pSetNPCFaction(uint32 id, uint32* factionid, int32* factionvalue, int8 *factionnpcvalue, uint8 *factiontemp) {
if (!MMFNPCFactionListsData_Writable) {
if(EQDEBUG>=1) cout<<"[Debug] !MMFNPCFactionListsData_Writable"<<endl;
return false;
}
if (id > MMF_MAX_NPCFactionList_ID) {
if(EQDEBUG>=1) cout<<"[Debug] id > MMF_MAX_NPCFactionList_ID"<<endl;
return false;
}
if (MMFNPCFactionListsData_Writable->NPCFactionListIndex[id] == 0xFFFFFFFF) {
if(EQDEBUG>=1) cout<<"[Debug] MMFNPCFactionListsData_Writable->NPCFactionListIndex[id="<<id<<"] == 0xFFFFFFFF"<<endl;
return false;
}
for (int i=0; i<MAX_NPC_FACTIONS; i++) {
MMFNPCFactionListsData_Writable->NPCFactionLists[MMFNPCFactionListsData_Writable->NPCFactionListIndex[id]].factionid[i] = factionid[i];
MMFNPCFactionListsData_Writable->NPCFactionLists[MMFNPCFactionListsData_Writable->NPCFactionListIndex[id]].factionvalue[i] = factionvalue[i];
MMFNPCFactionListsData_Writable->NPCFactionLists[MMFNPCFactionListsData_Writable->NPCFactionListIndex[id]].factionnpcvalue[i] = factionnpcvalue[i];
MMFNPCFactionListsData_Writable->NPCFactionLists[MMFNPCFactionListsData_Writable->NPCFactionListIndex[id]].factiontemp[i] = factiontemp[i];
}
return true;
}
bool pDLLLoadNPCFactionLists(CALLBACK_DBLoadNPCFactionLists cbDBLoadNPCFactionLists, uint32 iNPCFactionListStructSize, int32* iNPCFactionListsCount, uint32* iMaxNPCFactionListID, uint8 iMaxNPCFactions) {
if (iNPCFactionListStructSize != sizeof(NPCFactionList)) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: iNPCFactionListStructSize != sizeof(NPCFactionList)" << endl;
cout << "NPCFactionList struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (iMaxNPCFactions != MAX_NPC_FACTIONS) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: iMaxNPCFactions != MAX_NPC_FACTIONS" << endl;
cout << "NPCFactionList struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (*iMaxNPCFactionListID > MMF_MAX_NPCFactionList_ID) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: iMaxNPCFactions > MMF_MAX_NPCFactionList_ID" << endl;
cout << "You need to increase the define in NPCFactionList.h." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFNPCFactionLists_Struct) + 256 + (sizeof(NPCFactionList) * (*iNPCFactionListsCount));
if (NPCFactionListsMMF.Open("EQEMuFactionLists", tmpMemSize)) {
// MMFNPCFactionListsData = (const MMFNPCFactionLists_Struct*) NPCFactionListsMMF.GetHandle();
if (NPCFactionListsMMF.CanWrite()) {
MMFNPCFactionListsData_Writable = (MMFNPCFactionLists_Struct*) NPCFactionListsMMF.GetWriteableHandle();
if (!MMFNPCFactionListsData_Writable) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: !MMFNPCFactionListsData_Writable" << endl;
return false;
}
memset(MMFNPCFactionListsData_Writable, 0, tmpMemSize);
for(int i=0; i<MMF_MAX_NPCFactionList_ID; i++)
MMFNPCFactionListsData_Writable->NPCFactionListIndex[i] = 0xFFFFFFFF;
MMFNPCFactionListsData_Writable->MaxNPCFactionListID = *iMaxNPCFactionListID;
MMFNPCFactionListsData_Writable->NPCFactionListCount = *iNPCFactionListsCount;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadNPCFactionLists(MMFNPCFactionListsData_Writable->NPCFactionListCount, MMFNPCFactionListsData_Writable->MaxNPCFactionListID)) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: !cbDBLoadNPCFactionLists" << endl;
return false;
}
MMFNPCFactionListsData_Writable = 0;
NPCFactionListsMMF.SetLoaded();
MMFNPCFactionListsData = (const MMFNPCFactionLists_Struct*) NPCFactionListsMMF.GetHandle();
if (!MMFNPCFactionListsData) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: !MMFNPCFactionListsData (CanWrite=true)" << endl;
return false;
}
return true;
}
else {
if (!NPCFactionListsMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!NPCFactionListsMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(100);
Timer::SetCurrentTime();
}
if (!NPCFactionListsMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: !NPCFactionListsMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFNPCFactionListsData = (const MMFNPCFactionLists_Struct*) NPCFactionListsMMF.GetHandle();
if (!MMFNPCFactionListsData) {
cout << "Error: EMuShareMem: DLLLoadNPCFactionLists: !MMFNPCFactionListsData (CanWrite=false)" << endl;
return false;
}
*iMaxNPCFactionListID = MMFNPCFactionListsData->MaxNPCFactionListID;
*iNPCFactionListsCount = MMFNPCFactionListsData->NPCFactionListCount;
return true;
}
}
else {
cout << "Error Loading NPCFactionLists: NPCFactionLists.cpp: pDLLLoadNPCFactionLists: Open() == false" << endl;
return false;
}
return false;
};
const NPCFactionList* pGetNPCFactionList(uint32 id) {
if (MMFNPCFactionListsData == 0 || (!NPCFactionListsMMF.IsLoaded()) || id > MMF_MAX_NPCFactionList_ID || MMFNPCFactionListsData->NPCFactionListIndex[id] == 0xFFFFFFFF)
return 0;
return &MMFNPCFactionListsData->NPCFactionLists[MMFNPCFactionListsData->NPCFactionListIndex[id]];
}
-22
View File
@@ -1,22 +0,0 @@
#include "../common/types.h"
#include "../zone/features.h"
#include "../zone/faction.h"
#include "../common/EMuShareMem.h"
// MMF_MAX_NPCFactionList_ID: Make sure this is bigger than the highest NPCFactionList ID#
#ifndef MMF_MAX_NPCFactionList_ID
#define MMF_MAX_NPCFactionList_ID 50000
#endif
struct MMFNPCFactionLists_Struct {
uint32 MaxNPCFactionListID;
uint32 NextFreeIndex;
uint32 NPCFactionListCount;
uint32 NPCFactionListIndex[MMF_MAX_NPCFactionList_ID+1];
NPCFactionList NPCFactionLists[0];
};
bool pDLLLoadNPCFactionLists(CALLBACK_DBLoadNPCFactionLists cbDBLoadNPCFactionLists, uint32 iNPCFactionListStructSize, int32* iNPCFactionListCount, uint32* iMaxNPCFactionListID, uint8 iMaxNPCFactions);
bool pAddNPCFactionList(uint32 id, const NPCFactionList* nfl);
bool pSetNPCFaction(uint32 id, uint32* factionid, int32* factionvalue, int8 *factionnpcvalue, uint8 *factiontemp);
const NPCFactionList* pGetNPCFactionList(uint32 id);
-137
View File
@@ -1,137 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "NPCTypes.h"
#include "../common/timer.h"
#include "MMF.h"
MMF NPCTypesMMF;
const MMFNPCTypes_Struct* MMFNPCTypesData = 0;
MMFNPCTypes_Struct* MMFNPCTypesData_Writable = 0;
#ifdef _WINDOWS
extern "C" __declspec(dllexport) const NPCType* GetNPCType(uint32 id) {
return pGetNPCType(id);
};
extern "C" __declspec(dllexport) bool AddNPCType(uint32 id, const NPCType* npctype) {
return pAddNPCType(id, npctype);
};
/*extern "C" __declspec(dllexport) bool DLLLoadNPCTypes(CALLBACK_DBLoadNPCTypes cbDBLoadNPCTypes, uint32 iNPCTypeStructSize, int32* iNPCTypesCount, uint32* iMaxNPCTypeID) {
return pDLLLoadNPCTypes(cbDBLoadNPCTypes, iNPCTypeStructSize, iNPCTypesCount, iMaxNPCTypeID);
};*/
#else
extern "C" const NPCType* GetNPCType(uint32 id) {
return pGetNPCType(id);
};
extern "C" bool AddNPCType(uint32 id, const NPCType* npctype) {
return pAddNPCType(id, npctype);
};
extern "C" bool DLLLoadNPCTypes(CALLBACK_DBLoadNPCTypes cbDBLoadNPCTypes, uint32 iNPCTypeStructSize, int32* iNPCTypesCount, uint32* iMaxNPCTypeID) {
return pDLLLoadNPCTypes(cbDBLoadNPCTypes, iNPCTypeStructSize, iNPCTypesCount, iMaxNPCTypeID);
};
#endif
bool pAddNPCType(uint32 id, const NPCType* npctype) {
if (!MMFNPCTypesData_Writable)
return false;
if (id > MMF_MAX_NPCTYPE_ID || MMFNPCTypesData_Writable->NextFreeIndex >= MMFNPCTypesData_Writable->NPCTypeCount)
return false;
if (MMFNPCTypesData_Writable->NPCTypeIndex[id] != 0xFFFFFFFF)
return false;
MMFNPCTypesData_Writable->NPCTypeIndex[id] = MMFNPCTypesData_Writable->NextFreeIndex++;
memcpy(&MMFNPCTypesData_Writable->NPCTypes[MMFNPCTypesData_Writable->NPCTypeIndex[id]], npctype, sizeof(NPCType));
return true;
}
/*bool pDLLLoadNPCTypes(CALLBACK_DBLoadNPCTypes cbDBLoadNPCTypes, uint32 iNPCTypeStructSize, int32* iNPCTypesCount, uint32* iMaxNPCTypeID) {
if (iNPCTypeStructSize != sizeof(NPCType)) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: iNPCTypeStructSize != sizeof(NPCType)" << endl;
cout << "NPCType struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
if (*iMaxNPCTypeID > MMF_MAX_NPCTYPE_ID) {
cout << "Error: EMuShareMem: pDLLLoadNPCTypes: iMaxNPCTypeID > MMF_MAX_NPCTYPE_ID" << endl;
cout << "You need to increase the define in NPCTypes.h." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFNPCTypes_Struct) + 256 + (sizeof(NPCType) * (*iNPCTypesCount));
if (NPCTypesMMF.Open("EQEMuNPCTypes", tmpMemSize)) {
// MMFNPCTypesData = (const MMFNPCTypes_Struct*) NPCTypesMMF.GetHandle();
if (NPCTypesMMF.CanWrite()) {
MMFNPCTypesData_Writable = (MMFNPCTypes_Struct*) NPCTypesMMF.GetWriteableHandle();
if (!MMFNPCTypesData_Writable) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: !MMFNPCTypesData_Writable" << endl;
return false;
}
memset(MMFNPCTypesData_Writable, 0, tmpMemSize);
for(int i=0; i<MMF_MAX_NPCTYPE_ID; i++)
MMFNPCTypesData_Writable->NPCTypeIndex[i] = 0xFFFFFFFF;
MMFNPCTypesData_Writable->MaxNPCTypeID = *iMaxNPCTypeID;
MMFNPCTypesData_Writable->NPCTypeCount = *iNPCTypesCount;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cbDBLoadNPCTypes(MMFNPCTypesData_Writable->NPCTypeCount, MMFNPCTypesData_Writable->MaxNPCTypeID)) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: !cbDBLoadNPCTypes" << endl;
return false;
}
MMFNPCTypesData_Writable = 0;
NPCTypesMMF.SetLoaded();
MMFNPCTypesData = (const MMFNPCTypes_Struct*) NPCTypesMMF.GetHandle();
if (!MMFNPCTypesData) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: !MMFNPCTypesData (CanWrite=true)" << endl;
return false;
}
return true;
}
else {
if (!NPCTypesMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!NPCTypesMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(100);
Timer::SetCurrentTime();
}
if (!NPCTypesMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: !NPCTypesMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFNPCTypesData = (const MMFNPCTypes_Struct*) NPCTypesMMF.GetHandle();
if (!MMFNPCTypesData) {
cout << "Error: EMuShareMem: DLLLoadNPCTypes: !MMFNPCTypesData (CanWrite=false)" << endl;
return false;
}
*iMaxNPCTypeID = MMFNPCTypesData->MaxNPCTypeID;
*iNPCTypesCount = MMFNPCTypesData->NPCTypeCount;
return true;
}
}
else {
cout << "Error Loading NPCTypes: NPCTypes.cpp: pDLLLoadNPCTypes: Open() == false" << endl;
return false;
}
return false;
};*/
const NPCType* pGetNPCType(uint32 id) {
if (MMFNPCTypesData == 0 || (!NPCTypesMMF.IsLoaded()) || id > MMF_MAX_NPCTYPE_ID || MMFNPCTypesData->NPCTypeIndex[id] == 0xFFFFFFFF)
return 0;
return &MMFNPCTypesData->NPCTypes[MMFNPCTypesData->NPCTypeIndex[id]];
}
-18
View File
@@ -1,18 +0,0 @@
#include "../common/types.h"
#include "../zone/zonedump.h"
#include "../common/EMuShareMem.h"
// MMF_MAX_NPCTYPE_ID: Make sure this is bigger than the highest NPCType ID#
#define MMF_MAX_NPCTYPE_ID 400000
struct MMFNPCTypes_Struct {
uint32 MaxNPCTypeID;
uint32 NextFreeIndex;
uint32 NPCTypeCount;
uint32 NPCTypeIndex[MMF_MAX_NPCTYPE_ID+1];
NPCType NPCTypes[0];
};
//bool pDLLLoadNPCTypes(CALLBACK_DBLoadNPCTypes cbDBLoadNPCTypes, uint32 iNPCTypeStructSize, int32* iNPCTypesCount, uint32* iMaxNPCTypeID);
bool pAddNPCType(uint32 id, const NPCType* npctype);
const NPCType* pGetNPCType(uint32 id);
-140
View File
@@ -1,140 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "Opcodes.h"
#include "../common/timer.h"
#include "MMF.h"
MMF OpcodesMMF;
const MMFOpcodes_Struct* MMFOpcodesData = 0;
MMFOpcodes_Struct* MMFOpcodesData_Writable = 0;
const uint16 *MMFOpcodesData_emu_to_eq = NULL;
uint16 *MMFOpcodesData_emu_to_eq_write = NULL;
//we choose to store all opcodes as 16 bits, so if they are a different
//size in emu, they are gunna get casted to 16 bits... prolly will never
//be a problem, but I figured it was noteworthy
DLLFUNC uint16 GetEQOpcode(uint16 emu_op) {
if (MMFOpcodesData == 0 || (!OpcodesMMF.IsLoaded()) || emu_op >= MMFOpcodesData->EmuOpcodeCount )
return 0;
return MMFOpcodesData_emu_to_eq[emu_op];
}
DLLFUNC uint16 GetEmuOpcode(uint16 eq_op) {
if (MMFOpcodesData == 0 || (!OpcodesMMF.IsLoaded()) || eq_op >= MMFOpcodesData->EQOpcodeCount )
return 0;
return MMFOpcodesData->eq_to_emu[eq_op];
}
DLLFUNC bool SetOpcodePair(uint16 emu_op, uint16 eq_op) {
if (!MMFOpcodesData_Writable || !MMFOpcodesData_emu_to_eq_write)
return false;
if (emu_op >= MMFOpcodesData_Writable->EmuOpcodeCount || eq_op >= MMFOpcodesData_Writable->EQOpcodeCount)
return false;
MMFOpcodesData_emu_to_eq_write[emu_op] = eq_op;
MMFOpcodesData_Writable->eq_to_emu[eq_op] = emu_op;
return true;
}
DLLFUNC void ClearEQOpcodes() {
if (!MMFOpcodesData_Writable)
return;
memset(MMFOpcodesData_Writable->eq_to_emu, 0, sizeof(uint16)*MMFOpcodesData->EQOpcodeCount);
}
DLLFUNC bool DLLLoadOpcodes(CALLBACK_DBLoadOpcodes cb, uint32 opsize, uint32 eq_count, uint32 emu_count, const char *filename) {
if(opsize != sizeof(uint16)) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: opsize != sizeof(uint16)" << endl;
cout << "Opcode size has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFOpcodes_Struct) + opsize * (eq_count+emu_count);
if (OpcodesMMF.Open("EQEMuOpcodes", tmpMemSize)) {
if (OpcodesMMF.CanWrite()) {
MMFOpcodesData_Writable = (MMFOpcodes_Struct*) OpcodesMMF.GetWriteableHandle();
if (!MMFOpcodesData_Writable) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: !MMFOpcodesData_Writable" << endl;
return false;
}
//emu_to_eq is right after eq_to_emu
MMFOpcodesData_emu_to_eq = MMFOpcodesData_Writable->eq_to_emu + eq_count;
MMFOpcodesData_emu_to_eq_write = MMFOpcodesData_Writable->eq_to_emu + eq_count;
//we need to memset the eq opcodes
memset(MMFOpcodesData_Writable->eq_to_emu, 0, sizeof(uint16)*eq_count);
MMFOpcodesData_Writable->EQOpcodeCount = eq_count;
MMFOpcodesData_Writable->EmuOpcodeCount = emu_count;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cb(filename)) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: !cbDBLoadOpcodes" << endl;
return false;
}
//we dont disable the write handle here, so we can reload them
//MMFOpcodesData_Writable = 0;
OpcodesMMF.SetLoaded();
MMFOpcodesData = (const MMFOpcodes_Struct*) OpcodesMMF.GetHandle();
if (!MMFOpcodesData) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: !MMFOpcodesData (CanWrite=true)" << endl;
return false;
}
return true;
} else {
if (!OpcodesMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!OpcodesMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(10);
Timer::SetCurrentTime();
}
if (!OpcodesMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: !OpcodesMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFOpcodesData = (const MMFOpcodes_Struct*) OpcodesMMF.GetHandle();
if (!MMFOpcodesData) {
cout << "Error: EMuShareMem: DLLLoadOpcodes: !MMFOpcodesData (CanWrite=false)" << endl;
return false;
}
//emu_to_eq is right after eq_to_emu
MMFOpcodesData_emu_to_eq = MMFOpcodesData->eq_to_emu + MMFOpcodesData->EQOpcodeCount;
//cheat a little so we can retain writeable handles for reloading
MMFOpcodesData_Writable = const_cast<MMFOpcodes_Struct*>(MMFOpcodesData);
MMFOpcodesData_emu_to_eq_write = MMFOpcodesData_Writable->eq_to_emu + eq_count;
return true;
}
}
else {
cout << "Error Loading Opcodes: Opcodes.cpp: pDLLLoadOpcodes: ret == 0, size = " << tmpMemSize << endl;
return false;
}
return false;
}
-10
View File
@@ -1,10 +0,0 @@
#include "../common/types.h"
#include "../common/EMuShareMem.h"
struct MMFOpcodes_Struct {
uint32 EQOpcodeCount;
uint32 EmuOpcodeCount;
uint16 eq_to_emu[0];
//uint16 emu_to_eq[0]; //logical, not really here... EQOpcodeCount indexes in
};
-142
View File
@@ -1,142 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "SkillCaps.h"
#include "../common/timer.h"
#include "MMF.h"
MMF SkillCapsMMF;
const MMFSkillCaps_Struct* MMFSkillCapsData = 0;
MMFSkillCaps_Struct* MMFSkillCapsData_Writable = 0;
DLLFUNC uint16 GetSkillCap(uint8 Class_, uint8 Skill, uint8 Level) {
if (MMFSkillCapsData == 0 || (!SkillCapsMMF.IsLoaded()))
return 0;
if (Class_ >= MMFSkillCapsData->ClassCount || Skill >= MMFSkillCapsData->SkillCount || Level >= MMFSkillCapsData->LevelCount)
return(0);
uint32 index =
(((Class_ * MMFSkillCapsData->SkillCount) + Skill) * MMFSkillCapsData->LevelCount)
+ Level;
return MMFSkillCapsData->caps[index];
}
DLLFUNC bool SetSkillCap(uint8 Class_, uint8 Skill, uint8 Level, uint16 cap) {
if (!MMFSkillCapsData_Writable)
return false;
if (Class_ >= MMFSkillCapsData_Writable->ClassCount || Skill >= MMFSkillCapsData_Writable->SkillCount || Level >= MMFSkillCapsData_Writable->LevelCount)
return false;
uint32 index =
(((Class_ * MMFSkillCapsData_Writable->SkillCount) + Skill) * MMFSkillCapsData_Writable->LevelCount)
+ Level;
MMFSkillCapsData_Writable->caps[index] = cap;
return true;
}
DLLFUNC uint8 GetTrainLevel(uint8 Class_, uint8 Skill, uint8 Level){
if (MMFSkillCapsData == 0 || (!SkillCapsMMF.IsLoaded()))
return 0;
if (Class_ >= MMFSkillCapsData->ClassCount || Skill >= MMFSkillCapsData->SkillCount || Level >= MMFSkillCapsData->LevelCount)
return(0);
uint32 index = (((Class_ * MMFSkillCapsData->SkillCount) + Skill) * MMFSkillCapsData->LevelCount);
for(int x = 0; x < Level; x++){
if(MMFSkillCapsData->caps[index + x]){
return (x);
}
}
return(0);
}
DLLFUNC void ClearSkillCaps() {
if (!MMFSkillCapsData_Writable)
return;
memset(MMFSkillCapsData_Writable->caps, 0,
sizeof(uint16)*(MMFSkillCapsData->ClassCount*MMFSkillCapsData->SkillCount*MMFSkillCapsData->LevelCount));
}
DLLFUNC bool LoadSkillCaps(CALLBACK_DBLoadSkillCaps cb, uint32 opsize, uint8 ClassCount, uint8 SkillCount, uint8 LevelCount) {
if(opsize != sizeof(uint16)) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: opsize != sizeof(uint16)" << endl;
cout << "SkillCap size has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFSkillCaps_Struct) + opsize * (ClassCount*SkillCount*LevelCount);
if (SkillCapsMMF.Open("EQEMuKSkillCaps", tmpMemSize)) {
if (SkillCapsMMF.CanWrite()) {
MMFSkillCapsData_Writable = (MMFSkillCaps_Struct*) SkillCapsMMF.GetWriteableHandle();
if (!MMFSkillCapsData_Writable) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: !MMFSkillCapsData_Writable" << endl;
return false;
}
//we need to memset the eq SkillCaps
memset(MMFSkillCapsData_Writable->caps, 0, sizeof(uint16)*(ClassCount*SkillCount*LevelCount));
MMFSkillCapsData_Writable->ClassCount = ClassCount;
MMFSkillCapsData_Writable->SkillCount = SkillCount;
MMFSkillCapsData_Writable->LevelCount = LevelCount;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (!cb()) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: !cbDBLoadSkillCaps" << endl;
return false;
}
MMFSkillCapsData_Writable = 0;
SkillCapsMMF.SetLoaded();
MMFSkillCapsData = (const MMFSkillCaps_Struct*) SkillCapsMMF.GetHandle();
if (!MMFSkillCapsData) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: !MMFSkillCapsData (CanWrite=true)" << endl;
return false;
}
return true;
} else {
if (!SkillCapsMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!SkillCapsMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(10);
Timer::SetCurrentTime();
}
if (!SkillCapsMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: !SkillCapsMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFSkillCapsData = (const MMFSkillCaps_Struct*) SkillCapsMMF.GetHandle();
if (!MMFSkillCapsData) {
cout << "Error: EMuShareMem: DLLLoadSkillCaps: !MMFSkillCapsData (CanWrite=false)" << endl;
return false;
}
return true;
}
}
else {
cout << "Error Loading SkillCaps: SkillCaps.cpp: pDLLLoadSkillCaps: ret == 0, size = " << tmpMemSize << endl;
return false;
}
return false;
}
-10
View File
@@ -1,10 +0,0 @@
#include "../common/types.h"
#include "../common/EMuShareMem.h"
struct MMFSkillCaps_Struct {
uint8 ClassCount;
uint8 SkillCount;
uint8 LevelCount;
uint16 caps[0];
};
-98
View File
@@ -1,98 +0,0 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include <memory.h>
#include <iostream>
using namespace std;
#include "Spells.h"
#include "../common/timer.h"
//#include "../zone/masterentity.h"
#include "MMF.h"
MMF SpellsMMF;
const MMFSpells_Struct* MMFSpellsData = 0;
MMFSpells_Struct* MMFSpellsData_Writable = 0;
#ifdef _WINDOWS
extern "C" __declspec(dllexport) bool DLLLoadSPDat(const CALLBACK_FileLoadSPDat cbFileLoadSPDat, const void** oSpellsPointer, int32* oSPDAT_RECORDS, uint32 iSPDat_Struct_Size) {
return pDLLLoadSPDat(cbFileLoadSPDat, oSpellsPointer, oSPDAT_RECORDS, iSPDat_Struct_Size);
};
#else
extern "C" bool DLLLoadSPDat(const CALLBACK_FileLoadSPDat cbFileLoadSPDat, const void** oSpellsPointer, int32* oSPDAT_RECORDS, uint32 iSPDat_Struct_Size) {
return pDLLLoadSPDat(cbFileLoadSPDat, oSpellsPointer, oSPDAT_RECORDS, iSPDat_Struct_Size);
};
#endif
bool pDLLLoadSPDat(const CALLBACK_FileLoadSPDat cbFileLoadSPDat, const void** oSpellsPointer, int32* oSPDAT_RECORDS, uint32 iSPDat_Struct_Size) {
if (iSPDat_Struct_Size != sizeof(SPDat_Spell_Struct)) {
cout << "Error: EMuShareMem: DLLLoadSPDat: iSPDat_Struct_Size != sizeof(SPDat_Spell_Struct)" << endl;
cout << "SPDat_Spell_Struct has changed, EMuShareMem.dll needs to be recompiled." << endl;
return false;
}
uint32 tmpMemSize = sizeof(MMFSpells_Struct) + 256 + (sizeof(SPDat_Spell_Struct) * (*oSPDAT_RECORDS));
if (SpellsMMF.Open("EQEMuSpells", tmpMemSize)) {
if (SpellsMMF.CanWrite()) {
MMFSpellsData_Writable = (MMFSpells_Struct*) SpellsMMF.GetWriteableHandle();
if (!MMFSpellsData_Writable) {
cout << "Error: EMuShareMem: DLLLoadSPDat: !MMFSpellsData_Writable" << endl;
return false;
}
memset(MMFSpellsData_Writable, 0, tmpMemSize);
MMFSpellsData_Writable->SPDAT_RECORDS = *oSPDAT_RECORDS;
// use a callback so the DB functions are done in the main exe
// this way the DLL doesnt have to open a connection to mysql
if (MMFSpellsData_Writable->SPDAT_RECORDS > 0) {
cbFileLoadSPDat(&MMFSpellsData_Writable->spells[0], MMFSpellsData_Writable->SPDAT_RECORDS-1);
*oSpellsPointer = &MMFSpellsData_Writable->spells[0];
}
else
*oSpellsPointer = 0;
MMFSpellsData_Writable = 0;
SpellsMMF.SetLoaded();
MMFSpellsData = (const MMFSpells_Struct*) SpellsMMF.GetHandle();
if (!MMFSpellsData) {
cout << "Error: EMuShareMem: DLLLoadSPDat: !MMFSpellsData (CanWrite=true)" << endl;
return false;
}
return true;
}
else {
if (!SpellsMMF.IsLoaded()) {
Timer::SetCurrentTime();
uint32 starttime = Timer::GetCurrentTime();
while ((!SpellsMMF.IsLoaded()) && ((Timer::GetCurrentTime() - starttime) < 300000)) {
Sleep(100);
Timer::SetCurrentTime();
}
if (!SpellsMMF.IsLoaded()) {
cout << "Error: EMuShareMem: DLLLoadSPDat: !SpellsMMF.IsLoaded() (timeout)" << endl;
return false;
}
}
MMFSpellsData = (const MMFSpells_Struct*) SpellsMMF.GetHandle();
if (!MMFSpellsData) {
cout << "Error: EMuShareMem: DLLLoadSPDat: !SpellsMMF (CanWrite=false)" << endl;
return false;
}
*oSPDAT_RECORDS = MMFSpellsData->SPDAT_RECORDS;
if (MMFSpellsData->SPDAT_RECORDS > 0)
*oSpellsPointer = &MMFSpellsData->spells[0];
else
*oSpellsPointer = 0;
return true;
}
}
else {
cout << "Error Loading SPDat: Spells.cpp: pDLLLoadSPDat: Open() == false" << endl;
return false;
}
return false;
}
-16
View File
@@ -1,16 +0,0 @@
#ifndef MEMSHARE_SPELLS_H
#define MEMSHARE_SPELLS_H
#include "../common/types.h"
#include "../zone/spdat.h"
#include "../common/EMuShareMem.h"
struct MMFSpells_Struct {
uint32 SPDAT_RECORDS; // maxspellid + 1, size of array
SPDat_Spell_Struct spells[0];
};
bool pDLLLoadSPDat(const CALLBACK_FileLoadSPDat cbFileLoadSPDat, const void** oSpellsPointer, int32* oSPDAT_RECORDS, uint32 iSPDat_Struct_Size);
#endif
+3 -1
View File
@@ -1,4 +1,4 @@
The server code and utilities are released under GPL.
The server code and utilities are released under GPLv3.
We also include some small libraries for convienence that may be under different licensing:
@@ -8,3 +8,5 @@ StackWalker - New BSD License
ZLib - ZLib License
MySQL - GPL
Perl - GPL / ActiveState (under the assumption that this is a free project).
CPPUnit - GLP
StringUtilities - Apache
+52 -1
View File
@@ -1,2 +1,53 @@
EQEmu - Custom Game Implementation for EverQuest
EQEmu
===
[![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)
+2076 -154
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
add_subdirectory(import)
add_subdirectory(export)
+36
View File
@@ -0,0 +1,36 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(export_sources
main.cpp
)
SET(export_headers
)
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})
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")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(export_client_files "WS2_32")
ENDIF(MINGW)
IF(UNIX)
TARGET_LINK_LIBRARIES(export_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(export_client_files "z")
TARGET_LINK_LIBRARIES(export_client_files "m")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(export_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+235
View File
@@ -0,0 +1,235 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2013 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 <stdio.h>
#include "../../common/eqemu_logsys.h"
#include "../../common/global_define.h"
#include "../../common/shareddb.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/string_util.h"
EQEmuLogSys Log;
void ExportSpells(SharedDatabase *db);
void ExportSkillCaps(SharedDatabase *db);
void ExportBaseData(SharedDatabase *db);
void ExportDBStrings(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientExport);
Log.LoadLogSettingsDefaults();
set_exception_handler();
Log.Out(Logs::General, Logs::Status, "Client Files Export Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
SharedDatabase 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)) {
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);
ExportDBStrings(&database);
Log.CloseFileLogs();
return 0;
}
void ExportSpells(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting Spells...");
FILE *f = fopen("export/spells_us.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/spells_us.txt to write, skipping.");
return;
}
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 = results.ColumnCount();
for(unsigned int i = 0; i < fields; ++i) {
if(i != 0) {
line.push_back('^');
}
if(row[i] != nullptr) {
line += row[i];
}
}
fprintf(f, "%s\n", line.c_str());
}
} else {
}
fclose(f);
}
bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
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) {
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) {
Log.Out(Logs::General, Logs::Status, "Exporting Skill Caps...");
FILE *f = fopen("export/SkillCaps.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
return;
}
for(int cl = 1; cl <= 16; ++cl) {
for(int skill = 0; skill <= 77; ++skill) {
if(SkillUsable(db, skill, cl)) {
int previous_cap = 0;
for(int level = 1; level <= 100; ++level) {
int cap = GetSkill(db, skill, cl, level);
if(cap < previous_cap) {
cap = previous_cap;
}
fprintf(f, "%d^%d^%d^%d^0\n", cl, skill, level, cap);
previous_cap = cap;
}
}
}
}
fclose(f);
}
void ExportBaseData(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting Base Data...");
FILE *f = fopen("export/BaseData.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/BaseData.txt to write, skipping.");
return;
}
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 = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
line.push_back('^');
if(row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
fprintf(f, "%s\n", line.c_str());
}
}
fclose(f);
}
void ExportDBStrings(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Exporting DB Strings...");
FILE *f = fopen("export/dbstr_us.txt", "w");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open export/dbstr_us.txt to write, skipping.");
return;
}
fprintf(f, "Major^Minor^String(New)\n");
const std::string query = "SELECT * FROM db_str ORDER BY id, type";
auto results = db->QueryDatabase(query);
if(results.Success()) {
for(auto row = results.begin(); row != results.end(); ++row) {
std::string line;
unsigned int fields = results.ColumnCount();
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
if(rowIndex != 0)
line.push_back('^');
if(row[rowIndex] != nullptr) {
line += row[rowIndex];
}
}
fprintf(f, "%s\n", line.c_str());
}
}
fclose(f);
}
+36
View File
@@ -0,0 +1,36 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(import_sources
main.cpp
)
SET(import_headers
)
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})
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")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(import_client_files "WS2_32")
ENDIF(MINGW)
IF(UNIX)
TARGET_LINK_LIBRARIES(import_client_files "${CMAKE_DL_LIBS}")
TARGET_LINK_LIBRARIES(import_client_files "z")
TARGET_LINK_LIBRARIES(import_client_files "m")
IF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "rt")
ENDIF(NOT DARWIN)
TARGET_LINK_LIBRARIES(import_client_files "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+318
View File
@@ -0,0 +1,318 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2013 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/eqemu_logsys.h"
#include "../../common/global_define.h"
#include "../../common/shareddb.h"
#include "../../common/eqemu_config.h"
#include "../../common/platform.h"
#include "../../common/crash.h"
#include "../../common/rulesys.h"
#include "../../common/string_util.h"
EQEmuLogSys Log;
void ImportSpells(SharedDatabase *db);
void ImportSkillCaps(SharedDatabase *db);
void ImportBaseData(SharedDatabase *db);
void ImportDBStrings(SharedDatabase *db);
int main(int argc, char **argv) {
RegisterExecutablePlatform(ExePlatformClientImport);
Log.LoadLogSettingsDefaults();
set_exception_handler();
Log.Out(Logs::General, Logs::Status, "Client Files Import Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Out(Logs::General, Logs::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
SharedDatabase 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)) {
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);
ImportDBStrings(&database);
Log.CloseFileLogs();
return 0;
}
int GetSpellColumns(SharedDatabase *db) {
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) {
Log.Out(Logs::General, Logs::Status, "Importing Spells...");
FILE *f = fopen("import/spells_us.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/spells_us.txt to read, skipping.");
return;
}
std::string query = "DELETE FROM spells_new";
db->QueryDatabase(query);
int columns = GetSpellColumns(db);
int spells_imported = 0;
char buffer[2048];
while(fgets(buffer, 2048, f)) {
for(int i = 0; i < 2048; ++i) {
if(buffer[i] == '\n') {
buffer[i] = 0;
break;
}
}
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) {
if(i != 0) {
sql += ", '";
} else {
sql += "'";
}
if(split[i].compare("") == 0 && !IsStringField(i)) {
sql += "0";
}
else {
sql += split[i];
}
sql += "'";
}
sql += ");";
} else {
int i = 0;
sql = "INSERT INTO spells_new VALUES(";
for(; i < line_columns; ++i) {
if(i != 0) {
sql += ", '";
} else {
sql += "'";
}
if(split[i].compare("") == 0 && !IsStringField(i)) {
sql += "0";
} else {
sql += split[i];
}
sql += "'";
}
for(; i < columns; ++i) {
sql += ", '0'";
}
sql += ");";
}
db->QueryDatabase(sql);
spells_imported++;
if(spells_imported % 1000 == 0) {
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
}
}
if(spells_imported % 1000 != 0) {
Log.Out(Logs::General, Logs::Status, "%d spells imported.", spells_imported);
}
fclose(f);
}
void ImportSkillCaps(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing Skill Caps...");
FILE *f = fopen("import/SkillCaps.txt", "r");
if(!f) {
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->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
auto split = SplitString(buffer, '^');
if(split.size() < 4) {
continue;
}
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());
std::string sql = StringFormat("INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
class_id, skill_id, level, cap);
db->QueryDatabase(sql);
}
fclose(f);
}
void ImportBaseData(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing Base Data...");
FILE *f = fopen("import/BaseData.txt", "r");
if(!f) {
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->QueryDatabase(delete_sql);
char buffer[2048];
while(fgets(buffer, 2048, f)) {
auto split = SplitString(buffer, '^');
if(split.size() < 10) {
continue;
}
std::string sql;
int level, class_id;
double hp, mana, end, unk1, unk2, hp_fac, mana_fac, end_fac;
level = atoi(split[0].c_str());
class_id = atoi(split[1].c_str());
hp = atof(split[2].c_str());
mana = atof(split[3].c_str());
end = atof(split[4].c_str());
unk1 = atof(split[5].c_str());
unk2 = atof(split[6].c_str());
hp_fac = atof(split[7].c_str());
mana_fac = atof(split[8].c_str());
end_fac = atof(split[9].c_str());
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->QueryDatabase(sql);
}
fclose(f);
}
void ImportDBStrings(SharedDatabase *db) {
Log.Out(Logs::General, Logs::Status, "Importing DB Strings...");
FILE *f = fopen("import/dbstr_us.txt", "r");
if(!f) {
Log.Out(Logs::General, Logs::Error, "Unable to open import/dbstr_us.txt to read, skipping.");
return;
}
std::string delete_sql = "DELETE FROM db_str";
db->QueryDatabase(delete_sql);
char buffer[2048];
bool first = true;
while(fgets(buffer, 2048, f)) {
if(first) {
first = false;
continue;
}
for(int i = 0; i < 2048; ++i) {
if(buffer[i] == '\n') {
buffer[i] = 0;
break;
}
}
auto split = SplitString(buffer, '^');
if(split.size() < 2) {
continue;
}
std::string sql;
int id, type;
std::string value;
id = atoi(split[0].c_str());
type = atoi(split[1].c_str());
if(split.size() >= 3) {
value = ::EscapeString(split[2]);
}
sql = StringFormat("INSERT INTO db_str(id, type, value) VALUES(%u, %u, '%s')",
id, type, value.c_str());
db->QueryDatabase(sql);
}
fclose(f);
}
+124
View File
@@ -0,0 +1,124 @@
#CMake - Cross Platform Makefile Generator
#Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions
#are met:
#
#* Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
#* Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
#* Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This module defines
# LUA51_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
IF(LUA_ROOT)
FIND_PATH(LUA_INCLUDE_DIR
NAMES lua.h
HINTS
ENV LUA_DIR
PATHS
${LUA_ROOT}
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include src
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATHS
${LUA_ROOT}
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib bin
)
ELSE(LUA_ROOT)
FIND_PATH(LUA_INCLUDE_DIR
NAMES lua.h
HINTS
ENV LUA_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
)
FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
ENV LUA_DIR
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw
/opt/local
/opt/csw
/opt
PATH_SUFFIXES lib bin
)
ENDIF(LUA_ROOT)
IF(LUA_LIBRARY)
# include the math library for Unix
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUA_MATH_LIBRARY m)
SET(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
ELSE()
SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
ENDIF()
ENDIF()
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
UNSET(lua_version_str)
ENDIF()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+48 -49
View File
@@ -4,65 +4,65 @@
#
# Find the native MySQL includes and library
#
# MySQL_INCLUDE_DIR - where to find mysql.h, etc.
# MySQL_LIBRARIES - List of libraries when using MySQL.
# MySQL_FOUND - True if MySQL found.
# The following can be used as a hint as to where to search:
# MYSQL_ROOT
# MySQL_INCLUDE_DIR - where to find mysql.h, etc.
# MySQL_LIBRARIES - List of libraries when using MySQL.
# MySQL_FOUND - True if MySQL found.
# The following can be used as a hint as to where to search:
# MYSQL_ROOT
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARIES)
# Already in cache, be silent
SET(MySQL_FIND_QUIETLY TRUE)
# Already in cache, be silent
SET(MySQL_FIND_QUIETLY TRUE)
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARIES)
# Include dir
IF(MYSQL_ROOT)
FIND_PATH(MySQL_INCLUDE_DIR
NAMES mysql.h
PATHS ${MYSQL_ROOT}/include
PATH_SUFFIXES mysql
)
FIND_PATH(MySQL_INCLUDE_DIR
NAMES mysql.h
PATHS ${MYSQL_ROOT}/include
PATH_SUFFIXES mysql
)
ELSE(MYSQL_ROOT)
FIND_PATH(MySQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
FIND_PATH(MySQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
ENDIF(MYSQL_ROOT)
# Library
SET(MySQL_NAMES mysqlclient_r mysqlclient)
IF(MYSQL_ROOT)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib/debug /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib/debug /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
NAMES ${MySQL_NAMES}
PATHS ${MYSQL_ROOT}/lib /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
ELSE(MYSQL_ROOT)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
NAMES ${MySQL_NAMES}
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
NAMES ${MySQL_NAMES}
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
NAMES ${MySQL_NAMES}
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
NAMES ${MySQL_NAMES}
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
PATH_SUFFIXES mysql
)
ENDIF(MYSQL_ROOT)
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
SET(MySQL_FOUND TRUE)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
SET(MySQL_FOUND TRUE)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
SET(MySQL_FOUND FALSE)
SET( MySQL_LIBRARIES )
SET(MySQL_FOUND FALSE)
SET( MySQL_LIBRARIES )
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
@@ -72,14 +72,13 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY_DEBUG MySQL_LIBRARY_RELEASE MySQL_INCLUDE_DIR)
IF(MySQL_FOUND)
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
ELSE(MySQL_FOUND)
SET( MySQL_LIBRARIES )
SET( MySQL_LIBRARIES )
ENDIF(MySQL_FOUND)
MARK_AS_ADVANCED(
MySQL_LIBRARY_DEBUG
MySQL_LIBRARY_RELEASE
MySQL_INCLUDE_DIR
)
MySQL_LIBRARY_DEBUG
MySQL_LIBRARY_RELEASE
MySQL_INCLUDE_DIR
)
+328 -287
View File
@@ -1,313 +1,354 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(common_sources
BasePacket.cpp
classes.cpp
Condition.cpp
crash.cpp
CRC16.cpp
crc32.cpp
database.cpp
dbasync.cpp
dbcore.cpp
DBMemLeak.cpp
debug.cpp
emu_opcodes.cpp
EMuShareMem.cpp
EmuTCPConnection.cpp
EmuTCPServer.cpp
EQDB.cpp
EQDBRes.cpp
EQEmuConfig.cpp
EQEMuError.cpp
EQPacket.cpp
EQStream.cpp
EQStreamFactory.cpp
EQStreamIdent.cpp
EQStreamProxy.cpp
eqtime.cpp
extprofile.cpp
guild_base.cpp
guilds.cpp
Item.cpp
logsys.cpp
logsys_eqemu.cpp
md5.cpp
misc.cpp
MiscFunctions.cpp
moremath.cpp
Mutex.cpp
opcode_map.cpp
opcodemgr.cpp
packet_dump.cpp
packet_dump_file.cpp
packet_functions.cpp
perl_EQDB.cpp
perl_EQDBRes.cpp
ProcLauncher.cpp
ptimer.cpp
races.cpp
rdtsc.cpp
rulesys.cpp
serverinfo.cpp
shareddb.cpp
SharedLibrary.cpp
StructStrategy.cpp
TCPConnection.cpp
TCPServer.cpp
timeoutmgr.cpp
timer.cpp
unix.cpp
worldconn.cpp
XMLParser.cpp
platform.cpp
patches/Client62.cpp
patches/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
StackWalker/StackWalker.cpp
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
base_packet.cpp
classes.cpp
condition.cpp
crash.cpp
crc16.cpp
crc32.cpp
database.cpp
database_conversions.cpp
database_instances.cpp
dbcore.cpp
emu_opcodes.cpp
emu_tcp_connection.cpp
emu_tcp_server.cpp
eq_dictionary.cpp
eqdb.cpp
eqdb_res.cpp
eqemu_exception.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
inventory.cpp
inventory_db_data_model.cpp
ipc_mutex.cpp
item.cpp
item_container.cpp
item_container_default_serialization.cpp
item_container_personal_serialization.cpp
item_instance.cpp
md5.cpp
memory_buffer.cpp
memory_mapped_file.cpp
misc.cpp
misc_functions.cpp
mutex.cpp
mysql_request_result.cpp
mysql_request_row.cpp
opcode_map.cpp
opcodemgr.cpp
packet_dump.cpp
packet_dump_file.cpp
packet_functions.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
string_util.cpp
struct_strategy.cpp
tcp_connection.cpp
tcp_server.cpp
timeoutmgr.cpp
timer.cpp
unix.cpp
worldconn.cpp
xml_parser.cpp
platform.cpp
patches/patches.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
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
StackWalker/StackWalker.cpp
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
)
SET(common_headers
BasePacket.h
bodytypes.h
breakdowns.h
classes.h
common_profile.h
Condition.h
crash.h
CRC16.h
crc32.h
database.h
dbasync.h
dbcore.h
DBMemLeak.h
debug.h
deity.h
emu_opcodes.h
emu_oplist.h
EMuShareMem.h
EmuTCPConnection.h
EmuTCPServer.h
eq_constants.h
eq_opcodes.h
eq_packet_structs.h
EQDB.h
EQDBRes.h
EQEmuConfig.h
EQEmuConfig_elements.h
EQEMuError.h
EQPacket.h
EQStream.h
EQStreamFactory.h
EQStreamIdent.h
EQStreamIntf.h
EQStreamLocator.h
EQStreamProxy.h
EQStreamType.h
eqtime.h
errmsg.h
extprofile.h
guild_base.h
guilds.h
Item.h
item_fieldlist.h
item_struct.h
languages.h
linked_list.h
logsys.h
logtypes.h
mail_oplist.h
md5.h
misc.h
MiscFunctions.h
moremath.h
Mutex.h
op_codes.h
opcode_dispatch.h
opcodemgr.h
packet_dump.h
packet_dump_file.h
packet_functions.h
ProcLauncher.h
profiler.h
ptimer.h
queue.h
races.h
rdtsc.h
rulesys.h
ruletypes.h
seperator.h
serverinfo.h
servertalk.h
shareddb.h
SharedLibrary.h
skills.h
StructStrategy.h
TCPBasicServer.h
TCPConnection.h
TCPServer.h
timeoutmgr.h
timer.h
types.h
unix.h
useperl.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
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
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
StackWalker/StackWalker.h
tinyxml/tinystr.h
tinyxml/tinyxml.h
any.h
base_packet.h
base_data.h
bodytypes.h
classes.h
condition.h
crash.h
crc16.h
crc32.h
data_verification.h
database.h
dbcore.h
deity.h
emu_opcodes.h
emu_oplist.h
emu_tcp_connection.h
emu_tcp_server.h
eq_constants.h
eq_dictionary.h
eq_packet_structs.h
eqdb.h
eqdb_res.h
eqemu_exception.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
faction.h
features.h
fixed_memory_hash_set.h
fixed_memory_variable_hash_set.h
global_define.h
guild_base.h
guilds.h
inventory.h
inventory_data_model.h
inventory_db_data_model.h
inventory_null_data_model.h
ipc_mutex.h
item.h
item_container.h
item_container_default_serialization.h
item_container_personal_serialization.h
item_container_serialization_strategy.h
item_data.h
item_fieldlist.h
item_instance.h
languages.h
linked_list.h
loottable.h
mail_oplist.h
md5.h
memory_buffer.h
memory_mapped_file.h
misc.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
platform.h
proc_launcher.h
profiler.h
ptimer.h
queue.h
races.h
random.h
rdtsc.h
rulesys.h
ruletypes.h
seperator.h
serverinfo.h
servertalk.h
shareddb.h
skills.h
spdat.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
version.h
worldconn.h
xml_parser.h
zone_numbers.h
patches/patches.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
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
StackWalker/StackWalker.h
tinyxml/tinystr.h
tinyxml/tinyxml.h
)
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/patches.cpp
patches/SoD.cpp
patches/SoF.cpp
patches/RoF.cpp
patches/Titanium.cpp
patches/Underfoot.cpp
patches/patches.h
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/rof2.cpp
patches/titanium.cpp
patches/uf.cpp
)
SOURCE_GROUP(SocketLib FILES
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
SocketLib/Base64.h
SocketLib/File.h
SocketLib/HttpdCookies.h
SocketLib/HttpdForm.h
SocketLib/HttpdSocket.h
SocketLib/HTTPSocket.h
SocketLib/IFile.h
SocketLib/MemFile.h
SocketLib/Mime.h
SocketLib/Parse.h
SocketLib/socket_include.h
SocketLib/Utility.h
SocketLib/Base64.cpp
SocketLib/File.cpp
SocketLib/HttpdCookies.cpp
SocketLib/HttpdForm.cpp
SocketLib/HttpdSocket.cpp
SocketLib/HTTPSocket.cpp
SocketLib/MemFile.cpp
SocketLib/Mime.cpp
SocketLib/Parse.cpp
SocketLib/socket_include.cpp
SocketLib/Utility.cpp
)
SOURCE_GROUP(StackWalker FILES
StackWalker/StackWalker.h
StackWalker/StackWalker.cpp
StackWalker/StackWalker.h
StackWalker/StackWalker.cpp
)
SOURCE_GROUP(TinyXML FILES
tinyxml/tinystr.h
tinyxml/tinyxml.h
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
tinyxml/tinystr.h
tinyxml/tinyxml.h
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
)
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)
ADD_DEFINITIONS(-fPIC)
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 ../Bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
-346
View File
@@ -1,346 +0,0 @@
#include <stdio.h>
unsigned long IntArray[]={
0x00000000,
0x77073096,
0xEE0E612C,
0x990951BA,
0x076DC419,
0x706AF48F,
0xE963A535,
0x9E6495A3,
0x0EDB8832,
0x79DCB8A4,
0xE0D5E91E,
0x97D2D988,
0x09B64C2B,
0x7EB17CBD,
0xE7B82D07,
0x90BF1D91,
0x1DB71064,
0x6AB020F2,
0xF3B97148,
0x84BE41DE,
0x1ADAD47D,
0x6DDDE4EB,
0xF4D4B551,
0x83D385C7,
0x136C9856,
0x646BA8C0,
0xFD62F97A,
0x8A65C9EC,
0x14015C4F,
0x63066CD9,
0xFA0F3D63,
0x8D080DF5,
0x3B6E20C8,
0x4C69105E,
0xD56041E4,
0xA2677172,
0x3C03E4D1,
0x4B04D447,
0xD20D85FD,
0xA50AB56B,
0x35B5A8FA,
0x42B2986C,
0xDBBBC9D6,
0xACBCF940,
0x32D86CE3,
0x45DF5C75,
0xDCD60DCF,
0xABD13D59,
0x26D930AC,
0x51DE003A,
0xC8D75180,
0xBFD06116,
0x21B4F4B5,
0x56B3C423,
0xCFBA9599,
0xB8BDA50F,
0x2802B89E,
0x5F058808,
0xC60CD9B2,
0xB10BE924,
0x2F6F7C87,
0x58684C11,
0xC1611DAB,
0xB6662D3D,
0x76DC4190,
0x01DB7106,
0x98D220BC,
0xEFD5102A,
0x71B18589,
0x06B6B51F,
0x9FBFE4A5,
0xE8B8D433,
0x7807C9A2,
0x0F00F934,
0x9609A88E,
0xE10E9818,
0x7F6A0DBB,
0x086D3D2D,
0x91646C97,
0xE6635C01,
0x6B6B51F4,
0x1C6C6162,
0x856530D8,
0xF262004E,
0x6C0695ED,
0x1B01A57B,
0x8208F4C1,
0xF50FC457,
0x65B0D9C6,
0x12B7E950,
0x8BBEB8EA,
0xFCB9887C,
0x62DD1DDF,
0x15DA2D49,
0x8CD37CF3,
0xFBD44C65,
0x4DB26158,
0x3AB551CE,
0xA3BC0074,
0xD4BB30E2,
0x4ADFA541,
0x3DD895D7,
0xA4D1C46D,
0xD3D6F4FB,
0x4369E96A,
0x346ED9FC,
0xAD678846,
0xDA60B8D0,
0x44042D73,
0x33031DE5,
0xAA0A4C5F,
0xDD0D7CC9,
0x5005713C,
0x270241AA,
0xBE0B1010,
0xC90C2086,
0x5768B525,
0x206F85B3,
0xB966D409,
0xCE61E49F,
0x5EDEF90E,
0x29D9C998,
0xB0D09822,
0xC7D7A8B4,
0x59B33D17,
0x2EB40D81,
0xB7BD5C3B,
0xC0BA6CAD,
0xEDB88320,
0x9ABFB3B6,
0x03B6E20C,
0x74B1D29A,
0xEAD54739,
0x9DD277AF,
0x04DB2615,
0x73DC1683,
0xE3630B12,
0x94643B84,
0x0D6D6A3E,
0x7A6A5AA8,
0xE40ECF0B,
0x9309FF9D,
0x0A00AE27,
0x7D079EB1,
0xF00F9344,
0x8708A3D2,
0x1E01F268,
0x6906C2FE,
0xF762575D,
0x806567CB,
0x196C3671,
0x6E6B06E7,
0xFED41B76,
0x89D32BE0,
0x10DA7A5A,
0x67DD4ACC,
0xF9B9DF6F,
0x8EBEEFF9,
0x17B7BE43,
0x60B08ED5,
0xD6D6A3E8,
0xA1D1937E,
0x38D8C2C4,
0x4FDFF252,
0xD1BB67F1,
0xA6BC5767,
0x3FB506DD,
0x48B2364B,
0xD80D2BDA,
0xAF0A1B4C,
0x36034AF6,
0x41047A60,
0xDF60EFC3,
0xA867DF55,
0x316E8EEF,
0x4669BE79,
0xCB61B38C,
0xBC66831A,
0x256FD2A0,
0x5268E236,
0xCC0C7795,
0xBB0B4703,
0x220216B9,
0x5505262F,
0xC5BA3BBE,
0xB2BD0B28,
0x2BB45A92,
0x5CB36A04,
0xC2D7FFA7,
0xB5D0CF31,
0x2CD99E8B,
0x5BDEAE1D,
0x9B64C2B0,
0xEC63F226,
0x756AA39C,
0x026D930A,
0x9C0906A9,
0xEB0E363F,
0x72076785,
0x05005713,
0x95BF4A82,
0xE2B87A14,
0x7BB12BAE,
0x0CB61B38,
0x92D28E9B,
0xE5D5BE0D,
0x7CDCEFB7,
0x0BDBDF21,
0x86D3D2D4,
0xF1D4E242,
0x68DDB3F8,
0x1FDA836E,
0x81BE16CD,
0xF6B9265B,
0x6FB077E1,
0x18B74777,
0x88085AE6,
0xFF0F6A70,
0x66063BCA,
0x11010B5C,
0x8F659EFF,
0xF862AE69,
0x616BFFD3,
0x166CCF45,
0xA00AE278,
0xD70DD2EE,
0x4E048354,
0x3903B3C2,
0xA7672661,
0xD06016F7,
0x4969474D,
0x3E6E77DB,
0xAED16A4A,
0xD9D65ADC,
0x40DF0B66,
0x37D83BF0,
0xA9BCAE53,
0xDEBB9EC5,
0x47B2CF7F,
0x30B5FFE9,
0xBDBDF21C,
0xCABAC28A,
0x53B39330,
0x24B4A3A6,
0xBAD03605,
0xCDD70693,
0x54DE5729,
0x23D967BF,
0xB3667A2E,
0xC4614AB8,
0x5D681B02,
0x2A6F2B94,
0xB40BBE37,
0xC30C8EA1,
0x5A05DF1B,
0x2D02EF8D,
};
unsigned long CRC16(const unsigned char *buf, int size, int key)
{
//printf("CRC16() key=%d\n",key);
/*
sub_0_10020760 proc near ; CODE XREF: sub_0_10008620+AEp
; sub_0_10022A90+14Fp ...
arg_0 = dword ptr 4
arg_4 = dword ptr 8
arg_8 = dword ptr 0Ch
*/
//int *pecx = buf;
unsigned long ecx = key; //mov ecx, [esp+arg_8]
unsigned long eax = ecx; //mov eax, ecx
unsigned long edi;
/* int ecx = key; //mov ecx, [esp+arg_8]
int eax = ecx; //mov eax, ecx
int edi;
*/
eax = ~ eax; //not eax
eax&=0xFF; //and eax, 0FFh
eax=IntArray[eax]; //mov eax, dword_0_10115D38[eax*4] IntArray
eax ^= 0x00FFFFFF; //xor eax, 0FFFFFFh
int edx = ecx; //mov edx, ecx
edx = edx >> 8; //sar edx, 8
edx = edx ^ eax; //xor edx, eax
eax = eax >> 8; //sar eax, 8
edx &= 0xFF; //and edx, 0FFh
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
//push esi
eax ^= IntArray[edx]; //xor eax, dword_0_10115D38[edx*4]
edx = ecx; //mov edx, ecx
edx = edx >> 0x10; //sar edx, 10h
edx ^= eax; //xor edx, eax
eax = eax >> 8; //sar eax, 8
edx &= 0xFF; //and edx, 0FFh
int esi = IntArray[edx]; //mov esi, dword_0_10115D38[edx*4]
edx = size; //mov edx, [esp+4+arg_4]
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
eax ^= esi; //xor eax, esi
ecx = ecx >> 0x18; //sar ecx, 18h
ecx ^= eax; //xor ecx, eax
ecx &= 0xFF; //and ecx, 0FFh
esi = IntArray[ecx]; //mov esi, dword_0_10115D38[ecx*4]
/*ecx = (int) buf; not used */ //mov ecx, [esp+4+arg_0]
eax = eax >> 8; //sar eax, 8
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
eax ^= esi; //xor eax, esi
/* int* esi = ecx+edx //??*///lea esi, [ecx+edx]
for(int x = 0; x < size; x++)
{ //eax is the crc, ecx is the current part of the buffer
int edx = 0; //xor edx, edx
edx = buf[x] & 0x00FF; //mov dl, [ecx]
/*if(pos > size) //cmp ecx, esi
return ~eax; //jnb short loc_0_10020803
*/
//push edi
//loc_0_100207E0: ; CODE XREF: sub_0_10020760+A0j
//LOOP
edx ^= eax; //xor edx, eax
eax = eax >> 8; //sar eax, 8
edx &= 0xFF; //and edx, 0FFh
edi = IntArray[edx]; //mov edi, dword_0_10115D38[edx*4]
eax &= 0x00FFFFFF; //and eax, 0FFFFFFh
eax ^= edi; //xor eax, edi
//inc ecx
//cmp ecx, esi
// jb short loc_0_100207E0
//pop edi
}
return ~eax;
}
/*loc_0_10020803: ; CODE XREF: sub_0_10020760+7Dj
not eax
pop esi
retn
sub_0_10020760 endp
*/
-6
View File
@@ -1,6 +0,0 @@
#ifndef _CRC16_H
#define _CRC16_H
unsigned long CRC16(const unsigned char *buf, int size, int key);
#endif
-153
View File
@@ -1,153 +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 "debug.h"
#include "Condition.h"
#ifdef _WINDOWS
#else
#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
#endif
#ifdef _WINDOWS
Condition::Condition()
{
m_events[SignalEvent] = CreateEvent (NULL, // security
FALSE, // is auto-reset event?
FALSE, // is signaled initially?
NULL); // name
m_events[BroadcastEvent] = CreateEvent (NULL, // security
TRUE, // is auto-reset event?
FALSE, // is signaled initially?
NULL); // name
m_waiters = 0;
InitializeCriticalSection(&CSMutex);
}
Condition::~Condition()
{
DeleteCriticalSection(&CSMutex);
CloseHandle(m_events[SignalEvent]);
CloseHandle(m_events[BroadcastEvent]);
}
void Condition::Signal()
{
EnterCriticalSection(&CSMutex);
if(m_waiters > 0)
SetEvent(m_events[SignalEvent]);
LeaveCriticalSection(&CSMutex);
}
void Condition::SignalAll()
{
EnterCriticalSection(&CSMutex);
if(m_waiters > 0)
SetEvent(m_events[BroadcastEvent]);
LeaveCriticalSection(&CSMutex);
}
void Condition::Wait()
{
EnterCriticalSection(&CSMutex);
m_waiters++;
LeaveCriticalSection(&CSMutex);
int result = WaitForMultipleObjects (_eventCount, m_events, FALSE, INFINITE);
EnterCriticalSection(&CSMutex);
m_waiters--;
//see if we are the last person waiting on the condition, and there was a broadcast
//if so, we need to reset the broadcast event.
if(m_waiters == 0 && result == (WAIT_OBJECT_0+BroadcastEvent))
ResetEvent(m_events[BroadcastEvent]);
LeaveCriticalSection(&CSMutex);
}
#else //!WIN32
Condition::Condition()
{
pthread_cond_init(&cond,NULL);
pthread_mutex_init(&mutex,NULL);
}
void Condition::Signal()
{
pthread_mutex_lock(&mutex);
pthread_cond_signal(&cond);
pthread_mutex_unlock(&mutex);
}
void Condition::SignalAll()
{
pthread_mutex_lock(&mutex);
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mutex);
}
void Condition::Wait()
{
pthread_mutex_lock(&mutex);
pthread_cond_wait(&cond,&mutex);
pthread_mutex_unlock(&mutex);
}
/*
I commented this specifically because I think it might be very
difficult to write a windows counterpart to it, so I would like
to discourage its use until we can confirm that it can be reasonably
implemented on windows.
bool Condition::TimedWait(unsigned long usec)
{
struct timeval now;
struct timespec timeout;
int retcode=0;
pthread_mutex_lock(&mutex);
gettimeofday(&now,NULL);
now.tv_usec+=usec;
timeout.tv_sec = now.tv_sec + (now.tv_usec/1000000);
timeout.tv_nsec = (now.tv_usec%1000000) *1000;
//cout << "now=" << now.tv_sec << "."<<now.tv_usec << endl;
//cout << "timeout=" << timeout.tv_sec << "."<<timeout.tv_nsec << endl;
retcode=pthread_cond_timedwait(&cond,&mutex,&timeout);
pthread_mutex_unlock(&mutex);
return retcode!=ETIMEDOUT;
}
*/
Condition::~Condition()
{
pthread_mutex_lock(&mutex);
pthread_cond_destroy(&cond);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
}
#endif
-56
View File
@@ -1,56 +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 __CONDITION_H
#define __CONDITION_H
#include "debug.h"
#ifndef WIN32
#include <pthread.h>
#endif
//Sombody, someday needs to figure out how to implement a condition
//system on windows...
class Condition {
private:
#ifdef WIN32
enum {
SignalEvent = 0,
BroadcastEvent,
_eventCount
};
HANDLE m_events[_eventCount];
uint32 m_waiters;
CRITICAL_SECTION CSMutex;
#else
pthread_cond_t cond;
pthread_mutex_t mutex;
#endif
public:
Condition();
void Signal();
void SignalAll();
void Wait();
// bool TimedWait(unsigned long usec);
~Condition();
};
#endif
-62
View File
@@ -1,62 +0,0 @@
#ifdef _EQDEBUG
#include "../common/debug.h"
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include "../common/Mutex.h"
#include "DBMemLeak.h"
#include <crtdbg.h>
#ifdef _WINDOWS
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif
DBMemLeak dbmemleak;
LinkedList<DBMemLeakStruct*>* list = 0;
Mutex MDBMemLeak;
DBMemLeak::DBMemLeak() {
list = new LinkedList<DBMemLeakStruct*>;
}
DBMemLeak::~DBMemLeak() {
LinkedListIterator<DBMemLeakStruct*> iterator(*list);
iterator.Reset();
while (iterator.MoreElements()) {
char tmp[200];
snprintf(tmp, sizeof(tmp) - 3, "DB Mem Leak: Block=%6d, Query=%s", iterator.GetData()->memblock, iterator.GetData()->query);
snprintf(tmp, sizeof(tmp), "%s\n", tmp);
OutputDebugString(tmp);
iterator.Advance();
}
safe_delete(list);
}
void DBMemLeak::Alloc(const void* result, const char* query) {
LockMutex lock(&MDBMemLeak);
long requestNumber;
uint8* tmp2 = new uint8;
_CrtIsMemoryBlock( tmp2, 1, &requestNumber, 0, 0 );
safe_delete(tmp2);
DBMemLeakStruct* tmp = (DBMemLeakStruct*) new uchar[sizeof(DBMemLeakStruct) + strlen(query) + 1];
tmp->result = result;
tmp->memblock = requestNumber;
strcpy(tmp->query, query);
list->Append(tmp);
}
void DBMemLeak::Free(const void* result) {
LockMutex lock(&MDBMemLeak);
LinkedListIterator<DBMemLeakStruct*> iterator(*list);
iterator.Reset();
while (iterator.MoreElements()) {
if (result == iterator.GetData()->result)
iterator.RemoveCurrent();
else
iterator.Advance();
}
}
#endif
-25
View File
@@ -1,25 +0,0 @@
#ifdef _EQDEBUG
#ifndef DBMemLeak_H
#define DBMemLeak_H
#include "../common/types.h"
#include "../common/linked_list.h"
#define mysql_free_result(r) { DBMemLeak::Free(r); mysql_free_result(r); }
struct DBMemLeakStruct {
const void* result;
uint32 memblock;
char query[0];
};
class DBMemLeak {
public:
DBMemLeak();
~DBMemLeak();
static void Alloc(const void* result, const char* query);
static void Free(const void* result);
};
#endif
#endif
-300
View File
@@ -1,300 +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 <iostream>
using namespace std;
#include "../common/types.h"
#include "EMuShareMem.h"
#ifdef _WINDOWS
#define snprintf _snprintf
#if (_MSC_VER < 1500)
#define vsnprintf _vsnprintf
#endif
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define EmuLibName "EMuShareMem"
#else
#define EmuLibName "libEMuShareMem.so"
#endif
LoadEMuShareMemDLL EMuShareMemDLL;
#ifndef WIN32
uint32 LoadEMuShareMemDLL::refCount = 0;
#endif
LoadEMuShareMemDLL::LoadEMuShareMemDLL() {
ClearFunc();
#ifndef WIN32
refCountU();
#endif
}
LoadEMuShareMemDLL::~LoadEMuShareMemDLL() {
#ifndef WIN32
if (refCountD() <= 0) {
#endif
Unload();
#ifndef WIN32
}
#endif
}
bool LoadEMuShareMemDLL::Load() {
if(loaded)
return(true);
if(!SharedLibrary::Load(EmuLibName))
return(false);
if (Loaded()) {
Items.GetItem = (DLLFUNC_GetItem) GetSym("GetItem");
Items.IterateItems = (DLLFUNC_IterateItems) GetSym("IterateItems");
Items.cbAddItem = (DLLFUNC_AddItem) GetSym("AddItem");
Items.DLLLoadItems = (DLLFUNC_DLLLoadItems) GetSym("DLLLoadItems");
Doors.GetDoor = (DLLFUNC_GetDoor) GetSym("GetDoor");
Doors.cbAddDoor = (DLLFUNC_AddDoor) GetSym("AddDoor");
Doors.DLLLoadDoors = (DLLFUNC_DLLLoadDoors) GetSym("DLLLoadDoors");
Spells.DLLLoadSPDat = (DLLFUNC_DLLLoadSPDat) GetSym("DLLLoadSPDat");
NPCFactionList.DLLLoadNPCFactionLists = (DLLFUNC_DLLLoadNPCFactionLists) GetSym("DLLLoadNPCFactionLists");
NPCFactionList.GetNPCFactionList = (DLLFUNC_GetNPCFactionList) GetSym("GetNPCFactionList");
NPCFactionList.cbAddNPCFactionList = (DLLFUNC_AddNPCFactionList) GetSym("AddNPCFactionList");
NPCFactionList.cbSetFaction = (DLLFUNC_SetFaction) GetSym("SetNPCFaction");
Loot.DLLLoadLoot = (DLLFUNC_DLLLoadLoot) GetSym("DLLLoadLoot");
Loot.cbAddLootTable = (DLLFUNC_AddLootTable) GetSym("AddLootTable");
Loot.cbAddLootDrop = (DLLFUNC_AddLootDrop) GetSym("AddLootDrop");
Loot.GetLootTable = (DLLFUNC_GetLootTable) GetSym("GetLootTable");
Loot.GetLootDrop = (DLLFUNC_GetLootDrop) GetSym("GetLootDrop");
Opcodes.GetEQOpcode = (DLLFUNC_GetEQOpcode) GetSym("GetEQOpcode");
Opcodes.GetEmuOpcode = (DLLFUNC_GetEmuOpcode) GetSym("GetEmuOpcode");
Opcodes.SetOpcodePair = (DLLFUNC_SetOpcodePair) GetSym("SetOpcodePair");
Opcodes.DLLLoadOpcodes = (DLLFUNC_DLLLoadOpcodes) GetSym("DLLLoadOpcodes");
Opcodes.ClearEQOpcodes = (DLLFUNC_ClearEQOpcodes) GetSym("ClearEQOpcodes");
SkillCaps.LoadSkillCaps = (DLLFUNC_DLLLoadSkillCaps) GetSym("LoadSkillCaps");
SkillCaps.GetSkillCap = (DLLFUNC_GetSkillCap) GetSym("GetSkillCap");
SkillCaps.SetSkillCap = (DLLFUNC_SetSkillCap) GetSym("SetSkillCap");
SkillCaps.ClearSkillCaps = (DLLFUNC_ClearSkillCaps) GetSym("ClearSkillCaps");
SkillCaps.GetTrainLevel = (DLLFUNC_GetTrainLevel) GetSym("GetTrainLevel");
if(Items.GetItem == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Items.GetItem");
return(false);
}
if(Items.IterateItems == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Items.IterateItems");
return(false);
}
if(Items.cbAddItem == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Items.cbAddItem");
return(false);
}
if(Items.DLLLoadItems == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Items.DLLLoadItems");
return(false);
}
if(Doors.GetDoor == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Doors.GetDoor");
return(false);
}
if(Doors.cbAddDoor == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Doors.cbAddDoor");
return(false);
}
if(Doors.DLLLoadDoors == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Doors.DLLLoadDoors");
return(false);
}
if(Spells.DLLLoadSPDat == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Spells.DLLLoadSPDat");
return(false);
}
if(NPCFactionList.DLLLoadNPCFactionLists == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach NPCFactionList.DLLLoadNPCFactionLists");
return(false);
}
if(NPCFactionList.GetNPCFactionList == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach NPCFactionList.GetNPCFactionList");
return(false);
}
if(NPCFactionList.cbAddNPCFactionList == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach NPCFactionList.cbAddNPCFactionList");
return(false);
}
if(NPCFactionList.cbSetFaction == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach NPCFactionList.cbSetFaction");
return(false);
}
if(Loot.DLLLoadLoot == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Loot.DLLLoadLoot");
return(false);
}
if(Loot.cbAddLootTable == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Loot.cbAddLootTable");
return(false);
}
if(Loot.cbAddLootDrop == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Loot.cbAddLootDrop");
return(false);
}
if(Loot.GetLootTable == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Loot.GetLootTable");
return(false);
}
if(Loot.GetLootDrop == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Loot.GetLootDrop");
return(false);
}
if(Opcodes.GetEQOpcode == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Opcodes.GetEQOpcode");
return(false);
}
if(Opcodes.GetEmuOpcode == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Opcodes.GetEmuOpcode");
return(false);
}
if(Opcodes.SetOpcodePair == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Opcodes.SetOpcodePair");
return(false);
}
if(Opcodes.DLLLoadOpcodes == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Opcodes.DLLLoadOpcodes");
return(false);
}
if(Opcodes.ClearEQOpcodes == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach Opcodes.ClearEQOpcodes");
return(false);
}
if(SkillCaps.LoadSkillCaps == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach SkillCaps.LoadSkillCaps");
return(false);
}
if(SkillCaps.GetSkillCap == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach SkillCaps.GetSkillCap");
return(false);
}
if(SkillCaps.SetSkillCap == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach SkillCaps.SetSkillCap");
return(false);
}
if(SkillCaps.ClearSkillCaps == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach SkillCaps.ClearSkillCaps");
return(false);
}
if(SkillCaps.GetTrainLevel == NULL) {
Unload();
LogFile->write(EQEMuLog::Error, "LoadEMuShareMemDLL::Load() failed to attach SkillCaps.GetTrainLevel");
return(false);
}
LogFile->write(EQEMuLog::Status, "%s loaded", EmuLibName);
loaded = true;
return true;
}
else {
LogFile->write(EQEMuLog::Error, "%s was not loaded, but did not report an error.", EmuLibName);
}
return false;
}
void LoadEMuShareMemDLL::Unload() {
ClearFunc();
SharedLibrary::Unload();
}
void LoadEMuShareMemDLL::ClearFunc() {
Items.GetItem = 0;
Items.IterateItems = 0;
Items.cbAddItem = 0;
Items.DLLLoadItems = 0;
Doors.GetDoor = 0;
Doors.cbAddDoor = 0;
Doors.DLLLoadDoors = 0;
NPCFactionList.DLLLoadNPCFactionLists = 0;
NPCFactionList.GetNPCFactionList = 0;
NPCFactionList.cbAddNPCFactionList = 0;
NPCFactionList.cbSetFaction = 0;
Loot.DLLLoadLoot = 0;
Loot.cbAddLootTable = 0;
Loot.cbAddLootDrop = 0;
Loot.GetLootTable = 0;
Loot.GetLootDrop = 0;
Opcodes.GetEQOpcode = NULL;
Opcodes.GetEmuOpcode = NULL;
Opcodes.SetOpcodePair = NULL;
Opcodes.DLLLoadOpcodes = NULL;
Opcodes.ClearEQOpcodes = NULL;
SkillCaps.LoadSkillCaps = NULL;
SkillCaps.GetSkillCap = NULL;
SkillCaps.SetSkillCap = NULL;
SkillCaps.ClearSkillCaps = NULL;
SkillCaps.GetTrainLevel = NULL;
loaded = false;
}
-187
View File
@@ -1,187 +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 EMuShareMem_H
#define EMuShareMem_H
#ifdef _WINDOWS
#include <windows.h>
#else
#include "../common/unix.h"
#endif
#include "../common/eq_packet_structs.h"
#include "../zone/zonedump.h"
#include "../zone/loottable.h"
#include "SharedLibrary.h"
////////////
// Items //
///////////
typedef bool(*CALLBACK_DBLoadItems)(int32, uint32);
typedef bool(*DLLFUNC_DLLLoadItems)(const CALLBACK_DBLoadItems, uint32, int32*, uint32*);
typedef const Item_Struct*(*DLLFUNC_GetItem)(uint32);
typedef const Item_Struct*(*DLLFUNC_IterateItems)(uint32*);
typedef bool(*DLLFUNC_AddItem)(uint32, const Item_Struct*);
struct ItemsDLLFunc_Struct {
DLLFUNC_DLLLoadItems DLLLoadItems;
DLLFUNC_GetItem GetItem;
DLLFUNC_IterateItems IterateItems;
DLLFUNC_AddItem cbAddItem;
};
/*
typedef bool(*CALLBACK_DBLoadNPCTypes)(int32, uint32);
typedef bool(*DLLFUNC_DLLLoadNPCTypes)(const CALLBACK_DBLoadNPCTypes, uint32, int32*, uint32*);
typedef const NPCType*(*DLLFUNC_GetNPCType)(uint32);
typedef bool(*DLLFUNC_AddNPCType)(uint32, const NPCType*);
struct NPCTypesDLLFunc_Struct {
DLLFUNC_DLLLoadNPCTypes DLLLoadNPCTypes;
DLLFUNC_GetNPCType GetNPCType;
DLLFUNC_AddNPCType cbAddNPCType;
};
*/
////////////
// Doors ///
////////////
typedef bool(*CALLBACK_DBLoadDoors)(int32, uint32);
typedef bool(*DLLFUNC_DLLLoadDoors)(const CALLBACK_DBLoadDoors, uint32, int32*, uint32*);
typedef const Door*(*DLLFUNC_GetDoor)(uint32);
typedef bool(*DLLFUNC_AddDoor)(uint32, const Door*);
struct DoorsDLLFunc_Struct {
DLLFUNC_DLLLoadDoors DLLLoadDoors;
DLLFUNC_GetDoor GetDoor;
DLLFUNC_AddDoor cbAddDoor;
};
////////////
// Spells //
////////////
typedef bool(*CALLBACK_FileLoadSPDat)(void*, int32);
typedef bool(*DLLFUNC_DLLLoadSPDat)(const CALLBACK_FileLoadSPDat, const void**, int32*, uint32);
struct SpellsDLLFunc_Struct {
DLLFUNC_DLLLoadSPDat DLLLoadSPDat;
};
//////////////
// Factions //
//////////////
typedef bool(*CALLBACK_DBLoadNPCFactionLists)(int32, uint32);
typedef bool(*DLLFUNC_DLLLoadNPCFactionLists)(const CALLBACK_DBLoadNPCFactionLists, uint32, int32*, uint32*, uint8);
typedef const NPCFactionList*(*DLLFUNC_GetNPCFactionList)(uint32);
typedef bool(*DLLFUNC_AddNPCFactionList)(uint32, const NPCFactionList*);
typedef bool(*DLLFUNC_SetFaction)(uint32, uint32*, int32*, int8*, uint8*);
struct NPCFactionListDLLFunc_Struct {
DLLFUNC_DLLLoadNPCFactionLists DLLLoadNPCFactionLists;
DLLFUNC_GetNPCFactionList GetNPCFactionList;
DLLFUNC_AddNPCFactionList cbAddNPCFactionList;
DLLFUNC_SetFaction cbSetFaction;
};
////////////
// Loot //
///////////
typedef bool(*CALLBACK_DBLoadLoot)();
typedef bool(*DLLFUNC_DLLLoadLoot)(const CALLBACK_DBLoadLoot, uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32);
typedef bool(*DLLFUNC_AddLootTable)(uint32, const LootTable_Struct*);
typedef bool(*DLLFUNC_AddLootDrop)(uint32, const LootDrop_Struct*);
typedef const LootTable_Struct*(*DLLFUNC_GetLootTable)(uint32);
typedef const LootDrop_Struct*(*DLLFUNC_GetLootDrop)(uint32);
struct LootDLLFunc_Struct {
DLLFUNC_DLLLoadLoot DLLLoadLoot;
DLLFUNC_AddLootTable cbAddLootTable;
DLLFUNC_AddLootDrop cbAddLootDrop;
DLLFUNC_GetLootTable GetLootTable;
DLLFUNC_GetLootDrop GetLootDrop;
};
/////////////
// Opcodes //
/////////////
typedef bool(*CALLBACK_DBLoadOpcodes)(const char *filename);
typedef bool(*DLLFUNC_DLLLoadOpcodes)(const CALLBACK_DBLoadOpcodes, uint32 opsize, uint32 eq_count, uint32 emu_count, const char *filename);
typedef uint16 (*DLLFUNC_GetEQOpcode)(uint16 emu_op);
typedef uint16 (*DLLFUNC_GetEmuOpcode)(uint16 eq_op);
typedef void (*DLLFUNC_ClearEQOpcodes)();
typedef bool(*DLLFUNC_SetOpcodePair)(uint16 emu_op, uint16 eq_op);
struct OpcodeDLLFunc_Struct {
DLLFUNC_DLLLoadOpcodes DLLLoadOpcodes;
DLLFUNC_GetEQOpcode GetEQOpcode;
DLLFUNC_GetEmuOpcode GetEmuOpcode;
DLLFUNC_SetOpcodePair SetOpcodePair;
DLLFUNC_ClearEQOpcodes ClearEQOpcodes;
};
////////////////
// Skill Caps //
////////////////
typedef bool(*CALLBACK_DBLoadSkillCaps)();
typedef bool(*DLLFUNC_DLLLoadSkillCaps)(const CALLBACK_DBLoadSkillCaps, uint32 opsize, uint8 ClassCount, uint8 SkillCount, uint8 LevelCount);
typedef uint16 (*DLLFUNC_GetSkillCap)(uint8 Class_, uint8 Skill, uint8 Level);
typedef void (*DLLFUNC_ClearSkillCaps)();
typedef bool(*DLLFUNC_SetSkillCap)(uint8 Class_, uint8 Skill, uint8 Level, uint16 cap);
typedef uint8 (*DLLFUNC_GetTrainLevel)(uint8 Class_, uint8 Skill, uint8 Level);
struct SkillCapDLLFunc_Struct {
DLLFUNC_DLLLoadSkillCaps LoadSkillCaps;
DLLFUNC_GetSkillCap GetSkillCap;
DLLFUNC_SetSkillCap SetSkillCap;
DLLFUNC_ClearSkillCaps ClearSkillCaps;
DLLFUNC_GetTrainLevel GetTrainLevel;
};
class LoadEMuShareMemDLL : public SharedLibrary {
public:
LoadEMuShareMemDLL();
~LoadEMuShareMemDLL();
bool Load();
void Unload();
ItemsDLLFunc_Struct Items;
//NPCTypesDLLFunc_Struct NPCTypes;
DoorsDLLFunc_Struct Doors;
SpellsDLLFunc_Struct Spells;
NPCFactionListDLLFunc_Struct NPCFactionList;
LootDLLFunc_Struct Loot;
OpcodeDLLFunc_Struct Opcodes;
SkillCapDLLFunc_Struct SkillCaps;
private:
void ClearFunc();
bool loaded;
#ifdef _WINDOWS
#else
static uint32 refCount;
static uint32 refCountU() { return ++refCount; };
static uint32 refCountD() { return --refCount; };
#endif
};
#endif
-51
View File
@@ -1,51 +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 "debug.h"
#include "EQDBRes.h"
#include <mysql.h>
vector<string> EQDBRes::fetch_row_array() {
vector<string> array;
if(res == NULL)
return(array);
int count=mysql_num_fields(res);
MYSQL_ROW row=mysql_fetch_row(res);
for (int i=0;i<count;i++)
array.push_back(row[i]);
return array;
}
map<string,string> EQDBRes::fetch_row_hash() {
map<string,string> rowhash;
if(res == NULL)
return(rowhash);
MYSQL_FIELD *fields;
MYSQL_ROW row;
unsigned long num_fields,i;
if (res && (num_fields=mysql_num_fields(res)) && (row = mysql_fetch_row(res))!=NULL && (fields = mysql_fetch_fields(res))!=NULL) {
for(i=0;i<num_fields;i++) {
rowhash[fields[i].name]=(row[i] ? row[i] : "");
}
}
return rowhash;
}
-48
View File
@@ -1,48 +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 EQDBRes_H_
#define EQDBRes_H_
#include <string>
#include <vector>
#include <map>
#include "types.h"
#include "database.h"
#include <mysql.h>
//this is the main object exported to perl.
class EQDBRes {
public:
EQDBRes(MYSQL_RES *r) { res=r; }
~EQDBRes() { finish(); }
//BEGIN PERL EXPORT
unsigned long num_rows() { return (res) ? mysql_num_rows(res) : 0; }
unsigned long num_fields() { return (res) ? mysql_num_fields(res) : 0; }
void DESTROY() { }
void finish() { if (res) mysql_free_result(res); res=NULL; };
vector<string> fetch_row_array();
map<string,string> fetch_row_hash();
unsigned long * fetch_lengths() { return (res) ? mysql_fetch_lengths(res) : 0; }
//END PERL EXPORT
private:
MYSQL_RES *res;
};
#endif /*EQDBRes_H_*/
-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
}
-36
View File
@@ -1,36 +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 EQEMuError_H
#define EQEMuError_H
#include "../common/types.h"
enum eEQEMuError { EQEMuError_NoError,
EQEMuError_Mysql_1405,
EQEMuError_Mysql_2003,
EQEMuError_Mysql_2005,
EQEMuError_Mysql_2007,
EQEMuError_MaxErrorID };
void AddEQEMuError(eEQEMuError iError, bool iExitNow = false);
void AddEQEMuError(char* iError, bool iExitNow = false);
uint32 CheckEQEMuError();
void CheckEQEMuErrorAndPause();
#endif
-472
View File
@@ -1,472 +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>
string EQEmuConfig::ConfigFile = "eqemu_config.xml";
EQEmuConfig *EQEmuConfig::_config = NULL;
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 != NULL)
Locked=true;
// Get the <tcp> element
sub_ele = ele->FirstChildElement("tcp");
if(sub_ele != NULL) {
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 != NULL) {
// 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 != NULL) {
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 != NULL) {
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);
}
}
string EQEmuConfig::GetByName(const 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
{
cout << "ShortName = " << ShortName << endl;
cout << "LongName = " << LongName << endl;
cout << "WorldAddress = " << WorldAddress << endl;
cout << "LoginHost = " << LoginHost << endl;
cout << "LoginAccount = " << LoginAccount << endl;
cout << "LoginPassword = " << LoginPassword << endl;
cout << "LoginPort = " << LoginPort << endl;
cout << "Locked = " << Locked << endl;
cout << "WorldTCPPort = " << WorldTCPPort << endl;
cout << "WorldIP = " << WorldIP << endl;
cout << "TelnetEnabled = " << TelnetEnabled << endl;
cout << "WorldHTTPPort = " << WorldHTTPPort << endl;
cout << "WorldHTTPMimeFile = " << WorldHTTPMimeFile << endl;
cout << "WorldHTTPEnabled = " << WorldHTTPEnabled << endl;
cout << "ChatHost = " << ChatHost << endl;
cout << "ChatPort = " << ChatPort << endl;
cout << "MailHost = " << MailHost << endl;
cout << "MailPort = " << MailPort << endl;
cout << "DatabaseHost = " << DatabaseHost << endl;
cout << "DatabaseUsername = " << DatabaseUsername << endl;
cout << "DatabasePassword = " << DatabasePassword << endl;
cout << "DatabaseDB = " << DatabaseDB << endl;
cout << "DatabasePort = " << DatabasePort << endl;
cout << "QSDatabaseHost = " << QSDatabaseHost << endl;
cout << "QSDatabaseUsername = " << QSDatabaseUsername << endl;
cout << "QSDatabasePassword = " << QSDatabasePassword << endl;
cout << "QSDatabaseDB = " << QSDatabaseDB << endl;
cout << "QSDatabasePort = " << QSDatabasePort << endl;
cout << "SpellsFile = " << SpellsFile << endl;
cout << "OpCodesFile = " << OpCodesFile << endl;
cout << "EQTimeFile = " << EQTimeFile << endl;
cout << "LogSettingsFile = " << LogSettingsFile << endl;
cout << "MapDir = " << MapDir << endl;
cout << "QuestDir = " << QuestDir << endl;
cout << "PluginDir = " << PluginDir << endl;
cout << "ZonePortLow = " << ZonePortLow << endl;
cout << "ZonePortHigh = " << ZonePortHigh << endl;
cout << "DefaultStatus = " << (int)DefaultStatus << endl;
// cout << "DynamicCount = " << DynamicCount << 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 {
string LoginHost;
string LoginAccount;
string LoginPassword;
uint16 LoginPort;
};
class EQEmuConfig : public XMLParser {
public:
virtual string GetByName(const string &var_name) const;
// From <world/>
string ShortName;
string LongName;
string WorldAddress;
string LocalAddress;
string LoginHost;
string LoginAccount;
string LoginPassword;
uint16 LoginPort;
uint32 LoginCount;
LinkedList<LoginConfig*> loginlist;
bool Locked;
uint16 WorldTCPPort;
string WorldIP;
bool TelnetEnabled;
int32 MaxClients;
bool WorldHTTPEnabled;
uint16 WorldHTTPPort;
string WorldHTTPMimeFile;
string SharedKey;
// From <chatserver/>
string ChatHost;
uint16 ChatPort;
// From <mailserver/>
string MailHost;
uint16 MailPort;
// From <database/>
string DatabaseHost;
string DatabaseUsername;
string DatabasePassword;
string DatabaseDB;
uint16 DatabasePort;
// From <qsdatabase> // QueryServ
string QSDatabaseHost;
string QSDatabaseUsername;
string QSDatabasePassword;
string QSDatabaseDB;
uint16 QSDatabasePort;
// From <files/>
string SpellsFile;
string OpCodesFile;
string EQTimeFile;
string LogSettingsFile;
// From <directories/>
string MapDir;
string QuestDir;
string PluginDir;
// From <launcher/>
string LogPrefix;
string LogSuffix;
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 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 == NULL)
LoadConfig();
return(_config);
}
// Allow the use to set the conf file to be used.
static void SetConfigFile(string file) { EQEmuConfig::ConfigFile = file; }
// Load the config
static bool LoadConfig() {
if (_config != NULL)
delete _config;
_config=new EQEmuConfig;
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(),"server");
}
void Dump() const;
};
#endif
-414
View File
@@ -1,414 +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"
using namespace std;
#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;
}
}
map <string, EQStream*>::iterator connection;
for (connection = connection_list.begin( ); connection != connection_list.end( );)
{
if(!connection->second)
{
map <string, EQStream*>::iterator tmp=connection;
connection++;
connection_list.erase(tmp);
continue;
}
EQStream* eqs_data = connection->second;
if (eqs_data->IsFree() && (!eqs_data->CheckNetActive())) {
map <string, EQStream*>::iterator tmp=connection;
connection++;
safe_delete(eqs_data);
connection_list.erase(tmp);
}
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;
map <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
}
-121
View File
@@ -1,121 +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>
using namespace std;
#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;
map<string,EQStream*> connection_list;
queue<EQStream *> NewQueue;
};
#endif
-1433
View File
File diff suppressed because it is too large Load Diff
-199
View File
@@ -1,199 +0,0 @@
#include "debug.h"
#include "EQStreamIdent.h"
#include "EQStreamProxy.h"
#include "logsys.h"
using namespace std;
EQStreamIdentifier::~EQStreamIdentifier() {
while(!m_identified.empty()) {
m_identified.front()->ReleaseFromUse();
m_identified.pop();
}
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;
}
vector<Patch *>::iterator curp, endp;
curp = m_patches.begin();
endp = m_patches.end();
for(; curp != endp; curp++) {
delete *curp;
}
}
void EQStreamIdentifier::RegisterPatch(const EQStream::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs) {
Patch *p = new Patch;
p->signature = sig;
p->name = name;
p->opcodes = opcodes;
p->structs = structs;
m_patches.push_back(p);
}
void EQStreamIdentifier::Process() {
vector<Record *>::iterator cur;
vector<Patch *>::iterator curp, endp;
//foreach pending stream.
cur = m_streams.begin();
while(cur != m_streams.end()) {
Record *r = *cur;
//first see if this stream has expired
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;
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)
{
continue;
}
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())
{
case ESTABLISHED:
_log(NET__IDENTIFY, "Stream state was Established");
break;
case CLOSING:
_log(NET__IDENTIFY, "Stream state was Closing");
break;
case DISCONNECTING:
_log(NET__IDENTIFY, "Stream state was Disconnecting");
break;
case CLOSED:
_log(NET__IDENTIFY, "Stream state was Closed");
break;
default:
_log(NET__IDENTIFY, "Stream state was Unestablished or unknown");
break;
}
r->stream->ReleaseFromUse();
delete r;
cur = m_streams.erase(cur);
continue;
}
//not expired, check against all patch signatures
bool found_one = false; //"we found a matching patch for this stream"
bool all_ready = true; //"all signatures were ready to check the stream"
//foreach possbile patch...
curp = m_patches.begin();
endp = m_patches.end();
for(; !found_one && curp != endp; curp++) {
Patch *p = *curp;
//ask the stream to see if it matches the supplied 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());
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());
//might want to do something less-specific here... some day..
EQStreamInterface *s = new EQStreamProxy(r->stream, p->structs, p->opcodes);
m_identified.push(s);
found_one = true;
break;
}
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());
break;
}
}
//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();
}
//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;
cur = m_streams.erase(cur);
} else {
cur++;
}
} //end foreach stream
}
void EQStreamIdentifier::AddStream(EQStream *&eqs) {
m_streams.push_back(new Record(eqs));
eqs = NULL;
}
EQStreamInterface *EQStreamIdentifier::PopIdentified() {
if(m_identified.empty())
return(NULL);
EQStreamInterface *res = m_identified.front();
m_identified.pop();
return(res);
}
EQStreamIdentifier::Record::Record(EQStream *s)
: stream(s),
expire(STREAM_IDENT_WAIT_MS)
{
}
-1951
View File
File diff suppressed because it is too large Load Diff
-456
View File
@@ -1,456 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 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
*/
// @merth notes:
// These classes could be optimized with database reads/writes by storing
// a status flag indicating how object needs to interact with database
#ifndef __ITEM_H
#define __ITEM_H
class ItemInst; // Item belonging to a client (contains info on item, dye, augments, charges, etc)
class ItemInstQueue; // Queue of ItemInst objects (i.e., cursor)
class Inventory; // Character inventory
class ItemParse; // Parses item packets
class EvoItemInst; // Extended item inst, for use with scaling/evolving items
class EvolveInfo; // Stores information about an evolving item family
#include <string>
#include <vector>
#include <map>
#include <list>
using namespace std;
#include "../common/eq_packet_structs.h"
#include "../common/eq_constants.h"
#include "../common/item_struct.h"
// Helper typedefs
typedef list<ItemInst*>::const_iterator iter_queue;
typedef map<int16, ItemInst*>::const_iterator iter_inst;
typedef map<uint8, ItemInst*>::const_iterator iter_contents;
namespace ItemField {
enum {
source=0,
#define F(x) x,
#include "item_fieldlist.h"
#undef F
updated
};
};
// Indexing positions to the beginning slot_id's for a bucket of slots
#define IDX_EQUIP 0
#define IDX_CURSOR_BAG 331
#define IDX_INV 22
#define IDX_INV_BAG 251
#define IDX_TRIBUTE 400
#define IDX_BANK 2000
#define IDX_BANK_BAG 2031
#define IDX_SHBANK 2500
#define IDX_SHBANK_BAG 2531
#define IDX_TRADE 3000
#define IDX_TRADE_BAG 3031
#define IDX_TRADESKILL 4000
#define MAX_ITEMS_PER_BAG 10
// Specifies usage type for item inside ItemInst
enum ItemUseType
{
ItemUseNormal,
ItemUseWorldContainer
};
typedef enum {
byFlagIgnore, //do not consider this flag
byFlagSet, //apply action if the flag is set
byFlagNotSet //apply action if the flag is NOT set
} byFlagSetting;
//FatherNitwit: location bits for searching specific
//places with HasItem() and HasItemByUse()
enum {
invWhereWorn = 0x01,
invWherePersonal = 0x02, //in the character's inventory
invWhereBank = 0x04,
invWhereSharedBank = 0x08,
invWhereTrading = 0x10,
invWhereCursor = 0x20
};
// ########################################
// Class: Queue
// Queue that allows a read-only iterator
class ItemInstQueue
{
public:
~ItemInstQueue();
/////////////////////////
// Public Methods
/////////////////////////
inline iter_queue begin() { return m_list.begin(); }
inline iter_queue end() { return m_list.end(); }
void push(ItemInst* inst);
void push_front(ItemInst* inst);
ItemInst* pop();
ItemInst* peek_front() const;
inline int size() { return static_cast<int>(m_list.size()); }
protected:
/////////////////////////
// Protected Members
/////////////////////////
list<ItemInst*> m_list;
};
// ########################################
// Class: Inventory
// Character inventory
class Inventory
{
friend class ItemInst;
public:
///////////////////////////////
// Public Methods
///////////////////////////////
virtual ~Inventory();
// Retrieve a writeable item at specified slot
ItemInst* GetItem(int16 slot_id) const;
ItemInst* GetItem(int16 slot_id, uint8 bagidx) const;
inline iter_queue cursor_begin() { return m_cursor.begin(); }
inline iter_queue cursor_end() { return m_cursor.end(); }
inline bool CursorEmpty() { return (m_cursor.size() == 0); }
// Retrieve a read-only item from inventory
inline const ItemInst* operator[](int16 slot_id) const { return GetItem(slot_id); }
// Add item to inventory
int16 PutItem(int16 slot_id, const ItemInst& inst);
// Add item to cursor queue
int16 PushCursor(const ItemInst& inst);
// Swap items in inventory
bool SwapItem(int16 slot_a, int16 slot_b);
// Remove item from inventory
bool DeleteItem(int16 slot_id, uint8 quantity=0);
// Checks All items in a bag for No Drop
bool CheckNoDrop(int16 slot_id);
// Remove item from inventory (and take control of memory)
ItemInst* PopItem(int16 slot_id);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
int16 HasItem(uint32 item_id, uint8 quantity=0, uint8 where=0xFF);
// Check whether there is space for the specified number of the specified item.
bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
int16 HasItemByUse(uint8 use, uint8 quantity=0, uint8 where=0xFF);
// Check whether item exists in inventory
// where argument specifies OR'd list of invWhere constants to look
int16 HasItemByLoreGroup(uint32 loregroup, uint8 where=0xFF);
// Locate an available inventory slot
int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false);
// Calculate slot_id for an item within a bag
static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id
static int16 CalcSlotId(int16 bagslot_id, uint8 bagidx); // Calc slot_id for item inside bag
static uint8 CalcBagIdx(int16 slot_id); // Calc bagidx for slot_id
static int16 CalcSlotFromMaterial(uint8 material);
static uint8 CalcMaterialFromSlot(int16 equipslot);
static bool CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_Struct *Container);
// Test whether a given slot can support a container item
static bool SupportsContainers(int16 slot_id);
void dumpInventory();
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
std::string GetCustomItemData(int16 slot_id, std::string identifier);
protected:
///////////////////////////////
// Protected Methods
///////////////////////////////
// Retrieves item within an inventory bucket
ItemInst* _GetItem(const map<int16, ItemInst*>& bucket, int16 slot_id) const;
// Private "put" item into bucket, without regard for what is currently in bucket
int16 _PutItem(int16 slot_id, ItemInst* inst);
// Checks an inventory bucket for a particular item
int16 _HasItem(map<int16, ItemInst*>& bucket, uint32 item_id, uint8 quantity);
int16 _HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity);
int16 _HasItemByUse(map<int16, ItemInst*>& bucket, uint8 use, uint8 quantity);
int16 _HasItemByUse(ItemInstQueue& iqueue, uint8 use, uint8 quantity);
int16 _HasItemByLoreGroup(map<int16, ItemInst*>& bucket, uint32 loregroup);
int16 _HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 loregroup);
// Player inventory
map<int16, ItemInst*> m_worn; // Items worn by character
map<int16, ItemInst*> m_inv; // Items in character personal inventory
map<int16, ItemInst*> m_bank; // Items in character bank
map<int16, ItemInst*> m_shbank; // Items in character shared bank
map<int16, ItemInst*> m_trade; // Items in a trade session
ItemInstQueue m_cursor; // Items on cursor: FIFO
};
class SharedDatabase;
// ########################################
// Class: ItemInst
// Base class for an instance of an item
// An item instance encapsulates item data + data specific
// to an item instance (includes dye, augments, charges, etc)
class ItemInst
{
public:
/////////////////////////
// Methods
/////////////////////////
// Constructors/Destructor
ItemInst(const Item_Struct* item = NULL, int16 charges = 0);
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
ItemInst(ItemUseType use_type) {
m_use_type = use_type;
m_item = NULL;
m_charges = 0;
m_price = 0;
m_instnodrop = false;
m_merchantslot = 0;
m_color = 0;
}
ItemInst(const ItemInst& copy);
virtual ~ItemInst();
// Query item type
virtual bool IsType(ItemClass item_class) const;
// Can item be stacked?
virtual bool IsStackable() const;
// Can item be equipped by/at?
virtual bool IsEquipable(uint16 race, uint16 class_) const;
virtual bool IsEquipable(int16 slot_id) const;
//
// Augements
//
inline bool IsAugmentable() const { return m_item->AugSlotType[0]!=0 || m_item->AugSlotType[1]!=0 || m_item->AugSlotType[2]!=0 || m_item->AugSlotType[3]!=0 || m_item->AugSlotType[4]!=0; }
bool AvailableWearSlot(uint32 aug_wear_slots) const;
int8 AvailableAugmentSlot(int32 augtype) const;
inline int32 GetAugmentType() const { return m_item->AugType; }
inline bool IsExpendable() const { return ((m_item->Click.Type == ET_Expendable ) || (m_item->ItemType == ItemTypePotion)); }
//
// Contents
//
ItemInst* GetItem(uint8 slot) const;
virtual uint32 GetItemID(uint8 slot) const;
inline const ItemInst* operator[](uint8 slot) const { return GetItem(slot); }
void PutItem(uint8 slot, const ItemInst& inst);
void PutItem(SharedDatabase *db, uint8 slot, uint32 item_id);
void DeleteItem(uint8 slot);
ItemInst* PopItem(uint8 index);
void Clear();
void ClearByFlags(byFlagSetting is_nodrop, byFlagSetting is_norent);
uint8 FirstOpenSlot() const;
uint8 GetTotalItemCount() const;
bool IsNoneEmptyContainer();
map<uint8, ItemInst*>* GetContents() { return &m_contents; }
//
// Augments
//
ItemInst* GetAugment(uint8 slot) const;
virtual uint32 GetAugmentItemID(uint8 slot) const;
void PutAugment(uint8 slot, const ItemInst& inst);
void PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id);
void DeleteAugment(uint8 slot);
ItemInst* RemoveAugment(uint8 index);
bool IsAugmented();
// Has attack/delay?
virtual bool IsWeapon() const;
virtual bool IsAmmo() const;
// Accessors
const uint32 GetID() const { return m_item->ID; }
const uint32 GetItemScriptID() const { return m_item->ScriptFileID; }
virtual const Item_Struct* GetItem() const { return m_item; }
void SetItem(const Item_Struct* item) { m_item = item; }
int16 GetCharges() const { return m_charges; }
void SetCharges(int16 charges) { m_charges = charges; }
uint32 GetPrice() const { return m_price; }
void SetPrice(uint32 price) { m_price = price; }
void SetColor(uint32 color) { m_color = color; }
uint32 GetColor() const { return m_color; }
uint32 GetMerchantSlot() const { return m_merchantslot; }
void SetMerchantSlot(uint32 slot) { m_merchantslot = slot; }
int32 GetMerchantCount() const { return m_merchantcount; }
void SetMerchantCount(int32 count) { m_merchantcount = count; }
int16 GetCurrentSlot() const { return m_currentslot; }
void SetCurrentSlot(int16 curr_slot) { m_currentslot = curr_slot; }
// Is this item already attuned?
bool IsInstNoDrop() const { return m_instnodrop; }
void SetInstNoDrop(bool flag) { m_instnodrop=flag; }
std::string GetCustomDataString() const;
void SetCustomData(std::string identifier, std::string value);
void SetCustomData(std::string identifier, int value);
void SetCustomData(std::string identifier, float value);
void SetCustomData(std::string identifier, bool value);
std::string GetCustomData(std::string identifier);
void DeleteCustomData(std::string identifier);
// Allows treatment of this object as though it were a pointer to m_item
operator bool() const { return (m_item != NULL); }
// Compare inner Item_Struct of two ItemInst objects
bool operator==(const ItemInst& right) const { return (this->m_item == right.m_item); }
bool operator!=(const ItemInst& right) const { return (this->m_item != right.m_item); }
// Clone current item
virtual ItemInst* Clone() const;
bool IsSlotAllowed(int16 slot_id) const;
virtual bool IsScaling() const { return false; }
virtual bool IsEvolving() const { return false; }
string Serialize(int16 slot_id) const { InternalSerializedItem_Struct s; s.slot_id=slot_id; s.inst=(const void *)this; string ser; ser.assign((char *)&s,sizeof(InternalSerializedItem_Struct)); return ser; }
inline int32 GetSerialNumber() const { return m_SerialNumber; }
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
protected:
//////////////////////////
// Protected Members
//////////////////////////
iter_contents _begin() { return m_contents.begin(); }
iter_contents _end() { return m_contents.end(); }
friend class Inventory;
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
ItemUseType m_use_type; // Usage type for item
const Item_Struct* m_item; // Ptr to item data
int16 m_charges; // # of charges for chargeable items
uint32 m_price; // Bazaar /trader price
uint32 m_color;
uint32 m_merchantslot;
int16 m_currentslot;
bool m_instnodrop;
int32 m_merchantcount; //number avaliable on the merchant, -1=unlimited
int32 m_SerialNumber; // Unique identifier for this instance of an item. Needed for Bazaar.
//
// Items inside of this item (augs or contents);
map<uint8, ItemInst*> m_contents; // Zero-based index: min=0, max=9
map<std::string, std::string> m_custom_data;
};
class EvoItemInst: public ItemInst {
public:
// constructor and destructor
EvoItemInst(const EvoItemInst& copy);
EvoItemInst(const ItemInst& copy);
EvoItemInst(const Item_Struct* item = NULL, int16 charges = 0);
~EvoItemInst();
// accessors... a lot of these are for evolving items (not complete yet)
bool IsScaling() const { return (m_evolveLvl == -1); }
bool IsEvolving() const { return (m_evolveLvl >= 1); }
uint32 GetExp() const { return m_exp; }
void SetExp(uint32 exp) { m_exp = exp; }
void AddExp(uint32 exp) { m_exp += exp; }
bool IsActivated() { return m_activated; }
void SetActivated(bool activated) { m_activated = activated; }
int8 GetEvolveLvl() const { return m_evolveLvl; }
EvoItemInst* Clone() const;
const Item_Struct* GetItem() const;
const Item_Struct* GetUnscaledItem() const;
void Initialize(SharedDatabase *db = NULL);
void ScaleItem();
bool EvolveOnAllKills() const;
int8 GetMaxEvolveLvl() const;
uint32 GetKillsNeeded(uint8 currentlevel);
private:
uint32 m_exp;
int8 m_evolveLvl;
bool m_activated;
Item_Struct* m_scaledItem;
const EvolveInfo* m_evolveInfo;
};
class EvolveInfo {
public:
friend class EvoItemInst;
//temporary
uint16 LvlKills[9];
uint32 FirstItem;
uint8 MaxLvl;
bool AllKills;
EvolveInfo();
EvolveInfo(uint32 first, uint8 max, bool allkills, uint32 L2, uint32 L3, uint32 L4, uint32 L5, uint32 L6, uint32 L7, uint32 L8, uint32 L9, uint32 L10);
~EvolveInfo();
};
#endif // #define __ITEM_H
-1901
View File
File diff suppressed because it is too large Load Diff
-650
View File
@@ -1,650 +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
*/
#include "../common/debug.h"
#include "MiscFunctions.h"
#include <string.h>
#include <time.h>
#include <math.h>
#ifndef WIN32
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#include <iostream>
#include <iomanip>
#ifdef _WINDOWS
#include <io.h>
#endif
#include "../common/timer.h"
#include "../common/seperator.h"
using namespace std;
#ifdef _WINDOWS
#include <windows.h>
#define snprintf _snprintf
#if (_MSC_VER < 1500)
#define vsnprintf _vsnprintf
#endif
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/time.h>
#ifdef FREEBSD //Timothy Whitman - January 7, 2003
#include <sys/socket.h>
#include <netinet/in.h>
#endif
#include <sys/stat.h>
#include <unistd.h>
#include <netdb.h>
#include <errno.h>
#endif
#ifndef va_copy
#define va_copy(d,s) ((d) = (s))
#endif
static bool WELLRNG_init = false;
static int state_i = 0;
static unsigned int STATE[R];
static unsigned int z0, z1, z2;
unsigned int (*WELLRNG19937)(void);
static unsigned int case_1 (void);
static unsigned int case_2 (void);
static unsigned int case_3 (void);
static unsigned int case_4 (void);
static unsigned int case_5 (void);
static unsigned int case_6 (void);
uint32 rnd_hash(time_t t, clock_t c);
void oneseed(const uint32 seed);
void CoutTimestamp(bool ms) {
time_t rawtime;
struct tm* gmt_t;
time(&rawtime);
gmt_t = gmtime(&rawtime);
struct timeval read_time;
gettimeofday(&read_time,0);
cout << (gmt_t->tm_year + 1900) << "/" << setw(2) << setfill('0') << (gmt_t->tm_mon + 1) << "/" << setw(2) << setfill('0') << gmt_t->tm_mday << " " << setw(2) << setfill('0') << gmt_t->tm_hour << ":" << setw(2) << setfill('0') << gmt_t->tm_min << ":" << setw(2) << setfill('0') << gmt_t->tm_sec;
if (ms)
cout << "." << setw(3) << setfill('0') << (read_time.tv_usec / 1000);
cout << " GMT";
}
// normal strncpy doesnt put a null term on copied strings, this one does
// ref: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecrt/htm/_wcecrt_strncpy_wcsncpy.asp
char* strn0cpy(char* dest, const char* source, uint32 size) {
if (!dest)
return 0;
if (size == 0 || source == 0) {
dest[0] = 0;
return dest;
}
strncpy(dest, source, size);
dest[size - 1] = 0;
return dest;
}
// String N w/null Copy Truncated?
// return value =true if entire string(source) fit, false if it was truncated
bool strn0cpyt(char* dest, const char* source, uint32 size) {
if (!dest)
return 0;
if (size == 0 || source == 0) {
dest[0] = 0;
return false;
}
strncpy(dest, source, size);
dest[size - 1] = 0;
return (bool) (source[strlen(dest)] == 0);
}
const char *MakeUpperString(const char *source) {
static char str[128];
if (!source)
return NULL;
MakeUpperString(source, str);
return str;
}
void MakeUpperString(const char *source, char *target) {
if (!source || !target) {
*target=0;
return;
}
while (*source)
{
*target = toupper(*source);
target++;source++;
}
*target = 0;
}
const char *MakeLowerString(const char *source) {
static char str[128];
if (!source)
return NULL;
MakeLowerString(source, str);
return str;
}
void MakeLowerString(const char *source, char *target) {
if (!source || !target) {
*target=0;
return;
}
while (*source)
{
*target = tolower(*source);
target++;source++;
}
*target = 0;
}
int MakeAnyLenString(char** ret, const char* format, ...) {
int buf_len = 128;
int chars = -1;
va_list argptr, tmpargptr;
va_start(argptr, format);
while (chars == -1 || chars >= buf_len) {
safe_delete_array(*ret);
if (chars == -1)
buf_len *= 2;
else
buf_len = chars + 1;
*ret = new char[buf_len];
va_copy(tmpargptr, argptr);
chars = vsnprintf(*ret, buf_len, format, tmpargptr);
}
va_end(argptr);
return chars;
}
uint32 AppendAnyLenString(char** ret, uint32* bufsize, uint32* strlen, const char* format, ...) {
if (*bufsize == 0)
*bufsize = 256;
if (*ret == 0)
*strlen = 0;
int chars = -1;
char* oldret = 0;
va_list argptr, tmpargptr;
va_start(argptr, format);
while (chars == -1 || chars >= (int32)(*bufsize-*strlen)) {
if (chars == -1)
*bufsize += 256;
else
*bufsize += chars + 25;
oldret = *ret;
*ret = new char[*bufsize];
if (oldret) {
if (*strlen)
memcpy(*ret, oldret, *strlen);
safe_delete_array(oldret);
}
va_copy(tmpargptr, argptr);
chars = vsnprintf(&(*ret)[*strlen], (*bufsize-*strlen), format, tmpargptr);
}
va_end(argptr);
*strlen += chars;
return *strlen;
}
uint32 hextoi(char* num) {
int len = strlen(num);
if (len < 3)
return 0;
if (num[0] != '0' || (num[1] != 'x' && num[1] != 'X'))
return 0;
uint32 ret = 0;
int mul = 1;
for (int i=len-1; i>=2; i--) {
if (num[i] >= 'A' && num[i] <= 'F')
ret += ((num[i] - 'A') + 10) * mul;
else if (num[i] >= 'a' && num[i] <= 'f')
ret += ((num[i] - 'a') + 10) * mul;
else if (num[i] >= '0' && num[i] <= '9')
ret += (num[i] - '0') * mul;
else
return 0;
mul *= 16;
}
return ret;
}
uint64 hextoi64(char* num) {
int len = strlen(num);
if (len < 3)
return 0;
if (num[0] != '0' || (num[1] != 'x' && num[1] != 'X'))
return 0;
uint64 ret = 0;
int mul = 1;
for (int i=len-1; i>=2; i--) {
if (num[i] >= 'A' && num[i] <= 'F')
ret += ((num[i] - 'A') + 10) * mul;
else if (num[i] >= 'a' && num[i] <= 'f')
ret += ((num[i] - 'a') + 10) * mul;
else if (num[i] >= '0' && num[i] <= '9')
ret += (num[i] - '0') * mul;
else
return 0;
mul *= 16;
}
return ret;
}
bool atobool(char* iBool) {
if (!strcasecmp(iBool, "true"))
return true;
if (!strcasecmp(iBool, "false"))
return false;
if (!strcasecmp(iBool, "yes"))
return true;
if (!strcasecmp(iBool, "no"))
return false;
if (!strcasecmp(iBool, "on"))
return true;
if (!strcasecmp(iBool, "off"))
return false;
if (!strcasecmp(iBool, "enable"))
return true;
if (!strcasecmp(iBool, "disable"))
return false;
if (!strcasecmp(iBool, "enabled"))
return true;
if (!strcasecmp(iBool, "disabled"))
return false;
if (!strcasecmp(iBool, "y"))
return true;
if (!strcasecmp(iBool, "n"))
return false;
if (atoi(iBool))
return true;
return false;
}
int32 filesize(FILE* fp) {
#ifdef _WINDOWS
return _filelength(_fileno(fp));
#else
struct stat file_stat;
fstat(fileno(fp), &file_stat);
return (int32) file_stat.st_size;
/* uint32 tmp = 0;
while (!feof(fp)) {
fseek(fp, tmp++, SEEK_SET);
}
return tmp;*/
#endif
}
uint32 ResolveIP(const char* hostname, char* errbuf) {
#ifdef _WINDOWS
static InitWinsock ws;
#endif
if (errbuf)
errbuf[0] = 0;
if (hostname == 0) {
if (errbuf)
snprintf(errbuf, ERRBUF_SIZE, "ResolveIP(): hostname == 0");
return 0;
}
struct sockaddr_in server_sin;
#ifdef _WINDOWS
PHOSTENT phostent = NULL;
#else
struct hostent *phostent = NULL;
#endif
server_sin.sin_family = AF_INET;
if ((phostent = gethostbyname(hostname)) == NULL) {
#ifdef _WINDOWS
if (errbuf)
snprintf(errbuf, ERRBUF_SIZE, "Unable to get the host name. Error: %i", WSAGetLastError());
#else
if (errbuf)
snprintf(errbuf, ERRBUF_SIZE, "Unable to get the host name. Error: %s", strerror(errno));
#endif
return 0;
}
#ifdef _WINDOWS
memcpy ((char FAR *)&(server_sin.sin_addr), phostent->h_addr, phostent->h_length);
#else
memcpy ((char*)&(server_sin.sin_addr), phostent->h_addr, phostent->h_length);
#endif
return server_sin.sin_addr.s_addr;
}
bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf) {
Seperator sep(iAddress, ':', 2, 250, false, 0, 0);
if (sep.argnum == 1 && sep.IsNumber(1)) {
*oIP = ResolveIP(sep.arg[0], errbuf);
if (*oIP == 0)
return false;
if (oPort)
*oPort = atoi(sep.arg[1]);
return true;
}
return false;
}
#ifdef _WINDOWS
InitWinsock::InitWinsock() {
WORD version = MAKEWORD (1,1);
WSADATA wsadata;
WSAStartup (version, &wsadata);
}
InitWinsock::~InitWinsock() {
WSACleanup();
}
#endif
const char * itoa(int num) {
static char temp[_ITOA_BUFLEN];
memset(temp,0,_ITOA_BUFLEN);
snprintf(temp,_ITOA_BUFLEN,"%d",num);
return temp;
}
#ifndef WIN32
const char * itoa(int num, char* a,int b) {
static char temp[_ITOA_BUFLEN];
memset(temp,0,_ITOA_BUFLEN);
snprintf(temp,_ITOA_BUFLEN,"%d",num);
return temp;
return temp;
}
#endif
/*
* generate a random integer in the range low-high this
* should be used instead of the rand()%limit method
*/
int MakeRandomInt(int low, int high)
{
_CP(MakeRandomInt);
if(low >= high)
return(low);
//return (rand()%(high-low+1) + (low));
if(!WELLRNG_init) {
WELLRNG_init = true;
oneseed( rnd_hash( time(NULL), clock() ) );
WELLRNG19937 = case_1;
}
unsigned int randomnum = ((WELLRNG19937)());
if(randomnum == 0xffffffffUL)
return high;
return int ((randomnum / (double)0xffffffffUL) * (high - low + 1) + low);
}
double MakeRandomFloat(double low, double high)
{
_CP(MakeRandomFloat);
if(low >= high)
return(low);
//return (rand() / (double)RAND_MAX * (high - low) + low);
if(!WELLRNG_init) {
WELLRNG_init = true;
oneseed( rnd_hash( time(NULL), clock() ) );
WELLRNG19937 = case_1;
}
return ((WELLRNG19937)() / (double)0xffffffffUL * (high - low) + low);
}
uint32 rnd_hash( time_t t, clock_t c )
{
// Get a uint32 from t and c
// Better than uint32(x) in case x is floating point in [0,1]
// Based on code by Lawrence Kirby (fred@genesis.demon.co.uk)
static uint32 differ = 0; // guarantee time-based seeds will change
uint32 h1 = 0;
unsigned char *p = (unsigned char *) &t;
for( size_t i = 0; i < sizeof(t); ++i )
{
h1 *= 255 + 2U;
h1 += p[i];
}
uint32 h2 = 0;
p = (unsigned char *) &c;
for( size_t j = 0; j < sizeof(c); ++j )
{
h2 *= 255 + 2U;
h2 += p[j];
}
return ( h1 + differ++ ) ^ h2;
}
void oneseed( const uint32 seed )
{
// Initialize generator state with seed
// See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
// In previous versions, most significant bits (MSBs) of the seed affect
// only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto.
register int j = 0;
STATE[j] = seed & 0xffffffffUL;
for (j = 1; j < R; j++)
{
STATE[j] = ( 1812433253UL * ( STATE[j-1] ^ (STATE[j-1] >> 30) ) + j ) & 0xffffffffUL;
}
}
// WELL RNG code
/* ***************************************************************************** */
/* Copyright: Francois Panneton and Pierre L'Ecuyer, University of Montreal */
/* Makoto Matsumoto, Hiroshima University */
/* Notice: This code can be used freely for personal, academic, */
/* or non-commercial purposes. For commercial purposes, */
/* please contact P. L'Ecuyer at: lecuyer@iro.UMontreal.ca */
/* A modified "maximally equidistributed" implementation */
/* by Shin Harase, Hiroshima University. */
/* ***************************************************************************** */
unsigned int case_1 (void){
// state_i == 0
z0 = (VRm1Under & MASKL) | (VRm2Under & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0Under = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i = R - 1;
WELLRNG19937 = case_3;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_2 (void){
// state_i == 1
z0 = (VRm1 & MASKL) | (VRm2Under & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i = 0;
WELLRNG19937 = case_1;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
static unsigned int case_3 (void){
// state_i+M1 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1Over);
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M1 < R)
WELLRNG19937 = case_5;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_4 (void){
// state_i+M3 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M3 < R)
WELLRNG19937 = case_6;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
static unsigned int case_5 (void){
// state_i+M2 >= R
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2Over) ^ MAT0POS (1, VM3Over);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i + M2 < R)
WELLRNG19937 = case_4;
return (STATE[state_i] ^ (newVM2Over & BITMASK));
}
static unsigned int case_6 (void){
// 2 <= state_i <= (R - M3 - 1)
z0 = (VRm1 & MASKL) | (VRm2 & MASKU);
z1 = MAT0NEG (-25, V0) ^ MAT0POS (27, VM1);
z2 = MAT3POS (9, VM2) ^ MAT0POS (1, VM3);
newV1 = z1 ^ z2;
newV0 = MAT1 (z0) ^ MAT0NEG (-9, z1) ^ MAT0NEG (-21, z2) ^ MAT0POS (21, newV1);
state_i--;
if (state_i == 1)
WELLRNG19937 = case_2;
return (STATE[state_i] ^ (newVM2 & BITMASK));
}
// end WELL RNG code
// solar: removes the crap and turns the underscores into spaces.
char *CleanMobName(const char *in, char *out)
{
unsigned i, j;
for(i = j = 0; i < strlen(in); i++)
{
// convert _ to space.. any other conversions like this? I *think* this
// is the only non alpha char that's not stripped but converted.
if(in[i] == '_')
{
out[j++] = ' ';
}
else
{
if(isalpha(in[i]) || (in[i] == '`')) // numbers, #, or any other crap just gets skipped
out[j++] = in[i];
}
}
out[j] = 0; // terimnate the string before returning it
return out;
}
const char *ConvertArray(int input, char *returnchar)
{
sprintf(returnchar, "%i" ,input);
return returnchar;
}
const char *ConvertArrayF(float input, char *returnchar)
{
sprintf(returnchar, "%0.2f", input);
return returnchar;
}
float EQ13toFloat(int d)
{
return ( float(d)/float(1<<2));
}
float NewEQ13toFloat(int d)
{
return ( float(d)/float(1<<6));
}
float EQ19toFloat(int d)
{
return ( float(d)/float(1<<3));
}
int FloatToEQ13(float d)
{
return int(d*float(1<<2));
}
int NewFloatToEQ13(float d)
{
return int(d*float(1<<6));
}
int FloatToEQ19(float d)
{
return int(d*float(1<<3));
}
/*
Heading of 0 points in the pure positive Y direction
*/
int FloatToEQH(float d)
{
return(int((360.0f - d) * float(1<<11)) / 360);
}
float EQHtoFloat(int d)
{
return(360.0f - float((d * 360) >> 11));
}
void RemoveApostrophes(std::string &s)
{
for(unsigned int i = 0; i < s.length(); ++i)
if(s[i] == '\'')
s[i] = '_';
}
char *RemoveApostrophes(const char *s)
{
char *NewString = new char[strlen(s) + 1];
strcpy(NewString, s);
for(unsigned int i = 0 ; i < strlen(NewString); ++i)
if(NewString[i] == '\'')
NewString[i] = '_';
return NewString;
}
-171
View File
@@ -1,171 +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 MISCFUNCTIONS_H
#define MISCFUNCTIONS_H
#include "types.h"
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <time.h>
#ifndef ERRBUF_SIZE
#define ERRBUF_SIZE 1024
#endif
// These are helper macros for dealing with packets of variable length, typically those that contain
// variable length strings where it is not convenient to use a fixed length struct.
//
#define VARSTRUCT_DECODE_TYPE(Type, Buffer) *(Type *)Buffer; Buffer += sizeof(Type);
#define VARSTRUCT_DECODE_STRING(String, Buffer) strcpy(String, Buffer); Buffer += strlen(String)+1;
#define VARSTRUCT_ENCODE_STRING(Buffer, String) { sprintf(Buffer, String); Buffer += strlen(String) + 1; }
#define VARSTRUCT_ENCODE_INTSTRING(Buffer, Number) { sprintf(Buffer, "%i", Number); Buffer += strlen(Buffer) + 1; }
#define VARSTRUCT_ENCODE_TYPE(Type, Buffer, Value) { *(Type *)Buffer = Value; Buffer += sizeof(Type); }
#define VARSTRUCT_SKIP_TYPE(Type, Buffer) Buffer += sizeof(Type);
#define VERIFY_PACKET_LENGTH(OPCode, Packet, StructName) \
if(Packet->size != sizeof(StructName)) \
{ \
LogFile->write(EQEMuLog::Debug, "Size mismatch in " #OPCode " expected %i got %i", sizeof(StructName), Packet->size); \
DumpPacket(Packet); \
return; \
}
// Definitions for WELLRNG
//
#define W 32
#define R 624
#define DISCARD 31
#define MASKU (0xffffffffU>>(W-DISCARD))
#define MASKL (~MASKU)
#define M1 70
#define M2 179
#define M3 449
#define MAT0POS(t,v) (v^(v>>t))
#define MAT0NEG(t,v) (v^(v<<(-(t))))
#define MAT1(v) v
#define MAT3POS(t,v) (v>>t)
#define V0 STATE[state_i]
#define VM1Over STATE[state_i+M1-R]
#define VM1 STATE[state_i+M1]
#define VM2Over STATE[state_i+M2-R]
#define VM2 STATE[state_i+M2]
#define VM3Over STATE[state_i+M3-R]
#define VM3 STATE[state_i+M3]
#define VRm1 STATE[state_i-1]
#define VRm1Under STATE[state_i+R-1]
#define VRm2 STATE[state_i-2]
#define VRm2Under STATE[state_i+R-2]
#define newV0 STATE[state_i-1]
#define newV0Under STATE[state_i-1+R]
#define newV1 STATE[state_i]
#define newVRm1 STATE[state_i-2]
#define newVRm1Under STATE[state_i-2+R]
#define newVM2Over STATE[state_i+M2-R+1]
#define newVM2 STATE[state_i+M2+1]
#define BITMASK 0x41180000
//////////////////////////////////////////////////////////////////////
//
// MakeUpperString
// i : source - allocated null-terminated string
// return: pointer to static buffer with the target string
const char *MakeUpperString(const char *source);
const char *MakeLowerString(const char *source);
//////////////////////////////////////////////////////////////////////
//
// MakeUpperString
// i : source - allocated null-terminated string
// io: target - allocated buffer, at least of size strlen(source)+1
void MakeUpperString(const char *source, char *target);
void MakeLowerString(const char *source, char *target);
int MakeAnyLenString(char** ret, const char* format, ...);
uint32 AppendAnyLenString(char** ret, uint32* bufsize, uint32* strlen, const char* format, ...);
uint32 hextoi(char* num);
uint64 hextoi64(char* num);
bool atobool(char* iBool);
int32 filesize(FILE* fp);
uint32 ResolveIP(const char* hostname, char* errbuf = 0);
bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf = 0);
void CoutTimestamp(bool ms = true);
char* strn0cpy(char* dest, const char* source, uint32 size);
// return value =true if entire string(source) fit, false if it was truncated
bool strn0cpyt(char* dest, const char* source, uint32 size);
int MakeRandomInt(int low, int high);
double MakeRandomFloat(double low, double high);
char *CleanMobName(const char *in, char *out);
const char *ConvertArray(int input, char *returnchar);
const char *ConvertArrayF(float input, char *returnchar);
float EQ13toFloat(int d);
float NewEQ13toFloat(int d);
float EQ19toFloat(int d);
float EQHtoFloat(int d);
int FloatToEQ13(float d);
int NewFloatToEQ13(float d);
int FloatToEQ19(float d);
int FloatToEQH(float d);
void RemoveApostrophes(std::string &s);
char *RemoveApostrophes(const char *s);
#define _ITOA_BUFLEN 25
const char *itoa(int num); //not thread safe
#ifndef _WINDOWS
const char *itoa(int num, char* a,int b);
#endif
class InitWinsock {
public:
InitWinsock();
~InitWinsock();
};
template<class T> class AutoDelete {
public:
AutoDelete(T** iVar, T* iSetTo = 0) {
init(iVar, iSetTo);
}
AutoDelete() { pVar = NULL; }
void init(T** iVar, T* iSetTo = 0)
{
pVar = iVar;
if (iSetTo)
*pVar = iSetTo;
}
~AutoDelete() {
if(pVar != NULL)
safe_delete(*pVar);
}
void ReallyClearIt() {
pVar = NULL;
}
private:
T** pVar;
};
#endif
-117
View File
@@ -1,117 +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 "SharedLibrary.h"
#include <stdio.h>
#ifdef _WINDOWS
#define snprintf _snprintf
#if (_MSC_VER < 1500)
#define vsnprintf _vsnprintf
#endif
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define EmuLibName "EMuShareMem"
#else
#define EmuLibName "libEMuShareMem.so"
#include "../common/unix.h"
#include <dlfcn.h>
#define GetProcAddress(a,b) dlsym(a,b)
#define LoadLibrary(a) dlopen(a, RTLD_NOW)
#define FreeLibrary(a) dlclose(a)
#define GetLastError() dlerror()
#endif
SharedLibrary::SharedLibrary() {
hDLL = NULL;
}
SharedLibrary::~SharedLibrary() {
Unload();
}
bool SharedLibrary::Load(const char *name)
{
#ifdef _WINDOWS
SetLastError(0);
#endif
hDLL = LoadLibrary(name);
if(!hDLL) {
const char *load_error = GetError();
fprintf(stderr, "[Error] Load Shared Library '%s' failed. Error=%s\n", name, load_error?load_error:"Null Return, no error");
return false;
}
#ifdef _WINDOWS
else { SetLastError(0); } // Clear the win9x error
#endif
return(true);
}
void SharedLibrary::Unload() {
if (hDLL != NULL) {
FreeLibrary(hDLL);
#ifndef WIN32
const char* error;
if ((error = GetError()) != NULL)
fprintf(stderr, "FreeLibrary() error = %s", error);
#endif
hDLL = NULL;
}
}
void *SharedLibrary::GetSym(const char *name) {
if (!Loaded())
return(NULL);
void *r = GetProcAddress(hDLL, name);
if(GetError() != NULL)
r = NULL;
return(r);
}
bool SharedLibrary::GetSym(const char *name, void **sym)
{
bool result=false;
if (Loaded()) {
*sym = GetProcAddress(hDLL, name);
result= (GetError() == NULL);
}
return result;
}
const char *SharedLibrary::GetError()
{
#ifdef _WINDOWS
//not thread safe, dont care.
static char ErrBuf[128];
unsigned long err = GetLastError();
if(err == 0)
return(NULL);
sprintf(ErrBuf, "Error #%lu", (unsigned long)err);
return(ErrBuf);
#else
return GetLastError();
#endif
}
-49
View File
@@ -1,49 +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 _SHAREDLIBRARY_H
#define _SHAREDLIBRARY_H
#ifdef _WINDOWS
#include <windows.h>
#endif
class SharedLibrary {
public:
SharedLibrary();
virtual ~SharedLibrary();
//two call styles for GetSym, one returns bool, other NULL for fail
bool GetSym(const char *name, void **sym);
void *GetSym(const char *name);
const char *GetError();
virtual bool Load(const char *file);
virtual void Unload();
inline bool Loaded() { return (hDLL != 0); }
protected:
#ifdef _WINDOWS
HINSTANCE hDLL;
#else
void* hDLL;
#endif
};
#endif
+2 -2
View File
@@ -43,7 +43,7 @@ namespace SOCKETS_NAMESPACE {
File::File()
:m_fil(NULL)
:m_fil(nullptr)
{
}
@@ -85,7 +85,7 @@ size_t File::fwrite(const char *ptr, size_t size, size_t nmemb)
char *File::fgets(char *s, int size)
{
return m_fil ? ::fgets(s, size, m_fil) : NULL;
return m_fil ? ::fgets(s, size, m_fil) : nullptr;
}
+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
+6 -6
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
@@ -93,14 +93,14 @@ bool HttpdCookies::getvalue(const std::string& name,std::string& buffer) //char
void HttpdCookies::replacevalue(const std::string& name,const std::string& value)
{
COOKIE *c = NULL;
COOKIE *c = nullptr;
for (cookie_v::iterator it = m_cookies.begin(); it != m_cookies.end(); it++)
{
c = *it;
if (!strcasecmp(c -> name.c_str(),name.c_str()))
break;
c = NULL;
c = nullptr;
}
if (c)
@@ -126,14 +126,14 @@ void HttpdCookies::replacevalue(const std::string& name,int i)
size_t HttpdCookies::getlength(const std::string& name)
{
COOKIE *c = NULL;
COOKIE *c = nullptr;
for (cookie_v::iterator it = m_cookies.begin(); it != m_cookies.end(); it++)
{
c = *it;
if (!strcasecmp(c -> name.c_str(),name.c_str()))
break;
c = NULL;
c = nullptr;
}
return c ? c -> value.size() : 0;
}
@@ -223,7 +223,7 @@ void HttpdCookies::setcookie(HTTPSocket *sock, const std::string& domain, const
const std::string& HttpdCookies::expiredatetime()
{
time_t t = time(NULL);
time_t t = time(nullptr);
struct tm * tp = gmtime(&t);
const char *days[7] = {"Sunday", "Monday",
"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+10 -10
View File
@@ -47,7 +47,7 @@ namespace SOCKETS_NAMESPACE {
HttpdForm::HttpdForm(IFile *infil) : raw(false)
{
CGI *cgi = NULL;
CGI *cgi = nullptr;
char *c_t = getenv("CONTENT_TYPE");
char *c_l = getenv("CONTENT_LENGTH");
size_t extra = 2;
@@ -59,7 +59,7 @@ HttpdForm::HttpdForm(IFile *infil) : raw(false)
if (c_t && !strncmp(c_t, "multipart/form-data",19))
{
Parse pa(c_t,";=");
char *tempcmp = NULL;
char *tempcmp = nullptr;
size_t tc = 0;
size_t l = 0;
std::string str = pa.getword();
@@ -80,7 +80,7 @@ HttpdForm::HttpdForm(IFile *infil) : raw(false)
std::string content_type;
std::string current_name;
std::string current_filename;
char slask[200];
char slask[2000];
infil -> fgets(slask, 200);
while (!infil -> eof())
{
@@ -209,7 +209,7 @@ HttpdForm::HttpdForm(IFile *infil) : raw(false)
#else
sprintf(fn,"/tmp/%s",current_filename.c_str());
#endif
if ((fil = fopen(fn, "wb")) != NULL)
if ((fil = fopen(fn, "wb")) != nullptr)
{
infil -> fread(&c,1,1);
while (!infil -> eof())
@@ -353,7 +353,7 @@ HttpdForm::HttpdForm(IFile *infil) : raw(false)
HttpdForm::HttpdForm(const std::string& buffer,size_t l) : raw(false)
{
CGI *cgi = NULL;
CGI *cgi = nullptr;
char slask[8888];
char name[200];
int i = 0;
@@ -424,7 +424,7 @@ HttpdForm::HttpdForm(const std::string& buffer,size_t l) : raw(false)
HttpdForm::~HttpdForm()
{
CGI *cgi = NULL; //,*tmp;
CGI *cgi = nullptr; //,*tmp;
for (cgi_v::iterator it = m_cgi.begin(); it != m_cgi.end(); it++)
{
@@ -525,7 +525,7 @@ bool HttpdForm::getnext(std::string& n,std::string& v) //char *n,size_t len,char
int HttpdForm::getvalue(const std::string& n,std::string& v) //char *v,size_t len)
{
CGI *cgi = NULL;
CGI *cgi = nullptr;
int r = 0;
for (cgi_v::iterator it = m_cgi.begin(); it != m_cgi.end(); it++)
@@ -533,7 +533,7 @@ int HttpdForm::getvalue(const std::string& n,std::string& v) //char *v,size_t le
cgi = *it;
if (cgi -> name == n)
break;
cgi = NULL;
cgi = nullptr;
}
if (cgi)
{
@@ -572,7 +572,7 @@ std::string HttpdForm::getvalue(const std::string& n)
size_t HttpdForm::getlength(const std::string& n)
{
CGI *cgi = NULL;
CGI *cgi = nullptr;
size_t l;
for (cgi_v::iterator it = m_cgi.begin(); it != m_cgi.end(); it++)
@@ -580,7 +580,7 @@ size_t HttpdForm::getlength(const std::string& n)
cgi = *it;
if (cgi -> name == n)
break;
cgi = NULL;
cgi = nullptr;
}
l = cgi ? cgi -> value.size() : 0;
if (cgi && !raw)
+10 -13
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"
@@ -64,11 +64,11 @@ std::string HttpdSocket::m_start = "";
HttpdSocket::HttpdSocket(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
: HTTPSocket(ID,in_socket,irIP,irPort)
,m_content_length(0)
,m_file(NULL)
,m_file(nullptr)
,m_received(0)
,m_request_id(++m_request_count)
,m_cookies(NULL)
,m_form(NULL)
,m_cookies(nullptr)
,m_form(nullptr)
{
m_http_date = datetime2httpdate(GetDate());
if (!m_start.size())
@@ -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);
@@ -216,8 +215,6 @@ void HttpdSocket::OnData(const char *p,size_t l)
void HttpdSocket::Send64(const std::string& str64, const std::string& type)
{
Base64 bb;
if (!strcasecmp(m_start.c_str(), m_if_modified_since.c_str()))
{
SetStatus("304");
@@ -226,7 +223,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
}
else
{
size_t len = bb.decode_length(str64);
size_t len = Base64::decode_length(str64);
unsigned char *buf = new unsigned char[len];
SetStatus("200");
@@ -237,7 +234,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
AddResponseHeader("Last-modified", m_start);
SendResponse();
bb.decode(str64, buf, len);
Base64::decode(str64, buf, len);
SendBuf( (char *)buf, len);
delete[] buf;
}
@@ -291,7 +288,7 @@ std::string HttpdSocket::datetime2httpdate(const std::string& dt)
std::string HttpdSocket::GetDate()
{
time_t t = time(NULL);
time_t t = time(nullptr);
struct tm* tp = localtime(&t);
char slask[40];
if (tp)
@@ -317,16 +314,16 @@ void HttpdSocket::Reset()
if (m_file)
{
delete m_file;
m_file = NULL;
m_file = nullptr;
}
m_received = 0;
m_request_id = ++m_request_count;
if (m_cookies)
delete m_cookies;
m_cookies = NULL;
m_cookies = nullptr;
if (m_form)
delete m_form;
m_form = NULL;
m_form = nullptr;
}
+2 -4
View File
@@ -66,8 +66,8 @@ MemFile::MemFile(const std::string& path)
:m_path(path)
,m_temporary(false)
,m_base(m_files[path])
,m_current_read(NULL)
,m_current_write(NULL)
,m_current_read(nullptr)
,m_current_write(nullptr)
,m_read_ptr(0)
,m_write_ptr(0)
{
@@ -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
@@ -48,7 +48,7 @@ public:
/** File block structure.
\ingroup file */
struct block_t {
block_t() : next(NULL) {}
block_t() : next(nullptr) {}
struct block_t *next;
char data[BLOCKSIZE];
};
+1 -1
View File
@@ -37,7 +37,7 @@ Mime::Mime(const std::string& filename) {
bool Mime::LoadMimeFile(const std::string& filename) {
FILE *fil;
if ((fil = fopen(filename.c_str(),"rt")) != NULL) {
if ((fil = fopen(filename.c_str(),"rt")) != nullptr) {
char * slask = new char[1000];
fgets(slask,1000,fil);
while (!feof(fil))
+2 -4
View File
@@ -37,8 +37,7 @@ namespace SOCKETS_NAMESPACE {
std::string Utility::base64(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.encode(str_in, str, false); // , false == do not add cr/lf
Base64::encode(str_in, str, false); // , false == do not add cr/lf
return str;
}
@@ -46,8 +45,7 @@ std::string Utility::base64(const std::string& str_in)
std::string Utility::base64d(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.decode(str_in, str);
Base64::decode(str_in, str);
return str;
}
+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
+84 -85
View File
@@ -104,7 +104,7 @@ typedef struct _tagSTACKFRAME64 {
ADDRESS64 AddrFrame; // frame pointer
ADDRESS64 AddrStack; // stack pointer
ADDRESS64 AddrBStore; // backing store pointer
PVOID FuncTableEntry; // pointer to pdata/fpo or NULL
PVOID FuncTableEntry; // pointer to pdata/fpo or nullptr
DWORD64 Params[4]; // possible arguments to the function
BOOL Far; // WOW far call
BOOL Virtual; // is this a virtual frame?
@@ -187,44 +187,44 @@ public:
StackWalkerInternal(StackWalker *parent, HANDLE hProcess)
{
m_parent = parent;
m_hDbhHelp = NULL;
pSC = NULL;
m_hDbhHelp = nullptr;
pSC = nullptr;
m_hProcess = hProcess;
m_szSymPath = NULL;
pSFTA = NULL;
pSGLFA = NULL;
pSGMB = NULL;
pSGMI = NULL;
pSGO = NULL;
pSGSFA = NULL;
pSI = NULL;
pSLM = NULL;
pSSO = NULL;
pSW = NULL;
pUDSN = NULL;
pSGSP = NULL;
m_szSymPath = nullptr;
pSFTA = nullptr;
pSGLFA = nullptr;
pSGMB = nullptr;
pSGMI = nullptr;
pSGO = nullptr;
pSGSFA = nullptr;
pSI = nullptr;
pSLM = nullptr;
pSSO = nullptr;
pSW = nullptr;
pUDSN = nullptr;
pSGSP = nullptr;
}
~StackWalkerInternal()
{
if (pSC != NULL)
if (pSC != nullptr)
pSC(m_hProcess); // SymCleanup
if (m_hDbhHelp != NULL)
if (m_hDbhHelp != nullptr)
FreeLibrary(m_hDbhHelp);
m_hDbhHelp = NULL;
m_parent = NULL;
if(m_szSymPath != NULL)
m_hDbhHelp = nullptr;
m_parent = nullptr;
if(m_szSymPath != nullptr)
free(m_szSymPath);
m_szSymPath = NULL;
m_szSymPath = nullptr;
}
BOOL Init(LPCSTR szSymPath)
{
if (m_parent == NULL)
if (m_parent == nullptr)
return FALSE;
// Dynamically load the Entry-Points for dbghelp.dll:
// First try to load the newsest one from
TCHAR szTemp[4096];
// But before wqe do this, we first check if the ".local" file exists
if (GetModuleFileName(NULL, szTemp, 4096) > 0)
if (GetModuleFileName(nullptr, szTemp, 4096) > 0)
{
_tcscat_s(szTemp, _T(".local"));
if (GetFileAttributes(szTemp) == INVALID_FILE_ATTRIBUTES)
@@ -240,7 +240,7 @@ public:
}
}
// Still not found? Then try to load the 64-Bit version:
if ( (m_hDbhHelp == NULL) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) )
if ( (m_hDbhHelp == nullptr) && (GetEnvironmentVariable(_T("ProgramFiles"), szTemp, 4096) > 0) )
{
_tcscat_s(szTemp, _T("\\Debugging Tools for Windows 64-Bit\\dbghelp.dll"));
if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES)
@@ -250,9 +250,9 @@ public:
}
}
}
if (m_hDbhHelp == NULL) // if not already loaded, try to load a default-one
if (m_hDbhHelp == nullptr) // if not already loaded, try to load a default-one
m_hDbhHelp = LoadLibrary( _T("dbghelp.dll") );
if (m_hDbhHelp == NULL)
if (m_hDbhHelp == nullptr)
return FALSE;
pSI = (tSI) GetProcAddress(m_hDbhHelp, "SymInitialize" );
pSC = (tSC) GetProcAddress(m_hDbhHelp, "SymCleanup" );
@@ -271,18 +271,18 @@ public:
pSLM = (tSLM) GetProcAddress(m_hDbhHelp, "SymLoadModule64" );
pSGSP =(tSGSP) GetProcAddress(m_hDbhHelp, "SymGetSearchPath" );
if ( pSC == NULL || pSFTA == NULL || pSGMB == NULL || pSGMI == NULL ||
pSGO == NULL || pSGSFA == NULL || pSI == NULL || pSSO == NULL ||
pSW == NULL || pUDSN == NULL || pSLM == NULL )
if ( pSC == nullptr || pSFTA == nullptr || pSGMB == nullptr || pSGMI == nullptr ||
pSGO == nullptr || pSGSFA == nullptr || pSI == nullptr || pSSO == nullptr ||
pSW == nullptr || pUDSN == nullptr || pSLM == nullptr )
{
FreeLibrary(m_hDbhHelp);
m_hDbhHelp = NULL;
pSC = NULL;
m_hDbhHelp = nullptr;
pSC = nullptr;
return FALSE;
}
// SymInitialize
if (szSymPath != NULL)
if (szSymPath != nullptr)
m_szSymPath = _strdup(szSymPath);
if (this->pSI(m_hProcess, m_szSymPath, FALSE) == FALSE)
this->m_parent->OnDbgHelpErr("SymInitialize", GetLastError(), 0);
@@ -295,7 +295,7 @@ public:
symOptions = this->pSSO(symOptions);
char buf[StackWalker::STACKWALK_MAX_NAMELEN] = {0};
if (this->pSGSP != NULL)
if (this->pSGSP != nullptr)
{
if (this->pSGSP(m_hProcess, buf, StackWalker::STACKWALK_MAX_NAMELEN) == FALSE)
this->m_parent->OnDbgHelpErr("SymGetSearchPath", GetLastError(), 0);
@@ -458,10 +458,10 @@ private:
// try both dlls...
const TCHAR *dllname[] = { _T("kernel32.dll"), _T("tlhelp32.dll") };
HINSTANCE hToolhelp = NULL;
tCT32S pCT32S = NULL;
tM32F pM32F = NULL;
tM32N pM32N = NULL;
HINSTANCE hToolhelp = nullptr;
tCT32S pCT32S = nullptr;
tM32F pM32F = nullptr;
tM32N pM32N = nullptr;
HANDLE hSnap;
MODULEENTRY32 me;
@@ -472,18 +472,18 @@ private:
for (i = 0; i<(sizeof(dllname) / sizeof(dllname[0])); i++ )
{
hToolhelp = LoadLibrary( dllname[i] );
if (hToolhelp == NULL)
if (hToolhelp == nullptr)
continue;
pCT32S = (tCT32S) GetProcAddress(hToolhelp, "CreateToolhelp32Snapshot");
pM32F = (tM32F) GetProcAddress(hToolhelp, "Module32First");
pM32N = (tM32N) GetProcAddress(hToolhelp, "Module32Next");
if ( (pCT32S != NULL) && (pM32F != NULL) && (pM32N != NULL) )
if ( (pCT32S != nullptr) && (pM32F != nullptr) && (pM32N != nullptr) )
break; // found the functions!
FreeLibrary(hToolhelp);
hToolhelp = NULL;
hToolhelp = nullptr;
}
if (hToolhelp == NULL)
if (hToolhelp == nullptr)
return FALSE;
hSnap = pCT32S( TH32CS_SNAPMODULE, pid );
@@ -534,20 +534,20 @@ private:
DWORD cbNeeded;
MODULEINFO mi;
HMODULE *hMods = 0;
char *tt = NULL;
char *tt2 = NULL;
char *tt = nullptr;
char *tt2 = nullptr;
const SIZE_T TTBUFLEN = 8096;
int cnt = 0;
hPsapi = LoadLibrary( _T("psapi.dll") );
if (hPsapi == NULL)
if (hPsapi == nullptr)
return FALSE;
pEPM = (tEPM) GetProcAddress( hPsapi, "EnumProcessModules" );
pGMFNE = (tGMFNE) GetProcAddress( hPsapi, "GetModuleFileNameExA" );
pGMBN = (tGMFNE) GetProcAddress( hPsapi, "GetModuleBaseNameA" );
pGMI = (tGMI) GetProcAddress( hPsapi, "GetModuleInformation" );
if ( (pEPM == NULL) || (pGMFNE == NULL) || (pGMBN == NULL) || (pGMI == NULL) )
if ( (pEPM == nullptr) || (pGMFNE == nullptr) || (pGMBN == nullptr) || (pGMI == nullptr) )
{
// we couldn?t find all functions
FreeLibrary(hPsapi);
@@ -557,7 +557,7 @@ private:
hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof HMODULE));
tt = (char*) malloc(sizeof(char) * TTBUFLEN);
tt2 = (char*) malloc(sizeof(char) * TTBUFLEN);
if ( (hMods == NULL) || (tt == NULL) || (tt2 == NULL) )
if ( (hMods == nullptr) || (tt == nullptr) || (tt2 == nullptr) )
goto cleanup;
if ( ! pEPM( hProcess, hMods, TTBUFLEN, &cbNeeded ) )
@@ -590,10 +590,10 @@ private:
}
cleanup:
if (hPsapi != NULL) FreeLibrary(hPsapi);
if (tt2 != NULL) free(tt2);
if (tt != NULL) free(tt);
if (hMods != NULL) free(hMods);
if (hPsapi != nullptr) FreeLibrary(hPsapi);
if (tt2 != nullptr) free(tt2);
if (tt != nullptr) free(tt);
if (hMods != nullptr) free(hMods);
return cnt != 0;
} // GetModuleListPSAPI
@@ -603,7 +603,7 @@ private:
CHAR *szImg = _strdup(img);
CHAR *szMod = _strdup(mod);
DWORD result = ERROR_SUCCESS;
if ( (szImg == NULL) || (szMod == NULL) )
if ( (szImg == nullptr) || (szMod == nullptr) )
result = ERROR_NOT_ENOUGH_MEMORY;
else
{
@@ -611,25 +611,25 @@ private:
result = GetLastError();
}
ULONGLONG fileVersion = 0;
if ( (m_parent != NULL) && (szImg != NULL) )
if ( (m_parent != nullptr) && (szImg != nullptr) )
{
// try to retrive the file-version:
if ( (this->m_parent->m_options & StackWalker::RetrieveFileVersion) != 0)
{
VS_FIXEDFILEINFO *fInfo = NULL;
VS_FIXEDFILEINFO *fInfo = nullptr;
DWORD dwHandle;
DWORD dwSize = GetFileVersionInfoSizeA(szImg, &dwHandle);
if (dwSize > 0)
{
LPVOID vData = malloc(dwSize);
if (vData != NULL)
if (vData != nullptr)
{
if (GetFileVersionInfoA(szImg, dwHandle, dwSize, vData) != 0)
{
UINT len;
TCHAR szSubBlock[] = _T("\\");
if (VerQueryValue(vData, szSubBlock, (LPVOID*) &fInfo, &len) == 0)
fInfo = NULL;
fInfo = nullptr;
else
{
fileVersion = ((ULONGLONG)fInfo->dwFileVersionLS) + ((ULONGLONG)fInfo->dwFileVersionMS << 32);
@@ -678,8 +678,8 @@ private:
}
this->m_parent->OnLoadModule(img, mod, baseAddr, size, result, szSymType, Module.LoadedImageName, fileVersion);
}
if (szImg != NULL) free(szImg);
if (szMod != NULL) free(szMod);
if (szImg != nullptr) free(szImg);
if (szMod != nullptr) free(szMod);
return result;
}
public:
@@ -695,7 +695,7 @@ public:
BOOL GetModuleInfo(HANDLE hProcess, DWORD64 baseAddr, IMAGEHLP_MODULE64_V2 *pModuleInfo)
{
if(this->pSGMI == NULL)
if(this->pSGMI == nullptr)
{
SetLastError(ERROR_DLL_INIT_FAILED);
return FALSE;
@@ -703,7 +703,7 @@ public:
// First try to use the larger ModuleInfo-Structure
// memset(pModuleInfo, 0, sizeof(IMAGEHLP_MODULE64_V3));
// pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3);
// if (this->pSGMI_V3 != NULL)
// if (this->pSGMI_V3 != nullptr)
// {
// if (this->pSGMI_V3(hProcess, baseAddr, pModuleInfo) != FALSE)
// return TRUE;
@@ -714,7 +714,7 @@ public:
// could not retrive the bigger structure, try with the smaller one (as defined in VC7.1)...
pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V2);
void *pData = malloc(4096); // reserve enough memory, so the bug in v6.3.5.1 does not lead to memory-overwrites...
if (pData == NULL)
if (pData == nullptr)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
@@ -742,7 +742,7 @@ StackWalker::StackWalker(DWORD dwProcessId, HANDLE hProcess)
this->m_hProcess = hProcess;
this->m_sw = new StackWalkerInternal(this, this->m_hProcess);
this->m_dwProcessId = dwProcessId;
this->m_szSymPath = NULL;
this->m_szSymPath = nullptr;
}
StackWalker::StackWalker(int options, LPCSTR szSymPath, DWORD dwProcessId, HANDLE hProcess)
{
@@ -751,28 +751,28 @@ StackWalker::StackWalker(int options, LPCSTR szSymPath, DWORD dwProcessId, HANDL
this->m_hProcess = hProcess;
this->m_sw = new StackWalkerInternal(this, this->m_hProcess);
this->m_dwProcessId = dwProcessId;
if (szSymPath != NULL)
if (szSymPath != nullptr)
{
this->m_szSymPath = _strdup(szSymPath);
this->m_options |= SymBuildPath;
}
else
this->m_szSymPath = NULL;
this->m_szSymPath = nullptr;
}
StackWalker::~StackWalker()
{
if (m_szSymPath != NULL)
if (m_szSymPath != nullptr)
free(m_szSymPath);
m_szSymPath = NULL;
if (this->m_sw != NULL)
m_szSymPath = nullptr;
if (this->m_sw != nullptr)
delete this->m_sw;
this->m_sw = NULL;
this->m_sw = nullptr;
}
BOOL StackWalker::LoadModules()
{
if (this->m_sw == NULL)
if (this->m_sw == nullptr)
{
SetLastError(ERROR_DLL_INIT_FAILED);
return FALSE;
@@ -781,19 +781,19 @@ BOOL StackWalker::LoadModules()
return TRUE;
// Build the sym-path:
char *szSymPath = NULL;
char *szSymPath = nullptr;
if ( (this->m_options & SymBuildPath) != 0)
{
const size_t nSymPathLen = 4096;
szSymPath = (char*) malloc(nSymPathLen);
if (szSymPath == NULL)
if (szSymPath == nullptr)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
szSymPath[0] = 0;
// Now first add the (optional) provided sympath:
if (this->m_szSymPath != NULL)
if (this->m_szSymPath != nullptr)
{
strcat_s(szSymPath, nSymPathLen, this->m_szSymPath);
strcat_s(szSymPath, nSymPathLen, ";");
@@ -812,7 +812,7 @@ BOOL StackWalker::LoadModules()
}
// Now add the path for the main-module:
if (GetModuleFileNameA(NULL, szTemp, nTempLen) > 0)
if (GetModuleFileNameA(nullptr, szTemp, nTempLen) > 0)
{
szTemp[nTempLen-1] = 0;
for (char *p = (szTemp+strlen(szTemp)-1); p >= szTemp; --p)
@@ -870,7 +870,7 @@ BOOL StackWalker::LoadModules()
// First Init the whole stuff...
BOOL bRet = this->m_sw->Init(szSymPath);
if (szSymPath != NULL) free(szSymPath); szSymPath = NULL;
if (szSymPath != nullptr) free(szSymPath); szSymPath = nullptr;
if (bRet == FALSE)
{
this->OnDbgHelpErr("Error while initializing dbghelp.dll", 0, 0);
@@ -889,14 +889,14 @@ BOOL StackWalker::LoadModules()
// This has to be done due to a problem with the "hProcess"-parameter in x64...
// Because this class is in no case multi-threading-enabled (because of the limitations
// of dbghelp.dll) it is "safe" to use a static-variable
static StackWalker::PReadProcessMemoryRoutine s_readMemoryFunction = NULL;
static LPVOID s_readMemoryFunction_UserData = NULL;
static StackWalker::PReadProcessMemoryRoutine s_readMemoryFunction = nullptr;
static LPVOID s_readMemoryFunction_UserData = nullptr;
BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadProcessMemoryRoutine readMemoryFunction, LPVOID pUserData)
{
CONTEXT c;;
CallstackEntry csEntry;
IMAGEHLP_SYMBOL64 *pSym = NULL;
IMAGEHLP_SYMBOL64 *pSym = nullptr;
StackWalkerInternal::IMAGEHLP_MODULE64_V2 Module;
IMAGEHLP_LINE64 Line;
int frameNum;
@@ -904,7 +904,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
if (m_modulesLoaded == FALSE)
this->LoadModules(); // ignore the result...
if (this->m_sw->m_hDbhHelp == NULL)
if (this->m_sw->m_hDbhHelp == nullptr)
{
SetLastError(ERROR_DLL_INIT_FAILED);
return FALSE;
@@ -913,7 +913,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
s_readMemoryFunction = readMemoryFunction;
s_readMemoryFunction_UserData = pUserData;
if (context == NULL)
if (context == nullptr)
{
// If no context is provided, capture the context
if (hThread == GetCurrentThread())
@@ -989,7 +989,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
// assume that either you are done, or that the stack is so hosed that the next
// deeper frame could not be found.
// CONTEXT need not to be suplied if imageTyp is IMAGE_FILE_MACHINE_I386!
if ( ! this->m_sw->pSW(imageType, this->m_hProcess, hThread, &s, &c, myReadProcMem, this->m_sw->pSFTA, this->m_sw->pSGMB, NULL) )
if ( ! this->m_sw->pSW(imageType, this->m_hProcess, hThread, &s, &c, myReadProcMem, this->m_sw->pSFTA, this->m_sw->pSGMB, nullptr) )
{
this->OnDbgHelpErr("StackWalk64", GetLastError(), s.AddrPC.Offset);
break;
@@ -1028,7 +1028,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
}
// show line number info, NT5.0-method (SymGetLineFromAddr64())
if (this->m_sw->pSGLFA != NULL )
if (this->m_sw->pSGLFA != nullptr )
{ // yes, we have SymGetLineFromAddr64()
if (this->m_sw->pSGLFA(this->m_hProcess, s.AddrPC.Offset, &(csEntry.offsetFromLine), &Line) != FALSE)
{
@@ -1078,7 +1078,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
break;
default:
//_snprintf( ty, sizeof ty, "symtype=%ld", (long) Module.SymType );
csEntry.symTypeString = NULL;
csEntry.symTypeString = nullptr;
break;
}
@@ -1109,7 +1109,7 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, const CONTEXT *context, PReadPro
cleanup:
if (pSym) free( pSym );
if (context == NULL)
if (context == nullptr)
ResumeThread(hThread);
return TRUE;
@@ -1123,12 +1123,11 @@ BOOL __stdcall StackWalker::myReadProcMem(
LPDWORD lpNumberOfBytesRead
)
{
if (s_readMemoryFunction == NULL)
if (s_readMemoryFunction == nullptr)
{
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
+6 -6
View File
@@ -66,7 +66,7 @@ public:
StackWalker(
int options = OptionsAll, // 'int' is by design, to combine the enum-flags
LPCSTR szSymPath = NULL,
LPCSTR szSymPath = nullptr,
DWORD dwProcessId = GetCurrentProcessId(),
HANDLE hProcess = GetCurrentProcess()
);
@@ -86,9 +86,9 @@ public:
BOOL ShowCallstack(
HANDLE hThread = GetCurrentThread(),
const CONTEXT *context = NULL,
PReadProcessMemoryRoutine readMemoryFunction = NULL,
LPVOID pUserData = NULL // optional to identify some data in the 'readMemoryFunction'-callback
const CONTEXT *context = nullptr,
PReadProcessMemoryRoutine readMemoryFunction = nullptr,
LPVOID pUserData = nullptr // optional to identify some data in the 'readMemoryFunction'-callback
);
#if _MSC_VER >= 1300
@@ -157,11 +157,11 @@ protected:
#define GET_CURRENT_CONTEXT(c, contextFlags) \
do { \
memset(&c, 0, sizeof(CONTEXT)); \
EXCEPTION_POINTERS *pExp = NULL; \
EXCEPTION_POINTERS *pExp = nullptr; \
__try { \
throw 0; \
} __except( ( (pExp = GetExceptionInformation()) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_EXECUTE_HANDLER)) {} \
if (pExp != NULL) \
if (pExp != nullptr) \
memcpy(&c, pExp->ContextRecord, sizeof(CONTEXT)); \
c.ContextFlags = contextFlags; \
} while(0);
-59
View File
@@ -1,59 +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 XMLParser_H
#define XMLParser_H
#include "debug.h"
#include "tinyxml/tinyxml.h"
#include "../common/types.h"
#include <string>
#include <map>
using namespace std;
/*
* See note in XMLParser::ParseFile() before inheriting this class.
*/
class XMLParser {
public:
typedef void (XMLParser::*ElementHandler)(TiXmlElement *ele);
XMLParser();
virtual ~XMLParser() {}
bool ParseFile(const char *file, const char *root_ele);
bool ParseStatus() const { return ParseOkay; }
protected:
const char *ParseTextBlock(TiXmlNode *within, const char *name, bool optional = false);
const char *GetText(TiXmlNode *within, bool optional = false);
map<string,ElementHandler> Handlers;
bool ParseOkay;
};
#endif
+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
+34
View File
@@ -0,0 +1,34 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2013 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_COMMON_BASE_DATA_H
#define __EQEMU_COMMON_BASE_DATA_H
struct BaseDataStruct
{
double base_hp;
double base_mana;
double base_end;
double unk1;
double unk2;
double hp_factor;
double mana_factor;
double endurance_factor;
};
#endif
@@ -1,39 +1,39 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
/* 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
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
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 "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=NULL;
this->pBuffer=nullptr;
this->size=0;
this->_wpos = 0;
this->_rpos = 0;
this->timestamp.tv_sec = 0;
if (len>0) {
this->size=len;
pBuffer= new unsigned char[len];
if (buf) {
memcpy(this->pBuffer,buf,len);
} else {
} else {
memset(this->pBuffer,0,len);
}
}
@@ -43,7 +43,7 @@ BasePacket::~BasePacket()
{
if (pBuffer)
delete[] pBuffer;
pBuffer=NULL;
pBuffer=nullptr;
}
@@ -55,7 +55,7 @@ void BasePacket::build_raw_header_dump(char *buffer, uint16 seq) const
buffer += sprintf(buffer, "%s.%06lu ",temp,timestamp.tv_usec);
}
if (src_ip) {
string sIP,dIP;;
std::string sIP,dIP;;
sIP=long2ip(src_ip);
dIP=long2ip(dst_ip);
buffer += sprintf(buffer, "[%s:%d->%s:%d]\n",sIP.c_str(),src_port,dIP.c_str(),dst_port);
@@ -79,7 +79,7 @@ void BasePacket::build_header_dump(char *buffer) const
void BasePacket::DumpRawHeaderNoTime(uint16 seq, FILE *to) const
{
if (src_ip) {
string sIP,dIP;;
std::string sIP,dIP;;
sIP=long2ip(src_ip);
dIP=long2ip(dst_ip);
fprintf(to, "[%s:%d->%s:%d] ",sIP.c_str(),src_port,dIP.c_str(),dst_port);
@@ -107,7 +107,7 @@ void BasePacket::ReadString(char *str, uint32 Offset, uint32 MaxLength) const
while((j < size) && (i < MaxLength) && (str[i - 1] != 0));
str[i - 1] = '\0';
}
}
void DumpPacketHex(const BasePacket* app)
{
@@ -123,24 +123,3 @@ void DumpPacketBin(const BasePacket* app) {
DumpPacketBin(app->pBuffer, app->size);
}
+17 -19
View File
@@ -1,19 +1,19 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
/* 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
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
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 BASEPACKET_H_
#define BASEPACKET_H_
@@ -21,7 +21,6 @@
#include "types.h"
#include <stdio.h>
#include <string.h>
#include <string>
#ifdef WIN32
#include <time.h>
@@ -50,7 +49,7 @@ public:
void setSrcInfo(uint32 sip, uint16 sport) { src_ip=sip; src_port=sport; }
void setDstInfo(uint32 dip, uint16 dport) { dst_ip=dip; dst_port=dport; }
void setTimeInfo(uint32 ts_sec, uint32 ts_usec) { timestamp.tv_sec=ts_sec; timestamp.tv_usec=ts_usec; }
void copyInfo(const BasePacket *p) { src_ip=p->src_ip; src_port=p->src_port; dst_ip=p->dst_ip; dst_port=p->dst_port; timestamp.tv_sec=p->timestamp.tv_sec; timestamp.tv_usec=p->timestamp.tv_usec; }
void copyInfo(const BasePacket *p) { src_ip=p->src_ip; src_port=p->src_port; dst_ip=p->dst_ip; dst_port=p->dst_port; timestamp.tv_sec=p->timestamp.tv_sec; timestamp.tv_usec=p->timestamp.tv_usec; }
inline bool operator<(const BasePacket &rhs) {
return (timestamp.tv_sec < rhs.timestamp.tv_sec || (timestamp.tv_sec==rhs.timestamp.tv_sec && timestamp.tv_usec < rhs.timestamp.tv_usec));
@@ -64,6 +63,7 @@ public:
void WriteFloat(float value) { *(float *)(pBuffer + _wpos) = value; _wpos += sizeof(float); }
void WriteDouble(double value) { *(double *)(pBuffer + _wpos) = value; _wpos += sizeof(double); }
void WriteString(const char * str) { uint32 len = static_cast<uint32>(strlen(str)) + 1; memcpy(pBuffer + _wpos, str, len); _wpos += len; }
void WriteData(const void *ptr, size_t n) { memcpy(pBuffer + _wpos, ptr, n); _wpos += n; }
uint8 ReadUInt8() { uint8 value = *(uint8 *)(pBuffer + _rpos); _rpos += sizeof(uint8); return value; }
uint8 ReadUInt8(uint32 Offset) const { uint8 value = *(uint8 *)(pBuffer + Offset); return value; }
@@ -71,7 +71,7 @@ public:
uint32 ReadUInt32(uint32 Offset) const { uint32 value = *(uint32 *)(pBuffer + Offset); return value; }
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
void ReadString(char *str, uint32 Offset, uint32 MaxLength) const;
uint32 GetWritePosition() { return _wpos; }
uint32 GetReadPosition() { return _rpos; }
void SetWritePosition(uint32 Newwpos) { _wpos = Newwpos; }
@@ -79,7 +79,7 @@ public:
protected:
virtual ~BasePacket();
BasePacket() { pBuffer=NULL; size=0; _wpos = 0; _rpos = 0; }
BasePacket() { pBuffer=nullptr; size=0; _wpos = 0; _rpos = 0; }
BasePacket(const unsigned char *buf, const uint32 len);
};
@@ -89,5 +89,3 @@ extern void DumpPacketBin(const BasePacket* app);
#endif /*BASEPACKET_H_*/
+13 -13
View File
@@ -1,19 +1,19 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
/* 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 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
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.
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
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 BODYTYPES_H
#define BODYTYPES_H
@@ -25,7 +25,7 @@ typedef enum {
BT_Giant = 4,
BT_Construct = 5,
BT_Extraplanar = 6,
BT_Magical = 7, //this name might be a bit off,
BT_Magical = 7, //this name might be a bit off,
BT_SummonedUndead = 8,
BT_RaidGiant = 9,
// ...
@@ -45,7 +45,7 @@ typedef enum {
BT_Dragon = 26,
BT_Summoned2 = 27,
BT_Summoned3 = 28,
// 29
//29
BT_VeliousDragon = 30, //might not be a tight set
// ...
BT_Dragon3 = 32,
-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_*/
+253 -300
View File
@@ -1,279 +1,279 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
/* 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 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
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.
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"
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/classes.h"
const char* GetEQClassName(uint8 class_, uint8 level) {
switch(class_) {
case WARRIOR:
if (level >= 70)
return "Vanquisher";
else if (level >= 65)
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
else if (level >= 60)
return "Warlord";
else if (level >= 55)
return "Myrmidon";
else if (level >= 51)
return "Champion";
else
return "Warrior";
case CLERIC:
if (level >= 70)
return "Prelate";
else if (level >= 65)
return "Archon";
else if (level >= 60)
return "High Priest";
else if (level >= 55)
return "Templar";
else if (level >= 51)
return "Vicar";
else
return "Cleric";
case PALADIN:
if (level >= 70)
return "Lord";
else if (level >= 65)
return "Lord Protector";
else if (level >= 60)
return "Crusader";
else if (level >= 55)
return "Knight";
else if (level >= 51)
return "Cavalier";
else
return "Paladin";
case RANGER:
if (level >= 70)
return "Plainswalker";
else if (level >= 65)
return "Forest Stalker";
else if (level >= 60)
return "Warder";
else if (level >= 55)
return "Outrider";
else if (level >= 51)
return "Pathfinder";
else
return "Ranger";
case SHADOWKNIGHT:
if (level >= 70)
return "Scourge Knight";
else if (level >= 65)
return "Dread Lord";
else if (level >= 60)
return "Grave Lord";
else if (level >= 55)
return "Revenant";
else if (level >= 51)
return "Reaver";
else
return "Shadowknight";
case DRUID:
if (level >= 70)
return "Natureguard";
else if (level >= 65)
return "Storm Warden";
else if (level >= 60)
return "Hierophant";
else if (level >= 55)
return "Preserver";
else if (level >= 51)
return "Wanderer";
else
return "Druid";
case MONK:
if (level >= 70)
return "Stone Fist";
else if (level >= 65)
return "Transcendent";
else if (level >= 60)
return "Grandmaster";
else if (level >= 55)
return "Master";
else if (level >= 51)
return "Disciple";
else
return "Monk";
case BARD:
if (level >= 70)
return "Performer";
else if (level >= 65)
return "Maestro";
else if (level >= 60)
return "Virtuoso";
else if (level >= 55)
return "Troubadour";
else if (level >= 51)
return "Minstrel";
else
return "Bard";
case ROGUE:
if (level >= 70)
return "Nemesis";
else if (level >= 65)
return "Deceiver";
else if (level >= 60)
return "Assassin";
else if (level >= 55)
return "Blackguard";
else if (level >= 51)
return "Rake";
else
return "Rogue";
case SHAMAN:
if (level >= 70)
return "Soothsayer";
else if (level >= 65)
return "Prophet";
else if (level >= 60)
return "Oracle";
else if (level >= 55)
return "Luminary";
else if (level >= 51)
return "Mystic";
else
return "Shaman";
case NECROMANCER:
if (level >= 70)
return "Wraith";
else if (level >= 65)
return "Arch Lich";
else if (level >= 60)
return "Warlock";
else if (level >= 55)
return "Defiler";
else if (level >= 51)
return "Heretic";
else
return "Necromancer";
case WIZARD:
if (level >= 70)
return "Grand Arcanist";
else if (level >= 65)
return "Arcanist";
else if (level >= 60)
return "Sorcerer";
else if (level >= 55)
return "Evoker";
else if (level >= 51)
return "Channeler";
else
return "Wizard";
case MAGICIAN:
if (level >= 70)
return "Arch Magus";
else if (level >= 65)
return "Arch Convoker";
else if (level >= 60)
return "Arch Mage";
else if (level >= 55)
return "Conjurer";
if (level >= 51)
return "Elementalist";
else
return "Magician";
case ENCHANTER:
if (level >= 70)
return "Bedazzler";
else if (level >= 65)
return "Coercer";
else if (level >= 60)
return "Phantasmist";
else if (level >= 55)
return "Beguiler";
else if (level >= 51)
return "Illusionist";
else
return "Enchanter";
case BEASTLORD:
if (level >= 70)
return "Wildblood";
else if (level >= 65)
return "Feral Lord";
else if (level >= 60)
return "Savage Lord";
else if (level >= 55)
return "Animist";
else if (level >= 51)
return "Primalist";
else
return "Beastlord";
case BERSERKER:
if (level >= 70)
return "Ravager";
else if (level >= 65)
return "Fury";
else if (level >= 60)
return "Rager";
else if (level >= 55)
return "Vehement";
else if (level >= 51)
return "Brawler";
else
return "Berserker";
case BANKER:
if (level >= 70)
return "Master Banker";
else if (level >= 65)
return "Elder Banker";
else if (level >= 60)
return "Oldest Banker";
else if (level >= 55)
return "Older Banker";
else if (level >= 51)
return "Old Banker";
else
return "Banker";
case WARRIORGM:
case WARRIOR:
if (level >= 70)
return "Vanquisher";
else if (level >= 65)
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
else if (level >= 60)
return "Warlord";
else if (level >= 55)
return "Myrmidon";
else if (level >= 51)
return "Champion";
else
return "Warrior";
case CLERIC:
if (level >= 70)
return "Prelate";
else if (level >= 65)
return "Archon";
else if (level >= 60)
return "High Priest";
else if (level >= 55)
return "Templar";
else if (level >= 51)
return "Vicar";
else
return "Cleric";
case PALADIN:
if (level >= 70)
return "Lord";
else if (level >= 65)
return "Lord Protector";
else if (level >= 60)
return "Crusader";
else if (level >= 55)
return "Knight";
else if (level >= 51)
return "Cavalier";
else
return "Paladin";
case RANGER:
if (level >= 70)
return "Plainswalker";
else if (level >= 65)
return "Forest Stalker";
else if (level >= 60)
return "Warder";
else if (level >= 55)
return "Outrider";
else if (level >= 51)
return "Pathfinder";
else
return "Ranger";
case SHADOWKNIGHT:
if (level >= 70)
return "Scourge Knight";
else if (level >= 65)
return "Dread Lord";
else if (level >= 60)
return "Grave Lord";
else if (level >= 55)
return "Revenant";
else if (level >= 51)
return "Reaver";
else
return "Shadowknight";
case DRUID:
if (level >= 70)
return "Natureguard";
else if (level >= 65)
return "Storm Warden";
else if (level >= 60)
return "Hierophant";
else if (level >= 55)
return "Preserver";
else if (level >= 51)
return "Wanderer";
else
return "Druid";
case MONK:
if (level >= 70)
return "Stone Fist";
else if (level >= 65)
return "Transcendent";
else if (level >= 60)
return "Grandmaster";
else if (level >= 55)
return "Master";
else if (level >= 51)
return "Disciple";
else
return "Monk";
case BARD:
if (level >= 70)
return "Performer";
else if (level >= 65)
return "Maestro";
else if (level >= 60)
return "Virtuoso";
else if (level >= 55)
return "Troubadour";
else if (level >= 51)
return "Minstrel";
else
return "Bard";
case ROGUE:
if (level >= 70)
return "Nemesis";
else if (level >= 65)
return "Deceiver";
else if (level >= 60)
return "Assassin";
else if (level >= 55)
return "Blackguard";
else if (level >= 51)
return "Rake";
else
return "Rogue";
case SHAMAN:
if (level >= 70)
return "Soothsayer";
else if (level >= 65)
return "Prophet";
else if (level >= 60)
return "Oracle";
else if (level >= 55)
return "Luminary";
else if (level >= 51)
return "Mystic";
else
return "Shaman";
case NECROMANCER:
if (level >= 70)
return "Wraith";
else if (level >= 65)
return "Arch Lich";
else if (level >= 60)
return "Warlock";
else if (level >= 55)
return "Defiler";
else if (level >= 51)
return "Heretic";
else
return "Necromancer";
case WIZARD:
if (level >= 70)
return "Grand Arcanist";
else if (level >= 65)
return "Arcanist";
else if (level >= 60)
return "Sorcerer";
else if (level >= 55)
return "Evoker";
else if (level >= 51)
return "Channeler";
else
return "Wizard";
case MAGICIAN:
if (level >= 70)
return "Arch Magus";
else if (level >= 65)
return "Arch Convoker";
else if (level >= 60)
return "Arch Mage";
else if (level >= 55)
return "Conjurer";
if (level >= 51)
return "Elementalist";
else
return "Magician";
case ENCHANTER:
if (level >= 70)
return "Bedazzler";
else if (level >= 65)
return "Coercer";
else if (level >= 60)
return "Phantasmist";
else if (level >= 55)
return "Beguiler";
else if (level >= 51)
return "Illusionist";
else
return "Enchanter";
case BEASTLORD:
if (level >= 70)
return "Wildblood";
else if (level >= 65)
return "Feral Lord";
else if (level >= 60)
return "Savage Lord";
else if (level >= 55)
return "Animist";
else if (level >= 51)
return "Primalist";
else
return "Beastlord";
case BERSERKER:
if (level >= 70)
return "Ravager";
else if (level >= 65)
return "Fury";
else if (level >= 60)
return "Rager";
else if (level >= 55)
return "Vehement";
else if (level >= 51)
return "Brawler";
else
return "Berserker";
case BANKER:
if (level >= 70)
return "Master Banker";
else if (level >= 65)
return "Elder Banker";
else if (level >= 60)
return "Oldest Banker";
else if (level >= 55)
return "Older Banker";
else if (level >= 51)
return "Old Banker";
else
return "Banker";
case WARRIORGM:
return "Warrior Guildmaster";
case CLERICGM:
case CLERICGM:
return "Cleric Guildmaster";
case PALADINGM:
case PALADINGM:
return "Paladin Guildmaster";
case RANGERGM:
case RANGERGM:
return "Ranger Guildmaster";
case SHADOWKNIGHTGM:
case SHADOWKNIGHTGM:
return "Shadowknight Guildmaster";
case DRUIDGM:
return "Druid Guildmaster";
case MONKGM:
case DRUIDGM:
return "Druid Guildmaster";
case MONKGM:
return "Monk Guildmaster";
case BARDGM:
case BARDGM:
return "Bard Guildmaster";
case ROGUEGM:
case ROGUEGM:
return "Rogue Guildmaster";
case SHAMANGM:
case SHAMANGM:
return "Shaman Guildmaster";
case NECROMANCERGM:
case NECROMANCERGM:
return "Necromancer Guildmaster";
case WIZARDGM:
case WIZARDGM:
return "Wizard Guildmaster";
case MAGICIANGM:
case MAGICIANGM:
return "Magician Guildmaster";
case ENCHANTERGM:
case ENCHANTERGM:
return "Enchanter Guildmaster";
case BEASTLORDGM:
case BEASTLORDGM:
return "Beastlord Guildmaster";
case BERSERKERGM:
case BERSERKERGM:
return "Berserker Guildmaster";
case MERCHANT:
case MERCHANT:
return "Merchant";
case ADVENTURERECRUITER:
return "Adventure Recruiter";
@@ -285,55 +285,8 @@ const char* GetEQClassName(uint8 class_, uint8 level) {
return "Tribute Master";
case GUILD_TRIBUTE_MASTER:
return "Guild Tribute Master";
default:
default:
return "Unknown";
}
}
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;
}
+42 -44
View File
@@ -1,59 +1,59 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
/* 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 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
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.
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
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 CLASSES_CH
#define CLASSES_CH
#include "../common/types.h"
#define Array_Class_UNKNOWN 0
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define WARRIOR 1
#define CLERIC 2
#define PALADIN 3
#define RANGER 4
#define SHADOWKNIGHT 5
#define DRUID 6
#define MONK 7
#define BARD 8
#define ROGUE 9
#define SHAMAN 10
#define NECROMANCER 11
#define WIZARD 12
#define MAGICIAN 13
#define ENCHANTER 14
#define BEASTLORD 15
#define BERSERKER 16
#define PLAYER_CLASS_COUNT 16 // used for array defines, must be the count of playable classes
#define WARRIORGM 20
#define CLERICGM 21
#define PALADINGM 22
#define RANGERGM 23
#define SHADOWKNIGHTGM 24
#define DRUIDGM 25
#define MONKGM 26
#define BARDGM 27
#define ROGUEGM 28
#define SHAMANGM 29
#define NECROMANCERGM 30
#define WIZARDGM 31
#define MAGICIANGM 32
#define ENCHANTERGM 33
#define WARRIORGM 20
#define CLERICGM 21
#define PALADINGM 22
#define RANGERGM 23
#define SHADOWKNIGHTGM 24
#define DRUIDGM 25
#define MONKGM 26
#define BARDGM 27
#define ROGUEGM 28
#define SHAMANGM 29
#define NECROMANCERGM 30
#define WIZARDGM 31
#define MAGICIANGM 32
#define ENCHANTERGM 33
#define BEASTLORDGM 34
#define BERSERKERGM 35
#define BANKER 40
#define BANKER 40
#define MERCHANT 41
#define DISCORD_MERCHANT 59
#define ADVENTURERECRUITER 60
@@ -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
+153
View File
@@ -0,0 +1,153 @@
/*
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 CLIENTVERSIONS_H
#define CLIENTVERSIONS_H
#include "types.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_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 "Unknown";
case ClientVersion::Client62:
return "Client62";
case ClientVersion::Titanium:
return "Titanium";
case ClientVersion::SoF:
return "SoF";
case ClientVersion::SoD:
return "SoD";
case ClientVersion::UF:
return "UF";
case ClientVersion::RoF:
return "RoF";
case ClientVersion::RoF2:
return "RoF2";
case ClientVersion::MobNPC:
return "MobNPC";
case ClientVersion::MobMerc:
return "MobMerc";
case ClientVersion::MobBot:
return "MobBot";
case ClientVersion::MobPet:
return "MobPet";
default:
return "<ERROR> Invalid ClientVersion";
};
}
static uint32 ClientBitFromVersion(ClientVersion clientVersion)
{
switch (clientVersion)
{
case ClientVersion::Unknown:
case ClientVersion::Client62:
return 0;
case ClientVersion::Titanium:
case ClientVersion::SoF:
case ClientVersion::SoD:
case ClientVersion::UF:
case ClientVersion::RoF:
case ClientVersion::RoF2:
case ClientVersion::MobNPC:
case ClientVersion::MobMerc:
case ClientVersion::MobBot:
case ClientVersion::MobPet:
return ((uint32)1 << (static_cast<unsigned int>(clientVersion) - 1));
default:
return 0;
}
}
static ClientVersion ClientVersionFromBit(uint32 clientVersionBit)
{
switch (clientVersionBit)
{
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown):
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)):
return ClientVersion::Unknown;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)):
return ClientVersion::Titanium;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)):
return ClientVersion::SoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)):
return ClientVersion::SoD;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)):
return ClientVersion::UF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)):
return ClientVersion::RoF;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)):
return ClientVersion::RoF2;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobNPC) - 1)):
return ClientVersion::MobNPC;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobMerc) - 1)):
return ClientVersion::MobMerc;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobBot) - 1)):
return ClientVersion::MobBot;
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobPet) - 1)):
return ClientVersion::MobPet;
default:
return ClientVersion::Unknown;
}
}
#endif /* CLIENTVERSIONS_H */
-103
View File
@@ -1,103 +0,0 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2004 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 COMMON_PROFILE_H
#define COMMON_PROFILE_H
#ifdef ZONE
#include "../zone/features.h"
#ifndef EQPROFILE
#ifdef COMMON_PROFILE
#undef COMMON_PROFILE
#endif
#endif
#ifdef COMMON_PROFILE
#include "../common/profiler.h"
class CommonProfiler : public GeneralProfiler {
public:
enum {
Database_SaveInventory = 0,
Database_StoreCharacter,
Database_GetCharacterInfoForLogin,
Database_GetCharacterInfoForLogin_result,
Database_GetPlayerProfile,
Database_GetInventory,
Database_GetInventory_name,
Database_SetPlayerProfile,
Database_DBLoadItems,
Database_GetWaypoints,
Database_DBLoadNPCFactionLists,
DBcore_RunQuery,
DBAsync_ProcessWork,
DBAsync_DispatchWork,
DBAsyncLoop_loop,
EQStreamServer_Process,
EQStream_Process,
EQStreamServerLoop,
EQStreamInLoop,
EQStreamOutLoop,
TCPServerLoop,
TCPConnectionLoop,
Inventory_GetItem,
Inventory_HasItem,
BaseTCPServerLoop,
MakeRandomInt,
MakeRandomFloat,
Mutex_lock,
Timer_Check,
WorldConnection_Process,
MaxCommonProfilerId
};
inline CommonProfiler() : GeneralProfiler(MaxCommonProfilerId) { }
};
extern CommonProfiler _cp;
#define _CP(name) _GP(_cp, CommonProfiler, name)
#else
//no zone profiling, dummy functions
#define _CP(name) ;
#endif //COMMON_PROFILE
#else //else !ZONE
#define _CP(name) ;
#endif //!ZONE
#endif
+147
View File
@@ -0,0 +1,147 @@
/* 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 "condition.h"
#ifdef _WINDOWS
Condition::Condition()
{
m_events[SignalEvent] = CreateEvent (nullptr, // security
FALSE, // is auto-reset event?
FALSE, // is signaled initially?
nullptr); // name
m_events[BroadcastEvent] = CreateEvent (nullptr, // security
TRUE, // is auto-reset event?
FALSE, // is signaled initially?
nullptr); // name
m_waiters = 0;
InitializeCriticalSection(&CSMutex);
}
Condition::~Condition()
{
DeleteCriticalSection(&CSMutex);
CloseHandle(m_events[SignalEvent]);
CloseHandle(m_events[BroadcastEvent]);
}
void Condition::Signal()
{
EnterCriticalSection(&CSMutex);
if(m_waiters > 0)
SetEvent(m_events[SignalEvent]);
LeaveCriticalSection(&CSMutex);
}
void Condition::SignalAll()
{
EnterCriticalSection(&CSMutex);
if(m_waiters > 0)
SetEvent(m_events[BroadcastEvent]);
LeaveCriticalSection(&CSMutex);
}
void Condition::Wait()
{
EnterCriticalSection(&CSMutex);
m_waiters++;
LeaveCriticalSection(&CSMutex);
int result = WaitForMultipleObjects (_eventCount, m_events, FALSE, INFINITE);
EnterCriticalSection(&CSMutex);
m_waiters--;
//see if we are the last person waiting on the condition, and there was a broadcast
//if so, we need to reset the broadcast event.
if(m_waiters == 0 && result == (WAIT_OBJECT_0+BroadcastEvent))
ResetEvent(m_events[BroadcastEvent]);
LeaveCriticalSection(&CSMutex);
}
#else
#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
Condition::Condition()
{
pthread_cond_init(&cond,nullptr);
pthread_mutex_init(&mutex,nullptr);
}
void Condition::Signal()
{
pthread_mutex_lock(&mutex);
pthread_cond_signal(&cond);
pthread_mutex_unlock(&mutex);
}
void Condition::SignalAll()
{
pthread_mutex_lock(&mutex);
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mutex);
}
void Condition::Wait()
{
pthread_mutex_lock(&mutex);
pthread_cond_wait(&cond,&mutex);
pthread_mutex_unlock(&mutex);
}
/*
I commented this specifically because I think it might be very
difficult to write a windows counterpart to it, so I would like
to discourage its use until we can confirm that it can be reasonably
implemented on windows.
bool Condition::TimedWait(unsigned long usec)
{
struct timeval now;
struct timespec timeout;
int retcode=0;
pthread_mutex_lock(&mutex);
gettimeofday(&now,nullptr);
now.tv_usec+=usec;
timeout.tv_sec = now.tv_sec + (now.tv_usec/1000000);
timeout.tv_nsec = (now.tv_usec%1000000) *1000;
//cout << "now=" << now.tv_sec << "."<<now.tv_usec << endl;
//cout << "timeout=" << timeout.tv_sec << "."<<timeout.tv_nsec << endl;
retcode=pthread_cond_timedwait(&cond,&mutex,&timeout);
pthread_mutex_unlock(&mutex);
return retcode!=ETIMEDOUT;
}
*/
Condition::~Condition()
{
pthread_mutex_lock(&mutex);
pthread_cond_destroy(&cond);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
}
#endif
+57
View File
@@ -0,0 +1,57 @@
/* 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 __CONDITION_H
#define __CONDITION_H
#include "global_define.h"
#include "mutex.h"
#ifndef WIN32
#include <pthread.h>
#endif
//Sombody, someday needs to figure out how to implement a condition
//system on windows...
class Condition {
private:
#ifdef WIN32
enum {
SignalEvent = 0,
BroadcastEvent,
_eventCount
};
HANDLE m_events[_eventCount];
uint32 m_waiters;
CRITICAL_SECTION CSMutex;
#else
pthread_cond_t cond;
pthread_mutex_t mutex;
#endif
public:
Condition();
void Signal();
void SignalAll();
void Wait();
// bool TimedWait(unsigned long usec);
~Condition();
};
#endif
+94 -93
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)
@@ -7,107 +8,107 @@
class EQEmuStackWalker : public StackWalker
{
public:
EQEmuStackWalker() : StackWalker() { }
EQEmuStackWalker(DWORD dwProcessId, HANDLE hProcess) : StackWalker(dwProcessId, hProcess) { }
virtual void OnOutput(LPCSTR szText) {
char buffer[4096];
for(int i = 0; i < 4096; ++i) {
if(szText[i] == 0) {
buffer[i] = '\0';
break;
}
EQEmuStackWalker() : StackWalker() { }
EQEmuStackWalker(DWORD dwProcessId, HANDLE hProcess) : StackWalker(dwProcessId, hProcess) { }
virtual void OnOutput(LPCSTR szText) {
char buffer[4096];
for(int i = 0; i < 4096; ++i) {
if(szText[i] == 0) {
buffer[i] = '\0';
break;
}
if(szText[i] == '\n' || szText[i] == '\r') {
buffer[i] = ' ';
} else {
buffer[i] = szText[i];
}
}
if(szText[i] == '\n' || szText[i] == '\r') {
buffer[i] = ' ';
} else {
buffer[i] = szText[i];
}
}
LogFile->write(EQEMuLog::Crash, buffer);
StackWalker::OnOutput(szText);
}
Log.Out(Logs::General, Logs::Crash, buffer);
StackWalker::OnOutput(szText);
}
};
LONG WINAPI windows_exception_handler(EXCEPTION_POINTERS *ExceptionInfo)
{
switch(ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ACCESS_VIOLATION");
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
break;
case EXCEPTION_BREAKPOINT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_BREAKPOINT");
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_FLT_INEXACT_RESULT:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
break;
case EXCEPTION_FLT_INVALID_OPERATION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
break;
case EXCEPTION_FLT_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_OVERFLOW");
break;
case EXCEPTION_FLT_STACK_CHECK:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_STACK_CHECK");
break;
case EXCEPTION_FLT_UNDERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_FLT_UNDERFLOW");
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
break;
case EXCEPTION_IN_PAGE_ERROR:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_IN_PAGE_ERROR");
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_INT_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INT_OVERFLOW");
break;
case EXCEPTION_INVALID_DISPOSITION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_INVALID_DISPOSITION");
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
break;
case EXCEPTION_PRIV_INSTRUCTION:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_PRIV_INSTRUCTION");
break;
case EXCEPTION_SINGLE_STEP:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_SINGLE_STEP");
break;
case EXCEPTION_STACK_OVERFLOW:
LogFile->write(EQEMuLog::Crash, "EXCEPTION_STACK_OVERFLOW");
break;
default:
LogFile->write(EQEMuLog::Crash, "Unknown Exception");
break;
}
if(EXCEPTION_STACK_OVERFLOW != ExceptionInfo->ExceptionRecord->ExceptionCode)
{
EQEmuStackWalker sw; sw.ShowCallstack(GetCurrentThread(), ExceptionInfo->ContextRecord);
}
return EXCEPTION_EXECUTE_HANDLER;
switch(ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case EXCEPTION_ACCESS_VIOLATION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ACCESS_VIOLATION");
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ARRAY_BOUNDS_EXCEEDED");
break;
case EXCEPTION_BREAKPOINT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_BREAKPOINT");
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_DATATYPE_MISALIGNMENT");
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DENORMAL_OPERAND");
break;
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_FLT_INEXACT_RESULT:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INEXACT_RESULT");
break;
case EXCEPTION_FLT_INVALID_OPERATION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_INVALID_OPERATION");
break;
case EXCEPTION_FLT_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_OVERFLOW");
break;
case EXCEPTION_FLT_STACK_CHECK:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_STACK_CHECK");
break;
case EXCEPTION_FLT_UNDERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_FLT_UNDERFLOW");
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_ILLEGAL_INSTRUCTION");
break;
case EXCEPTION_IN_PAGE_ERROR:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_IN_PAGE_ERROR");
break;
case EXCEPTION_INT_DIVIDE_BY_ZERO:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_DIVIDE_BY_ZERO");
break;
case EXCEPTION_INT_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INT_OVERFLOW");
break;
case EXCEPTION_INVALID_DISPOSITION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_INVALID_DISPOSITION");
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_NONCONTINUABLE_EXCEPTION");
break;
case EXCEPTION_PRIV_INSTRUCTION:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_PRIV_INSTRUCTION");
break;
case EXCEPTION_SINGLE_STEP:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_SINGLE_STEP");
break;
case EXCEPTION_STACK_OVERFLOW:
Log.Out(Logs::General, Logs::Crash, "EXCEPTION_STACK_OVERFLOW");
break;
default:
Log.Out(Logs::General, Logs::Crash, "Unknown Exception");
break;
}
if(EXCEPTION_STACK_OVERFLOW != ExceptionInfo->ExceptionRecord->ExceptionCode)
{
EQEmuStackWalker sw; sw.ShowCallstack(GetCurrentThread(), ExceptionInfo->ContextRecord);
}
return EXCEPTION_EXECUTE_HANDLER;
}
void set_exception_handler() {
SetUnhandledExceptionFilter(windows_exception_handler);
SetUnhandledExceptionFilter(windows_exception_handler);
}
#else
// crash is off or an unhandled platform
+15
View File
@@ -0,0 +1,15 @@
#include "crc32.h"
uint16 CRC16(const unsigned char *buf, int size, int key)
{
// This is computed as the lowest 16 bits of an Ethernet CRC32 checksum
// where the key is prepended to the data in little endian order.
uint8 keyBuf[] = {(uint8)((key >> 0) & 0xff),
(uint8)((key >> 8) & 0xff),
(uint8)((key >> 16) & 0xff),
(uint8)((key >> 24) & 0xff)};
uint32 crc = CRC32::Update(keyBuf, sizeof(uint32));
crc = CRC32::Update(buf, size, crc);
return CRC32::Finish(crc) & 0xffff;
}
+7
View File
@@ -0,0 +1,7 @@
#ifndef _CRC16_H
#define _CRC16_H
#include "types.h"
uint16 CRC16(const unsigned char *buf, int size, int key);
#endif
+14 -14
View File
@@ -84,21 +84,21 @@ uint32 CRC32::GenerateNoFlip(const uint8* buf, uint32 bufsize) {
void CRC32::SetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at)
{
unsigned long data;
unsigned long check = 0xffffffff;
unsigned long check = 0xffffffff;
assert(in_length >= start_at && in_data);
for(uint32 i=start_at; i<in_length; i++)
{
data = in_data[i];
data = data ^ (check);
data = data & 0x000000ff;
check = check >> 8;
data = CRC32Table[data];
check = check ^ data;
}
memcpy(in_data, (char*)&check, 4);
for(uint32 i=start_at; i<in_length; i++)
{
data = in_data[i];
data = data ^ (check);
data = data & 0x000000ff;
check = check >> 8;
data = CRC32Table[data];
check = check ^ data;
}
memcpy(in_data, (char*)&check, 4);
}
uint32 CRC32::Update(const uint8* buf, uint32 bufsize, uint32 crc32var) {
+2 -2
View File
@@ -8,12 +8,12 @@ public:
static uint32 Generate(const uint8* buf, uint32 bufsize);
static uint32 GenerateNoFlip(const uint8* buf, uint32 bufsize); // Same as Generate(), but without the ~
static void SetEQChecksum(uchar* in_data, uint32 in_length, uint32 start_at=4);
// Multiple buffer CRC32
static uint32 Update(const uint8* buf, uint32 bufsize, uint32 crc32 = 0xFFFFFFFF);
static inline uint32 Finish(uint32 crc32) { return ~crc32; }
static inline void Finish(uint32* crc32) { *crc32 = ~(*crc32); }
private:
static inline void Calc(const uint8 byte, uint32& crc32);
};
+48
View File
@@ -0,0 +1,48 @@
/* 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 COMMON_DATA_VERIFICATION_H
#define COMMON_DATA_VERIFICATION_H
#include <algorithm>
namespace EQEmu
{
template <typename T, typename U, typename V>
T Clamp(const T& value, const U& lower, const V& upper) {
return std::max(static_cast<T>(lower), std::min(value, static_cast<T>(upper)));
}
template <typename T, typename U>
T ClampLower(const T& value, const U& lower) {
return std::max(static_cast<T>(lower), value);
}
template <typename T, typename U>
T ClampUpper(const T& value, const U& upper) {
return std::min(value, static_cast<T>(upper));
}
template <typename T, typename U, typename V>
bool ValueWithin(const T& value, const U& lower, const V& upper) {
return value >= lower && value <= upper;
}
}
#endif
+1555 -2562
View File
File diff suppressed because it is too large Load Diff
+167 -165
View File
@@ -1,19 +1,19 @@
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 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 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
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.
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
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_DATABASE_H
#define EQEMU_DATABASE_H
@@ -21,40 +21,25 @@
#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 "inventory.h"
#include <cmath>
#include <string>
#include <vector>
#include <map>
using namespace std;
//atoi is not uint32 or uint32 safe!!!!
#define atoul(str) strtoul(str, NULL, 10)
#define atoul(str) strtoul(str, nullptr, 10)
//class Spawn;
class Corpse;
class Spawn2;
class NPC;
class SpawnGroupList;
class Petition;
class InventoryOld;
class MySQLRequestResult;
class Client;
struct Combine_Struct;
//struct Faction;
//struct FactionMods;
//struct FactionValue;
struct ZonePoint;
struct NPCType;
class Inventory;
class ItemInst;
struct EventLogDetails_Struct {
uint32 id;
@@ -69,205 +54,222 @@ 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();
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
~Database();
// void ExtraOptions();
/*
* 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, InventoryOld* 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);
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 SetAccountStatus(const char* name, int16 status);
bool SetLocalPassword(uint32 accid, const char* password);
uint32 GetAccountIDFromLSID(uint32 iLSID, char* oAccountName = 0, int16* oStatus = 0);
bool UpdateLiveChar(char* charname,uint32 lsaccount_id);
bool GetLiveChar(uint32 account_id, char* cname);
uint8 GetAgreementFlag(uint32 acctid);
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);
char* GetGroupLeaderForLogin(const char* name,char* leaderbuf);
void SetGroupLeaderName(uint32 gid, const char* name);
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = NULL, char* assist = NULL, char* puller = NULL, char *marknpc = NULL,
GroupLeadershipAA_Struct* GLAA = NULL);
void ClearGroupLeader(uint32 gid = 0);
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);
uint32 GetMiniLoginAccount(char* ip);
uint8 GetAgreementFlag(uint32 acctid);
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
void SetAgreementFlag(uint32 acctid);
/* Groups */
char* GetGroupLeaderForLogin(const char* name,char* leaderbuf);
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 Varaibles
*/
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);
/*
* 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 LoadVariables_result(MySQLRequestResult results);
/* General Queries */
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); }
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);
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);
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 = NULL);
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 = NULL) { 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 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);
void AddReport(std::string who, std::string against, std::string lines);
protected:
void HandleMysqlError(uint32 errnum);
//bool RunQuery(const char* query, uint32 querylen, char* errbuf = 0, MYSQL_RES** result = 0, uint32* affected_rows = 0, uint32* errnum = 0, bool retry = true);
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);
/* EQEmuLogSys */
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
private:
void DBInitVars();
uint32 max_zonename;
char** zonename_array;
std::map<uint32,std::string> zonename_array;
Mutex Mvarcache;
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, map<string,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);
}
-677
View File
@@ -1,677 +0,0 @@
#include "debug.h"
#ifdef _WINDOWS
#include <windows.h>
#include <process.h>
#include <winsock2.h>
#endif
#include <iostream>
using namespace std;
#include "dbasync.h"
#include "database.h"
#include <errmsg.h>
#include <mysqld_error.h>
#include <limits.h>
#include "dbcore.h"
#include "common_profile.h"
#include <string.h>
#include "../common/MiscFunctions.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
cout << "Error: DBAsyncCB_LoadVariables failed: !GetAnswer: '" << errbuf << "'" << 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
{
_CP(DBAsyncLoop_loop);
dba->Process();
}
// Sleep(ASYNC_LOOP_GRANULARITY);
}
dba->MLoopRunning.unlock();
#ifndef WIN32
_log(COMMON__THREADS, "Ending DBAsyncLoop with thread ID %d", pthread_self());
#endif
THREAD_RETURN(NULL);
}
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, NULL, 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
cout << "Adding AsyncWork #" << (*iWork)->GetWorkID() << endl;
cout << "ExecuteAfter = " << (*iWork)->pExecuteAfter << " (" << Timer::GetCurrentTime() << " + " << iDelay << ")" << 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
cout << "DBAsync::CancelWork: " << iWorkID << 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
cout << "Poping AsyncWork #" << ret->GetWorkID() << endl;
cout << ret->pExecuteAfter << " <= " << Timer::GetCurrentTime() << 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) {
cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #1" << 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) {
cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::Process #2" << 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
cout << "DBAsync::CommitWrites() called." << 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) {
cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #1" << endl;
}
safe_delete(tmpWork);
}
else {
DispatchWork(tmpWork);
}
}
else {
if (tmpStatus != Canceled) {
cout << "Error: Unexpected DBAsyncWork->Status in DBAsync::CommitWrites #2" << endl;
}
safe_delete(tmpWork);
}
}
}
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
_CP(DBAsync_ProcessWork);
DBAsyncQuery* CurrentQuery;
#if DEBUG_MYSQL_QUERIES >= 2
cout << "Processing AsyncWork #" << iWork->GetWorkID() << endl;
#endif
while ((CurrentQuery = iWork->PopQuery())) {
CurrentQuery->Process(pDBC);
iWork->PushAnswer(CurrentQuery);
if (iSleep)
Sleep(1);
}
}
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
_CP(DBAsync_DispatchWork);
//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
+89 -95
View File
@@ -1,18 +1,17 @@
#include "../common/debug.h"
#ifdef _WINDOWS
#include <winsock2.h>
#endif
#include <iostream>
using namespace std;
#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
@@ -38,6 +37,7 @@ DBcore::DBcore() {
pDatabase = 0;
pCompress = false;
pSSL = false;
pStatus = Closed;
}
DBcore::~DBcore() {
@@ -58,98 +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) {
_CP(DBcore_RunQuery);
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 DEBUG_MYSQL_QUERIES >= 1
char tmp[120];
strn0cpy(tmp, query, sizeof(tmp));
cout << "QUERY: " << tmp << endl;
#endif
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) {
cout << "Database Error: Lost connection, attempting to recover...." << endl;
ret = RunQuery(query, querylen, errbuf, result, affected_rows, last_insert_id, errnum, false);
if (ret)
cout << "Reconnection to database successful." << endl;
}
else {
pStatus = Error;
if (errnum)
*errnum = mysql_errno(&mysql);
if (errbuf)
snprintf(errbuf, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << endl;
ret = false;
// 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;
MySQLRequestResult requestResult = QueryDatabase(query, querylen, false);
if (requestResult.Success())
{
std::cout << "Reconnection to database successful." << std::endl;
return requestResult;
}
}
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
cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << 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
cout << "DB Query Error: No Result" << 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) {
cout << "query successful";
if (result && (*result))
cout << ", " << (int) mysql_num_rows(*result) << " rows returned";
if (affected_rows)
cout << ", " << (*affected_rows) << " rows affected";
cout<< endl;
}
else {
cout << "QUERY: query FAILED" << 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) {
@@ -180,15 +173,16 @@ bool DBcore::Open(uint32* errnum, char* errbuf) {
LockMutex lock(&MDatabase);
if (GetStatus() == Connected)
return true;
if (GetStatus() == Error)
if (GetStatus() == Error) {
mysql_close(&mysql);
mysql_init(&mysql); // Initialize structure again
}
if (!pHost)
return false;
/*
Added CLIENT_FOUND_ROWS flag to the connect
otherwise DB update calls would say 0 rows affected when the value already equalled
what the function was tring to set it to, therefore the function would think it failed
what the function was tring to set it to, therefore the function would think it failed
*/
uint32 flags = CLIENT_FOUND_ROWS;
if (pCompress)

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