Commit graph

54 commits

Author SHA1 Message Date
VladimirMangos
2cbde12458 [11534] Guild disban memory losses and unsafe code.
* Make sure that guild object deleted in all cases after disband.
* Avoid recusive like way call Disband from DelMember
2011-05-25 03:20:28 +04:00
VladimirMangos
719e298795 [11470] Final cleanup uint64 guid cases
Also drop logout player update fields cleanup that in any cases not saved.
2011-05-11 21:36:27 +04:00
VladimirMangos
ef6a48fe03 [11465] non-ObjectGuid guids in random places.
Only ChannelMgr code wide use uint64 guids now, and Map object stores.
2011-05-10 21:27:49 +04:00
zergtmn
6498941ead [11430] Introduce GuildMgr
Move all guild-related functions from our overpowered ObjectMgr to GuildMgr.
Thx leak for idea.
2011-05-06 19:27:36 +06:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
a8a7f3c796 [10815] Use in social lists API ObjectGuid form.
0 GUID_LOPART uses in code. :)
2010-12-02 08:32:46 +03:00
VladimirMangos
9b3d37f0cf [10378] Avoid double lookup member slot in guild operations.
Also more wide use ObjectGuid in guild code
and fixed some uint32->uint64 guid assigns.
2010-08-19 11:17:33 +04:00
VladimirMangos
f2406c1962 [10377] Simplify use Guild::BroadcastEvent 2010-08-19 07:27:19 +04:00
VladimirMangos
e082e29bcc [10301] Init guild create date at create in same value in memory and DB. 2010-07-31 23:01:37 +04:00
Toinan67
6302659d58 [10281] Send proper account amount in guild in SMSG_GUILD_INFO packet.
Data seen for example in client command /guildinfo output.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-28 23:34:50 +04:00
VladimirMangos
9350c9990d [10250] Select auction store by house id only.
After this commit auction auctioneer guid used only for select auction house in packet or loading.
Next task replace it in DB by houseid, dependence DB data from creature guid isn't good.
2010-07-23 18:06:08 +04:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
Machiavelli
faa07b3ca5 [9607] Fix SMSG_GUILD_INFO time part. 2010-03-19 17:19:01 +01:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
tomrus88
0bd88dd55a [9353] Some fixes to guild/arenateam events. 2010-02-10 21:14:23 +03:00
VladimirMangos
e15f548bed Merge branch 'master' into 330 2010-01-08 16:03:27 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
tomrus88
57126880cf Guild bank hopefully fixed. 2009-12-17 18:57:35 +03:00
balrok
1d362eace4 [8845] fixed some gcc warnings 2009-11-20 12:57:19 +01:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
f35be9519c [8754] Some guld back related packets data correctness checks
* Move when possible checks from deep code to packer/DB read level.
* Check real existed guild bank tabs amount instead just max possible amount.
* Check guild bank loaded state for packets expected to be called only after
  guild bank data loadin by another packet.

Thanks to elecyb and NetSky for original fix versions.
2009-10-30 05:50:06 +03:00
leak
455a053b3d [8721] Allow guildmaster to withdraw money before first bank tab is purchased.
Attached sql file needs to be run to repair existing structure.

Signed-off-by: unknown <Jakub@.(none)>
2009-10-24 09:25:44 +02:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +04:00
VladimirMangos
cfacd7e696 [8480] Provided real-time update for guidl ranks rights.
Specially for guild bank tab access rights (including currently open tab case!)
Send roster broadcast for all online guild memebers at any rank edit and guild bank tab buy.
2009-09-07 05:41:31 +04:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
tomrus88
94fdc7e37e Fix. 2009-08-28 19:14:16 +04:00
Triply
512cb786ee [8408] Optimized guild_member loading during startup. Changed rank ids in guild_rank table.
First start of mangos will take more time then usually, because of guild_rank change. If you want to speed first start up, execute command:
UPDATE guild_rank SET rid = rid - 1;

