Commit Graph

71 Commits

Author SHA1 Message Date
leak 73cf793e56 Core/DBLayer: Refactor prepared statement defines Note:
The new format for the middle section is a 3-letter upper case abbreviation of the sql command being executed (select -> SEL, update -> UPD, etc.)
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
2011-12-31 20:14:38 +01:00
leak 8adac3f246 Core/DBLayer: Convert PExecute() queries to prepared statements No. 3 2011-12-31 00:32:05 +01:00
Spp 57490ead83 Core/Commands: Allow to search for other account/characters from a selected player without having to write the ip as argument (By Bizzy) 2011-12-30 08:27:05 +01:00
leak ef17c05dec Core/DBLayer: Convert PExecute() queries to prepared statements No. 1 2011-12-25 18:13:21 +01:00
megamage 5b034ee631 Revert 81fea2d7b5. 2011-11-28 14:34:30 -05:00
Shauren 638693e78f Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.) 2011-11-23 17:55:16 +01:00
Bootz f75ec5ba2b Core: Codestyle clean-up
"plr"->player

Note: codestyle methods needs maintained, Player* player.
2011-11-07 11:06:39 -06:00
megamage 3ba22d0d06 Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management. 2011-10-10 17:39:34 -04:00
Spp b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
leak d498a5b68f Core/Commands: Prevent crash upon using .pinfo on characters in unknown areas
Closes #2784
2011-08-30 13:15:38 +02:00
leak 91a3bfe42a Core/Commands: .pinfo improvements
- Allow .pinfo <guid>
- Add map/zone/subzone/phase to output
2011-08-13 13:00:38 +02:00
Spp- e47b96af3e Core: Append single character to stream as character, not as a string 2011-07-29 14:18:28 +02:00
Azazel c5d0c6b464 Core/Misc: cleanup npc_professions script (shouldn't the whole script go to DB?). Fix some warnings. 2011-07-29 15:25:52 +06:00
Machiavelli 0dcc229071 Core/Commands: Allow muting offline players - the mute will become effective on next player login. 2011-07-27 17:51:57 +02:00
QAston b0fe236265 Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo
*GetSpellProto is now GetSpellInfo
*SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].*
*sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo()
*SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff()
*SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class.
*GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections
*code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
2011-07-26 23:09:28 +02:00
Spp- e9aa72cc7b Cosmetic: rename function escape_string to EscapeString 2011-06-30 14:52:44 +02:00
click 6667277a16 Core/Commands: Remove deprecated command for modifying pet training points (.pet tp) - removed in patch 3.0.2 and replaced with talentpoints (command for adjusting that already exists).
Closes #135.
2011-06-26 10:35:35 +02:00
kaelima b9e8694540 Core: Continued cleanup
If and for whitespaces.
2011-06-12 02:30:32 +02:00
click f16df538ee Core: More codestyle cleanups 2011-06-12 01:47:45 +02:00
Shocker 2703c6a38b Core/Commands: Include mute/ban info in .pinfo command 2011-05-09 18:00:42 +03:00
leak 1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
leak c51c817a45 Core/ObjectMgr: Refactor sCreatureStorage 2011-04-28 22:57:08 +02:00
Machiavelli 957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren 928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Shauren 0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Shauren 7b4e1c6387 Core/ObjectMgr: Static members are no longer accessed through singleton
--HG--
branch : trunk
2010-12-22 20:23:47 +01:00
Spp 408fce1de6 Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
2010-12-06 02:07:53 +01:00
Shauren 650f62796a Core/Commands: Simplified .kick command handler and fixed possible crashes there
--HG--
branch : trunk
2010-11-24 15:31:20 +01:00
click c786f08146 Core: Fix issues with builds after rf68255d6ac
( and a minor int32->uint32 change for SendNotification() )

--HG--
branch : trunk
2010-11-24 13:20:36 +01:00
click f25cbacf72 Core/Commands: Forgot one GetIntConfig->GetBoolConfig -entry in previous commit
--HG--
branch : trunk
2010-11-23 19:53:42 +01:00
click f18cbadf7f Core/Commands: Reintroduce CONFIG_SHOW_KICK_IN_WORLD-handling after a long absensce in the 'commented out code'-world
Closes issue 4042.

--HG--
branch : trunk
2010-11-23 19:49:48 +01:00
click 95e956a0b5 Core/Scripts: Convert more commands over to CommandScripts (moves gobject, honor, quest, reload, titles and wp commands to scripts) - Patch by Paradox
(Also fixes a minor visual error on GM-listings (gm ingame/gm list) when the respective user had an R in his/her name).
Closes issue 4792.

