Commit graph

660 commits

Author SHA1 Message Date
VladimirMangos
fe1fae46ee [8830] Restore build at *nix. Make MAKE_PAIR* users includes explicit.
Comment for recently added field also.
2009-11-18 23:57:20 +03:00
VladimirMangos
37ba6623bb [8828] Independent instance reset time for different difficulties.
* Store reset time for map/difficulty pairs.
* Use DBC data for reset time and max players instead `instance_template` fields (dropped)
  for each existed map/difficulty pair.
* Fix some "heroic" related checks in spells/etc.
2009-11-18 10:08:41 +03:00
balrok
35d64c8d62 [8819] remove objects if unit leaves map
prior this - the objects were only removed when
unit itself gots removed
this fix some crashes with Object::SetUint64

thx to juansalvador and vladimir :)
2009-11-15 20:03:12 +01:00
balrok
c3c7ab2f63 [8816] call uncharm for all units at delete
currently it was only done for players - but units
also can have charms which must be removed
2009-11-14 19:11:04 +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
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
balrok
84573285db [8760] fixed invisibleForAlive visibility-checks
those creatures shouldn't see alive creatures - else
it would be very unfair ;)

now it's also possible that they can fight against each other

this fixes the bug, that those creatures attacked living players
2009-11-01 21:01:13 +01:00
darkstalker
aa4524852e [8748] Reflect by reflection shields only reflectable damage.
Not reflect self/environment damage cass, and not reflectable spells.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-29 05:16:54 +03:00
VladimirMangos
1b6176396e [8747] Implement player's pet resilience, also fix DoT case. 2009-10-29 04:34:57 +03:00
VladimirMangos
15ab6794d3 [8742] Avoid aura remove triggered casts and packets send at logout/delete
This is must speedup logout and solve some crash cases or unexpected effects.

Also fix some nonsense code with memory lost possibility.
2009-10-27 04:20:11 +03:00
VladimirMangos
ce3d0170f6 [8729] Fix crash added in [8725]. Sorry. 2009-10-25 03:25:02 +03:00
ApoC
f451298784 [8722] Fixed possible creash.
Crash may happen if you try summon pet by spell and certain NPC is not in
your DB (than CreatureInfo* is NULL).

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-24 14:01:48 +02: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
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