Commit Graph

262 Commits

Author SHA1 Message Date
DDuarte
25d1be5a75 Merge branch 'master' into 4.3.4
Conflicts:
	src/server/game/Battlefield/Battlefield.cpp
	src/server/game/Battlegrounds/Battleground.cpp
	src/server/game/Chat/Chat.cpp
	src/server/game/Chat/Chat.h
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Texts/CreatureTextMgr.cpp
	src/server/scripts/Commands/cs_wp.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
	src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp
	src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_thousand_needles.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
2014-01-10 06:13:26 +00: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
Vincent_Michael
736093e91b Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/DungeonFinding/LFGMgr.cpp
	src/server/scripts/Kalimdor/zone_silithus.cpp
2013-12-20 17:26:27 +01:00
Discover-
c5788de8a4 Core/SAI: Fix another memory leak, thanks to @Xter 2013-12-19 10:50:16 +01:00
Discover-
e44e932d4d Core/SAI: Fix two memoryleaks in my previous commits. Thanks to @Xter for the notice. 2013-12-19 10:28:45 +01:00
Vincent_Michael
2ded11354d Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4 2013-12-18 23:48:20 +01:00
Discover-
e5f7beecf5 Core/SAI: Using SMART_ACTION_FORCE_DESPAWN now despawns the given target_type instead of always the creature itself. 2013-12-18 10:06:19 +01:00
Discover-
a0f7fee922 Core/SAI: Fix compile
Core/SAI: Don't limit SMART_ACTION_SET_INGAME_PHASE_MASK to unit targets only. Thanks to @Shauren for the notice.
2013-12-17 11:38:29 +01:00
Discover-
154ee466eb Core/SAI: Using the action_type SMART_ACTION_SET_REACT_STATE now sets the react state of the target_type. Won't break any scripts as all current cases of this action_type have target_type 1 (SMART_TARGET_SELF). 2013-12-17 11:10:23 +01:00
Discover-
1f4d585bef Core/SAI: In all npc flag related action_types we now check if the target is a creature instead of an unit (creature/player). 2013-12-17 11:06:07 +01:00
Discover-
20a22662df Core/SAI: Using SMART_ACTION_SET_FOLLOW with target_type 0 (SMART_TARGET_NONE) will now stop the following completely. Fixes 6 scripts in a clean TDB already using this functionality even though it wasn't implemented. 2013-12-17 10:12:23 +01:00
Discover-
54b7162f1d Core/SAI: Make SMART_ACTION_SET_INGAME_PHASE_MASK set the phasemask of the target_type instead of always the source calling the action type. 2013-12-17 09:44:06 +01:00
Vincent_Michael
f7aedaef33 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Spells/SpellInfo.h
	src/server/game/World/World.cpp
2013-12-15 03:47:21 +01:00
Discover-
e17af3f203 Core/Quests: Fix an issue where auto-completed quests would not be automatically completed if the quest was added through either the SmartAI action_type SMART_ACTION_ADD_QUEST, the spell effect SPELL_EFFECT_QUEST_START or the opcode CMSG_QUEST_CONFIRM_ACCEPT. Also fixes auto-complete quests in the SAI and opcode case not calling the AI hook. 2013-12-14 19:42:31 +01:00
Discover-
4ca63412c8 Core/SmartAI: SMART_ACTION_UPDATE_TEMPLATE will no longer ignore the target type and force the source creature (creature only) to be updated; from now on it updates the given targets to the given entry (actionparam1) 2013-12-13 09:45:58 +01:00
Vincent_Michael
07024d3ea8 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/DataStores/DBCEnums.h
	src/server/scripts/Commands/cs_wp.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
2013-12-11 20:34:44 +01:00
joschiwald
eddf1b5a64 Scripts: replace some SetOrientation() calls with spline packets and some random changes 2013-12-10 18:46:11 +01:00
Vincent_Michael
e8be55aa8b Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/AI/CoreAI/TotemAI.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Guilds/Guild.h
	src/server/game/Movement/Spline/MoveSplineInit.cpp
	src/server/game/Movement/Spline/MovementPacketBuilder.cpp
	src/server/game/Movement/Spline/MovementPacketBuilder.h
	src/server/game/Spells/SpellMgr.cpp
	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.cpp
