Commit graph

498 commits

Author SHA1 Message Date
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
AlexDereka
f286a2e64e [8715] Fixed possible crashes and some typos 2009-10-23 17:09:51 +04:00
Corfen
2588cdabfc [8713] Moved calculation of absorbed damage amount into Unit::HandleProcTriggerSpell for spell 62606.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-23 00:33:06 +02:00
ApoC
86a6c952b8 [8712] Fixed commit [8708]
* Now final damage counted also with spell bonus.

Thanks Corfen for pointing this out.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-22 21:56:42 +02:00
Tassader2
53b6d28a24 [8709] Show spell miss as miss, not resist
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-22 14:20:31 +02:00
balrok
97c94cff56 fixed problems with isInvisbleForAlive
removed redundant check at MoveInLos
this check is already done in istargetableForAttack
thx to NoFantasy

fixed in isVisibleForOrDetect that isInvisbleForAlive
wasn't checked.. and therefore all spiritserviceprovider
got visible
thx to NetSky
2009-10-21 20:00:07 +02:00
balrok
fcf854c0bb [8694] GMs should see units with "invisibleForAlive()" 2009-10-21 00:07:11 +02:00
Corfen
86b60901bf [8693] Fixed glyph 45785
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-20 23:54:34 +02:00
balrok
20e8982075 [8690] added unit auraFlag variable
this can be used for faster checking if an unit has a specific
aura applied..
also implemented the alive-invisible auras now with this way
2009-10-20 23:37:31 +02:00
balrok
46389e4e1c [8689] implement function Unit::isInvisibleForAlive
with that i've implemented all known auras which makes
units invisible for alive.. but that's currently quite hacky
i think best would be if we could set a unit-flag after those auras
getting applied
2009-10-20 23:37:21 +02:00
balrok
e990d5c509 [8688] proper implementation of creatures ghost-flags
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5)
the new flag is from wdb-files so your database should be
already alright

also i've dropped the function Player::CanInteractWithNPCs
cause it was used only in one place and didn't seem to make anything
easier

NOTE for this flag:
it just means that the creature can be seen by ghost-players
too..
so they are still visible for alive players.. unless a special
aura or ther unitflag (spiritguide/healer) disables this..
(see next commit for it)
2009-10-20 23:34:13 +02:00
reeshack
efe057112d [8684] Typos in code for talent 30675 and ranks affect at spell 421 ranks 7 & 8 casting.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-20 18:37:16 +04:00
balrok
a2ff999fd3 [8676] implemented dead-visible creature flags_extra
with this flag you can specify a creature to be only
visible for dead players - this removes all hacks from
spiritguides/spirithealers from code and allows some other
special creatures

i decided to not implement an extra deathstate cause
actualy those creatures are almost equal to living ones
2009-10-18 21:28:36 +02:00
pasdVn
906b2784a2 [8670] Apply SPELL_AURA_MOD_EXPERTISE in related hit chance calculations for creatures
(backported from commit 315a1cd)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-18 18:28:12 +04:00
VladimirMangos
9a9ecddea3 [8663] Implement aura SPELL_AURA_MOD_ATTACKER_SPELL_CRIT_DAMAGE (205) 2009-10-18 06:21:04 +04:00
VladimirMangos
0a65c6218c [8662] Typo fixes in aura names. 2009-10-18 05:25:19 +04:00
VladimirMangos
2e884f4228 [8661] Fixes and improvments in absorb/reduction damage ignore auras work.
* Use stored in aura amount percent damage ignore for auras SPELL_AURA_MOD_IGNORE_ABSORB_FOR_SPELL
* Implement apply percent damage ignore for absorb (SPELL_AURA_MOD_IGNORE_ABSORB_SCHOOL (194))
  and redunction (SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL (269)).
  Later need recheck what from this 2 auras applied to armor reduction
  (currently 269 used only in single spell and this spell is single affecting armor
  and single normal school damage applied with 194 aura)
  Also unclear is this must applied to DoTs, expected that not need.
