Commit graph

72 commits

Author SHA1 Message Date
Salja
22bfaa12b0 Mage 400 INTO master/434
Signed-off-by: Salja <salja2012@hotmail.de>
2020-02-16 01:59:51 +00:00
Schmoozerd
835d1c7479 [12069] Cleanup comment style 2012-07-22 14:39:31 +02:00
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
aeff8f9d1a [12062] Cleanup MaNGOS sources 2012-07-19 22:05:00 +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
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
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
VladimirMangos
151e5eae9c [11458] Non-item related uint64 guids replaced by ObjectGUids in Player.h
Also let ObjectAccessor::FindPlayer optimize empty guid case work.
2011-05-09 21:54:09 +04:00
TOM_RUS
730a907252 Use enum InventoryResult as return type for few functions. 2011-04-24 02:48:35 +04:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
VladimirMangos
ba77d85a30 [11323] Avoid explicit use HIGHGUID_UNIT as creature high guid in guids or creature creating.
This helper change for allow have in future static spawned vehicles as `creature` table data.

Added CreatureInfo::GetHighGuid() high guid selector, and wrapper CreatureData::GetHighGuid()
for most real cases of usage. Also easy get expected guid form by CreatureData::GetObjectGuid(lowguid).

Also fixed some memory lost cases at creature spawn fail.
2011-04-07 21:15:27 +04:00
VladimirMangos
2b65cdb3bb [11244] Collect in CreatureCreatePos data for delayed pos setup into Creature::Create.
* CreatureCreatePos work in 3 modes:
    - exactly provided coordinates/orientation/map/phasemask
    - exactly object + orientation as coordinates/map/phasemask
    - delayed position calculation near provided object at specific dist/angle.
* Use in similar way and for Pet/Vehicle Create functions.
  For Totem created new Totem::Create function with some moved in to it totem specific code.
* This let resolve recent problems with creature spawn and preserve fix for cases when
  Creature::Create addon/script code expected known correct possition for creature.
2011-03-14 06:18:34 +03:00
VladimirMangos
51b4556c4b [11222] Move possition setup for Creature and subclases before Create call.
Some called from Create code can req. proper pos setup for creature.
Bad side: But in way how currently code orginized impossible setup excetly position for most
Creature sublasses. So in this part need more work.
2011-03-06 12:47:37 +03:00
VladimirMangos
9312ef7e78 [11214] Implement .debug spellcoefs command
Command show default calculated and DB stored coefficients for spell direct/dot heal/damage.
2011-03-03 18:56:29 +03:00
Skirnir
75b4f75f4d [11066] Remove tail whitespaces.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-25 00:22:29 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
b305f203b9 [10811] Use ObjectGuids in chat commands.
Still exist 15 GUID_LOPART uses in code.
2010-12-02 07:09:11 +03:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +03:00
VladimirMangos
2601022b9f [10751] Use objectguids in item code.
Also
* Fixed unexpected container updated state after inventory load
* Make .debug getitemstate command more friendly by args.
2010-11-20 01:59:48 +03:00
VladimirMangos
534ff29f15 [10711] Check localization data for existance main table entres.
Data will skipped for nonexistent entries, and reported with
disabled LogFilter_DbStrictedCheck filter.
2010-11-09 20:26:59 +03:00
VladimirMangos
c955941b55 [10627] Use ObjectGuid for player's selection and unit's target 2010-10-20 08:19:48 +04:00
VladimirMangos
59e672f1bc [10331] More basic chat command parsing functions and its uses.
* Commands .debug update and .modify bit removed as redundent
* Command .debug getvalue now can output values in float/int/hex/bitstring formats
* Command .debug setvalue now ca accept values in int/float/hex/bitstring formats
* Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask
  (in 3 modes: |= &= &=~ ) to value in update field
* Command .debug moditemvalue added similar .debug modvalue for item case.
* Command .npc set movetype now propertly update spawned in world creature state.
* Command .modify spell renamed to .debug spellmods and restored to working state.
* Commands .account password and .account set password now allow use quoted strings
  for passwords and then now possible set from chat/console passwords with white spaces.
* Many commands converted to new functions without modify functionality
  except better error detection in some cases at wrong command syntax use.

* Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
2010-08-09 03:52:11 +04:00
VladimirMangos
0cc1fbe697 [10322] In chat command handlers use char* arg instead "const char*"
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.