2013-12-08 20:27:46 +01:00
Malcrom
b407e72339 Core/SmartScript: Allow flag to be added to spell to determine combat movement.
Greatly simplifies SAI combat scripting.
2013-12-03 20:53:33 -03:30
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
ab2d26cb91 Merge branch 'master' into 4.3.4
Conflicts:
	src/server/game/AI/EventAI/CreatureEventAI.cpp
	src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlegrounds/ArenaTeam.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Conditions/ConditionMgr.cpp
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DungeonFinding/LFGMgr.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Guilds/GuildMgr.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattleGroundHandler.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/GroupHandler.cpp
	src/server/game/Handlers/GuildHandler.cpp
	src/server/game/Handlers/ItemHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/NPCHandler.cpp
	src/server/game/Handlers/PetitionsHandler.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Handlers/SpellHandler.cpp
	src/server/game/Handlers/TradeHandler.cpp
	src/server/game/Instances/InstanceScript.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Spells/SpellMgr.cpp
	src/server/game/Tools/PlayerDump.cpp
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_modify.cpp
	src/server/scripts/Commands/cs_reload.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/Spells/spell_warlock.cpp
	src/server/worldserver/worldserver.conf.dist
2013-11-08 11:12:17 +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
Spp
990e4c7851 Merge branch 'master' into 4.3.4
Conflicts:
	src/server/game/AI/EventAI/CreatureEventAI.h
	src/server/game/AI/EventAI/CreatureEventAIMgr.h
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/DungeonFinding/LFGMgr.h
	src/server/game/Entities/Creature/Creature.h
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Grids/Notifiers/GridNotifiers.h
	src/server/game/Grids/ObjectGridLoader.h
	src/server/game/Spells/SpellInfo.h
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
	src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_desolace.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
	src/server/scripts/Kalimdor/zone_tanaris.cpp
	src/server/scripts/Kalimdor/zone_thousand_needles.cpp
	src/tools/map_extractor/System.cpp
	src/tools/map_extractor/mpq_libmpq.cpp
	src/tools/map_extractor/mpq_libmpq04.h
	src/tools/vmap4_extractor/loadlib/loadlib.h
	src/tools/vmap4_extractor/mpq_libmpq.cpp
	src/tools/vmap4_extractor/mpq_libmpq04.h
2013-11-08 10:29:51 +01:00
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Shauren
75a790ca47 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4 2013-10-26 17:06:50 +02:00
Discover-
0cc32e28e3 Core/SAI: Rename SMART_EVENT_TARGET_CASTING to SMART_EVENT_VICTIM_CASTING as that's what it actually does. It was often confused to use the target_type field instead of the victim. 2013-10-22 15:59:32 +02:00
Discover-
1a6157985c Core/Misc: Get rid of some useless code 2013-10-21 09:15:17 +02:00
Shauren
ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Discover-
ca02411eff Core/SAI: When the castflags are set to both SMARTCAST_AURA_NOT_PRESENT and SMARTCAST_INTERRUPT_PREVIOUS, we only interrupt the spell if there is actually a spell cast. 2013-10-11 16:57:28 +02:00
Ellie
c803cc1f5c Merge branch 'master' of github.com:TrinityCore/TrinityCore into string_concatenation 2013-10-01 01:14:32 -07:00
Ellie
1fae858645 Whitespace between string literals and user-defined literals is now mandatory for concatenation in C++11 2013-10-01 01:13:13 -07:00
Discover-
11d9a44508 Core/SAI: Properly implement the second parameter of SMART_ACTION_CALL_TIMED_ACTIONLIST to reflect the wiki (which also makes more sense) 2013-10-01 10:08:05 +02:00
Discover-
80ce30ac7d Core/SAI: Add 'playerOnly' parameters to SMART_TARGET_CLOSEST_ENEMY and SMART_TARGET_CLOSEST_FRIENDLY. Wiki is updated accordingly. 2013-09-30 10:11:02 +02:00
jackpoz
c256a0330a Merge branch 'master' of github.com:TrinityCore/TrinityCore 2013-09-24 23:35:11 +02:00
jackpoz
ec3832c2c1 Core/AI: Fix uninitialized values and array overflows in SAI
Proper initialize POD struct members to 0 in SMART_ACTION_CREATE_TIMED_EVENT action type.
Fix array overflows and access uninitialized values in SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST, SMART_ACTION_RANDOM_PHASE and SMART_ACTION_RANDOM_EMOTE .

