Commit Graph

45 Commits

Author SHA1 Message Date
Spp
e252b8abe7 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 23:07:14 +02:00
Spp
405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +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
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
click
670964803f Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG
--HG--
branch : trunk
2010-08-22 01:57:04 +02:00
Spp
572f7bbd1d Core: Remove "may be used uninitialized in this function", "unused parameter ‘xxx’" and "'xxx' defined but not used" warnings
--HG--
branch : trunk
2010-08-21 23:08:54 +02:00
Spp
a136403dee Core: Remove "suggest parentheses around ‘&&’ within ‘||’" and "suggest parentheses around assignment used as truth value" warnings
--HG--
branch : trunk
2010-08-21 21:54:41 +02:00
Spp
c15c605a11 Core: Remove "unused variable 'xxx'" warnings
--HG--
branch : trunk
2010-08-21 21:14:35 +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
Spp
c3343638cb Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here"
- Some "unused variable"
- Some "enumeration value 'xxx' not handled in switch"

--HG--
branch : trunk
2010-08-21 20:08:47 +02:00
azazel
812b6694f9 Core/DB scripts:
* provide more information in error messages for DB scripts
* cleanup in DB scripts code

--HG--
branch : trunk
2010-08-20 14:57:05 +06:00
azazel
a200de3b5f Core
* Cleanup in LoadScripts method and related stuff (use enum instead of string to differentiate between script maps)
* Fix creation of id and sanity checks for spell_scripts. Should fix warnings about missing spells with id > 65535

--HG--
branch : trunk
2010-08-20 12:19:14 +06: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
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
909e332579 * Rename: BattleGround -> Battleground.
--HG--
branch : trunk
2010-08-08 04:37:24 +02:00
XTZGZoReX
87483be1e7 * Rename some more functions for consistency.
* Added missing call to FormulaScript::OnZeroDifferenceCalculation.
* Pass GridMap pointer into MapScript::OnLoadGridMap/OnUnloadGridMap.
* Fire map hooks for all map types, not only instances.

--HG--
branch : trunk
2010-08-07 13:07:18 +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
click
0caaa3e478 Revert changes done in r0074e32c2f and r4d86e4199a - fixes buildissues ( if()+reinterpret_cast is faster than dynamic_casts btw )
--HG--
branch : trunk
2010-08-06 03:00:39 +02:00
azazel
f9a51dc214 * Corpse related cleanup (author: Hunuza)
* Avoid saving of the corpse in arenas (author: VladimirMangos)

--HG--
branch : trunk
2010-08-06 00:15:29 +06:00
Shauren
4773aad26b Make use of new ToItem() casts
--HG--
branch : trunk
2010-08-05 18:43:30 +02:00
azazel
885fc368fd * Implement item limit category (based on changes by VladimirMangos)
* Additional check for HandleAutoBankItemOpcode (thanks to VladimitMangos)
* Properly show empty vendor list for empty item list (author: a1ien)
* More stricted checks for store operations (thanks to VladimirMangos)
* Prevent autostoring of not empty bags (thanks to L1ghtGu4rd)

Changes need testing. Please post bugs on our tracker.

--HG--
branch : trunk
2010-08-05 22:08:07 +06:00
azazel
f3eab91102 * Convert SCRIPT_COMMAND_* defines to enum. Make comments for values up-to-date.
* Cleanup ScriptsProcess method. Move repeating parts of code to inline helper methods.
* Improve SCRIPT_COMMAND_CAST_SPELL command. You can specify triggered attribute when datalong2 = 4 by making dataint negative.
* Improve SCRIPT_COMMAND_KILL command. Now, if source is not a creature, it tries to use target object instead.

--HG--
branch : trunk
2010-08-05 00:55:10 +06:00
QAston
48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
click
3296a944e7 Convert to using ACE for reading configurationfiles, and remove dependency on dotconfpp configuration library and related files
(patch by astellar - and a thankyou to vladimir for being a russian teddybear)