* Implement talent 53375 boots for spell 31884.
2009-10-18 05:02:33 +04:00
VladimirMangos
9fd87a644b [8659] Restore less restcricted call format for Unit::AddThreat
Mostly for scripting use, core cases already fixed anyway.
2009-10-17 12:39:26 +04:00
VladimirMangos
b258a17ba4 [8658] Threat calculation fixes and improvements.
* Add single arg version Unit::AddThreat for just adding to threat list.
* Req. provide schollmask and crit flag for any real threat value for proper threats mod apply.
* Send crit flag in DealDamage as MELEE_HIT_CRIT for spell damage for later send to threat call.
* For not affected by modifiers threat values use SPELL_SCHOOL_MASK_NONE.
* Implement aura SPELL_AURA_MOD_CRITICAL_THREAT (used only in itemset 529 effect).
2009-10-17 11:02:30 +04:00
ApoC
45c9c136ba [8653] Implemented per map guids store.
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.

For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-17 00:12:31 +02:00
VladimirMangos
a4d61a6988 [8649] Implement SPELL_AURA_MECHANIC_IMMUNITY_MASK (147) and related cleanups.
* Always use machanic masks in form (1 << (mech-1)), fix all cases.
* Imppement SPELL_AURA_MECHANIC_IMMUNITY_MASK (mostly boss/elite spells).

Note: db stored mechannic masks already stored in proper format so not affected.
2009-10-15 20:53:01 +04:00
NoFantasy
65965bc5fa [8642] Replace the Spanish word 'hostil' with the English one.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-14 12:46:10 +02:00
VladimirMangos
ec2fd7396f [8639] Fixed tabs and trailing whitespaces. 2009-10-14 11:46:09 +04:00
pasdVn
c47cf7bd61 [8635] Rewrote bonus damage claculation
* calculation depends on the damageClass now
  ->SPELL_DAMAGE_CLASS_RANGED & SPELL_DAMAGE_CLASS_MELEE use MeleeDamageBonus()
  ->SPELL_DAMAGE_CLASS_MAGIC & SPELL_DAMAGE_CLASS_RANGED use SpellDamageBonus()
* changes/improvements in MeleeDamageBonus:
  -> improved criterions to apply bonuses
  -> implemented scaling of FLAT damage Bonus for non weapon damage based spells
  -> support of DOT's
  -> added pet's bonus damage for non weapon based spells
* general cleanup in CalculateSpellDamage() and MeleeDamageBonus()
* implemented global helper functions GetWeaponAttackType() and GetAuraTicks() in SpellMgr

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 00:33:24 +02:00
balrok
01318dbc8c [8629] don't let eventaicreatures cast spells in stuns etc.
also small correction to feign death (unit could still turn around
to face his victim with this aura)
2009-10-11 22:42:07 +02:00
balrok
02d45b4b54 [8625] feign_death cleanups
use an extra function for setfeigndeath()
like it's done with setfeared already..
allow to apply feigndeath on creatures too
avoid moving of creatures with feign death applied
and start attacking last victim when feigndeath disappears
2009-10-11 14:22:52 +02:00
NoFantasy
45a2ee21ef [8623] Add function to update orientation of unit (for both server and client)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-11 11:32:47 +02:00
NoFantasy
732bcfbbb6 [8622] Add own function to send AI_Reaction packet.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-11 00:01:49 +02:00
GalaxyMan
545218fda3 [8618] Implement glyph 42752
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also fix typo in mangos.sql.
2009-10-10 17:26:37 +04:00
Lutik
ddb67f69ca [8617] Update resilience affect for 3.2.x
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-10 14:55:58 +04:00
balrok
45f6a474bf [8608] implement BattleGround Alterac Valley
sql won't be included - please look at your database
providers forum

also note, that creature_loot_template id 0
is used for the loot of dead players in this bg
(after a player died and you remove insignia from him..
he not only drops money - he drops some random items too)

