Commit Graph

92 Commits

Author SHA1 Message Date
Engilas
f6e52f6b3d Core/SmartAI: AI change on charmed (#26065)
* Fix AI refresh on charmed

* Remove unnecessary refresh

* Check SMART_EVENT_FLAG_WHILE_CHARMED flag
2021-02-14 14:38:06 +01:00
Giacomo Pozzoni
96b289cadb Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance (and other SMART_ACTION_CAST fixes) (#25778)
* Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance

Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance, always making the action trigger.

* Fix SMART_ACTION_CAST with SMART_EVENT_FLAG_NOT_REPEATABLE not casting the spell at all if rolled chance was successful but creature couldn't cast the spell

* Prevent linked actions if SMART_ACTION_CAST couldn't be completed and will be retried later
2020-12-30 21:18:00 +01:00
Giacomo Pozzoni
a58aeb41f4 Core/SAI: Reduce the chance of infinite loops/stack overflows (#25398)
Fixes #24092
2020-09-04 21:25:58 +02:00
Giacomo Pozzoni
cbed1039c4 Core/SAI: Implement SMART_TARGET_ACTION_INVOKER in SMART_EVENT_FRIENDLY_HEALTH_PCT (#25318)
* Core/SAI: Implement SMART_TARGET_ACTION_INVOKER in SMART_EVENT_FRIENDLY_HEALTH_PCT

* Require radius (5th parameter) to be set
2020-08-25 14:14:06 +02:00
Giacomo Pozzoni
ca25e8d019 Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events (#25238)
* Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events

* Core/SAI: Re-sort the events only when needed

* Fix some priority reset and wrong mEventSortingRequired handling

* Code cleanup.
Sort only events loaded from db (not stored events, not timed action list).

* Code cleanup.
Raise priority of failed casts so they are retried before other spells

* Keep priority of the action fails and is rescheduled on next update

* Don't try recasting a spell in SMART_ACTION_CAST if there are multiple targets and at least 1 was successful
2020-08-16 16:50:04 +02:00
Giacomo Pozzoni
07fd84b679 Core/Misc: Fix static analysis issues (#25194) 2020-08-04 11:36:47 +02:00
Rothend
e7a714f66c Core/SmartAI: allow AreaTrigger SAI scripts to use the player triggering it as base object for actions and targeting (#24817)
* Core/SmartAI: allow AreaTrigger SAI scripts to use the player triggering it as base object for actions and targeting.

Closes #23669
Closes #24791
Closes #24792
Closes #24793

* Apply suggested changes.

* Initialize atPlayer in the constructor

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-06-17 22:06:56 +02:00
Giacomo Pozzoni
90b00288c2 Core/SAI: Allow SMART_TARGET_ACTION_INVOKER to target GameObjects (#24416)
* Core/SAI: Allow SMART_TARGET_ACTION_INVOKER to target GameObjects

* Include new Coalesce(..) template by @Shauren
2020-04-09 11:59:10 +02:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
jackpoz
7634a57f64 Core/SAI: Add a 4th target parameter to SAI 2018-09-21 17:56:20 +02:00
Treeston
cfc77fd843 Scripts/SmartAI: SetData now has an invoker (if the setting is done by something using SmartAI).
Also, some refactors. SMARTAI IS SUCH A FUCKING CLUSTERFUCK I SWEAR.
2018-02-15 11:44:37 +01:00
Treeston
2cd5992f37 oops, now it builds (and a bonus refactor that annoyed me) 2018-02-13 18:42:28 +01:00
Treeston
6fb0bc1038 Scripts/SmartAI: Forward invoker to invoked action list actions. Also JustAppeared -> InitializeAI. 2018-02-13 18:29:38 +01:00
jackpoz
1c60af6328 Core/SAI: Add a 5th parameter to SAI events 2018-01-12 20:17:53 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
ariel-
619a5534c5 Core/SmartAI: implemented SMART_EVENT_EVENT_PHASE_CHANGE
- Use instead of Update + event_phase_mask when action needs to be synchronized
2017-06-10 19:20:44 -03:00
ariel-
866074b689 Core/SAI: properly validate stored targets when using SmartTrigger and fix a related crash 2017-06-04 16:44:43 -03:00
ariel-
a97439e8d6 Core/SAI: Change SmartScript::GetTargets to return an ObjectList instead of a ObjectList*
Applied the same treatment to GetWorldObjectsInDist

Honestly no idea why the original idea insisted so much
on using pointers. No more missing null checks or deletes.

SmartAI's "ObjectList" is now a std::vector instead of a std::list
because no where it was being used as an actual list.

Original idea by DDuarte :P
2017-06-03 05:21:06 -03: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
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
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
ariel-
3e596376a7 Core/SmartScripts: fixup SMART_EVENT_FLAG_WHILE_CHARMED behaviour to only mean charmed creatures (#17738 follow-up)
Unit::IsControlledByPlayer is a expected value for TempSummons (like some triggers used in quests, summoned by spells).
Previous logic broke a lot of quests which use triggers to do stuff.

Allow JustSummoned and events linked from other events with flag set also in charmed (prevents breaking event chains)
Allow vehicles (needed for vehicles with SmartAI, eg Iron Rune Constructs and You: Rocket Jumping)
2016-10-14 03:59:13 -03:00
treeston
96f90381e3 Scripts/SmartScripts: Fix charmed behavior for SmartAI. For real this time.
- Core AI logic will no longer issue attack/movement commands while under player control.
- Add new SMART_EVENT_FLAG_WHILE_CHARMED (0x200). Any event without this flag won't run while charmed.
- Add SMART_EVENT_FLAG_WHILE_CHARMED to existing actions, except a select subset (movement, talking, and nontriggered casts, pretty much).
2016-09-02 23:11:13 +02:00
treeston
152b3ad5b9 Scripts/SmartAI: Some clean-up work:
- NULL -> nullptr
- Rename "AssistPlayerInCombat(who)" to "AssistPlayerInCombatAgainst(who)" to reflect what the method actually does
- Code style

No functionality was changed.
2016-08-05 12:41:56 +02:00
Naios
9f61b72679 Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.

(cherry picked from commit bf33159a70)
2016-03-24 02:46:42 +01:00
ariel-
b08038c8b6 Fix typo after dcb7082277 2016-01-10 23:38:57 -03:00
Rushor
923a368ac7 Update copyright note for 2016 2016-01-01 12:02:33 +01:00
MitchesD
3b90b0368a Core/Misc: fix warning and misc codestyle fixes 2015-11-26 19:28:53 +01:00
Vincent-Michael
7d5e7102cd Core: Whitespace cleanup 2015-11-07 20:01:53 +01:00
pete318
b1032ed620 Change many uint32 to ObjectGuid::LowType in line with 6.x changes. 2015-10-12 23:10:41 +02:00
pete318
dcb7082277 Map local guids 6.x -> 3.3.35:
Implemented:
  ca83e14f8b
  ee1c1b97be
  18e4ab6911
  bf37446b3c
  cb854a2b7b

* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396e
* 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
* Added new function to return but not increment guid
* Adjusted .debug loadcells to show low guid in map before/after load
* Added debug messages for creature spawn/destroy, for map guid debugging
* Store all Gameobjects and Creatures added to OutdoorPvP, so the callback script can be removed when OutdoorPvP instance is destroyed.
2015-09-22 21:33:57 +02:00
Kelno
c142282e34 Removed useless calculation in last commit 2015-05-20 16:16:11 +02:00
Kelno
9e985f81b4 Fixed a math error in SmartScript::DecPhase(int32) 2015-05-20 15:32:52 +02:00
MitchesD
8d58bb93c9 Core/SAI: fix merge conflict
it's good to use CTRL + S
2015-04-02 18:34:31 +02:00
MitchesD
1de02764c7 Core/SmartScripts: added SMART_ACTION_SET_COUNTER and SMART_EVENT_COUNTER_SET
as per request of DB developers

(cherry picked from commit 23b1c042ad)

Conflicts:
	src/server/game/AI/SmartScripts/SmartScript.h
2015-04-02 18:30:27 +02:00
Vincent-Michael
f3e86d3e68 Update copyright note for 2015
Happy new year

Conflicts:
	src/server/bnetserver/Authentication/AuthCodes.h
	src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp
	src/server/bnetserver/Authentication/BattlenetPacketCrypt.h
	src/server/bnetserver/Packets/AchievementPackets.h
	src/server/bnetserver/Packets/AuthenticationPackets.cpp
	src/server/bnetserver/Packets/AuthenticationPackets.h
	src/server/bnetserver/Packets/BitStream.cpp
	src/server/bnetserver/Packets/BitStream.h
	src/server/bnetserver/Packets/CachePackets.cpp
	src/server/bnetserver/Packets/CachePackets.h
	src/server/bnetserver/Packets/ChatPackets.h
	src/server/bnetserver/Packets/ConnectionPackets.cpp
	src/server/bnetserver/Packets/ConnectionPackets.h
	src/server/bnetserver/Packets/FriendsPackets.cpp
	src/server/bnetserver/Packets/FriendsPackets.h
	src/server/bnetserver/Packets/PacketManager.cpp
	src/server/bnetserver/Packets/PacketManager.h
	src/server/bnetserver/Packets/Packets.h
	src/server/bnetserver/Packets/PacketsBase.cpp
	src/server/bnetserver/Packets/PacketsBase.h
	src/server/bnetserver/Packets/PresencePackets.cpp
	src/server/bnetserver/Packets/PresencePackets.h
	src/server/bnetserver/Packets/ProfilePackets.h
	src/server/bnetserver/Packets/SupportPackets.h
	src/server/bnetserver/Packets/WoWRealmPackets.cpp
	src/server/bnetserver/Packets/WoWRealmPackets.h
	src/server/bnetserver/Realms/RealmList.cpp
	src/server/bnetserver/Realms/WorldListener.cpp
	src/server/bnetserver/Realms/WorldListener.h
	src/server/bnetserver/Server/ComponentManager.cpp
	src/server/bnetserver/Server/ComponentManager.h
	src/server/bnetserver/Server/ModuleManager.cpp
	src/server/bnetserver/Server/ModuleManager.h
	src/server/bnetserver/Server/Session.cpp
	src/server/bnetserver/Server/Session.h
	src/server/bnetserver/Server/SessionManager.cpp
	src/server/bnetserver/Server/SessionManager.h
	src/server/game/Accounts/BattlenetAccountMgr.cpp
	src/server/game/Accounts/BattlenetAccountMgr.h
	src/server/game/Battlegrounds/Zones/BattlegroundBFG.cpp
	src/server/game/Battlegrounds/Zones/BattlegroundBFG.h
	src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp
	src/server/game/Battlegrounds/Zones/BattlegroundTP.h
	src/server/game/Entities/AreaTrigger/AreaTrigger.cpp
	src/server/game/Entities/AreaTrigger/AreaTrigger.h
	src/server/game/Entities/Item/ItemTemplate.cpp
	src/server/game/Guilds/GuildFinderMgr.cpp
	src/server/game/Guilds/GuildFinderMgr.h
	src/server/game/Handlers/GuildFinderHandler.cpp
	src/server/game/Handlers/VoidStorageHandler.cpp
	src/server/game/Movement/MovementStructures.cpp
	src/server/game/Movement/MovementStructures.h
	src/server/game/Movement/PathGenerator.cpp
	src/server/game/Server/BattlenetServerManager.cpp
	src/server/game/Server/BattlenetServerManager.h
	src/server/game/Server/Packet.cpp
	src/server/game/Server/Packet.h
	src/server/game/Server/Packets/AchievementPackets.cpp
	src/server/game/Server/Packets/AchievementPackets.h
	src/server/game/Server/Packets/AuctionHousePackets.cpp
	src/server/game/Server/Packets/AuctionHousePackets.h
	src/server/game/Server/Packets/AuthenticationPackets.cpp
	src/server/game/Server/Packets/AuthenticationPackets.h
	src/server/game/Server/Packets/BattlegroundPackets.cpp
	src/server/game/Server/Packets/BattlegroundPackets.h
	src/server/game/Server/Packets/ChannelPackets.cpp
	src/server/game/Server/Packets/ChannelPackets.h
	src/server/game/Server/Packets/CharacterPackets.cpp
	src/server/game/Server/Packets/CharacterPackets.h
	src/server/game/Server/Packets/ChatPackets.cpp
	src/server/game/Server/Packets/ChatPackets.h
	src/server/game/Server/Packets/ClientConfigPackets.cpp
	src/server/game/Server/Packets/ClientConfigPackets.h
	src/server/game/Server/Packets/CombatLogPackets.cpp
	src/server/game/Server/Packets/CombatLogPackets.h
	src/server/game/Server/Packets/CombatPackets.cpp
	src/server/game/Server/Packets/CombatPackets.h
	src/server/game/Server/Packets/EquipmentSetPackets.cpp
	src/server/game/Server/Packets/EquipmentSetPackets.h
	src/server/game/Server/Packets/GameObjectPackets.cpp
	src/server/game/Server/Packets/GameObjectPackets.h
	src/server/game/Server/Packets/GuildPackets.cpp
	src/server/game/Server/Packets/GuildPackets.h
	src/server/game/Server/Packets/ItemPackets.cpp
	src/server/game/Server/Packets/ItemPackets.h
	src/server/game/Server/Packets/LootPackets.h
	src/server/game/Server/Packets/MiscPackets.cpp
	src/server/game/Server/Packets/MiscPackets.h
	src/server/game/Server/Packets/MovementPackets.cpp
	src/server/game/Server/Packets/MovementPackets.h
	src/server/game/Server/Packets/NPCPackets.cpp
	src/server/game/Server/Packets/NPCPackets.h
	src/server/game/Server/Packets/QueryPackets.cpp
	src/server/game/Server/Packets/QueryPackets.h
	src/server/game/Server/Packets/QuestPackets.cpp
	src/server/game/Server/Packets/QuestPackets.h
	src/server/game/Server/Packets/ReputationPackets.cpp
	src/server/game/Server/Packets/ReputationPackets.h
	src/server/game/Server/Packets/SpellPackets.cpp
	src/server/game/Server/Packets/SpellPackets.h
	src/server/game/Server/Packets/SystemPackets.cpp
	src/server/game/Server/Packets/SystemPackets.h
	src/server/game/Server/Packets/TalentPackets.cpp
	src/server/game/Server/Packets/TalentPackets.h
	src/server/game/Server/Packets/TradePackets.h
	src/server/game/Server/Packets/WorldStatePackets.cpp
	src/server/game/Server/Packets/WorldStatePackets.h
	src/server/game/Server/WorldSocket.cpp
	src/server/ipc/CMakeLists.txt
	src/server/ipc/Commands.cpp
	src/server/ipc/Commands.h
	src/server/ipc/ZMQTask.cpp
	src/server/ipc/ZMQTask.h
	src/server/ipc/ZmqContext.cpp
	src/server/ipc/ZmqContext.h
	src/server/ipc/ZmqListener.cpp
	src/server/ipc/ZmqListener.h
	src/server/ipc/ZmqMux.cpp
	src/server/ipc/ZmqMux.h
	src/server/ipc/ZmqWorker.cpp
	src/server/ipc/ZmqWorker.h
	src/server/scripts/Commands/cs_battlenet_account.cpp
	src/server/scripts/Commands/cs_mmaps.cpp
	src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp
	src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp
	src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp
	src/server/scripts/EasternKingdoms/BaradinHold/instance_baradin_hold.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.h
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp
	src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
	src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
	src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
	src/server/scripts/EasternKingdoms/zone_ironforge.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
	src/server/scripts/Kalimdor/Firelands/firelands.h
	src/server/scripts/Kalimdor/Firelands/instance_firelands.cpp
	src/server/scripts/Kalimdor/HallsOfOrigination/boss_anraphet.cpp
	src/server/scripts/Kalimdor/HallsOfOrigination/boss_earthrager_ptah.cpp
	src/server/scripts/Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp
	src/server/scripts/Kalimdor/HallsOfOrigination/halls_of_origination.h
	src/server/scripts/Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_felwood.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp
	src/server/scripts/Maelstrom/Stonecore/boss_high_priestess_azil.cpp
	src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp
	src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp
	src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
	src/server/scripts/Maelstrom/Stonecore/stonecore.cpp
	src/server/scripts/Maelstrom/Stonecore/stonecore.h
	src/server/shared/Cryptography/Authentication/AuthCrypt.h
	src/server/shared/Cryptography/Authentication/PacketCrypt.cpp
	src/server/shared/Cryptography/Authentication/WorldPacketCrypt.cpp
	src/server/shared/Cryptography/HmacHash.cpp
	src/server/shared/Cryptography/SHA256.cpp
	src/server/shared/Cryptography/SHA256.h
	src/server/shared/Database/Implementation/HotfixDatabase.cpp
	src/server/shared/Database/Implementation/HotfixDatabase.h
	src/server/shared/Realm/Realm.cpp
	src/server/shared/Realm/Realm.h
	src/tools/connection_patcher/CMakeLists.txt
	src/tools/connection_patcher/Constants/BinaryTypes.hpp
	src/tools/connection_patcher/Helper.cpp
	src/tools/connection_patcher/Helper.hpp
	src/tools/connection_patcher/Patcher.cpp
	src/tools/connection_patcher/Patcher.hpp
	src/tools/connection_patcher/Patches/Common.hpp
	src/tools/connection_patcher/Patches/Mac.hpp
	src/tools/connection_patcher/Patches/Windows.hpp
	src/tools/connection_patcher/Patterns/Common.hpp
	src/tools/connection_patcher/Patterns/Mac.hpp
	src/tools/connection_patcher/Patterns/Windows.hpp
	src/tools/connection_patcher/Program.cpp
	src/tools/map_extractor/loadlib/DBFilesClientList.h
2015-01-01 00:32:50 +01:00
joschiwald
90a2acfbdf Core/SAI: changed multiple validation checks 2014-10-11 18:52:01 +02:00
DDuarte
af7daba02d Core/SAI: Remove SMART_ACTION_STORE_VARIABLE_DECIMAL
It's not used.
2014-09-17 01:07:29 +01:00
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
Shauren
7532864264 Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
2014-07-17 15:42:57 +02:00
Dehravor
cbd36d5a4e Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros 2014-05-01 11:19:32 +02:00
jackpoz
28946ac5db Core/SAI: Improve error log
Log both target and current Object when checking if a Creature/GameObject have SmartAI enabled.
2014-02-08 22:38:29 +01:00
jackpoz
dbed818f6f Core/SAI: Fix crash
Disable script type SMART_SCRIPT_TYPE_TIMED_ACTIONLIST actions if they are trying to overwrite the timed action list while iterating it.
This was invalidating the iterator and deleting any smart action stored in it, including the current executed one.

Valgrind log:
 Invalid read of size 1
  at SmartScript::OnUpdate(unsigned int) (SmartScript.cpp:3258)
  by SmartAI::UpdateAI(unsigned int) (SmartAI.cpp:331)
  by Creature::Update(unsigned int) (Creature.cpp:544)
 Address 0x1807d9b2 is 10 bytes after a block of size 40 alloc'd
  at operator new(unsigned long) (vg_replace_malloc.c:319)
  ...
  by SmartAIMgr::LoadSmartAIFromDB() (SmartScriptMgr.cpp:231)
  by World::SetInitialWorldSettings() (World.cpp:1724)
  by Master::Run() (Master.cpp:169)
  by main (Main.cpp:142)
2014-02-08 21:59:35 +01:00
jackpoz
b8625f41bd Core/SAI: Fix crash in SmartScript
Fix crash in SmartScript storing WorldObject* instead of guid as targets in SmartScript::mTargetStorage , used by SMART_TARGET_STORED target type , SMART_ESCORT_TARGETS and other escort related code.
Fixes #11228 , #10157 .

Valgrind log:
 Invalid read of size 4
  at : Object::GetTypeId() const (Object.h:140)
  by : SmartScript::IsPlayer(WorldObject*) (SmartScript.h:73)
  by : SmartScript::ProcessAction(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:330)
  by : SmartScript::ProcessEvent(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:2662)
  by : SmartScript::ProcessAction(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:2226)
  by : SmartScript::ProcessTimedAction(SmartScriptHolder&, unsigned int const&, unsigned int const&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:2238)
  by : SmartScript::ProcessEvent(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:2685)
  by : SmartScript::UpdateTimer(SmartScriptHolder&, unsigned int) (SmartScript.cpp:3198)
  by : SmartScript::OnUpdate(unsigned int) (SmartScript.cpp:3244)
  by : SmartAI::UpdateAI(unsigned int) (SmartAI.cpp:331)
  by : Creature::Update(unsigned int) (Creature.cpp:544)
  by : void Trinity::ObjectUpdater::Visit<Creature>(GridRefManager<Creature>&) (GridNotifiers.cpp:340)
2014-01-12 20:23:13 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren
107af52853 Core/Chat: Refactored building chat packets
* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
2013-12-23 14:23:49 +01:00
Spp
65cd07a288 Core: Improve error messages for linked_respawn table (and minor cosmetic changes here and there) 2013-11-11 11:03:32 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00