Commit graph

86 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
98e1efd435 Various Cleanups (game P) 2012-07-19 21:51:30 +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
Vinolentus
336ebaa24a [11771] Avoid happines overflow in HandlePetAbandon :)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-08-07 00:49:52 +04:00
VladimirMangos
3e0cacbdaf [11743] Fixed auction crash in case missing localization for only some items
Source crash in missing locale strings array size check before access
to it in locale structure.

Also move repeating code for access to wide used localization string arrays to ObjectMgr functions.
2011-07-19 02:34:16 +04:00
VladimirMangos
d8a3f4b925 [11674] Fixed names of pets summoned by npc.
* Add check to make sure that creature controlled pet use default name from template.
* Add localization support to pet name query for above pets type.
2011-06-25 20:45:48 +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
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
Den
6e1988bfc7 [11463] Cleanup codestyle in PetHandler.cpp
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-05-10 13:10:45 +04:00
VladimirMangos
cf685da47a [11139] Use for Creature/GameObject local per-map guids
* Creature/GameObject guid generators moved to Map
* For avoid wrong not converted cases generic function in ObjectMgr has been replaced by
  specilized guid generation function like sObjectMgr.GeneratePlayerLowGuid().
  This let catch all cases that need update in custom code or scripts.
* Drop many ObjectAcessor.h now dead code. This is also make mangos more thread safe.
* Restore one more time unix build broken in prev. commits.

Note: many cases when something not wotk in instance but work in continents
possible magicly start work after this commit. For example, some gm commands.
From large systems that need more chnages for start work in full power in instances
can be referecned pool/gamevent system. Last need just small hacks drop changes but
in will addded in independent commit.
2011-02-12 09:52:16 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +03:00
VladimirMangos
f9bcfa3a89 [10739] Cleanup pet remove code and some fixes.
* Merge Player::RemovePet and Pet::Remove function code to Pet::Unsummon
  This let be sure that in all cases all required steps doen. For example this fix
  creature's guardians propertly remove from guardians list.
* Add new pet save mode PET_SAVE_REAGENTS as replacement PET_SAVE_NOT_IN_SLOT+true-arg stable pair in old function args
  This will avoid use reagent save arg with wrong different save modes.
* Fixed recently added code with absent check for re-summon protector pet call.
2010-11-19 02:17:55 +03:00
VladimirMangos
a32d68febd [10671] Convert some Unit owner/etc guids to ObjectGuid way. 2010-11-01 13:19:50 +03:00
nos4r2zod
f483b41242 [10651] Fixed combat log being bugged by pets without name
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2010-10-26 20:35:25 +03:00
VladimirMangos
851e15c70a [10635] Convert many opcode handlers to ObjectGuid use.
Also re-enabled anticheating check for bank window open
base at .bank command access rights.
2010-10-21 10:43:14 +04:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02:00
zergtmn
f9fcf5e055 [10563] Implement CMSG_PET_STOP_ATTACK.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-30 21:02:43 +04:00
VladimirMangos
98f36e4652 [10562] Cleanup WorldSession::HandlePetAction
Also fixed attack target seelction base at packet content instead direct player selection.
Remove unneded arg for Unit::SendPetAIReaction.
2010-09-30 20:39:13 +04:00
zergtmn
ab3de84cca [10561] Avoid ask AI for direct controlled creature at attack.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also fix warrning double->float in recent commited code.
2010-09-30 18:05:38 +04:00
darkstalker
3a8ad26a5e [10526] Implement server side global cooldown check.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also pet/controlled unit global cooldown code replaced by new placed in charmInfo structure.

Thanks to nos4r2zod for testing and gcd range check implement.
2010-09-24 06:07:26 +04:00
VladimirMangos
54d991ef3a [10469] Rename some opcode handler to better follow used naming style 2010-09-11 14:38:22 +04:00
VladimirMangos
45cdc67f58 [10338] Create Map version for GetPlayer/GetUnit fucntions
* This let make map local way access for cases when player/all units
  expected to be at same map (for scripts cases for example).
  Ofc, still exist many places where code expect world wide player search.
  Spell casting for support far target cases, groups/guilds/chat/etc packets

* Function Unit::GetUnit depricated and will removed soon.
* Function GetCreatureOrPetOrVehicle renamed to less horriable GetAnyTypeCreature name.
2010-08-10 23:22:11 +04:00
VladimirMangos
07a931e141 [10074] Add IsPassive(SpellEntry*) function and use in cases wjern entry already known.
Some other small code cleanups
2010-06-18 02:17:51 +04:00
VladimirMangos
492f467bcc [10068] Fixes in pet movments
* Use proper stop packet as expected. In case 0 trevel time used before move packet
  can generate infinity move forward (at client side).
* Avoid reset top movegen before add idle in pet stay command.
* Avoid assign random move to player owned creatures as default movegen.
* Finish follow movegen init including need-stay case.
2010-06-17 02:46:39 +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
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
ff8d494ed4 [9408] Add MAX_EFFECT_INDEX to enum SpellEffectIndex and use it. 2010-02-18 23:33:16 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
VladimirMangos
6a2e8064f1 [9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
2010-01-18 11:59:10 +03:00
tomrus88
a8b04f09e0 Compile fix. 2010-01-09 21:47:16 +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
Lightguard
9c98bd92e2 [9077] Fixes for pet work in case mounted owner.
* No unsummon temporary pet at non-fly mounting.
* Implement client side disable pet's action bar for mountted owner time

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

* implement server side action disabled case (action bar modify, aggro reaction and autocast)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-28 16:00:55 +03:00
Arthorius
41b0b88674 [9009] More fixes in pet action bar buttons swap.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-16 23:18:10 +03:00
Arthorius
4e55757a94 [8987] Allow swap spell and command/reaction in pet action bar.
* Also prevent command/action drop from action bar
* Pet action bar will recetn at this revision use single time for all pets.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-13 23:04:12 +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
VladimirMangos
d7ae5e3af0 [8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
2009-10-24 01:16:40 +04: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
SilverIce
023b13f348 [8627] Avoid not needed too oftent send update data, cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-11 19:31:57 +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
VladimirMangos
715470a898 [8126] Improvemets in player/pet/charter name checks.
* Implement new config options for minimal player/pet/charter name length (2 by default)
* Better error reporting at problems in names.
* Add check from max pet/charter name length (same as for player names at client side)
2009-07-05 20:30:33 +04:00
Ambal
9f938a9ed4 [8103] More wide use IsInWorld checks and delayed at teleport operations.
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-01 14:00:29 +04:00
VladimirMangos
1baec77845 [8098] Support uint32 spell ids in code.
* Propertly work with uint32 spell ids in player action bar
* Fix in same time bug with not save equipment set button with id==0
* Merge misc field in character_action and playercreateinfo_action to action field as 3 byte
* Propertly load uint32 spell ids from character_spell
* Fixed types for some pet/creature related structure for spell id storing.
2009-06-30 11:25:32 +04:00
XTZGZoReX
9b9fe55981 [8056] Move SMSG_CLEAR_COOLDOWN into function and use it. Other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-21 03:07:54 +04:00
VladimirMangos
05b1bda879 Merge commit 'origin/master' into 310 2009-06-09 09:51:34 +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
tomrus88
cae3f0a532 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
2009-05-31 12:16:25 +04:00
VladimirMangos
2a27a44e2a [7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
  I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
  Please always use UI64LIT(0x00001) instead less portable 0x00001LL
2009-05-30 22:44:20 +04:00