Commit graph

584 commits

Author SHA1 Message Date
ApoC
71e736abc6 [8478] Removed dependency on getMSTime() for last mana use.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-06 01:40:22 +02: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
sixsixnine
63e7c092f1 [8458] Re-implement SPELL_AURA_MOD_TARGET_ARMOR_PCT in more porper way for weapon dependent cases.
(cherry picked from commit 7efab7fd38c3a753e967648ca8ef1f2cdfbac76c)

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

With some fixes and rewrites.
2009-09-04 02:16:17 +04:00
Lutik
ab9b738e54 [8454] Implement aura SPELL_AURA_MOD_TARGET_ARMOR_PCT.
This fix work stance 2457, talent 12284/13709 and ranks, partly talent 61154 and ranks.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-02 18:48:05 +04:00
VladimirMangos
69fbe1e82f [8451] Implement talent 47236 and ranks.
Added changes base at merge of patches suggested by pasdVn and Astellar.
2009-09-02 06:43:00 +04:00
VladimirMangos
c8b717ab7d [8449] Deprecate healing/damage item mods and merge internal data in to spell power.
* Report at loading about deprecated ITEM_MOD_SPELL_HEALING_DONE and ITEM_MOD_SPELL_DAMAGE_DONE
  and drop support code.
* Merge healing/damage base spell bonus fields and function to spell power field/function.
2009-09-01 22:45:56 +04:00
NoFantasy
a9dea03e09 [8443] Implement use of UNIT_FLAG_OOC_NOT_ATTACKABLE for creature.
Creature with this flag will no longer be attackable by other creatures, and if by any reason it enter combat, flag is removed.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-08-31 16:46:19 +02:00
VladimirMangos
16b617c3c3 [8429] Not allow stacking SPELL_AURA_PERIODIC_ENERGIZE from diff casters. 2009-08-27 16:10:43 +04:00
VladimirMangos
fdb2842f60 [8425] Implement SPELL_EFFECT_LEAP_BACK and spell 781
* Move CMSG_MOVE_KNOCK_BACK_ACK (player case) to Unit::KnockBackFrom
* Implement creature case, most at hack way currently :(
  Need information about expected server packet, and possible some disorientation movegen apply at short time.
* In adition of spell 781 implement related creature versions.

* Fixed warnings spawn at reading CMSG_MOVE_KNOCK_BACK_ACK, CMSG_MOVE_HOVER_ACK, CMSG_MOVE_WATER_WALK_ACK.
2009-08-27 05:27:45 +04:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +04: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
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
VladimirMangos
4826a192a0 [8404] Prevent triggering from deleted auras.
This possible at recursive spell event triggering case.
2009-08-22 07:42:59 +04:00
VladimirMangos
9eb5a3eea1 [8394] Fixes for some non-self only positive spells.
* Propertly reject self targeting for pet spell 2947 and ranks, and spell 54646.
* Some related fixes for pet spells with target mode TARGET_SINGLE_FRIEND_2
* Implement original caster bonus part of spell 54646.
2009-08-20 00:26:34 +04:00
Den
055aa46a8f [8392] Implement 47569 and ranks work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-19 07:05:44 +04:00
VladimirMangos
74d27294aa [8381] Some refactoring work in Unit::m_currentSpells code.
* Restrict access, use enum args, move some repeated code parts to function.
* Make m_selfContainer set only part of Unit::SetCurrentCastedSpell
2009-08-18 02:12:56 +04:00
VladimirMangos
a6503ac0a4 [8372] Prevent remove triggered spell auras by later applied parent spell auras. 2009-08-14 18:48:00 +04:00
VladimirMangos
8b2517c7a8 [8367] Fixed build after [8366]. 2009-08-13 23:18:24 +04:00
MeRclLy
83a95a2a5a [8366] Prevent double heal effect casting with triggering talent 31876 and ranks.
Cast only at client casted judgements (and ignore triggered additional affects from seals)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-13 22:37:26 +04:00
VladimirMangos
0bbc496192 [8357] Use less hacky Spell::AddTriggeredSpell call for spell 33076 and ranks jump animation cast 2009-08-12 17:49:37 +04:00
VladimirMangos
74a9624cc3 [8354] Update kill credit for normal creature entry including heroic case. 2009-08-12 14:56:01 +04:00
VladimirMangos
9f6dfa282f [8353] Prevent reporting about wrong stacking in log for spell 33076 and ranks.
Using new delayed aura deleted functionality remove source aura before cast triggred aura.
2009-08-12 05:21:32 +04:00
VladimirMangos
3c297ac8c4 [8340] Implement talent 29447 and ranks.
Original patch provided by raftom.
More compact spell filter code provided by Sarjuuk.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-09 15:02:17 +04:00
XTZGZoReX
5c2ae96e38 [8338] Use expected constant name instead explicit value.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-09 11:01:53 +04:00
VladimirMangos
6b25da27dd [8336] Prevent apply item 34678 damage effect to cast target if it's friendly.
Current combat target or just selection will be used instead if it not friendly.
2009-08-09 10:00:59 +04:00
VladimirMangos
fe4b057dc2 [8334] Small cleanup in magic shield back damage code.
Also misc variable use consistence in aura hander (no any affect expected).
2009-08-09 08:16:20 +04:00
VladimirMangos
c8cc9b28f8 [8329] Implement aura deleting delay in case aura lock as currently used.
* Use counter for aura uses lock for recursivly mark as used in some cases.
* At aura remove add aura to deleting delayed auras list for aura target.
* Remove now unneeded hacks from aura handlers and aura tick code (maybe not all found yet)
* Use new aura delete locking for simplify proc spell event code.
* Prevent apply aura boost spells if aura deleted while adding to target by triggered spells.
* Re-implement aura list updating at auras update for target to better way skip
  removed from aura list auras while auras update.
2009-08-08 11:31:29 +04:00
VladimirMangos
bb2aca5217 [8325] Restore BG spirit guids work after [8308]-1. 2009-08-06 20:09:21 +04:00
NoFantasy
4574d64008 [8323] Check for unitState follow in selectHostilTarget to prevent unexpected enterEvadeMode.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-08-06 10:58:11 +02:00
VladimirMangos
a1973ced28 [8321] For additional atatck target ignore source spell target instaed auto-attack target.
This is fix targets selection in special cases for 13877, 26654 and ranks.
2009-08-06 02:01:17 +04:00
VladimirMangos
dc8bf0f7e7 [8317] Implement 48801 and ranks work as expected in 3.1.x
Original patch writed by QAston.
Original patch prepared to mangos by KAPATEJIb.
2009-08-05 17:53:31 +04:00
hunuza
902a645116 [8313] Fix dk talent 49219 and ranks.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-08-05 09:27:00 +02:00
Nevan
0a534fda64 [8310] Implement item set 73/824 (4) bonus.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-05 01:51:15 +04:00
KAPATEJIb
fc66d2729b [8309] Fixed paladin judgement selection code in some places.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-05 00:52:40 +04:00
VladimirMangos
49b88a14a9 For check allowed in dead state auras apply use IsDeathPersistentSpell instead hack code. 2009-08-04 23:42:45 +04:00
hunuza
6db608d1d3 [8307] Fix skinning for creatures without loot.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-08-04 18:45:01 +02:00
nos4r2zod
39eca7d43a [8298] Use new Aura::HandleSpellSpecificBoosts for apply/remove dependent auras.
This provided more clear place where dependent auras can be applied/removed,
if expected manual apply _with_ aura remove at parent aura expire.
This can be used for more cases.

In current state it implement additional effects for
29836 and ranks, 61846 and ranks, 31869, 53379 and ranks, 20254 and ranks,
20138 an ranks, 48263, and 48265.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-03 02:27:30 +04:00
VladimirMangos
822a34e2c7 [8295] Remove single target auras at caster/target shift to not accessable phase.
This must fix another source of "Couldn't find the caster of the single target aura" errors.
2009-08-02 10:55:41 +04:00
Prince
efa741a5cb [8285] Don't show creatures as lootable that have no loot.
Signed-off-by: hunuza <hunuza@gmail.com>
2009-08-01 10:05:01 +02:00
VladimirMangos
8d7f6e5e0a [8266] Move percent spells with flat energize effect spells to effect code.
* This is fix talent 51521 and ranks.
* And replace hardcoded percent for talent 31876 and ranks.
2009-07-28 16:53:55 +04:00
nos4r2zod
38326edb12 [8260] Fixed energize anount for spell 63375
Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-27 19:44:49 +02:00
Den
110ff906e8 [8253] Some spell proc fixes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 20:33:31 +04:00
nos4r2zod
13b709a10b [8249] Implement support spell_proc_item_enchant table for ppm item enchantments triggering at hit.
* Added a new SQL table, spell_proc_item_enchant, for "custom" ppmRates on Item Enchants that do not use auras.
  With table data this must fix ppm for effect from 8033 and ranks enchanting, and item 6947/10918 and ranks enchanting.

* Implemented SPELLMOD_FREQUENCY_OF_SUCCESS (26).
  That must fix work talent 14113, spell 32645 with ranks, glyph 41094 and item set effect 64917 in frequency part.

Thanks to MaS0n as author alternative patch that partly used in this patch.
Thanks to Thenecromancer as author alternative patch that ideas inspire MaS0n's patch writing and then this patch also.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 04:58:46 +04:00
ApoC
79d49504e0 [8248] Fixed talent 12328
* This one spell belongs to SPELLFAMILY_WARRIOR not GENERIC
  next to IDs are for NPC possible.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-25 16:23:01 +02:00
raftom
0d559180fa [8246] Fixed check for spell 59921 debuf aura (55095) at target for spell 49202 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-25 07:52:01 +04:00
ApoC
6b2b58cec9 [8236] Implemented explicit remove of Aura by pointer to it (used for single cast auras).
* This can prevent removing single cast aura of same id and effect
  but different caster what can cause assert in next code.

Thanks Vladimir for hints.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-23 21:45:13 +02:00
Ambal
fc7871f0a2 [8229] Improve stealth detection code for player case.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-22 12:23:12 +04:00
tomrus88
a0efd034ca [8225] Some fixes from 320 branch.
(backported from commit 4bdcf42)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-21 05:30:58 +04:00
VladimirMangos
36605805b4 [8218] Final part of talent 17962 and ranks fixes.
* Support correct aura state at server set for different casters effects
* Correctly check this telent (per caster) aura state at cast
* Correctly show per-caster aura state for cleitns.
2009-07-20 11:47:59 +04:00
Itch
454b9a06a8 [8207] Allow show combat log for healing done by totems.
(cherry picked from commit 62436f324461648b3b0c3a1a9dee896fc1220343)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-19 08:31:10 +04:00