Commit graph

310 commits

Author SHA1 Message Date
laise
2a189d7275 [9053] Fxied some mage DoTs stacking.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-24 02:37:53 +03:00
VladimirMangos
68c8757127 [9044] Exclude TARGET_SELF from IsExplicitPositiveTarget.
This must fix triggred spells casting in case when it self casted but cast code send diff target.
2009-12-21 16:55:46 +03:00
VladimirMangos
7b0a059d2f [9039] Allow have more one hunter aspect from different casters. 2009-12-21 00:02:54 +03:00
VladimirMangos
15de428242 [9037] Cleanups in spellmode apply code.
* Add constructores for spellmode creating instead explcit fields init
* Use uint32 for family mask 2 instead unneded uint64

Also drop one from manual applies for uno-existed now spell.
2009-12-20 19:47:14 +03:00
VladimirMangos
9e18fc5745 [9035] Attempt make more fast and less hackish spell target checks
* Enable server side recheck clear negative to friend or positive to enemy casts that already checks at client side
* Use more fast way check in similar cases for non-players, and fall back to old way in unclear (for while at least)

Please report if some spell stop propertly casted at friends/enemies.
2009-12-20 03:29:36 +03:00
VladimirMangos
53680ec3b6 [8972] Some hacks to our hackish IsPositiveEffect function.
In attempt improve positive spells detection.
2009-12-11 22:11:08 +03:00
VladimirMangos
5e2c6e6b86 [8969] Ignore in stacking check pure dummy spells.
One more hacks to SpellMgr::IsNoStackSpellDueToSpell
This fix for example 53601 with 20911 stacking.
2009-12-11 15:25:29 +03:00
MrLama
895c84b8b0 [8942] Spells 20911 and 25899 stats bonus.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also stacking rule to prevent log spam.
2009-12-07 22:17:34 +03:00
darkstalker
486c628ce2 [8934] Implement aura PELL_AURA_MOD_MINIMUM_SPEED (305) and it used for FORM_GHOSTWOLF.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-06 23:06:16 +03:00
Sarjuuk
92ec5ace70 [8916] Fixed spell stacking problem for somr sprlls with spell icon 240.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-12-04 05:09:58 +03:00
Sarjuuk
d542e25302 [8892] Implement spell 29166 and glyph 40908.
Original patch provided by bobaz.

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

Also add protection from wrong periodic heal at relogin.
2009-11-29 19:22:22 +03:00
laise
166c4feaca [8847] Implement talent 20335 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also reorder switch cases by case values.
2009-11-20 17:32:16 +03:00
XTZGZoReX
b3f3ffa885 [8793] Don't do operations through singleton if already in singleton context.
* Also, some minor things:
   - Remove duplicate sWorldLog define.
   - Add sRealmList macro for RealmList::Instance().
   - Use sLog macro in scripting log functions.
2009-11-08 19:32:59 +01: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
AlexDereka
f286a2e64e [8715] Fixed possible crashes and some typos 2009-10-23 17:09:51 +04:00
ApoC
58139610eb [8687] Fixes in TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT.
* Removed my too script check on data load.
* Allow looking up fo DB target also if spell has required focus set.
* Makes DB targets optional not required.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-20 23:21:44 +02:00
ApoC
356f1da19b [8674] Fixed mistake in my commit [8657]
I accidentaly put code into wrong switch.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-18 20:18:23 +02:00
ApoC
ba62cdbe8f [8657] Mark spell 44689 as negative.
This allows aura to be counted down in logoff.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-17 00:56:39 +02:00
laise
adcfd1e078 [8650] Allow stacking some paladin spell auras.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-16 06:11:50 +04: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
ApoC
7eb95ed64b [8640] Puted back commented not obsolete but disabled code what i removed in [8637] by mistake.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 10:34:59 +02:00
ApoC
9fd4965299 [8638] For TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT check also if target type in DB is GameObject target.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 03:07:38 +02:00
ApoC
ed0b01c65c [8637] Added special check in load time for TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT, code cleanup.
- Added check for presence of implicit spell focus for TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT
- Avoid double creature lookup in loading code
- Code style cleanup
- Old commented code part removed

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-14 02:38:52 +02: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
VladimirMangos
17b0c43ea9 [8614] Simplify check, drop redundent break. 2009-10-10 11:40:44 +04:00
balrok
4dc1df7d54 [8610] castchecks for recall spell for the av-trinket
this spell should be cast only in battlegrounds
and only after battleground started
2009-10-09 20:48:07 +02:00
balrok
3de0c8f3dd [8558] fixed typo which disabled accidently some spells 2009-09-28 22:59:03 +02:00
balrok
5385b385bc [8551] code cleanup
moved arena/battleground check from spell::checkcast
to SpellMgr::GetSpellAllowedInLocationError

