Commit Graph
42 Commits
Author SHA1 Message Date
QAston 46b9942f97 Core/Db/Conditions: remove ConditionValue2 parameter CONDITION_SPELL which was used for checking if player doesn't have spell and use NegativeCondition parameter instead. 2012-02-10 18:49:40 +01:00
Nay ed3e5d816a Core/Db/Conditions: CONDITION_NOITEM and CONDITION_NO_AURA became deprecated with NegativeCondition
Wiki updated.
2012-02-10 16:32:26 +00:00
QAston 586a76e3a0 Core/Db/Conditions: Add 3rd parameter to CONDITION_ITEM so it can now perform a check if item exists in bank aswell as in equipment. 2012-02-10 16:47:58 +01:00
QAston 676151f6ac Core/Db/Conditions: Don't use ConditionValue3 as a reference id for template conditions - ConditionTypeOrReference serves this purpose. 2012-02-10 15:30:33 +01:00
QAston 8713b44ee7 Core/Db/Conditions: Prepare conditions system to work on objects of different type than players.
Warning: API has changed a bit:
ConditionScript::OnConditionCheck(Condition* condition, Player* player, Unit* invoker) is now
ConditionScript::OnConditionCheck(Condition* condition, WorldObject* object, WorldObject* invoker)
2012-02-10 14:18:59 +01:00
QAston a7fc2586e7 Core/Db/Conditions: Add NegativeCondition column to conditions table which allows to check whenever player does not meet condition specified by ConditionTypeOrReference column (ConditionTypeOrReference and ConditionValue3 set to reference id are not affected by the change) 2012-02-10 12:46:01 +01:00
Subv2112 29f8e4309e Core/Conditions: Allow using guid (negative value) in SAI conditions 2012-01-31 09:50:02 -05:00
Subv2112 74b64150bb Core/Conditions: Implemented SAI conditions, only usable with events in which the invoker is a player.
sourceType = 22
sourceEntry = entryorguid
sourceGroup = eventId + 1
sourceId = SAI sourceType (0 = creature, 1 = gameobject, etc)

Also refactored some code

Signed-off-by: Subv2112 <[email protected]>
2012-01-29 13:49:19 -05:00
kiper 8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
Spp 852ffcc139 Core/Scripting: Remove unnecesary reference in param function OnMemberRemove 2011-09-28 10:35:59 +02:00
Spp 473f341012 Core/GameEvent: Minor code optimization. (Also cosmetic changes in other unrelated files) 2011-08-04 14:27:10 +02:00
click 158966dc79 Core: Codestyle cleanup 2011-06-11 22:35:29 +02:00
Shauren 7abb302d8f Core/Conditions: Prevent unneccessary copying condition list on every check 2011-05-26 23:27:43 +02:00
leak 1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
Supabad baedc78b10 Core/Conditions: fix little typo in previous commit. 2011-04-09 10:23:54 +02:00
Supabad 6174703d45 Core/Conditions: updated CONDITION_SPELL to allow to return false also 2011-04-09 10:12:45 +02:00
Machiavelli 957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren 0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Spp 408fce1de6 Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
2010-12-06 02:07:53 +01:00
Rat b45e12fdf9 Core/Conditions: updated CONDITION_AURA, if Param3 is set true target is tested for condition, else caster is tested
--HG--
branch : trunk
2010-11-05 22:54:51 +01:00
Rat 32f088558d Core/ConditionMgr: added two new conditions NEAR_CREATURE and NEAR_GAMEOBJECT
--HG--
branch : trunk
2010-10-31 22:10:31 +01:00
Rat 5eb8ea2a5d Core/ConditionMgr: added CONDITION_QUEST_COMPLETE, conditionValue1: questiID, true if player has the quest in the questlog as 'completed'
--HG--
branch : trunk
2010-10-24 21:44:58 +02:00
Rat e67f04d362 Core/ConditionMgr: added CONDITION_SOURCE_TYPE_VEHICLE_SPELL, sourceGroup=creatureTemplate.entry, sourceEntry=spellEntry
--HG--
branch : trunk
2010-10-22 22:45:11 +02:00
Rat 5ee2c83835 Code/ConditionMgr: added CONDITION_DRUNKENSTATE, true if player is drunk enough. sober(0), tipsy(1), drunk(2), smashed(3)
--HG--
branch : trunk
2010-10-11 23:35:55 +02:00
click 613b81f36f REALLY fix the CRLF-crap...
--HG--
branch : trunk
2010-10-07 15:54:07 +02:00
click 8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Rat f745705ef9 Code/ConditionMgr: cleanup
--HG--
branch : trunk
2010-10-05 18:07:41 +02:00
Rat f733d8b224 Code/ConditionMgr: added CONDITION_LEVEL(27) value1: player level, value2: modify test statement, default(0) is '=='
--HG--
branch : trunk
2010-10-05 17:54:27 +02:00
Machiavelli 27e2a98920 Core/Conditions: Drop hacky/nonworking CONDITION_AD_COMMISSION_AURA (10). Condition data with this condition type needs to use CONDITION_AURA (1) to function properly.
--HG--
branch : trunk
2010-10-02 22:24:02 +02:00
Rat 0857c18af8 Code/ConditionMgr: added condition_NOITEM (26) value1: item.entry value2: 0/1 if 1 it searches player's bank too
--HG--
branch : trunk
2010-09-30 22:41:19 +02:00
Rat b46b498141 Core/ConditionMgr: revert CONDITION_GUID, can not be coded in current system without huge rewrites
--HG--
branch : trunk
2010-09-24 19:55:44 +02:00
Rat d2af10618f Core/ConditionMgr: added placeholder for CONDITION_GUID
renamed targetOverride to invoker
removed targetOverride code (had no use)