Some other code style exist in related code.
2010-08-06 01:14:33 +04:00
NoFantasy
8aaf32798f [10310] Clarify argument in emote related functions, expecting emote id
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-03 01:01:45 +02:00
NoFantasy
3eb2d2910e [10112] Rename GetObjectSize function to GetObjectBoundingRadius
To reflect better what the function should actually return and also to clarify when used in misc calculations.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 14:14:23 +02:00
VladimirMangos
696a4b6db0 [9918] Fixed player's tapped creature loot access by group in diff cases
* If player tap creature in group and leave then group will have access to creature loot if not disbanded
* If player tap creature and after join to group then creature loot will accesable only by player
* Also RewardPlayerAndGroupAtKill divided to simgle player and group reward versions used for group tap
  and single player tap cases.
2010-05-17 12:56:57 +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
8416702d7c [9579] Use ObjectGuid in some loot code.
Also use ObjectGuidSet instead std::set<ObjectGuid>
2010-03-13 14:06:27 +03:00
VladimirMangos
c8fd454a79 [9551] Add and use PackedGuid wrapper.
Also
* use more wide bytebuff << >> operators for objects
* use at read packet faisl alsways exception way instead some time used bool results.
2010-03-08 20:23:16 +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
c71f79584d [9501] Implement item limit category inventory mode.
* Now expected item limit categories (for example for item 5513 and related)
  correctly limited by its amount in inventory.
* Provide and use additional arg in SendEquipError for alt. way get affected
  item prototype. This let send to function item id and prevent crash client at
  limit category equip errors that required item prototype data.
2010-03-02 14:10:38 +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
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
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00
tomrus88
3f33946d6a Update to latest client build 10505.
Fixed CMSG_AUCTION_SELL_ITEM.
Fixed CMSG_BUY_PETITION.
Some other fixes.
2009-09-26 19:40:14 +04:00
VladimirMangos
f99f477fe8 [8169] Implement new optional table spell_check and console command .debug spellcheck
* Table expected to be store data mirror same data in code:
  - explicit spell ids with related expected spell properties like effects, spell family or auras
  - implicit requirements for select some spell sets like spell family masks, icons or visual values
* For check can be used .debug spellcheck _console_ only command.
* Main purpose table and related command check code parts for outdated data at client switch.
  It also can be used for check data in patch writing time to be sure code correctness.
2009-07-12 22:15:56 +04:00
VladimirMangos
7f3f21ee1a [8167] Use more consistence debug command handler names and move its code to debugcmds.cpp 2009-07-12 16:00:28 +04:00
Win32
03926619d9 [8151] Fixed some format warnings and typos.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

SOme changes rewrited with using [8150]
2009-07-09 01:09:12 +04:00
VladimirMangos
97721109ff [8083] New debug command: .debug setaurastate for test target/caster aura states.
Also fix wrong (!args) checks in debug commands.
2009-06-28 00:06:57 +04:00
NoFantasy
6a1b4e5729 [7980] Implement item use target requirements store and check (new table item_required_target).
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

* Also implement this table reload
* Static Spell::SendCastResult function for call not from spell code.
  Can be also used in scripts where need send explicitly spell cast error to client.
2009-06-09 00:26:36 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
AlexDereka
c9d51a6dc7 [7716] Fixed some typos and possible crashes. 2009-04-26 18:49:07 +04:00
VladimirMangos
dfa2869136 [7616] Implement .debug play cinematic and .debig play movie. Rename .debug playsound to .debug play sound. 2009-04-05 04:36:26 +04:00
VladimirMangos
db2027feb0 [7614] Sort/rename debug commands, Move packet send commands to new ".debug send " subcommands list.
Also drop not implemented .debug inarc
Add to .debug send spellfail support for up to 2 additional args for spell fail packet.
2009-04-04 06:27:49 +04:00
VladimirMangos
ab2bdc3e69 [7518] Implement new script command SCRIPT_COMMAND_PLAY_SOUND (look in World.h for args)
* Also rewrite use SMSG_PLAY_OBJECT_SOUND/SMSG_PLAY_SOUND
  Now WorldObject have 2 function for sound level dependent from distance (PlayDistanceSound)
  and for not depednet (PlayDirectSound)
* Old Player::PlaySound function removed and uses need to be updated to WorldObject functions
  Note: function called for _source_ of sound in different from old function.
* chat command .debug ps removed and .debug playsound can used for bother packects test:
  if no selection used SMSG_PLAY_SOUND, if selection exist including self then SMSG_PLAY_OBJECT_SOUND.
2009-03-23 00:27:01 +03:00
tomrus88
28dc20c6e2 Small code cleanup and partial merge with dev branch 2009-03-21 19:07:38 +03:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
VladimirMangos
bfa67880f2 [7492] Rename subcommands functions to names more similar related chat commands 2009-03-19 11:59:02 +03:00