Commit Graph

112 Commits

Author SHA1 Message Date
ratkosrb 5d7467f79b Implement area guards system.
Done without using the guard post gameobjects, since spawning them crashes the 1.12 client.
2019-03-06 19:48:01 +02:00
ratkosrb a718115fd2 Update a few npc commands. 2019-02-03 16:22:17 +02:00
ratkosrb a7905795ac Update creature_template column names.
Changed to all lower case with underscores.
2019-01-23 08:29:34 +02:00
ratkosrb 8496704313 Fix travis build. 2019-01-16 00:21:04 +02:00
ratkosrb f61fb19130 Rename creature pointer to something more appropriate. 2019-01-15 23:51:52 +02:00
ratkosrb b7fb84abe8 Add support for non-Totems to TotemAI.
For some reason, there are totem spells that summon the totem as guardian.
2019-01-15 23:49:26 +02:00
ratkosrb 9998f2de90 Add separate handler for SPELL_EFFECT_SUMMON_POSSESSED.
This fixes the eye of killrog + mind control crash without hacks.
2019-01-02 18:27:18 +02:00
ratkosrb b7b970e886 Code style improvements.
based on https://github.com/cmangos/mangos-classic/commit/ce2527c0b2fdcc8b72d745371ab2f68c81728cc6
2018-12-04 15:30:47 +02:00
ratkosrb 395d47d15f Organize code in Player.h 2018-12-02 19:19:04 +02:00
ratkosrb 6735de0174 Improvements to PvP flagging.
Based on https://github.com/cmangos/mangos-classic/commit/d63bebd45742b75bc6f0b02206263a8f16182fec
2018-11-27 12:36:52 +02:00
ratkosrb 6708c8284b Use modern for loop in EventAI code. 2018-11-25 08:46:41 +02:00
ratkosrb b80466ce61 Move functions specific to 3 mobs out of Unit class. 2018-11-23 12:40:28 +02:00
ratkosrb e56b932f10 Fix startup errors on 1.9. 2018-11-22 02:40:25 +02:00
ratkosrb 48e1d4ea22 Taming the Beast improvements.
Closes https://github.com/vmangos/core/pull/30
2018-10-29 18:04:21 +02:00
ratkosrb ea0c1a031b Prevent creature pets from chasing forever. 2018-10-26 05:14:51 +03:00
ratkosrb f89b22cf72 Prevent follower npc abuse.
You were able to cancel the quest and the npc would continue following you.
2018-10-20 21:30:49 +03:00
ratkosrb 7dcfbdb8a9 Fleeing movement fixes. 2018-10-10 17:26:26 +03:00
ratkosrb 7e03a2f8a3 Add distancing motion type. 2018-10-10 00:53:18 +03:00
ratkosrb 7adaecea38 EventAI: Add PlayerOnly parameter to EVENT_T_KILL. 2018-10-09 18:01:58 +03:00
ratkosrb 687311fec7 Tabs to spaces. 2018-09-13 21:58:11 +03:00
ratkosrb ff7b909085 Improve caster mob responsiveness. 2018-09-02 10:25:08 +03:00
ratkosrb 14eba4a2ca Implement GuardEventAI and add scripts for guards. (#196)
* Add command to apply aura.

* Add condition for no path to victim.

* Add Is Player condition.

* Database scripts and fixes.

* Improve GuardAI.

* Implement GuardEventAI.

* Mark faction as At War in client on aggro.

* Fix instance reset message.

* Reimplement invisability for Shade of Jindo.

* Cleanup ancient methods.

* Sync At War flag.

* Fix aura for Drunken Bruiser.

* Add LoS check.
2018-08-05 13:58:32 +03:00
GuybrushGit 2709cfd5c8 Allow player pets attacking feigned players (#174) 2018-08-05 13:48:35 +03:00
GuybrushGit dfc23a8772 Prevent totems attacking neutral targets (#173)
* Prevent totems attacking neutral targets

* Prevent totems attacking neutral targets

* Prevent totems attacking players if owner has pvp off
2018-07-28 13:52:47 +10:00
ratkosrb bb603d42c0 Prevent auto attacking friendly targets (#165)
* Refactor auto attack checks.

* Fix typo.

* Simplify code.
2018-07-11 15:04:48 +03:00
bladez d9df6df714 Dynamic respawn improvements (#143)
* Improve creature dynamic respawn
- Now check indoors
- Now allow on elites
- Properly use minimums
- Prevent dynamic respawns near players on an escort quest

* Additional escort status cleanup

* Properly cap reduction rate
Only adjust elite min if it is less than the default minimum. Indoor still takes prio

* Remove unneeded comments

* Properly go to 0 delay if appropriate
2018-06-27 20:12:03 +10:00
ratkosrb 03eb27c42e Remove template arguments from Random Movement Generator.
Its only for creatures so its not needed.
2018-06-27 10:44:33 +03:00
ratkosrb 700d272741 Shadowfang Keep: Move hardcoded scripts to DB (#132)
* Core changes.

* Replace hardcoded SFK scripts.
2018-06-15 12:26:24 +03:00
ratkosrb 70de8027ce Use c++ strings for spell names.
This fixes the shutdown crash.
2018-06-09 08:43:43 +03:00
ratkosrb 96ec451406 In Dreams: Full Quest Implementation (#121)
Scripted entirely in the database now.
2018-06-08 06:12:09 +03:00
ratkosrb 265420f1e2 Add system for scripted map events (#89)
* It compiles.

* Add conditions.

* Script command definitions.

* Add script commands.

* Add migration.

* Rename variable.

* Fix iterator.

* Rename field.
2018-05-25 18:49:10 +03:00
GuybrushGit 4fe1350159 Fix to Anubisath Defenders phase setting (#97)
* Move Spawn event processing out of AI creation

* Set AI before processing spawn events
2018-05-23 20:02:46 +10:00
ratkosrb 9cacea871f Improvements to waypoint system. (#77)
* Redesign of waypoint system.

* More fixes.

* Fix table name in startup error.

* Add point Id to move command.

* Fix startup error.
2018-05-12 16:25:55 +03:00
ratkosrb 9f4a43194c Cleanup of small things that bother me. 2018-05-12 16:07:15 +03:00
ratkosrb bcff89c9a0 Fix combat movement resetting for hardcoded scripts. 2018-05-12 15:49:08 +03:00
GuybrushGit b4d12a0c3b Followup to pet autocast (#63)
* Followup to pet autocast

* Followup to pet autocast
2018-05-02 18:57:01 +10:00
ratkosrb ea66fc38fe Implement EventAI for Pets (#66)
* Added an AI class for Pets that inherits EventAI.

* Added conditions to check target's HP and Mana percents.

* Fixed mistake in Unit::IsImmuneToDamage.

* Made DoSelectLowestHpFriendly work with Players.

* Added a script command to set a creature's react state.

* Moved Timbermaw Ancestor's script to EventAI.
2018-04-28 23:54:45 +03:00
ratkosrb 43124bbe8c Fix crash when using SetMeleeAttack for creature with no victim.
Thanks to Nolin for reporting it.
2018-04-24 01:21:17 +03:00
sipertruk 345d89604e EscortAI proper motion resume after combat. (#45) 2018-04-21 16:41:32 +10:00
ratkosrb 71e02b2fe8 Move caster mobs to Creature Spells and fix any script issues. (#21)
Move close to 600 ranged mobs to creature_spells system.
2018-04-16 15:35:51 +03:00
ratkosrb c6683f1344 Add a few new conditions. 2018-03-16 00:49:14 +02:00
ratkosrb a62768524f Reset Creature Spells template on respawn.
And fix Set Spells Template script command.
2018-03-15 18:20:20 +02:00
ratkosrb 734a0d5085 New DB release and EventAI changes.
https://github.com/brotalnia/database/blob/master/world_full_12_march_2018.7z
2018-03-12 20:19:57 +02:00
GuybrushGit a8ee1d4f7b Prevent raid loot loss on grid unload 2018-03-04 00:38:04 +00:00
brotalnia b455fc2c6a Merge open source repo. 2018-03-02 16:00:16 +02:00
brotalnia 8a108ece26 Merge branch 'screechFix' into 'development'
Fix to pet autocast

See merge request lights-hope/server!28
2018-03-02 13:37:01 +00:00
GuybrushGit a1a4c65b0c Fix to pet autocast 2018-02-27 01:13:29 +00:00
GuybrushGit 1739316d52 More fixes to Vanquished Tentacle 2018-02-27 00:07:12 +00:00
brotalnia 0745892686 Merge branch 'issue-823' into 'development'
Fix to pet in combat health regen

See merge request lights-hope/server!4
2018-02-26 04:23:17 +00:00
Prithu Parker 4ed1253b62 Ossirian and Skeram adjustments
Improved Ossirian crystal spawn logic
Removed the initial crystal spawn for the Ossirian encounter, as it was added in 1.11
No longer allow multiple people to use the same crystal and give Ossirian multiple debuffs
Increased the search range for Ossirian when clicking the crystal

Skeram now only mind controls the closest target
Skeram no longer uses Arcane Explosion when there are less than 5 targets within melee reach
Skeram's pathing and evading should now be more reliable when players are standing on ledges
Skeram's initial Earthshock cast now has a slightly longer delay
Skeram's illusions now share the mana Skeram has before the split
Skeram's illusions now have considerably less health, but still continue to increase in health each split

commit aef5d9756e679fee698b2a31955951b4e2469bca
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 04:42:05 2018 +1100

    Don't change Skeram's bounding radius. It throws off pathfinding again

commit 0c959771b7985285289d28f6a6fefe3de9ee9d82
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 04:29:38 2018 +1100

    Increase Skeram's melee reach and hitbox slightly

commit a99c17cd89505b6a3909ae53d8b529cb9daf7d94
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 04:29:19 2018 +1100

    Allow Skeram to attack through the raised ledges on his platform, and make use of incomplete paths to move near players on them

commit 217eaddfeb0e6c2fe0c3469e099fa248f1605ea5
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 04:28:40 2018 +1100

    Allow creatures with UNIT_STAT_ALLOW_INCOMPLETE_PATH to make use of incomplete movement paths
    Allow attacking creatures to override the melee Z distance limit
    Allow creatures with UNIT_STAT_ALLOW_LOS_ATTACK to melee attack through LoS blocking objects and terrain

commit 7acdbd13d58287d0bce4bd0fbc7223fb6b460524
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 01:11:55 2018 +1100

    Increased the initial timer for Skeram's earth shock so that he does not immediately begin Earthshocking after a split or on aggro
    Now only cast Arcane Explosion if more than 4 players are in melee range
    Now only cast True Fulfillment on the closest player
    Lowered the health of all Illusions. The first split had a mathematical error and was 1% higher than intended, the 2nd and 3rd splits had way more health then they should
    The illusion health is now 12.5, 15 and 17.5 of Skeram's maximum HP, down from 13.3, 25 and 50
    Skeram's illusions now have the same mana as him on split

commit 671bcc8ea657ce80ff8e85ffad54fb841160abfa
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Tue Feb 13 00:07:09 2018 +1100

    Now maintain a short history of used indexes to ensure that we do not get stuck in a single area
    Now enforce a minimum distance to assist in forcing crystal spawn variety

commit 058527f37061cf8d85677952a491615b290e052c
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 18:45:33 2018 +1100

    Move Ossirian crystal management to the instance rather than doing inside Ossirian's AI

commit cc99ef42e4cfbc909496ac29b255c556fe524f6e
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 18:44:54 2018 +1100

    Allow game objects to be added directly to maps by scripts

commit 4cb31cb69495b27438111911ed2a02572be447f5
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 07:48:37 2018 +1100

    Further expand Ossirian's crystal search range

commit 6aecf68a4c5f28e2ffa4f17d1ac248a3c2adb0f8
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 07:46:03 2018 +1100

    Improved the crystal searching logic to build a list of possible indexes rather than randomly selecting which could have bad RNG

commit 211d259a4e96d75d231f2206fe3e9605a369374f
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 06:44:42 2018 +1100

    Fix double named var

commit 66a4f34f1e3e74fa30d7da7e218a1adbd273dbde
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 06:42:04 2018 +1100

    Adjust new crystal spawn logic

commit 9efc167d88b23c871d77cae05e83a5a481ad7a6a
Author: Prithu Parker <prithu@iinet.net.au>
Date:   Mon Feb 12 04:26:35 2018 +1100

    Extend Ossirian search range
    Replace FindNearCreature with GetClosestCreatureWithEntry, the method was being used incorrectly here
2018-02-14 18:26:51 +11:00