Valgrind log for SMART_ACTION_RANDOM_PHASE case:
 Conditional jump or move depends on uninitialised value(s)
   at : SmartScript::UpdateTimer(SmartScriptHolder&, unsigned int) (SmartScript.cpp:3086)
   by : SmartScript::OnUpdate(unsigned int) (SmartScript.cpp:3176)
   by : SmartAI::UpdateAI(unsigned int) (SmartAI.cpp:335)
   by : Creature::Update(unsigned int) (Creature.cpp:542)
   by : TempSummon::Update(unsigned int) (TemporarySummon.cpp:47)

 Uninitialised value was created by a stack allocation
   at : SmartScript::ProcessAction(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:143)
2013-09-24 23:33:28 +02:00
Discover-
a0db0728f2 Merge branch 'master' of https://github.com/TrinityCore/TrinityCore 2013-09-23 16:47:47 +02:00
Discover-
9653576cb4 Core/SAI: Using SMART_TARGET_NONE no longer works the same way as SMART_TARGET_ACTION_INVOKER but rather return NULL instead.
Fixes #10908
2013-09-23 16:47:22 +02:00
Discover-
69b0a009c4 Core/SAI: Make SMART_ACTION_RANDOM_MOVE also work with SMART_TARGET_NONE and non-creature targets (if a non-creature target_type is specified and no creature target was found, the action is fired at the source)
Ref. #7431
2013-09-21 11:21:29 +02:00
Shauren
fcf9552934 Core/SmartScripts: Fixed heap corruption in SMART_ACTION_EQUIP
Closes #10739
2013-09-08 12:15:13 +02:00
Discover-
926edaf49d Tabs to spaces... 2013-09-04 14:07:27 +02:00
Discover-
9761affc8d Core/SAI: Make SMART_TARGET_OWNER_OR_SUMMONER also work for creatures summoned by spells 2013-09-04 09:35:21 +02:00
Nay
582686090d Merge pull request #10685 from Discover-/SmartAI-Target-Casting
Core/SmartAI: Add a spellid to SMART_EVENT_TARGET_CASTING. If left on 0,...
2013-09-01 10:03:45 -07:00
Nay
c4bd91ceb9 Merge pull request #10690 from Discover-/SmartAI-Set-Home-Pos
Core/SAI: Allow using SMART_ACTION_SET_HOME_POS with multiple target typ...
2013-09-01 10:03:09 -07:00
Nay
b324646005 Merge pull request #10689 from Discover-/SmartAI-Killed-Monster-Credit
Core/SAI: Also use loot recipient for SMART_ACTION_CALL_KILLEDMONSTER wh...
2013-09-01 10:02:43 -07:00
Nay
a762df0aba Core/SAI: Fix processing linked events when return is used in ProcessAction
Thanks Discover-

Closes #10688
2013-09-01 18:01:59 +01:00
Discover-
8ba8190773 Core/SAI: Allow using SMART_ACTION_SET_HOME_POS with multiple target types 2013-09-01 13:56:35 +02:00
Discover-
7d7fc7b662 Core/SAI: Also use loot recipient for SMART_ACTION_CALL_KILLEDMONSTER when target is SMART_TARGET_SELF (used in four cases in a clean TDB which will be fixed by this) 2013-09-01 13:44:08 +02:00
Discover-
016dac995e Core/SmartAI: Add a spellid to SMART_EVENT_TARGET_CASTING. If left on 0, it checks for all spells (like it did without these changes) 2013-09-01 10:49:29 +02:00
Nay
7776016106 Core/Quests: Remove CastedCreatureOrGO method
- Remove EAI's ACTION_T_CAST_EVENT and ACTION_T_CAST_EVENT_ALL
- Remove SAI's SMART_ACTION_CALL_CASTEDCREATUREORGO
- Split QUEST_TRINITY_FLAGS_KILL_OR_CAST into QUEST_TRINITY_FLAGS_KILL and QUEST_TRINITY_FLAGS_CAST
- Assign QUEST_TRINITY_FLAGS_CAST to all the quests that were using RequiredSpellCastX
- (unrelated) Fix a warning in Player.cpp
- Replace CastedCreatureOrGO usage in scripts by KilledMonsterCredit

TODO: Convert the two EAI scripts commented out in the .sql to proper SAI

Closes #10667
2013-08-30 19:32:08 +01:00
xjose93
c3afc00571 Implement SMART_ACTION_GAME_EVENT_STOP (111) and SMART_ACTION_GAME_EVENT_START (112). 2013-08-30 01:23:01 +02:00