Commit Graph

60 Commits

Author SHA1 Message Date
click
caf8bbbe0a Core/Grid: Fix infinity-loop in grid loading (patch by SilverIce)
--HG--
branch : trunk
2010-10-22 03:39:27 +02:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +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
Shocker
87ff64431c Core/Maps: Fix crash in ExistMap, fixes issue 4115
--HG--
branch : trunk
2010-09-25 20:09:20 +03:00
azazel
eae0e5c822 Scripts/DB_Scripts: massive cleanup of SCRIPT_COMMAND_* related staff
* add union into ScriptInfo structure (thanks NoFantasy for the idea);
* move scripts methods from Map.cpp to new file MapScripts.cpp;
* remove magic numbers and introduce eScriptFlags enumeration.

It's just a beginning and more changes to come. Stay tuned!

--HG--
branch : trunk
2010-09-22 18:13:57 +06:00
Rat
cf93313316 Scripts/DB_Scripts: enable DB scripts to use CHAT_MSG_RAID_BOSS_WHISPER (42) as chat type
--HG--
branch : trunk
2010-09-20 21:58:14 +02:00
linencloth
d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
linencloth
f12a61f9f4 Core/Map: Log grid loading only if the grid was not already active
--HG--
branch : trunk
2010-09-17 04:15:42 +02:00
azazel
a034ac9937 Scripts: enhance SCRIPT_COMMAND_TALK command to make Players talk (add 0x1 bit to datalong2 and command will expect Player instead of Creature for talking).
--HG--
branch : trunk
2010-09-16 13:28:16 +06:00
click
bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +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
Shocker
adf1ae6286 Cleanup: Some typo fixes, closes issue 3798, thanks tru.bazoozoo and Lopin
--HG--
branch : trunk
2010-09-05 00:48:31 +03:00
silinoron
5179d3149a Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG--
branch : trunk
2010-09-03 21:55:57 -07:00
Spp
b9e19572c4 Core: Fix more warnings (very few left under linux 32)
--HG--
branch : trunk
2010-08-31 11:39:51 +02:00
Spp
849ae84f5b Core: Fix more warnings and fix compile under linux 64
--HG--
branch : trunk
2010-08-31 10:23:22 +02:00
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