Commit Graph

740 Commits

Author SHA1 Message Date
ariel-
3ceeffde86 Core/Movement: Corrected all speed checks after 23b6991273
Ref issue #19210
2017-03-03 01:30:15 +01:00
xinef1
62111a8c4a Core/SmartAI: Various fixes and extensions for smart scripts: (#18673)
- Possible crashes fixed
- Memory leak fixed
- Implemented checking of vehicle conditions
- Extended eventphasemask to 12 bits (sql required to change DB field type)
- SMART_EVENT_GOSSIP_HELLO - added possibility to detect for gameobject reportUse call
- Renamed action SMART_ACTION_SET_FLY to SMART_ACTION_SET_DISABLE_GRAVITY (to reflect actual functionality)
- Added targetsLimit to action SMART_ACTION_CAST and SMART_ACTION_INVOKER_CAST to limit max amount of targets (selected randomly)
- Action SMART_ACTION_TALK corrected to always work as intended
- Properly call GroupEventHappens in action SMART_ACTION_CALL_GROUPEVENTHAPPENS if invoker was charmed or owned by the player
- Properly utilize followAngle in action SMART_ACTION_FOLLOW (db orientation should be in degrees), but keep backward compatibility
- Added action SMART_ACTION_SET_CAN_FLY (119) 0/1
- Added action SMART_ACTION_REMOVE_AURAS_BY_TYPE (120) AuraType, can be used to exit vehicle for example
- Added action SMART_ACTION_SET_SIGHT_DIST (121) sightDist
- Added action SMART_ACTION_FLEE (122) fleeTime
- Added action SMART_ACTION_ADD_THREAT (123) +threat, -threat
- Added action SMART_ACTION_LOAD_EQUIPMENT (124) equipmentId
- Added action SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT (125) minId, maxId
- Added action SMART_ACTION_REMOVE_ALL_GAMEOBJECTS (126), removes all owned gameobjects
- Added action SMART_ACTION_STOP_MOTION (127), stopMoving, movementExpired
- Extended target SMART_TARGET_HOSTILE_SECOND_AGGRO with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_LAST_AGGRO with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_RANDOM with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_HOSTILE_RANDOM_NOT_TOP with following parameters maxdist, playerOnly, powerType + 1
- Extended target SMART_TARGET_THREAT_LIST with maxdist
- Extended target SMART_TARGET_OWNER_OR_SUMMONER to be able to get charmer/owner of current owner
- Added new target SMART_TARGET_FARTHEST with maxDist, playerOnly, isInLos restrictions
- Added SpellHit hook to GameObjectAI and extended SmartGameObjectAI to call SMART_EVENT_SPELLHIT when gameobject is hit by spell
- Call GameObjectAI Reset hook on gameobject respawn (for ex. to reset one time events in smart scripts)
- Fixed some logic errors in code
- SmartAI Escorts properly despawn escortee if no players are in range
- Disable Evading while charming creature with SmartAI
- Don't call SMART_EVENT_RESPAWN for dead units before they actually respawn
- Don't call SMART_EVENT_RESPAWN for not spawned gameobjects
- Properly call SMART_EVENT_RESPAWN for gameobject respawn
- Allow action SMART_ACTION_SET_IN_COMBAT_WITH_ZONE to utilize targetlist
- Allow action SMART_ACTION_CALL_FOR_HELP to utilize targetList
- Allow action SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL to utilize targetList
- Allow action SMART_ACTION_SET_VISIBILITY to utilize targetList
- Allow action SMART_ACTION_SET_ACTIVE to utilize targetList
- Allow action SMART_ACTION_ATTACK_START to select random attack target instead of first on the list
- Allow gameobjects to summon gameobjects with action SMART_ACTION_SUMMON_GO
- Properly store action invokers for action SMART_ACTION_WP_START, if no player invokers are found, distance despawn check won't be used
- Allow action SMART_ACTION_WP_RESUME to compensate for the state the unit actually is in (eg. combat)
- Allow action SMART_ACTION_MOVE_TO_POS to select random of the avaiable targets, not only the first one.
- Allow action SMART_ACTION_MOVE_TO_POS to utilize x, y, z parameters as an offset to calculated coordinates
- Action SMART_ACTION_RESPAWN_TARGET should never modify respawntime of already spawned gameobjects, use dedicated function
- Properly delete ontime events created by SMART_ACTION_CREATE_TIMED_EVENT
- If action could not be started because conditions were not satisfied, do not recalculate the waittime to action repeattime, use smaller value to recheck more frequently
- Allow target SMART_TARGET_CLOSEST_PLAYER to be used by gameobjects
- Allow target SMART_TARGET_OWNER_OR_SUMMONER to be used by gameobjects
- Fixed SMART_EVENT_COUNTER_SET to be only called for the id that was incremented
- Changed the way counters work
- Protect PhaseInc from surpassing maximum phase
- Added loading checks for missing NON_REPEATABLE flag if no repeatmin, repeatmax is set
- Added spell validation for SMART_ACTION_CROSS_CAST
2017-02-19 09:10:29 +01:00
Aokromes
0748e7f820 Added some missing SetFallInformation calls
Fixed HP drop bug on zeppelins
Fixed possible packet relocation problems on huge transports
2017-02-17 09:39:09 +01:00
xinef1
6832ce8c32 Core/Spells: Corrected summon category SUMMON_CATEGORY_VEHICLE (#19052) 2017-02-10 05:21:58 +01:00
xinef1
a76da51e7f Core/Spells: Fixed spell effect 93 (SPELL_EFFECT_FORCE_DESELECT) (#19001) 2017-02-05 01:57:59 +01:00
Aokromes
8a63c4919e Core/Packets: updated some contactlist packets
(cherry picked from commit e01bb91)
2017-02-01 02:11:56 +01:00
Aokromes
1d2eeebc63 tabs to space 2017-01-26 17:52:45 +01:00
Aokromes
4a3d10502b Some fixes 2017-01-26 17:39:24 +01:00
Aokromes
c1c8b6098a missing include 2017-01-25 12:56:33 +01:00
Aokromes
4c4c03a074 more missing part 2017-01-24 12:35:47 +01:00
Aokromes
efce128b66 Core/Party: Implement Raid Marker
By ArkCORE
2017-01-24 00:02:29 +01:00
Aokromes
b7432bc39a Compile fix try 2017-01-18 15:09:57 +01:00
Aokromes
719a317a67 Update copyright note for 2017 2017-01-02 07:26:38 +01:00
Aokromes
949ce2d576 Core/Units: Cleanup hardcoded magic numbers for byte field offsets
(cherry picked from commit ac1dc75)
2016-12-16 19:54:22 +01:00
ariel-
eb3a90a4e8 Core/Spell: implemented dispel reflection
Closes #18323
2016-12-16 19:24:01 +01:00
Aokromes
c0ba6c2dfe Core/Auras: Rewritten conditionally applying SPELL_AURA_MOD_WEAPON_CR…
…IT_PERCENT, SPELL_AURA_MOD_DAMAGE_DONE and SPELL_AURA_MOD_DAMAGE_PERCENT_DONE auras

* Now the entire aura is removed when changing equipment
* All aura types can now depend on equipped items
2016-11-27 03:09:29 +01:00
ariel-
bc25bbcd42 Core/Spell: register items received through SPELL_EFFECT_SUMMON_CHANGE_ITEM for quest credit
- Also sends proper SMSG_ITEM_PUSH_RESULT packet

Closes #3505
2016-11-27 01:42:18 +01:00
Aokromes
1659ea03cf Core/GameObject: spawn linked traps at gameobject creation instead of…
… using DB spawns.
2016-11-02 04:01:09 +01:00
Aokromes
065b6fdc2c Core/GameObjects: Handle despawning and respawning of nearby linked t…
…raps on gameobject despawn and respawn
2016-11-02 03:27:25 +01:00
SnapperRy
f28c778788 Core/Spell: allow SPELL_EFFECT_QUEST_COMPLETE to set a quest to rewarded only if that quest is used as internal flag by the server (has flag 1024 - QUEST_FLAGS_TRACKING). 2016-10-24 13:55:33 +02:00
Aokromes
2057e6de4a Core/Items: Defined all item flags
(cherry picked from commit ef29f32)
2016-10-24 13:01:00 +02:00
Krudor
2a607f6ce1 Core/Spells: Effect leap back fix (#18057)
* Fixed unintentional typo?

Seemed to fix the issues related to the effect for the spells I tried.
Sometimes the caster triggers leapback onto targets, and with the old
code, it instead made the caster leap back instead of its targets

(cherry picked from commit 08aab73c7f)
2016-10-24 11:03:23 +02:00
Aokromes
686a9eeef9 Core/Spells: add Target Processing (SMSG_SPELLLOGEXECUTE) to LAUNCH_T…
…ARGET phase.

Move EffectInterruptCast to LAUNCH_TARGET Phase.
2016-10-21 08:23:40 +02:00
Aokromes
57d0a5d16d Revert "Core/Spells: Implementation of QAston proc system"
This reverts commit a70e4e26b3.
2016-10-21 07:27:04 +02:00
Aokromes
a70e4e26b3 Core/Spells: Implementation of QAston proc system
- Move checks from Unit::IsTriggeredAtSpellProcEvent (old system) to Aura::IsProcTriggeredOnEvent (new system)
- Templatize SpellModOp param of Player::ApplySpellMod, also killed charge counter from SpellModifier and Player system for handling charges... no point in having 3 different systems doing the same thing
- Automatically add default entries to spellProcMap, based on spellinfo (else auras won't proc without an entry) Based on old Unit::ProcDamageAndSpellFor
- Old Unit::ProcDamageAndSpellFor renamed to Unit::ProcSkillsAndReactives and made private, will no longer handle auras.
- Start making use of HealInfo::AbsorbHeal in unit calculations, add effective healing info to HealInfo struct
- Changes in spell reflection system, emulates old behaviour, delaying aura drop
- Removed old charge count hacks in SpellMgr::LoadSpellInfoCorrections
- Removed bogus error log when procChance is 0: Some auras have initial 0 procChance but modified by SPELLMOD_CHANCE_OF_SUCCESS
- Fixed TriggerAurasProcOnEvent logic that tried to trigger twice from actor.
- Allow non damaging spells with DamageClass Melee or Ranged to proc character enchants. Ref issue #17034:

  * http://web.archive.org/web/20110309092008/http://elitistjerks.com/f47/t49865-paladin_retribution_pve/
  * When an auto-attack lands (does not dodge/parry/miss) that can proc a seal the of the following things happen independently of each other (see 2 roll system).

  * 1) A "hidden strike" which uses melee combat mechanics occurs. If it lands it refreshes/stacks SoV DoT. Only white swings can trigger a refresh or stack. (This hidden strike mechanic can also proc things like berserking..)
  * 2) A weapon damage based proc will occur if you used a special (CS/DS/judge) or if you have a 5 stack (from auto attacks). This attack can not be avoided.

  * Holy Vengeance is the "hidden strike" it has an apply aura effect and damage class melee.
- Fixed Blood Tap interaction with Death Runes (btw, don't know what was going on with those MiscValueB, spell 45529 doesn't have any MiscValueB in SPELL_EFFECT_ACTIVATE_RUNE)
- Ported some AuraEffect checks from old Unit.cpp function. added new AuraScript hook to check procs of an specific effect
- Allow only AuraEffects that passed the check to proc, this won't block whole aura from proccing (and lose charges) if at least one of the effects procs, though
- Changes in spell mod system (for SPELLMOD_CASTING_TIME). fixes #17558.
- Added an exception for SPELLMOD_CRITICAL_CHANCE too, fixes #15193
2016-10-05 13:19:51 +02:00
Aokromes
d9ae70396b Core/Player: Implemented Titan's Grip damage reduction 2016-10-03 14:51:20 +02:00
joschiwald
4ed2cd9500 Core/Spells: use spellinfo helper methods
(cherry picked from commit 12a52595ed)
2016-10-03 14:42:37 +02:00
SnapperRy
83dafd5886 Core/Spell: set quest to rewarded instead of complete when targeted by SPELL_EFFECT_QUEST_COMPLETE. (#18021)
Prevents people from ending up with strange quests in their quest logs.
2016-10-01 16:47:49 +02:00
Rochet2
19ed813f6b Core/Scripts: Enhance quest status hook by making it catch more status changes (#17865) 2016-09-10 14:25:57 +02:00
Aokromes
ed41de566f Core/Scripts: Implement Glyph of Backstab 2016-09-04 11:34:09 +02:00
treeston
cd53178361 Core/Spells: Fix Spell::EffectJumpDest not to turn caster to zero orientation when ground targeting. 2016-08-20 13:15:23 +02:00
Aokromes
0852050e68 Core/Logs: Fine tune more logs
And move others to more logical appenders
2016-08-12 12:18:19 +02:00
Aokromes
340b0227bf Core/Logs: Fine tunning some logs 2016-08-07 21:28:07 +02:00
ariel-
35209adb87 Core/Spells: Abyssal Shatter should have a chance to skill up 2016-08-03 11:44:23 +02:00
ariel-
30d4f70533 Core/Entities: debloat SummonGameObject parameter list using proper wrappers and enable GO rotation in scripts
- There's still an overload allowing for x, y, z, o to be passed directly
- Fixed default animstate for GameObject creation in many places, it should be 255, not 100 (checked in sniffs)

(cherry picked from commit 62bfee37cb)

Conflicts:
	src/server/game/Entities/GameObject/GameObject.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/Commands/cs_gobject.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/Kalimdor/zone_feralas.cpp
2016-08-01 01:23:47 -03:00
Aokromes
b51adac24c Core/GameObjects: Gameobject rotation (from cmangos/mangos-wotlk@2bcbc0f)
cmangos/mangos-wotlk@0fe88f3: [11531] Normalize gameobject's quaternion, thanks to zergtmn for pointing
cmangos/mangos-wotlk@060dfb7: [11667] Implement transport path rotation
cmangos/mangos-wotlk@565f52c: [11806] A bit gameobject code refactoring
cmangos/mangos-wotlk@6874951: [11807] Add gameobject_addon table
2016-07-30 15:51:23 +02:00
Trond B Krokli
d716e6049a [3.3.5] Core/Spell: restore old pet values after dismount (#16551)
* Core/Spell: restore old pet values after dismount & re-summon
Original PR #15667 by ghost

Closes #873
2016-07-20 13:54:49 +02:00
mik1893
13c5e4be65 Core/Spells: Fix Blood Tap activation when Blood Rune is in cooldown as Death Rune (#17132) 2016-07-20 11:00:56 +02:00
Aokromes
cd9acb7d05 Core/Spells: Fixed overwriting summon requests 2016-07-19 17:15:06 +02:00
Aokromes
f5de65fd96 Core/Misc: MSVC /W4 warning fixes 2016-07-19 13:02:54 +02:00
Aokromes
3f0c7f6b2f Core/Spells: Renamed EnsureSpellInfo to AssertSpellInfo to minimize differences between branches 2016-07-19 12:02:52 +02:00
Aokromes
d647b5d6a1 Scripts/Spells: fixed Decahedral Dwarven Dice and Worn Troll Dice 2016-05-14 06:23:38 +02:00
Lopfest
28b3874057 Core/Spells: enabled SPELL_EFFECT_160 (#16987)
(cherry picked from commit ff3e176eb1)
2016-05-12 08:52:23 +02:00
chaodhib
8a84d7de3e Scripts/Naxxramas: Rework of Gluth
1) Gluth should be able to eat zombies close to him, one at the time, during the whole fight.
2) Gluth should be able to eat zombies at an accelerated rate after each Decimate.
3) The zombies should put the "Infected Wound" debuff on their auto-attack targets.
4) Zombies should have a normal threat table before decimate and should loose all kind of aggro behavior and walk toward Gluth after decimate.
5) Gluth shouldn't be affected by the decimate damage.
6) Newly poped zombies should have all players in their aggro list as soon as they spawn. So far, they were not moving and were only aggroed by proximity.
7) and several minor fixes (emotes, useless data in db).
2016-05-12 08:45:44 +02:00
Aokromes
1b0cc33b3e Core: Name some Spell Effects 2016-04-13 23:57:19 +02:00
Aokromes
e8d994f568 Core/Spells: Implemented spell effects SPELL_EFFECT_UPDATE_PLAYER_PHASE and SPELL_EFFECT_UPDATE_ZONE_AURAS_AND_PHASES
By Lopfest
2016-04-13 20:39:21 +02:00
ariel-
8bc477a2de Merge remote-tracking branch 'tc/3.3.5' into 4.3.4
Conflicts:
	sql/base/characters_database.sql
	sql/updates/world/2016_01_26_00_world.sql
	sql/updates/world/2016_01_31_00_world.sql
	sql/updates/world/2016_02_07_00_world.sql
	src/server/authserver/Server/AuthSession.cpp
	src/server/database/Database/Implementation/LoginDatabase.cpp
	src/server/database/Database/Implementation/LoginDatabase.h
	src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
	src/server/game/AI/ScriptedAI/ScriptedCreature.h
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Chat/Chat.cpp
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DataStores/DBCStructure.h
	src/server/game/DataStores/DBCfmt.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Server/WorldSocket.h
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Spells/SpellMgr.cpp
	src/server/scripts/Spells/spell_druid.cpp
	src/server/scripts/Spells/spell_generic.cpp
	src/server/scripts/Spells/spell_hunter.cpp
	src/server/scripts/Spells/spell_rogue.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/shared/Networking/AsyncAcceptor.h
	src/tools/map_extractor/CMakeLists.txt
	src/tools/map_extractor/System.cpp
	src/tools/map_extractor/adt.h
	src/tools/mmaps_generator/MapBuilder.cpp
2016-02-21 07:02:53 -03:00
tkrokli
9e4cc26312 [3.3.5] Core/Logs: English text corrections
This is an attempt to proofread standard error messages and system messages
from both core and DB. The corrections span typos, grammar and punctuation.

Because some of these messages can have multiple meanings depending on context,
this PR will stay in "WIP" status until the corrections have been validated and approved.

You are welcome to suggest improvements and files not yet included in this list.

Thanks to @Kinzcool for suggesting this line of work. :)
2016-02-20 10:05:04 +01:00
treeston
cfed2d7a3d Merge remote-tracking branch 'Eliminationzx/FixJumpDestOrientation' into 3.3.5 (PR #16450) with some minor CS adjustments 2016-02-10 17:41:19 +01:00
Elimination
ff80f249a7 Fix jump dest orientation 2016-02-10 20:25:29 +07:00