Commit graph

957 commits

Author SHA1 Message Date
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
e3d7b114c6 [10514] New option PetUnsummonAtMount
Make possible disable pet unsummon for non-fly mounts (1.x way work)
2010-09-22 07:40:39 +04:00
VladimirMangos
b0edd807d7 [10513] Clear grid *Check/*Searcher clases use
* Check class considered have all info select  object in world from suggested but grid walker list in some grid.
  This also meaning that Check must always have focus object around that (and in same phase) fit objects must be.
* Searcher only must ask Check and know how from all objects fiting to Check select result object(s).

For this reason and for better compatibility removed first arg (searcher) form all Searcher classes.
Instead expected used Check::GetFocusObject() object if need ( by always need check and simolify Check classes
phase checked in Search classes). This also restore source code compatibilty in related lines with prev.client
version branches code.

* While focus object adding fixed possible wrong phase object selection at stealth detection and at corpse searches.
2010-09-22 06:25:21 +04:00
VladimirMangos
14a240361d [10511] Fixed SPELL_AURA_MOD_COMBAT_RESULT_CHANCE dodge chance apply to auto-attacks result. 2010-09-20 14:20:34 +04:00
Lynx3d
47397ff19b [10509] Fix some "foo initialized after bar" gcc warnings and remove some unused variables. 2010-09-20 10:07:25 +02:00
Chipleo
e766102457 [10504] Prevent damage player in sanctuary by pet or other controlled unit.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-19 02:24:04 +04:00
Laise
abbf4f5331 [10486] Use casterGUID check for delaying holder since possible stacking same spell from different casters 2010-09-15 11:36:04 +02:00
darkstalker
63cdd66bcb [10485] Check school mask for SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE
* Some spells expect this.
* Check SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE just for similarity,
  currently no spels with aura 310 with special school masks.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-15 03:17:38 +04:00
darkstalker
919dc87bac [10479] Implement heak absorb for periodic heal
Also fix SMSG_PERIODICAURALOG for periodic heal for 3.5.5

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-13 03:10:10 +04:00
Laise
b91f914dbc [10476] Fix 31228 and ranks 2010-09-12 16:52:26 +02:00
VladimirMangos
84a915e1b1 [10475] Implement SPELL_AURA_HEAL_ABSORB (301)
Used for example in spells 66237 and 70659.

Also rename CalculateAbsorbAndResist -> CalculateDamageAbsorbAndResist
2010-09-12 02:45:26 +04:00
LordJZ
31ea979c7c [10473] Fix structure SMSG_SPELLHEALLOG for 3.5.5
This also fix proper show critical heals

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-12 01:27:57 +04:00
VladimirMangos
8eb47efddc [10472] Implement SPELL_AURA_MOD_PET_AOE_DAMAGE_AVOIDANCE (310)
Original patch provided by rsa
2010-09-12 00:20:35 +04:00
VladimirMangos
d334f9fab8 [10460] Fixed unexpected area aura stacking from same caster at spellmods reapply.
In fact it general problem possible with area auras if it re-casted
non-standard way from code. But known only test case for mangos-0.12 branch.

Thanks to ciphercom for reportand original research of problem source.
2010-09-09 23:34:56 +04:00
NoFantasy
334398b3f7 [10458] Changes to corpse decay/respawn times for creatures
*CORPSE_DECAY values adjusted (Rare/RareElite values are guessed) with more proper.
*RATE_CORPSE_DECAY_LOOTED is now 0.0 as default and a modifier of the creatures spawntimesecs are used for corpse decay.

Respawn time for creature is now set at death (result: database spawntimesecs are in most cases the time it takes from kill to respawn)

Overall, this will affect four things:
* corpse will stay visible longer before looted
* corpse will stay visible longer after looted, when creature has long respawn time
* creature without loot will "skip" the default decay times and then fix a "should respawn almost instant" -problem
* creature with loot and very short respawn time may respawn instantly after looted

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-09 11:58:53 +02:00
Laise
0cb6f7be0c [10453] Fix disease consume part of 49020 and ranks 2010-09-08 10:47:41 +03:00
Lynx3d
ddc42c5491 [10447] Certain compilers refuse to erase const_iterator... 2010-09-05 11:26:12 +02:00
VladimirMangos
425375687c [10446] Small fix for single target auras: remove caster only auras
Avoid remove different caster aura if target have similar diff caster auras
in case when auras from diff casters allowed for spell.
2010-09-05 08:54:03 +04:00
VladimirMangos
dfc9966d3b [10445] Re-implement in more safe way single cast spell targets system.
It also fix case when target can unexpected lost single target aura at phase switch
in case when target still visible in new phase (pet for example)
2010-09-05 07:47:45 +04:00
Warlord123
b5ed6938ad [10441] Fix 64962 bonus for 47541 and ranks
Signed-off-by: Laise <fenrisse@gmail.com>
2010-09-04 16:28:08 +03:00
VladimirMangos
acd0716297 [10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.

In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
2010-09-02 05:13:16 +04:00
NoFantasy
32e3e252fb [10431] Correcting issues with flying creatures falling to ground at death.
Simplified the way FallGround works and death states are set in a more logical way when a mob is in fact DEAD_FALLING.
Visual will in some cases not be correct. Notes in code for details.

Thanks to Lynx fixing Map::GetHeight
It now return mapHeight as last resort, making FallGround work as expected.
This fix reveal one (known) bug, and therefore a temp hack is added in TargetedMovegen, to be sure Z is not the ground Z for a creature that are able to fly.
Other creatures will follow by the ground level Z (in other words, they will no longer follow in the air).
2010-09-01 00:31:31 +02:00
NoFantasy
9700d481fa [10421] Correct typo in function name.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-29 12:24:21 +02:00
rsa
7f9208426a [10408] Fix mistake in recent debug log output change (ref 10395)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-25 00:25:34 +02:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
NoFantasy
ddfc6386c5 [10395] No debug log output when a certain ability is active
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-21 18:12:45 +02:00
NoFantasy
c252ca5bc4 [10394] Remove redundant use of this-> in recent implemented script calls
Thanks porteyoplait for pointing it out /bonk author

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-21 16:37:42 +02:00
VladimirMangos
9d76725a0e [10391] Restore build at Unix after Unit::GetUnit drop. 2010-08-20 23:44:01 +04:00
NoFantasy
9c02f476ec [10390] Add several new script calls for InstanceData
OnCreature Evade/Death/EnterCombat and in addition OnPlayerLeave
The functions are intended to help doing instance related tasks (in other words, not for the general AI of creatures).

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-20 20:26:06 +02:00
VladimirMangos
77ae9a63b8 [10385] Remove Unit::GetUnit and update it callers. 2010-08-20 16:53:45 +04:00
VladimirMangos
dbe9c6f190 [10371] More wide use ObjectGuid in group code.
Also drop some unused functions.
And fix some uint32 -> uint6 guid assigns.
2010-08-18 13:43:55 +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
VladimirMangos
085811fc06 [10336] Server side checks for casting non-combat spells in combat.
Interrupt casting non combat spell spell at neter to combat
and prevent it casting in combat (last checked by client
but better recheck at server for prevent cheating).
2010-08-10 02:01:08 +04:00
VladimirMangos
bfb1cb9e67 [10319] Prevent double remove aura holder at stacking limit.
If aura holder have 2 or 3 auras with fit to aura type stacking limitation
code can attempt deleted old aura holder 2/3 times.
2010-08-04 19:00:41 +04:00
zergtmn
d31ce2e2a3 [10315] Make AuraHolder::IsDeleted() really work.
In fact it has been broken originally when added in Aura long before move it to AuraHolder.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-04 01:36:56 +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
VladimirMangos
4f19017872 [10300] Fixed some strange GetAura arg values. 2010-07-31 21:46:24 +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
ed737c55cd [10287] Fixed crash in result double deleting auras in some cases.
Pre-aura holder code always remove auras from diff lists before un-apply aura affect call.
Restore this way work for new aura holder code. This prevent different strange affects
when aura find by search when it already expected to be removed from target, including case when in
result som un-apply called code aura deleted 2 times.
2010-07-30 05:00:59 +04:00
Laise
0faa1185ae [10268] If schoolMask present for proc, ignore SpellFamilyFlags check 2010-07-25 07:31:25 +03:00
Laise
dbf2d02762 [10255] Fix aura remove in Unit:: _UpdateSpells 2010-07-24 12:56:42 +03:00
Lynx3d
6c6ce87867 [10253] Small cleanup in Unit::HasAura() to prevent redundant upper_bound calls. 2010-07-23 23:15:13 +02:00
Laise
02532a469a [10249] Don't interrupt area effects for channeled spells from target side 2010-07-23 09:22:05 +03:00
Laise
30a0701ca9 [10241] Fix expired spell interrupt 2010-07-21 13:01:59 +03:00
Laise
3e326311ad [10240] Fix some spells proc from spells that don't deal damage/heal 2010-07-21 08:16:23 +03:00
Laise
d8c1374fcd [10232] Fix mechanic-related check, thanks to VladimirMangos 2010-07-20 13:20:35 +03:00
Laise
c384650af8 [10218] Restore trinket procs when no specific spell is defined for proc 2010-07-18 18:53:46 +03:00
zergtmn
5c6fbdb54e [10212] Fix iterator update in Unit::RemoveNotOwnSingleTargetAuras
Signed-off-by: Laise <fenrisse@gmail.com>
2010-07-17 21:36:53 +03:00
Laise
f37c73e255 [10211] Fix aura procs for spells with auras that can't trigger 2010-07-17 21:32:05 +03:00
Lynx3d
01d326b90d [10202] Rename isInFlight() to IsTaxiFlying() and UNIT_STAT_IN_FLIGHT to UNIT_STAT_TAXI_FLIGHT.
Also add IsFreeFlying() function to Player class.
2010-07-17 02:06:28 +02:00