--HG--
branch : trunk
2010-11-16 21:27:25 +01:00
click c374f3245a Scripts/Commands: Add tele and event commands to commandscripts system and streamlining the command selection process to ensure the correct command is run when using abbreviations
Patch by Paradox (some cleanups was needed)

--HG--
branch : trunk
2010-11-13 22:29:46 +01:00
click e22426c7c0 Core/Scripts: Reinstate commandscripts, now with extra bling and working commands (and yes, we did test it thoroughly this time)
Thanks to Paradox for sorting the commandscripts and chanhandlers out to work as they were intentionally ment to be like.

--HG--
branch : trunk
2010-11-12 20:47:03 +01:00
click 03e4ecfbfd Core: Partial revert of rcb3188281e, rc85b35f076, r97f9a0fa3e due to missing loader implementation.
(files disabled but kept in repo, and will be fully reinstated once everything is sorted out)
Note: SQL-update-data is NOT supplied for 're-converting' to old help-system - this is after all considered a workrepo untill we tag a commit as stable!

--HG--
branch : trunk
2010-11-10 05:22:27 +01:00
Paradox de1798e4ac Core/Scripts Part 1 of moving all commands to commandscripts
closes issue 4669
(first 5 patches rolled into 1)
Patch by Paradox

--HG--
branch : trunk
2010-11-09 10:15:35 -05:00
linencloth 07fa1bcbdf Core/Creature: Implement FarTeleportTo (teleport to an other map)
Core/Transport: Cleanup and optimize transport and passenger handling
- Only transports will be active objects
  - Reduced cpu and memory usage
- Using FarTeleportTo for creature passengers at transport teleportation
  - Creatures won't be recreated on teleport

--HG--
branch : trunk
2010-10-24 02:55:50 +02:00
click f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click 8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
runningnak3d b90c5d6760 Core/Misc: Set the hard level of the waypoint wisp to 255. If you for *SOME*
reason had more than 255 waypoints, bad things (such as a client crash) would
happen.

--HG--
branch : trunk
2010-09-30 21:06:53 -06:00
runningnak3d 8e9b0647b5 Core/Misc: Allow waypoint wisp to exceed level 100. If more than 100 waypoints
are generated, there will be errors thrown if you don't have level stats, but
this is acceptable.

--HG--
branch : trunk
2010-09-30 20:39:53 -06:00
Shocker 78803c9f09 Magic numbers cleanup:
- Replace many magic numbers with constants
- Use enum for vehicle flags/seat flags
- Correct structure for ItemRandomSuffixEntry

--HG--
branch : trunk
2010-09-28 08:21:51 +03:00
Shocker 75f5e9756e Core/Commands: Allow .gobject near to print gameobject entry too
--HG--
branch : trunk
2010-09-26 23:46:31 +03:00
Machiavelli 3c6dc32030 Core/DBLayer:
- Rewrite Field class to be able to store both binary prepared statement data and data from adhoc query resultsets
- Buffer the data of prepared statements using ResultSet and Field classes and let go of mysql c api structures after PreparedResultSet constructor. Fixes a race condition and thus a possible crash/data corruption (issue pointed out to Derex, basic suggestion by raczman)
- Conform PreparedResultSet and ResultSet to the same design standards, and using Field class as data buffer class for both
* NOTE: This means the fetching methods are uniform again, using ¨Field* fields = result->Fetch();¨ and access to elements trough fields[x].
* NOTE: for access to the correct row in prepared statements, ¨Field* fields = result->Fetch();¨ must ALWAYS be called inside the do { }while(result->NextRow()) loop.
* NOTE: This means that Field::GetString() returns std::string object and Field::GetCString() returns const char* pointer.

Still experimental and all that jazz, not recommended for production servers until feedback is given.

--HG--
branch : trunk
2010-09-24 22:16:21 +02:00
Spp 4db7e4aaa0 Core/Command: Fix 'character titles' command, patch by Shadowstep
closes issue 3939

--HG--
branch : trunk
2010-09-16 10:59:02 +02:00
Machiavelli a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
Shocker f9ecc36fb0 Core/Commands: Implement config for setting the maximum number of results a .lookup command can return, closes issue 3875
--HG--
branch : trunk
2010-09-08 09:28:21 +03:00
silinoron be7d94f24e Add support for character race and faction transfers.
Based (loosely) on patch by Ner'zhul, DarkXuan, and darkshines@sakha.net.
Fixes issue #3429.

--HG--
branch : trunk
2010-09-05 13:12:24 -07:00
silinoron 5179d3149a Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG--
branch : trunk
2010-09-03 21:55:57 -07:00