Commit graph

924 commits

Author SHA1 Message Date
VladimirMangos
0564b622c2 [11510] Implement SPELL_AURA_MOD_PARRY_FROM_BEHIND_PERCENT (288) and related spell 19263.
Original patchs provided by KAPATEJIb and Roshnak.
2011-05-19 03:50:30 +04:00
VladimirMangos
6237c115a5 [11495] Implement damage taken reduce part of spell 20911, 25899. 2011-05-16 20:47:14 +04:00
zergtmn
d001ce2d2e [11493] Add comment for prev. commit 2011-05-16 02:28:57 +06:00
zergtmn
05cfb8d36b [11492] Fix possible crash at guardian pet unsummon 2011-05-16 01:59:04 +06:00
VladimirMangos
249fb836ca [11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
2011-05-15 22:04:57 +04:00
VladimirMangos
719e298795 [11470] Final cleanup uint64 guid cases
Also drop logout player update fields cleanup that in any cases not saved.
2011-05-11 21:36:27 +04:00
VladimirMangos
ef6a48fe03 [11465] non-ObjectGuid guids in random places.
Only ChannelMgr code wide use uint64 guids now, and Map object stores.
2011-05-10 21:27:49 +04:00
VladimirMangos
31c34a940d [11462] Missing ObjectGuids in spell code. 2011-05-10 13:05:39 +04:00
VladimirMangos
44f2c26389 [11459] More ObjectGuid using in Aura/SpellAuraHolder code.
Also fix build in PetAI code. Thanks to rsa for fix code.
2011-05-09 23:17:39 +04:00
VladimirMangos
06ba42ccba [11435] Fixed IsPositiveEffect triggered spell case and some cleanups
Mostly found in time 400 update.
2011-05-08 01:43:02 +04:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
darkstalker
070af93262 [11365] Implement SPELL_ATTR_EX3_CANT_MISS attribute. Should fix alot of 'too-often-missing' spells 2011-04-16 10:23:48 +03:00
VladimirMangos
6f34696350 [11332] Avoid use direct mechanic names in loop bounds for version portability. 2011-04-11 23:57:52 +04:00
rsa
cd32dd9bfc [11330] Use ObjectGuid to store Totem guids instead of uint64 and fix related rare crash.
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-04-11 22:45:32 +03:00
NoFantasy
889ce13264 [11316] Implement a basic system to restore default faction for creatures after changes
A new specialized function SetFactionTemporary for creatures are added. It work just like setFaction but has in addition option to set flags.
The flags determine if default faction should be restored and when; most commonly just before respawn and when reaching home after evade.

SCRIPT_COMMAND_SET_FACTION for DB scripts and ACTION_T_SET_FACTION for creature_ai_scripts are now capable of using the system (documentation updated)

The intention of the system is to be able to solve basic events that include faction changes, with the use of database only and in easier ways.

It is advised that DB devs revise current database scripts to check if changes should be made. The same goes for EventAI devs regarding ACTION_T_SET_FACTION.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-05 15:04:39 +02:00
VladimirMangos
1fea8a321f [11304] Restore school check for weapon in SPELL_AURA_MOD_DAMAGE_*DONE
Broken in [10692].
2011-04-01 22:03:49 +04:00
zergtmn
4687fa8cb4 [11299] Handle aura durations in SpellAuraHolder
- Unit::CalculateSpellDuration split into two functions
    - CalculateSpellDuration taking into account combo points and caster-side spell mods
    - Unit::CalculateAuraDuration taking into account target-side spell mods
- Diminishing is now applied before duration reduction mods
- Implement saving per-effect periodic timers to DB (required for auras affected by haste)
2011-03-30 23:29:01 +06:00
VladimirMangos
989d229968 [11288] Check IsPositiveEffect in IsPositiveSpell only for existed effects.
Thanks to NoFantasy for problem research.

Also make IsPositiveEffect use SpellEntry* arg instead spell id.
2011-03-26 03:10:26 +03:00
zergtmn
0bc4bc1d75 [11282] Use uint32 datatype for aura charges and stacks
* Some spells have StackAmount > 255, for example 22735, 54314
* In SMSG_AURA_UPDATE maximum stack amount is limited by 255
* Move duplicate code into SpellAuraHolder::BuildUpdatePacket function
* Cleanup some weird type casts in _LoadAuras
2011-03-25 14:40:09 +05:00
VladimirMangos
06fe777f82 [11215] Replace direct code use in .npc tame by spell cast.
Only work different from old way: target creature despawned.
So if this not expected use .respawn to it in gm mode or area respawn.

Code simplification suggested originally by rsa.
2011-03-03 21:33:47 +03:00
VladimirMangos
f1899e3b27 [11206] Move visibility self/around to new function and use it.
* Fixed wrong visibility changes in some cases at .mod phase uses.
* Apply phase change to any owned units (not only pets as before).
  It also will applied in more safe way for avoid unexpected lost owner at update.
* Check view point setting auras targets accessability not only at visibility change
  but also at phase change.
* Replace SetVisibility(GetVisibility()) hack like calls.
2011-02-27 19:23:05 +03:00
SilverIce
fcc09483ad [11202] Schedule AI notify at adding to world
This fixes the problem, that creatures, added at grid loading, do not start attack each other
More shedule -> schedule fixes added, removed unused Map::PlayerRelocationNotify function
2011-02-23 17:04:54 +02:00
kbz
09c5b49cc4 [11194] Fix the word shedule -> schedule in function name
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-02-22 03:53:29 +02:00
SilverIce
724092d9e5 [11193] Optimize visibility update and AI notification code. Optimization decreases amount of visibility and AI notification operations in 8-10 times, and as a result, lowers CPU usage by 30-40%
You need to update your config file, new "Visibility.RelocationLowerLimit" and "Visibility.AIRelocationNotifyDelay' options added

Special thanks to Ambal for code hints and advices
Thanks to Undergarun and kero99 for making tests
2011-02-22 02:37:08 +02:00
SilverIce
d597ffe10e [11183] Use map type dependent visibility distance for gameobject, dynamicobject and corpse visibility checks
Also drop no more needed Visibility.Distance.Object config option
2011-02-18 02:09:47 +02:00
SilverIce
76ea11489d [11156] Update speed for controlled units in any case, does not matter if owner's speed was really changed or not
Also remove static attribute from my prev. commit, thanks to vladimir
2011-02-12 22:40:46 +02:00
SilverIce
4aa3361f51 [11149] Correct MSG_MOVE_SET_*_SPEED packet structures
Also update movementInfo ms time to actual server side time(need keep it updated at sending always)
2011-02-12 17:11:06 +02:00
VladimirMangos
108feb993d [11127] Rename src/game/InstanceSaveMgr.* -> src/game/MapPersistentStateMgr.* 2011-02-10 05:35:07 +03:00
VladimirMangos
dde16bc48c [11126] Rewrite InstanceSaveMgr related code.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
  This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.

* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
   - MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
   - DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
   - BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())

   Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.

* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
  return DungeonPersistentState (same pointer in fact with proper subcalss type)

* InstanceResetScheduler renamed to DungeonResetScheduler
2011-02-10 05:20:56 +03:00
VladimirMangos
6cfa64db97 [11123] Move respawn data to InstanceSave.
This make prev commit more useful.
In future InstanceSave also planned store local pools state.
2011-02-09 06:09:32 +03:00
Schmoozerd
8e68d1bcaf [11105] Melee attacks distance
Inspired by patch provided by Feanordev.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-03 01:25:32 +03:00
VladimirMangos
06cebecd50 [11100] Avoid send SMSG_DISMOUNT for non aura source mount state.
This fix problem with lost mount show at multi-node taxi path.

Thanks to blueboy for research problem.
2011-02-02 17:33:19 +03:00
zergtmn
ad64af1fdb [11094] Fix some C6246 warnings 2011-02-01 23:15:04 +05:00
Schmoozerd
5951d77a0d [11069] Set aggro for player controlled units only at zone aggro.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-25 14:13:08 +03:00
breakwater
d5b982cbbe [11065] Implement stun absorb part of spell 24858
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-24 23:07:39 +03:00
zergtmn
9bc37afa28 [11044] Make EffectDistract implementation less hacky 2011-01-19 23:13:19 +05:00
Darkknight900
d12fa5b8ac [11035] Implement some spell duration glyphs work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-18 15:57:07 +03:00
Schmoozerd
54cb8f1a63 [11032] Implement CREATURE_FLAG_EXTRA_AGGRO_ZONE.
This let control zone wide aggro in DB data instead
need special script code.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-18 13:48:46 +03:00
x3n
d35be7f4c1 [11023] Implement support for threat multiplier and AP based threat bonus for spells.
* Higher ranks are now automatically filled when not listed in spell_threat
* Added some loading checks to detect inconsistent data

