Commit Graph
410 Commits
Author SHA1 Message Date
Ovahlord 89c6777803 * Core/Phasing: fixed gameobject floor detection
*merged a crash fix
2018-03-22 17:36:01 +01:00
Ovahlord e44bb5f387 Core/Entities: Phase Rework (main commit) 2018-03-08 22:58:50 +01:00
Aokromes 4bd0525edd Update copyright note for 2018 2018-01-01 01:06:19 +01:00
Krudor c8aeadc949 Remove reportUse parameter on GameObjectAI::GossipHello and give it its own event.
Ported from 3.3.5
2017-12-10 13:59:13 +01:00
Erik Strandberg a3b16c040b Port https://github.com/TrinityCore/TrinityCore/commit/f913f3bb8977c127d200d5d4a608ab434b21bbcd 2017-12-10 00:37:21 +00:00
Aokromes 405445d564 rename files 2017-11-27 00:58:28 +01:00
Ovalord c868e10d9b Core/Skills: implement Archaeology 2017-11-09 03:58:28 +01:00
Aokromes 1a5c0f5c3b Core/Grids: Ported cmangos/mangos-wotlk@ea99457
(cherry picked from commit 9299e9b)
2017-06-19 20:20:26 +02:00
Aokromes 1c6021ba96 Core/AI: Factory functions cleanup
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
2017-06-01 13:22:24 +02:00
Ryan 1442984686 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4 2017-05-28 19:10:00 +01:00
Aokromes f0e36b0863 Core/Defines: define faction templates and replace magic numbers from scripts 2017-05-23 14:37:54 +02:00
Ryan 20726edec2 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4 2017-05-19 23:49:46 +01:00
Aokromes 0fbcdca05e Core/Collision: Replaced phasemask with proper phases in GameObject c…
…ollision calculation
2017-05-06 01:55:17 +02:00
ariel- 938f43302c Core/Entities: fix interaction of traps with ffa pvp and sanctuary flags 2017-05-04 02:34:25 +01:00
Aokromes c015a5cf10 Core/Misc: camelize GetFaction/SetFaction properly 2017-05-02 02:02:31 +02:00
roc13x e4bfd0aa05 Corrected doors and buttons without autoclose time after recent changes 2017-04-19 18:30:32 +01:00
Aokromes adae2fec26 Ensure that all actions are compared to fixed point in time (ie. world update start) 2017-04-14 15:02:49 +02:00
Aokromes 4e4f82a3e7 more fix 2017-04-05 02:55:44 +02:00
Aokromes 0decba0ad7 compile fix 2017-04-02 08:15:30 +02:00
Aokromes 9b378447f8 Core/Entities: GameObjectDespawn packet is only sent for GameObjects 2017-04-02 07:57:21 +02:00
Aokromes 2f1d6d5597 Core/Scripts: Fix a logic fail that overriden the script of an entity…
… that changed entry
2017-04-01 07:11:25 +02:00
Aokromes 47961b7888 typo fix 2017-03-25 10:33:20 +01:00
Aokromes 55914733a0 Core/Scripts: Add support for spawn specific C++ scripts
By Krudor.
2017-03-25 10:27:51 +01:00
xinef1 206fddf129 Core/GameObject: regenerate GO loot if respawn time passed since last loot generation time and not all items were taken (#19101) 2017-03-03 01:31:44 +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
xinef1 2c05a59815 Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove 
* remove some possible references item may have when it is deleted during save. 
* Also clear all hostile references when unit is removed from map.
2017-02-05 01:58:11 +01:00
Aokromes 8bb777ef5c Few small optimizations here and there 2017-02-01 16:51:21 +01:00
Aokromes 719a317a67 Update copyright note for 2017 2017-01-02 07:26:38 +01:00
ariel- b1b31fd685 Core/Gameobject: fixed sometimes not found linked trap
Closes #18256
2016-11-27 01:39:22 +01:00
ariel- b6f8ecbefc Core/GameObject: use a friendly trigger for positive spells.
Fixes an issue with Skadi Harpoons.

Note to self: should actually implement GameObject casting already :/
2016-11-15 05:48:22 +01:00
ariel- 03c3279395 Core/Gameobject: remove immune flags from trigger used to cast GO spells
Spells were failing flags check in Unit::_IsValidAttackTarget

Closes #18206
2016-11-10 23:42:29 +01:00
Aokromes 94ca5c157a Core/Gameobject: Build fix 2016-11-02 07:26:46 +01:00
Aokromes 6d49df2635 Core/GameObject: added possibilty for gameobjects to contain money loot 2016-11-02 05:47:52 +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
Shauren 93fd8f2511 Core/GameObjects: Fixed Frozen Trap target selection
Closes #14238
Closes #17517
2016-11-02 03:23:23 +01:00
jackpoz 71d4d34d33 Scripts/ICC: Fix chest loot exploit
Fix an exploit at chest loot bosses Valithria and Deathbringer that allowed the first played to hit them to leave party at low hp % and loot the whole chest alone, without the party being able to loot anything.
2016-09-25 10:10:57 +02:00
SnapperRy aeae738b37 Core/Fishing: ignore required skill when fishing in pools. 2016-09-14 14:32:50 +02:00
ariel- a6ab7196ca Core/GameObject: save spawn GOState and reset to it instead of toggling from whatever current state we have
Prevents exploit of SMART_ACTION_ACTIVATE_GOBJECT
2016-08-28 10:35:12 +02:00
treeston 7b036961f3 AI/SmartScripts: Add param3 to SMART_ACTION_CAST and SMART_ACTION_INVOKER_CAST that allows specific triggered flags to be set (rather than all-or-nothing). Ignored if SMARTCAST_TRIGGERED is not set. 2016-08-20 06:19:54 +02:00
Naios e23d063f5a 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-08-10 08:40:44 +02:00
ariel- 7c58e4cc08 Core/GameObject: misc type mismatch
(cherry picked from commit 4baa7f443a26df36ced18f96f28c64f1920514eb)
2016-08-01 01:29:58 -03: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 62bfee37cb21584cef631dda428feaf5eb829cda)

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
SnapperRy 0b62ea5f24 Core/Fishing: update fishing skill regardless of success or failure (junk items fished) (#17504) 2016-07-20 18:40:59 +02:00
Shauren 05f11a46ba build fix 2016-07-20 16:05:51 +02:00
treeston 35596cee5c Too many damn stars in that damn argument list. 2016-07-20 10:46:50 +02:00
treeston dbd1d58f9d Creature/CreatureAI:
- Default range for DoZoneInCombat: 50.0f -> 250.0f.
- Add optional second arg to SummonList::DoZoneInCombat to specify range.
- Also a bunch of random NULL -> nullptr cleanup.
2016-07-20 10:39:10 +02:00
Shauren a7f68c489a Properly rename the stand state method... 2016-05-12 08:27:48 +02:00
Shauren a12493fd84 Core/Misc: Renamed getStandState to minimize differences between branches 2016-05-12 08:27:29 +02:00