--HG--
branch : trunk
2010-09-24 18:16:29 +02:00
Rat 8e6ba6e7c9 Core/ConditionMgr: small cleanup, small fix
--HG--
branch : trunk
2010-09-20 22:11:55 +02:00
Rat 2fb80e4a86 Core/ConditionMgr: You can now hide/show the quest marks with conditions (! ?)
note: check only runs at quest giver query!
Using together with CONDITION_SOURCE_TYPE_QUEST_ACCEPT you can totally hide quests

--HG--
branch : trunk
2010-09-20 10:19:20 +02:00
Rat 5de3183180 Core/ConditionMgr: You can now add conditions to QuestAccept (at CanTakeQuest check)
--HG--
branch : trunk
2010-09-19 19:49:23 +02:00
Shauren 320929ff40 Core/Conditions: Added "player knows spell" condition type
--HG--
branch : trunk
2010-09-10 20:49:29 +02:00
click 1f80c7b3c0 Sourcefile sleanups -> tabs to spaces, remove whitespace - also update the cleanupscripts very slightly
--HG--
branch : trunk
2010-08-08 19:45:53 +02:00
XTZGZoReX 946adf469c *** New core <-> script library interface - complete rewrite of the old one.
* Removed the misdesigned on_events script/hooks.
* Lots of related cleanups and assertions.
* The interface is now fully object-oriented.
** Scripts no longer use function pointers.
** Scripts no longer use the general-purpose Script struct for everything.
** Script types are split into separate classes which must be inherited depending on what functionality is desired.
* Several script types have been added to allow extending functionality in a code-only manner (some script types require
  assignment in the recently added ScriptName columns in the database, though).
** SpellHandlerScript: Wrapper around spell scripts (returns new SpellScript objects (`spell_script_names`.`ScriptName`)).
** ServerScript: Allows scripting events that occur in the network layer.
** WorldScript: Allows scripting certain world-global events.
** FormulaScript: Allows hooking and interfering with core formulas.
** *MapScript: Allows hooking different map types (including world, instance, and battleground maps (`instance_template`.`ScriptName`)).
** ItemScript: Allows scripting of items (like the old interface (`item_template`.`ScriptName`)).
** CreatureScript: Allows scripting of creatures/AI (like the old interface (`creature_template`.`ScriptName`)).
** GameObjectScript: Allows scripting of gameobjects (like the old interface (`gameobject_template`.`ScriptName`)).
** AreaTriggerScript: Allows scripting triggered area triggers (like the old interface (`areatrigger_scripts`.`ScriptName`)).
** OutdoorPvPScript: Script which should return OutdoorPvP objects for use by OutdoorPvPMgr (`outdoorpvp_template`.`ScriptName`).
** CommandScript: Allows extending the in-core command table.
** WeatherScript: Allows scripting of weather changes (`game_weather`.`ScriptName`).
** AuctionHouseScript: Allows scripting of auction events.
** ConditionScript: Allows scripting of conditions (`conditions`.`ScriptName`).
** DynamicObjectScript: Allows scripting of dynamicobjects.
** TransportScript: Allows scripting of transport events (`transports`.`ScriptName`).
* OutdoorPvP objects are now created through scripts. This effectively means that they'll need to be moved to scripts
  before the they're functional again.
* The whole idea with this new interface is to allow expanding core functionality without touching core code. If further
  hooks are needed to expand functionality of the core, let us know; we'll add them, if we agree that it is appropriate
  to do so.
*** NOTE: The scripts project will _not_ build before it has been adapted to the new interface.
*** Thanks to everyone who helped out with related preparations and suggestions!

--HG--
branch : trunk
2010-08-06 19:23:43 +02:00
XTZGZoReX e4cab07f32 * Add ScriptName to conditions.
--HG--
branch : trunk
2010-08-06 16:33:31 +02:00
Machiavelli 0f7657b68c Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.

--HG--
branch : trunk
2010-06-25 00:18:01 +02:00
Anubisss 6da05ec5d1 Fix memory leaks in ConditionManager.
--HG--
branch : trunk
2010-06-11 01:25:10 +02:00
XTZGZoReX 62200e8d02 * Even more restructuring of the game library.
--HG--
branch : trunk
2010-06-06 22:55:56 +02:00