Commit graph

61 commits

Author SHA1 Message Date
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
f80629e307 Various Cleanups (game A-B) 2012-07-19 21:45:38 +02:00
Schmoozerd
0e0a765312 [12026] Replace std containers of ObjectGuids with some predefined types
Based on patch by stfx

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-07-03 18:47:05 +02:00
darkstalker
f777665d48 [12021] Fix some warnings
Thx to stfx for porting

Signed-off-by: stfx <stfx@hotmail.de>
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-06-25 15:40:27 +02:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
VladimirMangos
28759f9ed4 [11753] Show pending auction sales from all auctionhouses. 2011-07-25 10:16:59 +04:00
zergtmn
a1ca1d71d8 [11734] Use vector instead of list for sorting auction items 2011-07-12 03:41:28 +06:00
VladimirMangos
8e48e44c22 [11730] Move empty guid check into GetPlayerAccountIdByGUID code.
This cleanup small code and let catch some missing check cases
when 0 guid attempt searched by real DB query.

This also make function call more safe if it used with non-player guid by
some reason.
2011-07-10 05:57:37 +04:00
VladimirMangos
5e9854974b [11706] Use proper text structure in auction mail subject/text
This for example will enable show random property suffix in item name
in auction mails.
2011-07-02 07:12:34 +04:00
VladimirMangos
cda3a95fc2 [11705] Allow have auction bid generated by server
Some code cleanups also.

Fir generation bids can be used auction->UpdateBid(price) call without player pointer.
2011-07-02 06:26:49 +04:00
VladimirMangos
0f0fa22607 [11704] Resolve possible crash in auction code for paiment pending state.
Source of crash in sharing item object for sent mail to new owner
and in same time use it in still existed auction for show pending paiment.
Crash possible if new onwer get mail in less hour delay and will drop item
at receive.

Solution: Added fields in memory auction object and table `auction` for
store item stack size and random property id. This let not use auction item
except points where item send to owner at expire and new owner at
buyout/timeout auction with bid.
2011-07-02 04:23:24 +04:00
VladimirMangos
0daf12a348 [11703] Proper way create items in Item::CreateItem/CloneItem for items not for inventory
Old code way work not allow create item without providing targeting player.
In result creating item that will not placed to inventory required additional hacks
for undo redundent links to player structures.
2011-07-02 01:08:01 +04:00
VladimirMangos
67f9c26d51 [11701] Command .auction item and support auction without owner.
* New command allow place auction from chat/console and create auction without owner.
* Same code can be used in other place when server code want create generated auction
  without need have associated player. Auction code update for support this case.
