Commit Graph

529 Commits

Author SHA1 Message Date
ariel-
5ff847159c Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources 2018-03-28 04:41:59 -03:00
Ovalord
e60e0f9f4a Scripts/Professions: fixed multi-profession trainer 2018-01-08 02:08:00 +01:00
Aokromes
46366373ab Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now. 2018-01-01 16:02:22 +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
Krudor
843c21048a Fix some warnings introduced in a previous commit 2017-12-10 12:56:35 +01:00
Erik Strandberg
a3b16c040b Port f913f3bb89 2017-12-10 00:37:21 +00:00
Shauren
d979329be3 Scripts/Events: Fixed memory leak in npc_bountiful_table added in 75df296bb6 2017-11-25 22:44:00 +01:00
Aokromes
b93430ee08 Misc: More cleanup 2017-11-25 02:25:18 +01:00
Aokromes
91affef0c6 Misc: Kill trailing white spaces 2017-11-25 01:36:21 +01:00
Aokromes
58c2e871a9 rename files 2017-11-16 20:55:04 +01:00
Aokromes
dd6c12a7a3 Gameobject/Script: Remove outdated script 2017-11-16 20:34:36 +01:00
jackpoz
67dc6a7576 Core/Misc: Fix static analysis issues 2017-11-12 13:24:42 +01:00
Wyreth
f59cca2dd2 Script/Trainer: move alchemy specialization-related script to DB and fix some wrong texts 2017-10-30 01:02:51 +01:00
PolarCookie
e6f334f46f Scripts/Quest: The Missing Diplomat part 14 (ID 1265) 2017-10-30 00:52:22 +01:00
Wyreth
10a414c6d9 Scripts/World: move Leviroth's item_script to SAI 2017-10-22 10:51:56 +02:00
Keader
f2aa981f81 Core/Custom: Fixed Duel Reset Exploits
Close #17419
*Fixed exploit with SPELLMOD_COOLDOWN
*Fixed exploit with some items (like Sylvanas' Music Box)
*Little cleanup
2017-07-02 10:12:05 +02:00
Aokromes
1a5c0f5c3b Core/Grids: Ported cmangos/mangos-wotlk@ea99457
(cherry picked from commit 9299e9b)
2017-06-19 20:20:26 +02:00
Aokromes
f0e36b0863 Core/Defines: define faction templates and replace magic numbers from scripts 2017-05-23 14:37:54 +02:00
Aokromes
bdac4421e2 Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60 2017-05-02 02:59:58 +02:00
Aokromes
c015a5cf10 Core/Misc: camelize GetFaction/SetFaction properly 2017-05-02 02:02:31 +02:00
Aokromes
3563af5c60 Core/Script: Fix low level class quest 2017-04-30 23:34:31 +02:00
Aokromes
0d61a6b512 missing part 2017-04-16 17:19:23 +02:00
Aokromes
6fef0d2eb2 Core/Trainers: Fix Multiprofession Trainers
By Malcrom, closes #61
2017-04-16 16:01:27 +02: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
ariel-
68c4606725 Core/Scripts: converted Argent Tournament pennants to AI
Closes #14616
2017-03-13 10:08:59 +01:00
Kittnz
5b057ed5a0 Script/GO: Alliance Bell, Horde Bell and Karazhan Bell will now send a bell sound on the start of each hour. (#19145)
* Script/GO: Alliance Bell, Horde Bell and Karazhan Bell will now send a bell sound on the start of each hour.

How many times it rings depence on the hour.

* fix little things from pr comments

* Added OnGameEvent

* Fix braces

* almost finished

* fix enum

* Add gameobjects to the game event

Fix override for InitializeAI

* enum squash

* remove braces

* Rename 9999_99_99_99_world.sql to 2017_02_19_01_world.sql
2017-03-03 01:18:00 +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
719a317a67 Update copyright note for 2017 2017-01-02 07:26:38 +01:00
sirikfoll
d7fcf684c0 Scripts/Events Implement Pilgrim's Bounty Bountiful Table 2016-12-28 16:03:16 +01:00
ccrs
617427ca11 Scripts/BlackTemple: minor cleanup and corrections after recent PRs
plus a ninja tabs to spaces cleanup
2016-12-06 11:05:26 +01:00
Kittnz
72d02185ba Core/Event: Change Midsummer Music container to vector 2016-10-24 13:19:28 +02:00
Kittnz
de78de624e Core/Event: Change Midsummer Music to search grid only 2016-10-24 13:19:15 +02:00
Kittnz
f0566bc2a5 Core/Scripts: Initialize rnd and remove where it was not needed 2016-10-22 10:50:23 +02:00
Kittnz
2072a3f78c Core/Event: Pirate Day Music during the event 2016-10-22 10:49:56 +02:00
Kittnz
3c1535678e Core/Event: Add Darkmoon Fair Music during the event 2016-10-22 10:49:47 +02:00
Kittnz
622e65c3e1 Core/Event: Add Midsummer Music during the event 2016-10-22 10:49:07 +02:00
Kittnz
cd22b8ea7a Core/Event: Fix Brewfest Music
Was only playing the same song over and over again.
2016-10-21 08:58:15 +02:00
SnapperRy
001f4881f8 Fix non PCH build. 2016-10-21 08:47:52 +02:00
Kittnz
f5364cc5aa Core/Event: Add Brewfest Music during the event
Note: Dark Iron invasion music can be added with a trigger at a later stage
2016-10-21 08:46:21 +02:00
tkrokli
a34fbdaa40 Core/Scripts: move npc_lunaclaw_spirit to SAI
This PR moves the core script `npc_lunaclaw_spirit` to SAI, removing hardcoded text.
The quests 6001 + 6002 are druid class quests to get bear form, removed in patch 4.0.3a

Changes in this PR:
- remove core script, including hardcoded text (with typo)
- use gossip_menu_option for each faction (Alliance & Horde)
- add SAI script to complete quest 6001 or 6002 based on option
- add gossip option conditions for team A (469) or team H (67)
- add gossip option conditions for quest 6001/6002 not completed
2016-09-24 07:00:12 +02:00
tkrokli
6953e06c4b Core/Scripts: simplified npc_pet_trainer gossip script
This is what the script changes should have been in PR #17746
(also updates issue #14719 with a correct solution).

- remove OnGossipHello() to use DB conditions
- replace OnGossipSelect() with sGossipSelect()
- focus script on the confirming gossip option
- let the other gossip menus be handled in DB
2016-09-18 07:38:25 +02:00
treeston
9a829b4761 Scripts/Events: Globally fix all ExecuteEvent loops to check UNIT_STATE_CASTING after each iteration, instead of just checking it once initially 2016-09-03 17:26:20 +02:00
treeston
109d87d3c3 Entities/Gossip: The Big One™ that gets rid of all uses of The Bad™ and The Ugly™, e.g. gossip preprocessor macros, and replaces them with the new-and-shiny gossip functions. 2016-08-31 08:39:33 +02:00
Aokromes
5de3f3c59f Core/Scripts: move npc_experience hardcoded text to DB 2016-08-25 14:59:00 +02:00
Gustavo
49d4e22c6a Scripts/Pet Implemented Argent Squire/Gruntling and Argent Pony Bridle 2016-08-25 14:52:56 +02:00
tkrokli
efa7a0639c Core/Scripts: npc_wormhole #define text moved to DB (#17805)
Another core script hardcoded text removal:
- removed #define text from script
- added the text to gossip_menu_option
- added and renamed enum to match DB entries
- minor additional adjustments and comments

Closes #6841
2016-08-23 13:54:38 +02:00
Aokromes
56b3f461fe Core/Scripts: move Pet Trainer gossip to DB
SQL content based  on issue 14719 by Killyana,
conditions output from Malcrom's Condition Creator

- remove hardcoded #define gossip options
- enum gossip menu IDs from DB
- remove outdated SD comments at the top of the file
2016-08-20 12:22:58 +02:00
tkrokli
c425b91368 Core/Scripts: remove 2 unused scripts (#17759)
These scripts are no longer in use:
- generic_creature
- trigger_death
2016-08-12 12:19:02 +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