Commit Graph
436 Commits
Author SHA1 Message Date
ForesterDev 5c2705fadc Core: updated creature type flags enum (#17128)
Core/Misc: Update CreatureTypeFlags enum according to TrinityCoreWiki
(cherry picked from commit fb0881398a106806fad48abe9ffd600e0caf175d)

# Conflicts:
#	src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
#	src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
#	src/server/game/AI/SmartScripts/SmartAI.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Miscellaneous/SharedDefines.h
2017-01-09 02:00:17 +01:00
treeston 489027703e Entities/Unit: Finally fix no-path evasion.
- When a creature cannot find a path to its victim, it begins evading all attacks and regenerating health.
- If this persists for 5 seconds, it evades back to spawn position with new EvadeReason value EVADE_REASON_NO_PATH.
- Also some SmartAI cleanup (why oh why does it have so much duplicated code) and getting rid of #defines in favor of type-checked compile-time constants.

(cherry picked from commit 7b1560fccba77ecbdfecd7b33af740aea41b7087)
2017-01-07 21:33:28 +01:00
vincent-michael 86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren ac1dc758b9 Core/Units: Cleanup hardcoded magic numbers for byte field offsets 2016-12-13 20:58:22 +01:00
Shauren 5411ca8cdf Core/Units: Removed attack speed float to int conversion special case in building SMSG_UPDATE_OBJECT 2016-11-25 17:58:48 +01:00
Shauren bbc983fc3d Core/Creatures: Fixed visuals for spells cast by creatures that have missile/travel time
Closes #17950
2016-09-16 17:22:58 +02:00
Malcrom f10a4c1364 Core/Creatures: Implemented loading animkits from creature_addon (#17834) 2016-08-20 23:53:07 +02:00
Shauren e405ac5f41 Fixed nopch build and some leftover warnings 2016-07-20 13:27:04 +02:00
Shauren 70137b8f3a Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-06 00:05:13 +02:00
Shauren 73aababbd4 Core/Spells: Fixed handling spell interrupts - PreventionType dbc field is a bitmask 2016-06-23 22:19:52 +02:00
Shauren c95f4a5070 Core/GameObjects: Updated GameObjectTemplate to 7.0.3.21796 2016-05-30 23:49:35 +02:00
Shauren df6d557a4d Core/Entities: Updated updatefields to 7.0.3.21414 2016-05-20 23:50:20 +02:00
Chaouki Dhib 3cbbcdb51a Core/Movement: Clean up and improvements on Unit::SetSpeed (#16843)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch):
- the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior.
- Removed the unused method parameter "forced" from Unit::SetSpeed
- Renamed Unit::SetSpeed to SetSpeedRate
- Removed the unused method parameter "forced" from Unit::UpdateSpeed
- Added utility method Unit::SetSpeed which take the new flat value.
(cherry picked from commit dc3327f9c5f80c36000356829159c060d916f62b)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/MovementHandler.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
#	src/server/scripts/Kalimdor/zone_azshara.cpp
#	src/server/scripts/Kalimdor/zone_durotar.cpp
#	src/server/scripts/Outland/zone_hellfire_peninsula.cpp
2016-04-16 02:26:24 +01:00
Naios 9cc97f226d Core/Game: Rewrote the ScriptMgr to support script reloading.
* Finally this commit enables dynamic script hotswapping
  and finished the PR #15671.
* Split the storage layout to use optimized storages
  for database bound and unbound scripts.
* Add several unload workers to reload scripts correctly
  -> Requires further investigation.
* Fixes memory leaks in ScriptMgr when dropping invalid scripts.
* Fixes VehicleScripts
* Makes OutdoorPvP scripts reloadable
* Makes InstanceMapScripts reloadable
* Makes CommandScripts reloadable
2016-04-11 21:14:00 +02:00
treeston 181da2a65c - Clean up spell facing behavior a bit. Visual target behavior should now be a lot smoother.
- Clean up Creature.cpp. NULL -> nullptr, gotta love it.
- Renamed some recently added members of Creature to match code style.

(cherry picked from commit 1cf1d4a1eafb3a31bf87a615d9d947eed6eb0f62)
2016-04-09 17:47:45 +02:00
treeston d5ec4ce97b Entities/Creature: Fix bugs with pets not properly reacquiring target after spell cast. Closes #16824.
(cherry picked from commit accad00567f96b9c8173d680034953a54bdb6462)
2016-04-09 17:28:11 +02:00
Vincent-Michael 179b521dce Core: Remove whitespaces
(cherry picked from commit 5e74c2223bff8a467d6f1ce18f6f08aa05e17019)
2016-04-09 17:14:08 +02:00
jackpoz 307a93839b Core/Creatures: Fix dead creatures spawn position on restart
Fix dead flying creatures ignoring being spawned below the floor in instances on server restart because of not taking into account vmap height.
Fix #16777

(cherry picked from commit 912514c198bd0f59bd22c4a189692aff5244f697)
2016-04-09 17:10:24 +02:00
treeston 3b67e57e0e Core/Creature: Prevent friendly vehicles from trying to attack their rider after dismounting.
(cherry picked from commit 89e2afb8f9f3766c6ca0e780371f5421c79064b1)
2016-04-08 22:48:06 +02:00
Treeston 7135a23d33 Merge pull request #16467 from Treeston/3.3.5-FixEvadeMode
[3.3.5] Creature/AI: Fix incorrect evade logic
(cherry picked from commit 8eabbb0427fff559592545f9336909882369b820)
2016-04-05 18:02:46 +02:00
Incorrect f8d5031fca Core/Creature: Do not load equipment with id = 1 when creature.equipment_id is 0
Closes #16416

(cherry picked from commit cc3ae640a48417aae31eac8828842ab50099069b)
2016-04-02 19:32:03 +02:00
Rushor 92a80979dd Game/Creature: Implement CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK
* updates #16423

(cherry picked from commit 110e0fd0925a8d7c5b0db684207a1f0208ac33a5)
2016-04-02 19:24:13 +02:00
Shauren e6e3e799d0 Build fixes 2016-04-02 19:22:30 +02:00
pete318 2fe84d7471 Prevent duplicate spawns for same spawn ID
If there is an alive instance of the creature upon creature spawn, skip
spawn entirely. If there are only dead instances, despawn them. A new dead
corpse in the creatures home position will be respawned.

Closes: #16462
(cherry picked from commit fe2a0fda4464effeb2fb655da84a0460328b1aeb)
2016-04-02 17:51:03 +02:00
Trisjdc a51ec98044 Core/Creatures: Reset unit flags/dynamic flags on Creature::SetDeathState(JUST_RESPAWNED)
(cherry picked from commit 132be2d25a3766c1ef2099fb65ef3cbcdf9705ae)
2016-04-02 17:49:20 +02:00
r00ty-tc 6cd7b58065 Adjustments to spell facing - Adjusted HaveAtClient to accept Object* (still accepts all subordinates) - Use grid searcher to find players in visibility range for unit - Use client cache instead of "See or Detect" to decide who to send updates to - Adjusted SendUpdateToPlayer to send createobject packet only if not known to client
(cherry picked from commit c0693a6ee52d31840ab2ee878c4881884b857638)
2016-04-01 12:43:10 +01:00
treeston d9c99acebb Spell facing follow-up: Fix an issue with creatures' channeled spells not cancelling properly in certain conditions
(cherry picked from commit 17f924a031e5ebbbc07a54acd61e738bf234867a)
2016-03-29 20:08:01 +02:00
treeston 009cabb4b9 Merge branch '3.3.5-spellfacing' into 3.3.5-base (PR #15641)
(cherry picked from commit 233297c5c8619af96e2aab4fa5ef6d205b5dc18a)
2016-03-29 19:36:05 +02:00
treeston e2f2c70ba4 Merge branch '3.3.5-bossboundary' into 3.3.5-base (PR #16089)
(cherry picked from commit 5b8b8c653039ec2add0b3a66468abb85e6f35054)
2016-03-22 22:56:43 +01:00
Vincent-Michael 478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren 93c4710c38 Added missing null checks to c488fb219a 2015-12-06 00:19:33 +01:00
Shauren c488fb219a Core/Creatures: Implemented automatic detection of trigger models, their order in creature_template no longer matters 2015-12-05 18:47:35 +01:00
Kittnz e6465b5cb6 Merge pull request #15884 from tkrokli/re-enable_flying_vehicles
Core/Creature: Flying vehicles able to fly again
(cherry picked from commit 38c44fad8d7ee48bcf8cac9db3f821842384619e)
2015-11-23 10:12:12 +01:00
Carbenium 94b22d98be Merge pull request #15835 from ariel-/entry
Creature Addon should be updated when entry is changed.
(cherry picked from commit 52692c3f9d09dc781add9cfee043d6f6ec80291a)
2015-11-23 10:11:58 +01:00
Carbenium 230e820898 Core/Creature: Remove duplicate call to LoadCreatureAddons in Creature::Create
* Add error log for duplicated aura entries in creature_(template_)addon

(cherry picked from commit c5f635b6896abaa3b9a2242c63c61a37fc60bf80)

Conflicts:
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Globals/ObjectMgr.cpp
2015-11-14 04:22:42 +01:00
treeston 0bf78d5761 Custom logic for putting people in combat instead of relying on CreatureAI or Creature methods.
(cherry picked from commit 6a8524c068d418092c193a3419b65818f3fd3443)
2015-10-16 12:45:53 +02:00
treeston 89357f5425 Core/Creature: Add facilities to the Creature class to allow setting an automated, periodic pulse that puts every player in the zone in combat and on the creature's threat list.
Scripts/BossAI: Set the BossAI parent class to make use of this in its _EnterCombat and _Reset methods. Combat pulses happen every 5 seconds.

(cherry picked from commit d57193df444b719757ae1da4a5f19e204074f6ae)

# Conflicts:
#	src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
#	src/server/game/Entities/Creature/Creature.cpp
2015-10-16 12:44:17 +02:00
jackpoz cd72a243af Merge pull request #15168 from jameyboor/3.3.5
Core/Creature: Fix Creature::UpdateMovementFlags() ignoring DynamicTree height

Fix Creature::UpdateMovementFlags() checking only maps/vmaps height and skipping GameObject height stored in DynamicTree
(cherry picked from commit a7ee951d9efcfb0a0a5b9ed1ec3a732c06d8877f)
2015-09-24 19:17:06 +02:00
Vincent-Michael 2e586bc520 Core: Header cleanup in game/*/*.cpp 2015-07-25 20:18:42 +02:00
Vincent-Michael d418ae54a4 Core: White space CleanUp 2015-07-05 04:03:36 +02:00
DDuarte 678a08c8c5 Core: Fix multiple warnings
Travis should be building again now
2015-07-04 02:43:43 +01:00
DDuarte 58adb74717 Dep: Disable 2 warnings in zmqpp and CascLib 2015-07-03 02:23:58 +01:00
DDuarte ccfaf663aa Fix build and SQL import after cherry-picks 2015-07-03 02:10:54 +01:00
Mik1893 c7ca739711 Core/Creature: Fix UNIT_FLAG_IMMUNE_TO_PC validity for player pets
related to #14780 and #14744

(cherry picked from commit accab5451d3e62739e4aa376d25bc6623f0d3c52)
2015-07-03 01:06:33 +01:00
jackpoz 0b745370dc Core/Texts: Fix race conditions in CreatureTextMgr repeat group
Fix race conditions in CreatureTextMgr repeat group happening with MapThreads > 1 reported by helgrind by moving Creature-GUID-base data from CreatureTextMgr to Creature.
Issues added in bbf86641a1

(cherry picked from commit d123c811623fcedcf125f56101b6aea773f460e0)

Conflicts:
	src/server/game/Texts/CreatureTextMgr.cpp
2015-07-03 01:05:22 +01:00
Shauren 585f978c58 Core: Started work on 6.2.0.20182 2015-07-01 02:22:03 +02:00
Carbenium 4a9bbbda14 Merge pull request #14780 from mik1893/immune_to_npc_flag
Core/Creature: UNIT_FLAG_IMMUNE_TO_NPC check only vs non-player targets
(cherry picked from commit 125d839a1878d3d3d0cbc193298f385560e268c9)
2015-06-26 02:59:41 +01:00
MitchesD 530074f453 Core/Creature: fixed loading of creature auras on respawn, deathState needs to be set to ALIVE before trying to AddAuras (which fails with different deathState than ALIVE)
Closes https://github.com/TrinityCore/TrinityCore/issues/4150
2015-06-21 13:40:24 +02:00
Shauren edbd44a675 Core/Creatures: Extended npcflags to uint64 2015-05-04 12:39:36 +02:00
Shauren ca83e14f8b Core/Entities: Reworked guid scopes
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not
* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396eb0b
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
2015-04-28 21:19:46 +02:00