also i adjusted some spell_fail-codes related to battleground
cause a spell_fail_wrong_area always requires the areaid, else it
would output "not in area %s"

then we don't need to check for map->isarena() when player is already in an
arena

----
in Spell.h
i moved "isTargetableForAttack()" to the top - cause it was anyway used
in every case of that switch

and isTargetableForAttack for attack also checks for isAlive
and isInFlight

so this could get simplified
2009-09-28 16:44:37 +02:00
qsa
f6f5b532cc [8544] Implement implicit target type 40, TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT
Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-28 14:58:12 +03:00
nos4r2zod
c361b0dc0b [8509] Some absorb shield aura fixes for specific spells.
* Apply expected healing bonus to spell 53601.
* Allow stacking spell 62600 and 22842 effects at caster.
* Update charges for absorb shield with charges and preopertly expire it at last charge.
  This fix spell 62600 effect remove at next damage.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-19 16:10:10 +04:00
VladimirMangos
610703c14b [8492] Implement talent 53563.
Original patch suggested by Arthorius.
Added data in mangos_spell_check to remember requirement update code for 3.2.x support in future.
2009-09-12 11:04:03 +04:00
pasdVn
70df7c8e91 [8484] Fix priest spell 47585
* Move precast spell and add one more to Aura boosts for proper remove at cancel.
* Check in ispositivespell as positive to allow cancel in client.

(cherry picked from commit 6566ec2bbd3654921446b6522e9800ef835ffffe)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-10 07:31:51 +04:00
VladimirMangos
7a2df3c309 [8476] Revert some recent cleanup changes, some other fixes and cleanups. 2009-09-05 22:09:37 +04:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
VladimirMangos
e59eea4fb5 [8456] Implement area check for SPELL_ATTR_EX6_NOT_IN_RAID_INSTANCE
Base at hunuza reseach.
2009-09-02 23:10:37 +04:00
ksergik
8497b520ce [8448] Fixed loaded spell target position records in log.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-01 16:34:26 +04:00
win
4d413e4a87 [8439] Fixed counting loaded extra spell bonuses.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-29 23:37:02 +04:00
VladimirMangos
5d50bb16b8 [8426] Use upper/lower iterator pairs as result instead 2 function calls. 2009-08-27 10:56:20 +04:00
arrai
43a4d1505e [8424] Added support for strict chatmessage validation 2009-08-27 01:08:21 +02:00
VladimirMangos
9f01551210 [8414] Re-implement [8406] in more clear and working way.
* Rename IsSingleFromSpellSpecificPerCaster to IsSingleFromSpellSpecificPerTargetPerCaster for clear meaning.
* Rename IsSingleFromSpellSpecificRanksPerTarget to IsSingleFromSpellSpecificSpellRanksPerTarget for clear meaning.
* Add new IsSingleFromSpellSpecificPerTarget for case single spell specific aura allowed to be at target from any caster and use it.
  Move some spell psecific checks (mostly sellf casted) from IsSingleFromSpellSpecificPerCaster to new function.
2009-08-24 06:44:15 +04:00
nos4r2zod
89a84127eb [8411] Fixed typos in recent spell stacking related comits.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-23 21:42:15 +04:00
VladimirMangos
f3930cb06f [8406] Detect/check stacking of food/drink/elental shileds as spell specifics.
Food/Drink checks base at nos4r2zod's patch code.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-23 03:33:01 +04:00
nos4r2zod
6c57a01507 [8401] Restore original check as suggested by autor for priest bufs cast
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-21 06:50:34 +04:00
VladimirMangos
6695b1319d [8400] Remove redundent wrong check. 2009-08-21 06:39:40 +04:00
nos4r2zod
e07a0d9652 [8399] Prevent stacking well fed buffs.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-21 06:00:08 +04:00
VladimirMangos
c26c7395a1 [8377] Resolve some spell_area problems in GM and non-GM mode.
* Make spell 40216 and 42016 casted/remove at aura 40214 apply/remove.
  And drop related spell_area possible existed data.
* In general restore apply area limitations to spell casting in GM mode.
2009-08-17 00:40:19 +04:00
VladimirMangos
4b644a57a4 [8374] Implement glyph 43379. 2009-08-16 10:41:26 +04:00
Sarjuuk
fdfc235faa [8363] Implement spell 52610.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-13 19:27:28 +04:00
VladimirMangos
39b2844210 [8359] Make effect from item 20414 positive. 2009-08-12 23:14:54 +04:00
VladimirMangos
99f74411a0 [8346] Avoid aggro at positive spells for non friendly targets.
* Not all positive spell have SPELL_ATTR_EX_NO_INITIAL_AGGRO (for react at assistance).
  Avoid aggro at positive spell without this flag for non frindly target.
* Some cleanups and better checks in IsPositiveEffect.
2009-08-11 01:24:37 +04:00