* MailDraft::SendMailTo now allow "send" mails to non-players. It correcly drop items in like case.
2011-06-29 23:29:32 +04:00
VladimirMangos
d5675ba3bd [11524] Avoid adding auction item to player inventory update queue.
Also not set ITEM_FIELD_CONTAINED before real adding item to inventory.
No known porblem with last but code cleanup.
2011-05-23 05:33:21 +04:00
VladimirMangos
249fb836ca [11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
2011-05-15 22:04:57 +04:00
VladimirMangos
b997f4925d [11423] Support localization into auction sorting. 2011-05-02 22:06:51 +04:00
VladimirMangos
864ec71941 [11415] Better server side error reporting to player for bid adding cases
Sometime to client can sedn bid infor near to same time.
In like cases client fail prevent bid apply attempt at self side
and need send proper error from server side instead just ignore packet.
2011-05-02 02:06:23 +04:00
TOM_RUS
66ba7d2c49 [11396] Auction: server side sorting and get all auctions feature. 2011-04-26 04:05:23 +04:00
TOM_RUS
e39a8b55a0 [11391] Auction: multi sell, sale pending list and other fixes. 2011-04-24 21:57:49 +04:00
VladimirMangos
231c6d77ce [10969] Some cleanups in MailDraft API
* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items its can't be just shared
  and need preoprtly cloned, but item close is high price operation (guid use, DB tiuched and etc)
  So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.
2011-01-06 02:11:21 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
938622bedc [10802] Use ObjectGuid in Mail code.
Some catched bugs fixed in mixed uint32/guid values using cases.
2010-12-01 15:11:08 +03:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +03:00
VladimirMangos
46d740bbf4 [10641] Fixed use item dynamic/item proto flags.
* List its independelty. Each from this 2 fields have own flags. Cleanup lists.
* Not copy proto flags to item flags update field. This fix heroic item versions
  show in client in result mixed use ITEM_DYNFLAG_WRAPPED (0x8) with ITEM_FLAG_HEROIC (0x8)
* Update uses to proto case use for some cases where before wrongly has been used item dyn.flags
* For ITEM_DYNFLAG_UNLOCKED (0x4) set for item at unlock and check for prevent re-unlocking.
  This mostly for future case when will be implemented partly loting items support.
* For ITEM_FLAG_LOOTABLE (0x4) check loot absent or conflicting setting with containers/casted at use items.
  Report wrong cases art loading.
* Better check related loot tables content using ITEM_FLAG_PROSPECTABLE and ITEM_FLAG_MILLABLE
2010-10-25 16:27:14 +04:00
VladimirMangos
31c9efd219 [10629] Drop function GuidHigh2TypeId
Added ObjectGuid version Aura::GetCasterGuid()

But for prevent big problen with backporting AuraHolder
to mangos-0.12 in most cases still used old uint64 version
Aura::GetCasterGUID.

Recommended use new version where possible in clean way
as done for some cases in commit already.
2010-10-20 09:12:43 +04:00
VladimirMangos
5f44c4da21 [10363] More wide use ObjectGuid in way remove MAKE_NEW_GUID uses.
Also
* Fixed some amount wrong uses low guids as full player guids.
* Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid.
  In some cases need assign "0" guid, then use ObjectGuid() instead.
* Fixed .pdump commands work.
2010-08-17 08:22:28 +04:00
Fred
ea93dd13cf [10350] Fixed some typos.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 05:32:18 +04:00
NoFantasy
25d9fd265b [10293] Correct a not exitan...non-existin... a word that is often spelled wrong
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 18:26:08 +02:00
VladimirMangos
9a6535963c [10256] New auction command with subcommands for look different auction stores from anywhere. 2010-07-24 14:29:38 +04:00
VladimirMangos
e3befa2072 [10254] Remove dependence auction data from auctioneer guid.
* Field `auctioneerguid` replaced by `houseid` and table reanmed to `auction`
  (it list auctions and `id` is auction id).
* Update related code.

* SQL update fill `houseid` field by old `auctioneerguid`
  BUT: SQL update expect that you world DB named `mangos`.
  If this not true for your case you need modify SQL update BEFORE APPLY
  in 2 placed in part "mangos.creature AS c, mangos.creature_template AS ct"

* Another small possitive result: now possible easy select auctions related
  to some auction store (1-3 is one team actions, 4-6 another team auction,
  and 7 is neutral auction store for both teams
2010-07-24 01:45:59 +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
VladimirMangos
c64a2e8c84 [9730] Mail send related fixes in recent code.
* Avoid use explicit MailReciever/MailSender where not need.
  Types specially added for autoconvertion from common cases.

* Prevent allow copy text auction mails. It anyway store encoded data.
  Same for some another non-player mails.
2010-04-12 05:07:47 +04:00
tomrus88
4c8dd37612 Merge remote branch 'origin/master' into 330 2010-03-30 13:06:34 +04:00
XTZGZoReX
51fd11c92c [9638] Replace all C assert()s with MaNGOS ASSERT() macro. 2010-03-29 19:29:42 +02:00
tomrus88
d4647bbeaa Dropped itemtextid field from mail table. 2010-03-25 15:33:22 +03:00
tomrus88
50c96da112 Some work on mail/auction. 2010-03-25 13:19:21 +03:00
tomrus88
292f6189ea Merge remote branch 'origin/master' into 330 2010-03-24 08:33:12 +03:00
VladimirMangos
a27ff3e79d [9602] Simplify creating mail draft with content text, cleanup includes. 2010-03-18 12:10:47 +03:00
tomrus88
e82eb322e3 Fixed auction (may be not completely). 2010-03-13 23:06:53 +03:00
VladimirMangos
6487c24f29 [9545] Rename ObjectDefines.h -> ObjectGuid.h
Also move unrelated generic defines to Common.h
2010-03-07 20:05:32 +03:00
VladimirMangos
df652c56c0 [9425] More achievement types support.
Implemented new achievement criteria requirement:
* ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL (item level and item quality equiped in specific slot)

Implemented suppoprt achievement types:
* ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM (required DB data)
* ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL (required DB data)

Also achievment types used only for statistics:
* ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION
* ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS
* ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS
* ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM
* ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM
2010-02-21 03:20:26 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +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
arrai
b4ce8020e7 [8848] Fixed bidding on auctions below starting bid
This was possible by using cheating tools only; the client denies such
actions without sending CMSG_AUCTION_PLACE_BID.
Thanks to leak for reporting this vulnerability.
2009-11-20 16:22:02 +01:00
VladimirMangos
fe1fae46ee [8830] Restore build at *nix. Make MAKE_PAIR* users includes explicit.
Comment for recently added field also.
2009-11-18 23:57:20 +03: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
d009994f59 [8768] Rewrite code for prepare and send mails.
* Move send functions to new MailDraft class from WorldSession
* Simplify use different args combinations used in SendMailTo
  by groupping its by functionality in Helper classes. This also will prevent wrong way use args combinations.
2009-11-03 17:34:23 +03:00
VladimirMangos
d5dad82f3d [8764] Simplify code for mail items send. Avoid packet unread spam at errors. 2009-11-02 15:58:12 +03:00