--HG--
branch : trunk
2010-07-29 01:22:45 +02:00
QAston
e232c0e235 *Cleanup in ObjectAccessor - this should fix some crashes
--HG--
branch : trunk
2010-07-28 00:08:21 +02:00
Shauren
4ea385ec50 Small fix for previous revision
--HG--
branch : trunk
2010-07-27 19:28:02 +02:00
Shauren
de2f63bcfb Added possibility to cast spells with triggered flag using SCRIPT_COMMAND_CAST_SPELL, original patch by Az@zel
Fixed SCRIPT_COMMAND_CAST_SPELL for casting on creatures with selected entry

--HG--
branch : trunk
2010-07-27 19:18:44 +02:00
click
e5b7f6ad01 Add option for search distance to getHeight() functions and make Creature::FallGround() use VMaps properly. (Fix by Lynx3d)
This finally prevents flying creatures from falling to infinity (basically instantly diappearing) in several instances, aswell
as prevent creatures from falling inside larger solid object around the world.

--HG--
branch : trunk
2010-07-27 17:29:33 +02:00
click
07c1d011d4 Reinstate ITEM_FLAGS_NO_EQUIP_COOLDOWN implementation and the serverside checks for ITEM_FLAGS_INDESTRUCTIBLE (with prototypes this time)
--HG--
branch : trunk
2010-07-11 23:53:48 +02:00
click
307bf7f73e Backed out changeset 6670e64b2d92
--HG--
branch : trunk
2010-07-11 22:33:18 +02:00
click
66547c5fbd Implement ITEM_FLAGS_NO_EQUIP_COOLDOWN support + add serverside checks for ITEM_FLAGS_INDESTRUCTIBLE (code by Vladimir)
--HG--
branch : trunk
2010-07-11 22:22:49 +02:00
Tartalo
9182ab6ead Uncomment the assert that I commented some revs ago on InstanceMap::CanEnter()
--HG--
branch : trunk
2010-07-09 13:23:22 +02:00
Tartalo
e58ca4d363 Coment annoying assert that nobody knows why is there
--HG--
branch : trunk
2010-07-07 22:30:38 +02:00
Tartalo
7969723527 Deny access to instances if other party/user with the same perm id is inside
Fixes #2844

--HG--
branch : trunk
2010-07-07 22:22:16 +02:00
Shauren
1740bace3a Initialize a pointer with NULL value to prevent possible crashes.
--HG--
branch : trunk
2010-06-30 14:48:38 +02:00
click
988467467c Properly initialize variable in WorldObject::PlayDirectSound()
Fixes issue 2838

--HG--
branch : trunk
2010-06-28 14:40:57 +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
Machiavelli
95ddfbd9e2 Remove some redundant explicit NULL checks for pointers before ´delete´ or ´delete[]´ calls since this check is done implicitly when deleting.
Also fixes a memory leak in .reload creature_template command

--HG--
branch : trunk
2010-06-21 23:20:58 +02:00
Machiavelli
e6d0fa20cd Typo spotted by glizzard.ad
--HG--
branch : trunk
2010-06-13 14:24:44 +02:00
Machiavelli
b6621ddf90 Add some safer casting conditions in Map::ScriptsProcess.
Fixes issue #2676
Fixes issue #2553

--HG--
branch : trunk
2010-06-13 13:29:31 +02:00
click
39e793b2bd Add extractors and assembler - EXTRACTION OF NEW MAPS IS REQUIRED!
This will allow for easier testing of functionality between different
projects, ie. one set of maps/vmaps instead of 2 (saves space, saves
time and saves us some confusion).

--HG--
branch : trunk
2010-06-11 05:01:30 +02:00
Brian
dee7fd1382 * Remove more not needed relative paths in include files
--HG--
branch : trunk
2010-06-08 16:13:55 -06:00
Brian
6650068b5e * Nearly done with fixing the Linux build.
* Thanks to samccstudios for saving me some time with the Outlands scripts.

--HG--
branch : trunk
2010-06-07 15:59:21 -06:00
XTZGZoReX
62200e8d02 * Even more restructuring of the game library.
--HG--
branch : trunk
2010-06-06 22:55:56 +02:00