Commit Graph

4374 Commits

Author SHA1 Message Date
ariel-
ace2a75197 Core/Scripts: kill a warning 2017-02-25 05:17:33 -03:00
ariel-
01f5befcec Core/Scripts: Thrusting Hodir's Spear
- Everything is sniffed, enjoy this hell of a quest!

Closes #12808
2017-02-25 04:46:02 -03:00
Gustavo
4224259d83 Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED (#18136) 2017-02-24 12:20:20 +01:00
ariel-
9934a43e09 Core/Scripts: kill a warning 2017-02-23 11:33:40 -03:00
ariel-
32e2207ab9 Core/Scripts: Victory Rush and Rune Strike proc correction
(d0f760420a follow up)
Closes #19192
2017-02-23 11:30:25 -03:00
ariel-
d0f760420a Core/Scripts: remove no longer needed scripts, use db attribute for disabling procs
(e7ccd8ea3f followup)

- Fix some broken procs after c0cb823a91

Closes #19068
2017-02-22 17:54:12 -03:00
Keader
bb3c964e7c Core/Scripts: Fixed Illidan epic sounds again (#19184) 2017-02-22 13:13:22 -03:00
ariel-
eac9c1f0b9 Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60
Closes #15734
2017-02-21 22:38:30 -03:00
Gustavo
3a67c8e361 Core/Misc Remove Tabs and Whitespaces (#19179) 2017-02-21 18:37:34 +01:00
xinef1
ae9d01a324 Store cached static data queries, instead of building them in every query opcode (#18637)
- Added config option to enable / disable cache
- Reinitialize data on reload command use
- Always send WDB fields in item query
2017-02-20 16:27:08 -03:00
Keader
50973e9d6f Core/Scripts: Fixed epic sounds on Illidan Fight (#19172)
Thanks Kittnz for notice <3
2017-02-20 08:38:30 -03:00
Kittnz
495339a2c7 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-02-19 20:47:40 +01:00
xinef1
b0ae5fadd1 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-17 21:33:18 +01:00
Gustavo
4536846d7d Core/Scripts Update boss Skadi the Ruthless (#19114) 2017-02-12 05:43:55 -03:00
jackpoz
865a3a47ea Core/Misc: Fix static analysis issues 2017-02-11 21:01:11 +01:00
Gustavo
87f2cb04ca Core/Scripts Rework boss Terestian Illhoof (Karazhan) (#19057) 2017-02-09 23:01:39 -03:00
Keader
8f00aa92de Build fix and codestyle 2017-02-09 21:12:12 -03:00
Afgann
21b5a377e4 Core/Scripts: Moorabi encounter updated. (#19013) 2017-02-09 21:07:29 -03:00
ariel-
149e449506 Update spell_item.cpp
Small indent and codestyle fixes
2017-02-09 16:01:43 -03:00
Gustavo
d06391d062 Core/Scripts Update boss Maiden of Virtue (#19058) 2017-02-05 19:45:13 -03:00
xinef1
14dfc377b4 Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer
Fixed some more crashes

* Correction
2017-02-05 23:42:31 +01:00
xinef1
59ce3d6c9b Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030
2017-02-05 23:14:19 +01:00
Gustavo
169e150628 Core/Scripts: boss The Curator (Karazhan) rework (#19040)
Closes #16099
2017-02-05 17:52:14 -03:00
Keader
8731975187 Core/Scripts: Illidan Stormrage Rewrite (#18963)
Closes #5018
2017-02-05 12:45:29 -03:00
Xinef
7c7b877c3f Core/Achievements: Optimized resetting achievement criteria by condition and changed the functionality to properly reset all possible criteria with given condition
Closes #18905
2017-02-05 16:41:45 +01:00
xinef1
e1f14215d8 Core/Creatures: Various fixes for creatures, regarding combat conditions, despawning, and few others (#18998)
* Made some changes to kiting mechanics, simplified code and made taunt auras prolong combat no matter the distance from the spawn
Unified some creature despawning code, removed some brutal direct calls in scripts
Don't play death anim on forced despawn
Removed some redundant visibility changes on creature despawn
Fixed possible problem with pet initializing template info from difficulty greater than normal
Properly keep UNIT_FLAG_IN_COMBAT on UpdateEntry call
Moved RegenerateMana function to general Regenerate(Power) function
Fixed increased health regeneration from polymorph for pets
Implemented CREATURE_TYPE_FLAG_GHOST_VISIBLE, those creatures will be properly seen when player is dead also
Removed hackfix from Gaeriyan and Franclorn Forgewright, fixed properly
Simplified ForcedRespawnTime code in ForcedDespawn
Do not allow to assist unit while evading or when enemy is evading
Do not allow to attack other units when evading or when the unit is evading
Corrected distance checking code before creature is allowed to evade, should fix some common problems
Properly return summon position for summoned creatures as their respawn position
Properly stop all moving units on gossip hello, no matter their npc flags
2017-02-05 15:39:22 +01:00
xinef1
93746e8c4a Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities
- Implemented binary resistances
- Corrected resistances calculations
- Pets properly inherit players spell penetration
- Fixed doubled block calculation for damaging melee spells
- Auras removing snare effects will only remove the snaring component
- Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath)
- Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools
- Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction
- Demonic Circle: Teleport no longer removes root effects
2017-02-04 19:50:32 -03:00
xinef1
86da1a19bb 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-04 22:37:16 +01:00
Gustavo
ad8a71c084 Core/Scripts: boss Nightbane rework (Karazhan) (#18899)
Closes #10017
2017-02-04 11:56:00 -03:00
Keader
ce774918a7 Core/Scripts: Updated Ruby Sanctum instance model 2017-02-04 10:13:22 -03:00
Keader
c58dd6c166 Core/Ruby Sanctum: Improved General Zarithrian encounter
* Fixed spell timers
* Improved Codestyle
* Fixed minions number in 25 man
* Fixed movement
* Implemented DespawnAtEvade
*
2017-02-03 22:28:20 -03:00
ariel-
5e46bb3e8c Core/Scripts: fix penance procs with Unchained magic
Closes #19005
2017-01-30 02:43:24 -03:00
Gerhood
bab59b28fa Core/Spells: implement Mad/Crazy Alchemist's potions 2017-01-29 14:06:40 +01:00
ariel-
317efd51ec Core/Scripts: remove GMs from Sindragosa's Fury's targetlist
By Keader
Ref #18452
2017-01-28 01:42:50 -03:00
ariel-
6f9e8b6c91 Core: add some missing Player Name normalization on input data 2017-01-28 01:27:39 -03:00
xinef1
b955456008 Few small optimizations here and there (#18684)
Changes list:
- Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo)
- Extended CharacterInfo structure with GuildId
- Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5)
- Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName
- Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid
- Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously
- Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo
- Replaced synchronous db calls with CharacterInfo lookups
- Removed ObjectMgr::GetPlayerGUIDByName, as it used db query
- Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster
- Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players
- Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure
- Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable
- Changed some functions checking quest status to use other functions for quest status check instead of duplicating code
- Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query
- Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query
- Added callback to unwrap wrapped items asynchronously
- Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database
2017-01-28 01:00:28 -03:00
Keader
3c4dc3ec4f Core/Scripts: Removed double check of CheckRequiredBosses in Sindragosa 2017-01-27 23:42:25 -03:00
Keader
15ea5b1b8d Core/Entities: Implemented CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE (#18980) 2017-01-27 20:47:54 -02:00
Gustavo
f57132b795 Core/Scripts Fix issue with Lady Deathwhisper's door 2017-01-26 00:17:46 +01:00
ariel-
2db3e86d9b Core/Scripts: implemented Gnomish Harm Prevention Belt
Updates #18542
2017-01-23 22:03:24 -03:00
ariel-
e33f0e0606 Core/Scripts: implement lightwell aura removal at 30% damaged
Ref #18542
2017-01-23 15:02:12 -03:00
ariel-
a8c2d59864 Core/Scripts: Fix Lock and Load proc with Frost trap 2017-01-21 23:48:04 -03:00
Keader
591a25500d Core/Scripts: Fixed Crok event not starting
[*] Fixed Svalna entering in combat with people ouside of room
Closes #8186
2017-01-21 11:03:26 -03:00
Rushor
a3c6880579 Revert "[3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)" (#18888)
This reverts commit 28050f338d.

Conflicts:
	src/server/game/AI/SmartScripts/SmartAI.cpp
	src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
2017-01-20 14:16:47 +01:00
Keader
55c3eb66d7 Core/Scripts: Removed unneeded check in Blood Prince Council 2017-01-13 17:07:03 -03:00
Keader
a884660d50 Core/Scripts: Fixed issues in Gal'darah fight
Closes #16219

* Added DespawnAtEvadeMethod
* Fixed Agro
* Implemented Stampede
* Fixed Rhino Spirit flags
* Updated codestyle
2017-01-09 11:36:51 -03:00
Keader
bef8a6dee5 Core/RubySanctum: Updates in Saviana Ragefire encounter
* Fixed Codestyle
* Fixed Spell timers
* Added DespawnAtEvade Method
2017-01-08 23:44:36 -03:00
Rochet2
117d1c31c9 Scripts/Commands: Fix guid usage and enhance commands (#18278)
- Fix targeting gameobjects and creatures for .dist and .gps. The old code used DB guid to search from core generated guid lists.
- Fix some error messages saying 'no player found' even if creatures and gameobjects and players were searched
- Change atoi to atoul when receiving lowguids as string or other uint32 values
- Use ObjectGuid::LowType instead of uint32 for lowguid type
- Allow .gob info to take in gameobject guid link as well as entry link in addition to gameobject entry and update the documentation of the command
- Change .gob delete to post the spawnid (dbguid) instead of the ingame generated guid (which is basically never seen or used by the player in any other commands that I see)
- Allow spawntimesecs to be negative when spawning a gameobject
- Disable searching by ingame spawn id in commands. (it makes little sense for a user to provide a number which is then attempted to be used as DB guid and non DB guid when both could have a match)
- Update .gob turn documentation to tell about possibility to provide orientation in command
- Correct the types in .gob add command result trinity_string
- Correct the creature search for .npc del
- Change .event to .event info
- Add .go offset command
- Remove the .go command for empty string (no subcommand given) because it just used .go xyz
- Extend .gob info to show size, faction, flags and model dimensions
- Remove some unnecessary casts
- Document .wp show better (first and last were not documented)
- Insert spawnid to .wp show info error message
- Fix spawntime printing for .gobject target
- Fix guid targetting for .npc set movetype
- Fix query by spawnid for .wp show info
- Fix deleting of existing waypoints when twice doing the command .wp show on
- Fix deleting of existing waypoints when doing the command .wp show off
- Change wpguid column in DB and in core to uint32, which is what the spawnid type is in core and db.
2017-01-08 04:55:22 +01:00
ariel-
f6dc66e55f Core/Script: PCH issues 2017-01-07 13:27:43 -03:00
ariel-
db34f6480f DB/Script: The Only Cure is More Green Glow
Closes #1723

SQL by Staleness89, corrections by Killyana
Script by Keader, corrections by sirikfoll and me
2017-01-07 13:23:20 -03:00