Signed-off-by: Triply <triply@getmangos.com>
2009-08-23 09:22:34 +02:00
VladimirMangos
5ceb0919e7 [8407] Extract from guild bank handler functions for 3 cases and move code to Guild class.
This mostly just move code and caller updates to use it from new place.
More code chnages possible later.
2009-08-23 08:33:21 +04:00
Triply
38fa6b241c [8402] Optimalized guild_eventlog and guild_bank_eventlog loading from database.
Added config options to set count of eventlog records stored in DB.
Attached SQL files will DROP existing and create new tables. Make sure you create backup (if you need old data).
Renamed few variables in Guild class.
Signed-off-by: Triply <triply@getmangos.com>
2009-08-21 09:42:21 +02:00
VladimirMangos
35121cdd34 [8389] Implement check really read received packet size and warning it not all data read.
* This let more easy catch packet structure chnages at client switch.
* Fixed structure CMSG_GUILD_BANK_SWAP_ITEMS
* Fixed structure CMSG_SPLIT_ITEM, CMSG_SELL_ITEM
* Added read data amount fixes for some other packets.

Thanks to TOM_RUS in help check correct packets structure.

Note: not all packets possible fixed. Please report for not fixed cases at errors:
"opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)"
2009-08-19 00:45:24 +04:00
VladimirMangos
2b534cbc23 [8382] Implement ByteArray functions for skip read of fields not needed for server in received packets.
* Use this fucntions in some case.
* Change some packets to form: read fields first check later for better control recieved packets structure.
* Fix CMSG_STAND_STATE_CHANGE packet structure to more correct.
2009-08-18 03:49:50 +04:00
arrai
a24f39a36f [8378] Use exceptions instead of explicit size checking for each packet
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
2009-08-16 23:50:22 +02:00
hunuza
8a32a19bad [8072] First step to get rid of data blob.
Adds new fields gender, level, xp, money, playerBytes, playerBytes2 and playerFlags to characters table.

The update will not work if your database contains characters with an old data field (not fitting to the actual client version).

It's recommended to backup your character database before applying this patch.

Signed-off-by: hunuza <hunuza@gmail.com>
2009-06-23 17:51:48 +02:00
tomrus88
42f8ce5f3e [7911] Applied coding style. 2009-05-29 19:07:28 +04:00
zhenya
20ffd7f421 [7761] GuildBankTabPrice vector is replaced by an array.
Arrays are significantly faster.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-05-04 19:47:14 +04:00
AlexDereka
c9d51a6dc7 [7716] Fixed some typos and possible crashes. 2009-04-26 18:49:07 +04:00
VladimirMangos
f4adf83cd7 [7688] Move Get*IfCanInteractWith to Player including renamed IsGameObjectOfTypeInRange. 2009-04-19 22:54:40 +04:00
arrai
a0ef77af5b [7659] Added several security checks to prevent cheating using facked packets 2009-04-13 02:16:01 +02:00
VladimirMangos
eac584eb89 [7422] Allow localization base at guildmaster locale default guild rank names at guild creating. 2009-03-09 11:41:22 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
Zerg2000
03fd67aaf5 [7314] Not set GR_RIGHT_WITHDRAW_GOLD_LOCK flag for guild masters, remove in DB.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-21 10:08:01 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
arrai
6b34b76426 [6973] Fixed storing demotes in guild log. Patch provided by vdesai 2008-12-29 15:11:07 +01:00
ApoC
58a05b831a [6964] Correctly show new guild rank name on guild demote.
Signed-off-by: ApoC <apoc@nymfe.net>
2008-12-28 20:26:49 +01:00
hunuza
0f12997ef1 [6899] Pass const reference instead of value for some strings in some functions.
Signed-off-by: hunuza <hunuza@gmail.com>
2008-12-12 14:17:37 +01:00
hunuza
818c378854 [6868] Don't load data field from DB to save money or arena team id.
Signed-off-by: hunuza <hunuza@gmail.com>
2008-11-30 18:31:17 +01:00
VladimirMangos
4ccfa1e71e [6848] Implement possibility creating gm log per account files using new option in mangosd.conf. Releated cleanups. 2008-11-24 22:44:29 +03:00
hunuza
b681f5ac1a Access cached member lists in guild handlers instead of querying the DB. 2008-11-07 11:49:27 +01:00
hunuza
4957d9f335 Further reduce of DB access in guild handlers. 2008-11-06 11:08:31 +01:00