Commit Graph

29 Commits

Author SHA1 Message Date
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
Shocker
78803c9f09 Magic numbers cleanup:
- Replace many magic numbers with constants
- Use enum for vehicle flags/seat flags
- Correct structure for ItemRandomSuffixEntry

--HG--
branch : trunk
2010-09-28 08:21:51 +03:00
Machiavelli
3c6dc32030 Core/DBLayer:
- Rewrite Field class to be able to store both binary prepared statement data and data from adhoc query resultsets
- Buffer the data of prepared statements using ResultSet and Field classes and let go of mysql c api structures after PreparedResultSet constructor. Fixes a race condition and thus a possible crash/data corruption (issue pointed out to Derex, basic suggestion by raczman)
- Conform PreparedResultSet and ResultSet to the same design standards, and using Field class as data buffer class for both
* NOTE: This means the fetching methods are uniform again, using ¨Field* fields = result->Fetch();¨ and access to elements trough fields[x].
* NOTE: for access to the correct row in prepared statements, ¨Field* fields = result->Fetch();¨ must ALWAYS be called inside the do { }while(result->NextRow()) loop.
* NOTE: This means that Field::GetString() returns std::string object and Field::GetCString() returns const char* pointer.

Still experimental and all that jazz, not recommended for production servers until feedback is given.

--HG--
branch : trunk
2010-09-24 22:16:21 +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
8b5369ff3f Core/ConditionMgr: only send special error msg if condition failed
--HG--
branch : trunk
2010-09-21 23:30:37 +02:00
Spp
7a3fd2e9bf Core/: Fix warnings
--HG--
branch : trunk
2010-09-21 10:11:25 +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
Machiavelli
a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
Shauren
320929ff40 Core/Conditions: Added "player knows spell" condition type
--HG--
branch : trunk
2010-09-10 20:49:29 +02:00
QAston
a8de57559b *Allow channeled spells to be casted on dead target
*Define relted spell attributes

--HG--
branch : trunk
2010-08-30 17:32:51 +02:00
azazel
341e6303ef Core:
* add helping methods for manipulating unit's health and use it where applicable
* fix some conversion warnings and cleanup code (formatting, CRLF, tabs to spaces)

--HG--
branch : trunk
2010-08-26 01:20:57 +06:00
Spp
16d95d3115 Core: Fix some warnings
--HG--
branch : trunk
2010-08-23 07:51:19 +02:00
Spp
e7856a831c Core: Remove "enumeration value 'xxx' not handled in switch" warnings
--HG--
branch : trunk
2010-08-21 20:55:31 +02:00
azazel
590199d8e1 * Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project
* Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker.

--HG--
branch : trunk
rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp
rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
2010-08-08 22:54:58 +06:00
XTZGZoReX
9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +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
Xanadu
ae384ea8c7 Fixed a bug in CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET conditions loading checks.
--HG--
branch : trunk
2010-07-31 04:12:30 +02:00
Xanadu
eb852f5bbd * Added the option to specify target entry in conditions table for spells with AoE GO targets.
* A few examples where this is desirable are posted on the forum.

--HG--
branch : trunk
2010-07-30 01:51:33 +02:00
Rat
6693bf5092 removed unneeded debug lines from conditions loading
--HG--
branch : trunk
2010-06-26 10:57:19 +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
Shauren
4507e7dd66 Fixed some spaces
--HG--
branch : trunk
2010-06-10 20:52:15 +02:00
Brian
9b6669e5f3 * Remove more relative paths from includes
--HG--
branch : trunk
2010-06-08 15:50:23 -06:00
Brian
b0e1605455 * Getting closer (at least for Linux :) )
--HG--
branch : trunk
2010-06-07 14:44:18 -06:00
XTZGZoReX
62200e8d02 * Even more restructuring of the game library.
--HG--
branch : trunk
2010-06-06 22:55:56 +02:00