Commit Graph

55 Commits

Author SHA1 Message Date
click
da03bbbdab Core: Yet more cleanups in codestyle... 2011-06-12 02:06:07 +02:00
click
f16df538ee Core: More codestyle cleanups 2011-06-12 01:47:45 +02:00
leak
ea06dcf418 Core/ObjectMgr: Refactor guild related functions into dedicated class 2011-05-04 10:08:09 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
leak
01a79947d5 More cleanup after last commit spree 2011-04-29 19:59:40 +02:00
Azazel
6fb2bf4224 Core: use enum InventoryResult as return type for functions working with player items.
Original patch by TOM_RUS.
2011-04-29 16:48:15 +06:00
leak
a82654debd Core/ObjectMgr: Refactor sItemStorage 2011-04-28 22:42:33 +02:00
Azazel
e49b5b44d6 Core/Cleanup: remove C-style cast to (Bag*):
* add ToBag() methods for Item class;
* add GetBagByPos() method for Player class.
2011-03-18 15:58:08 +06:00
leak
b6074f90da Core: Cleaned up leftovers from loading functions streamlining 2011-03-10 22:22:29 +01:00
Shauren
e5347a3bda Core: Fixed warnings:
C4100: 'variable' : unreferenced formal parameter
C4701: potentially uninitialized local variable
C4389: '!=' : signed/unsigned mismatch
C4245: 'argument' : conversion from 'X' to 'Y', signed/unsigned mismatch
2011-03-08 16:42:00 +01:00
Machiavelli
e07e20ffca Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf. 2011-02-20 20:16:34 +01:00
leak
dd751242fc Core/Spells: Better solution for exploit check (Thanks to manuel)
Readd lost changes from char db type cleanup
2011-01-20 03:06:51 +01:00
leak
c59ea4726e SQL: Characters db storage type cleanup No. 6 2011-01-20 01:02:24 +01:00
leak
a486eb0c2f SQL: Characters db storage type cleanup No. 5 2011-01-20 00:08:45 +01:00
leak
a7df9ddff1 SQL: Characters db storage type cleanup No. 4 2011-01-19 22:46:21 +01:00
Machiavelli
deed0d0781 Core/General: Fix some comment style. //* to // *. Fixes certain code display errors on nano. Thanks to Aokromes for pointing out. 2011-01-16 12:23:17 +01:00
Machiavelli
fa8e5047a6 Core/Guilds: Fix a possible client crash in MSG_GUILD_BANK_LOG_QUERY 2011-01-10 20:57:58 +01: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
azazel
b39b8fdd0d DB Schema/Characters: removed columns auctionhouse.item_template, character_inventory.item_template, guild_bank_item.item_entry and mail_items.item_template and created item_instance.itemEntry column instead of them.
As a side effect moved related queries to prepared statements.
As one more side effect fixed not shown and lost mail items in returned expired mail (patch by Quriq14).

--HG--
branch : trunk
2010-12-15 14:08:12 +06:00
click
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
Machiavelli
d75eaf8e83 Core/Guild: More signed/unsigned comparison fixes. Should fix guild log loading.
--HG--
branch : trunk
2010-12-13 16:58:59 +01:00
Machiavelli
1a4fe4baca Core/Guilds: Fix logic in bank withdrawal method (unsigned comparison with signed value). Should fix certain guild bank related bugs.
--HG--
branch : trunk
2010-12-13 16:42:09 +01:00
Machiavelli
976225a9dd Core/DBLayer: Implement global ExecuteOrAppend methods to DatabaseWorkerPool for executing queries in a diverse context (transaction or non transaction) - instead of local to Guild.cpp
--HG--
branch : trunk
2010-12-13 16:27:14 +01:00
click
5f4b97fcf7 Core/Guild: Fix guildbank withdrawal limit (non-guildmaster character will not be able to withdraw more than withdraw-limit) - thanks to Azz
Fixes issue 4720

--HG--
branch : trunk
2010-11-11 22:59:06 +01:00
Spp
739f336618 Core: Fix warnings
--HG--
branch : trunk
2010-10-25 11:25:42 +02:00
linencloth
168a085723 Core/Guilds: Fix a crash
--HG--
branch : trunk
2010-10-21 17:15:13 +02:00
azazel
c0faed2251 Core/Guilds: guild code was completely refactored and rewritten.
* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;

WARNING: Make sure you backup your characters database before applying this change (just in case).

Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.

--HG--
branch : trunk
2010-10-17 19:54:13 +06:00
Shauren
324de6fb4c Core: Added some anti-WPE filter checks to prevent putting non-empty bags into other bags/gbank/mail/auction, original patch from mythcore
Core: Changed inventory saving - will no longer abort operation at single item fail

Closes issue #1994.

--HG--
branch : trunk
2010-10-09 17:36:53 +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
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
linencloth
33babfa2d2 Core: Optimize guild loading
--HG--
branch : trunk
2010-09-18 21:24:05 +02:00
linencloth
d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
Shocker
de9ed810ef Core/Guilds: Fix Guild bank event log for big stacks, fixes issue 3996, thanks maketheking for pointing out the problem
--HG--
branch : trunk
2010-09-13 22:41:32 +03: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
Machiavelli
9f5708f4f5 Wrap guild_bank_item save queries in transactions.
Fixes a potential dataloss issue

--HG--
branch : trunk
2010-08-30 19:19:47 +02:00
Spp
405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
click
d16656bb5d Core/Guild: Compile properly on *nix + fix so we don't delete the same item twice on disband (thanks shauren)
--HG--
branch : trunk
2010-08-21 10:31:46 +02:00
Machiavelli
8cfc3782e3 Fix linux build (with PCH enabled, mind you)
--HG--
branch : trunk
2010-08-21 03:44:02 +02:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
silinoron
8d0a058411 Add a GuildScript class with a handful of hooks.
--HG--
branch : trunk
2010-08-14 12:17:05 -07:00
azazel
9bd2619425 Fixed memory leaks at guild unload/disband (author: porteyoplait)
--HG--
branch : trunk
2010-08-13 17:39:43 +06:00
XTZGZoReX
9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +02:00
QAston
48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
Shauren
77fc91bde8 Deleted data blob in item_instance
Fixed issues with displaying sockets/enchants/durability on heroic items

--HG--
branch : trunk
2010-07-30 13:15:31 +02:00
Brian
09728dd491 * Fix small typo in commit 9073 -- oppppsss
* MembersList still sounds better than MemberList -- but ehh -- I'm American

--HG--
branch : trunk
2010-07-28 17:40:02 -06:00