further work must be done in better code for adjusting right
levels to creatures - maybe using something similar like it's
done in heroic instances

also quests and creatures needs some scripts in future

thanks to:
netsky - initial start of this patch
bogie - 2nd person writing on this patch
triply, kapatejib, vladimir - code review and suggestions
arrai - for his great tool and help
and all testers / code contributers - I won't write
down a list, else I would forget most probably one ^^
2009-10-09 18:18:22 +02:00
balrok
c999490aa2 [8603] corrected comment of last commit
the problem was in Unit::setFeared
which got called after removing a fearaura

inside setFeared there is a check for isAlive()
which will return true in this case, cause m_deathState
is updated only after RemoveAllAurasOnDeath()

a fix could be to set m_deathState earlier, but
then auras which require a spellcast on remove
won't work anymore..
(not sure if we actualy have such auras)

but if in future more functions will require special code there,
moving the m_deathState setting should be considered

big thx to Naicisum for explanation and investigation
2009-10-09 02:01:16 +02:00
balrok
5a48fe3c96 [8602] update movement packet when unit dies
this avoids, that feared creatures walk away after dead
(happens often if a creature dies in fear)
2009-10-08 18:37:06 +02:00
tomrus88
2964f399c7 Merge commit 'origin/master' into 320 2009-10-03 11:04:30 +04:00
VladimirMangos
8ad4f0f10b Restore spell 53563 work at 3.2.x 2009-10-03 07:17:53 +04:00
VladimirMangos
e167a567d5 [8583] Prevent crash at casting DK spells by non-DK characters. 2009-10-02 21:55:53 +04:00
VladimirMangos
59befa2e0e Merge branch 'master' into 320 2009-10-02 19:09:06 +04:00
VladimirMangos
47bf1dbce6 [8571] Avoid use ^ bitmask operation for bool values compare in general.
Also drop HandleSet32Bit logn unused and wrong coded chat command code.
2009-09-30 19:39:44 +04:00
Wojta
e412e10de1 [8559] Fixed item 42455
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-29 11:03:20 +03:00
tomrus88
546f7a7fe5 Merge commit 'origin/master' into 320
Conflicts:
	src/game/BattleGround.cpp
2009-09-28 19:52:54 +04:00
balrok
2da82a8c68 [8552] implemented spells which can be casted while dead
i added a function IsDeathOnlySpell() which returns true
if this spell can ONLY be casted while dead, so i haven't
implemented all spells which could be cast while dead..
2009-09-28 16:44:49 +02:00
hunuza
23618d66ea Implement DK talent 49471 and ranks.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-27 22:21:11 +02:00
hunuza
302afbc40f Allow weapon procs in druid shapeshifts.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-09-27 12:24:34 +02:00
ApoC
e2556b1825 [8540] Revert "[8538] Fixed spell 63375" due to patch incorrectness.
Revert suggested by Vladimir.

This reverts commit 6217b913c35563f68ea3c414367cd7ac84236b3e.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-26 19:21:52 +04:00
KAPATEJIb
8c276365ba [8538] Fixed spell 63375
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:21:50 +04:00
Maxxie
3c89d50d10 [8530] Correctly restore powers with energize-effect spells like Shadowfiend or Mana Tide Totem
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-26 19:19:57 +04:00
ApoC
eb46131715 [8540] Revert "[8538] Fixed spell 63375" due to patch incorrectness.
Revert suggested by Vladimir.

This reverts commit 6217b913c35563f68ea3c414367cd7ac84236b3e.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-25 23:08:51 +02:00
KAPATEJIb
04e7a553c2 [8538] Fixed spell 63375
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 20:43:27 +03:00
Maxxie
a2d1781ba8 [8530] Correctly restore powers with energize-effect spells like Shadowfiend or Mana Tide Totem
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-25 15:12:18 +03:00
tomrus88
258e19a4a3 Merge commit 'origin/master' into 320 2009-09-22 18:14:06 +04:00