Signed-off-by: Lynx3d <lynx3d@some-imaginary-isp.org>
2011-01-17 12:55:24 +01:00
NoFantasy
d38539f12a [11000] Minor code style changes for readability in aggro related unit functions
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-11 15:03:00 +01:00
VladimirMangos
b7f4a41fcd [10998] Re-write work proc of stackable spells with charges in more simple way
Some spells have procCharges > 0 and in same time maxStack > 1. It's support has been implemented more year ago
but current way work with single aura from stack remove at proc always made some spells work wrongly
(7 spells (with ranks) in 3.3.5a). In fact only 3 spell (with ranks) need this "one from stack" way and
all form its have similarity: Its apply max stack from start and decrease stacks at proc hit.
Another prove for correctness this way: in 2.x exist single spell with charges and maxstack that expect full aura stack remove.

So implemented opposition way: normal aura proc remove always full aura holder stack.
Special 3 cases have overwrite code for work with stack in correct for its way.

Fixed work:

* items 31857 and 50259
* recipe 46027 effects.
* talent 63730 and ranks

Affected by code changes talents 51528 and 55166 tested and work.

Spell 34026 use similar decrease stack at hit but req. independent patch for full implemention, so not work.
2011-01-11 05:15:51 +03:00
VladimirMangos
2d2b17dd3a [10995] Not do redundent unlock aura holder at each proccessed spell proc handler.
Aura holder unlock called later by code.
This prevent unexpected real aura delete at early effect aura proccessing
and crash at next effect aura proccessing.
2011-01-10 13:50:49 +03:00
VladimirMangos
6e241689e7 [10987] Prevent deleting reflect source aura ebfore reflected spell cast. 2011-01-09 00:53:05 +03:00
Pat S
46fdc3af97 [10979] Add extra ghost speed rate for BGs: Death.Ghost.RunSpeed.Battleground
Also recently added option renamed to Death.Ghost.RunSpeed.World

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-07 07:46:41 +03:00
Pat S
af50b352b2 [10977] Add ghost speed rate in config: Death.Ghost.RunSpeed.
Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-07 06:45:25 +03:00
NoFantasy
514a66fd67 [10963] Rename UNIT_STAND_STATE_SUBMERGED to more generic *_CUSTOM
Visual appearance depend on model animation capability.
In addition, change stand state for creature at enter combat when creature has custom stand state.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-05 00:13:27 +01:00
VladimirMangos
3a99027a80 [10960] Send SMSG_DISMOUNT to client.
As know no any affect in work from it.
2011-01-04 21:55:58 +03:00
NoFantasy
b3076146fc [10958] Rename function to CanUseEquippedWeapon
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-04 10:29:04 +01:00
QAston
4fe41fb335 [10957] Implement auras SPELL_AURA_MOD_DISARM_OFFHAND (254) and SPELL_AURA_MOD_DISARM_RANGED (278).
Thanks to Qsa prepare for mangos.

Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-04 06:42:35 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00