Commit Graph

228 Commits

Author SHA1 Message Date
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
QAston
77bd968c63 *Remove some unused containers from Spell class.
--HG--
branch : trunk
2010-08-21 21:00:06 +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
John Holiver
6e6d62def9 Core: Creature should aggro player when players aggro creature during SetInCombatWithZone (otherwise, creature will remain not in combat).
--HG--
branch : trunk
2010-08-21 02:15:19 -03:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
click
a7498d2f56 Core/Includes: Include ACE as an external dependency, not local (#include "ace/something.h" -> #include <ace/something.h>)
--HG--
branch : trunk
2010-08-21 02:27:12 +02:00
silinoron
d89671727b fix r905a640a2d - tabs to spaces, and add a forgetten break.
--HG--
branch : trunk
2010-08-20 15:22:42 -07:00
Liberate
6f605cb0e5 Fixes silly gossip menus of quest givers.
Fixes issue #3484

--HG--
branch : trunk
2010-08-20 22:03:19 +02:00
silinoron
d58e19385f Fix combustion crits with area of effect spells - patch by moriquendu.
--HG--
branch : trunk
2010-08-19 10:37:20 -07:00
Shauren
a693f49bd1 Vehicles: Prohibit entering vehicle in combat only if it is a multi-passenger mount
Scripts/Icecrown Citadel: Changed Bone Spike id and remove teleport z+3 hack, its a vehicle, thx wowgargamel
Scripts/Icecrown Citadel: Fixed typo in variable name, thx Paradox
Scripts/Icecrown Citadel: Added warning emote for Bone Storm

--HG--
branch : trunk
2010-08-19 16:40:47 +02:00
QAston
30bcf8c659 Scripts/Spell: extend SpellScript class: add target aura accessors and functions which prevent various effects of the spell from being executed. Check out SpellScript.h for details
--HG--
branch : trunk
2010-08-19 14:31:31 +02:00
Machiavelli
d845a903b1 DBLayer:
- Use ACE_Future and ACE_Future_Set for async SQL queries with callback
* Callbacks will now be executed from the thread and object that scheduled the request, instead of the world runnable thread (and thus are no longer dependent on the 50ms forced sleep time).
* This design gets rid of a potential DOS loophole in the resultqueue system - unique requests will be cancelled when re-requested.
- Drop now redundant SQLQueryTask, SQLResultQueue, SQLResultQueueTask operations.
- Drop now redundant CharacterHandler class
- Change static callback functions in WorldSession to normal functions.

Thanks to Derex and Zor for advice along the way.

--HG--
branch : trunk
2010-08-18 19:48:51 +02:00
QAston
2ffe785765 Core/Spells: add SPELL_ATTR_CU_IGNORE_ARMOR to the avalible custom attribute list, make some spells use the attribute. Research made with JohnHoliver and Shauren
--HG--
branch : trunk
2010-08-18 19:26:07 +02:00
enjoi
e20a541494 Core/Vehicles: Players cannot enter a vehicle when in combat. Fixes issue 1966.
--HG--
branch : trunk
2010-08-18 06:51:59 +01:00
silinoron
d6fe4b23e9 Add support for recruit-a-friend XP and reputation multipliers.
More research needs to be done to implement summoning and granting levels.

--HG--
branch : trunk
2010-08-17 19:18:09 -07:00
Machiavelli
87218eadcd * HIGHLY EXPERIMENTAL - USE AT OWN RISK *
Database Layer:
- Implement connection pooling: Instead of 1 delay thread per database, you can configure between 1 and 32 worker threads that have a seperate thread in the core and have a seperate connection to the MySQL server (based on raczman/Albator´s database layer for Trinitycore3)
- Implement a configurable thread bundle for synchroneous requests from seperate core threads (see worldserver.conf.dist for more info)
- Every mapupdate thread now has its seperate MySQL connection to the world and characters database
- Drop inconsistent PExecuteLog function - query logging will be implemented CONSISTENTLY later
- Drop current prepared statement interface - this will be done *properly* later
- You´ll need to update your worldserver.conf and authserver.conf
- You´re recommended to make a backup of your databases before using this.
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
* HIGHLY EXPERIMENTAL - USE AT OWN RISK *
etc.

--HG--
branch : trunk
2010-08-18 02:25:52 +02:00
Spp
1ab2bd6d58 Dungeon Finder: Update wait time after a successful proposal
--HG--
branch : trunk
2010-08-18 00:30:17 +02:00
click
26386d1e20 Core: Use enum-size for CONFIG_START_ALL_EXPLORED (was hardcoded to 64, not using the proper size of the enum PLAYER_EXPLORED_ZONES_SIZE)
Fixes issue 2726

--HG--
branch : trunk
2010-08-17 11:27:47 +02:00
click
d8b2a31f70 Core: Fix minor bug with max skills value not being properly updated in the database when a player has been leveled up while offline - Thanks to Hyriuu
Fixes issue 3374

--HG--
branch : trunk
2010-08-17 00:35:12 +02:00
Brian
fe90b1c974 Core/Gossip: stop log spam of unknown gossip option for quest givers.
--HG--
branch : trunk
2010-08-16 14:46:51 -06:00
QAston
8b057babf2 *Fix typo in r7dd45a018254, thanks to Shauren for narrowing the falling issue to that rev.
--HG--
branch : trunk
2010-08-13 20:53:33 +02:00
Spp
3e29ae1ee8 Dungeon Finder: Add vote kick support
--HG--
branch : trunk
2010-08-13 15:38:10 +02:00
Shauren
30468a106f Moved battleground achievement scripted checks into scripts
Call ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL updates in code
Implemented achievements: Save the Day, Quick Cap, Warsong Expedience

--HG--
branch : trunk
2010-08-13 13:48:59 +02:00
azazel
ed08bedc6e * Modify PlayerScript::OnChat hook. Now it takes one optional parameter of type void *. Value of this parameter depends on chat type.
* Modify chat and emote hook in PlayerScript to take Player parameter insted on WorldSession (this is player script, isn't it?)
* Move calls of OnChat hooks after validation of parameters and before actual call to chat methods. It's more logical because otherwise it will be necessary to repeat validation inside hooks.
* Make use of new PlayeScript hooks. Move chat logging logic into separate script.
* Add one path to scripts CMakeLists to make ChatLogScript happy.

--HG--
branch : trunk
2010-08-12 22:33:45 +06:00
azazel
f8eed4da58 Add checks to prevent some player stats from overflowing thus making such exploits as 65k SP impossible.
This change affects such stats as spell power, feral AP, mana regen and health regen.

--HG--
branch : trunk
2010-08-12 22:07:56 +06:00
azazel
c6b4309f1e * Unsummon pet if direct control spell expire out of visibility range from owner (base on VladimirMangos changes)
* Move repeating code to separate method

--HG--
branch : trunk
2010-08-12 12:14:32 +06:00
silinoron
c7b48c1ca9 Add PlayerScript hooks:
* OnMoneyChanged
* OnGiveXP
* OnReputationChange
* OnChat
* OnEmote
* OnTextEmote

--HG--
branch : trunk
2010-08-11 22:53:31 -07:00
silinoron
0963cb3aea Implement a PlayerScript class with a handful of new hooks:
* OnPVPKill
* OnCreatureKill
* OnPlayerKilledByCreature
* OnPlayerLevelChanged
* OnPlayerFreeTalentPointsChanged
* OnPlayerTalentsReset
* More hooks may be added in the future

--HG--
branch : trunk
2010-08-11 19:52:58 -07:00
Spp
4b62042b28 Dungeon Finder: Make player internal Lfg data private and some minor cleanups
--HG--
branch : trunk
2010-08-11 11:54:03 +02:00
Shauren
36d1405b52 Fixed bug allowing players to enter instance even if selected difficulty was disabled
Added map id to log when player tries to enter disabled map

--HG--
branch : trunk
2010-08-10 19:40:35 +02:00
Shauren
88965d9419 Fixed honor points and arena points displaying in currency tab
Currencies lost (spent all in vendor) are not removed from known currencies tab, they now display 0 count

--HG--
branch : trunk
2010-08-10 13:26:07 +02:00
Brian
1f52153410 Backed out changeset f751065ec933
Spell rep rate was already implemented by QAston

--HG--
branch : trunk
2010-08-09 11:33:31 -06:00
azazel
f5399618d9 Implement reputation rates and aura effects for Spell::EffectReputation() (thanks Lynx3d)
--HG--
branch : trunk
2010-08-09 23:22:31 +06:00
azazel
464c0c1611 * Process GAMEOBJECT_TYPE_FISHINGHOLE in normal way as for other GO's (thanks NoFantasy)
* Improve process for Use() of GAMEOBJECT_TYPE_SUMMONING_RITUAL (thanks NoFantasy)

--HG--
branch : trunk
2010-08-09 22:50:30 +06:00
XTZGZoReX
a038772b3e * Remove Player::SetSession (obsolete and dangerous function).
* Speed up map script searches (avoid redundant loops).
* Fix linking errors for ScriptObject::RegisterSelf.

--HG--
branch : trunk
extra : rebase_source : 2ba48fdab4e119c6de7fe64e47c5b8115fdac1b5
2010-08-09 11:07:23 +02:00
QAston
617a56ba29 *Implement spell casting on transports (no more out of range error, etc)
*Add MO transports to ObjectAccessor storage
*Add functions Position::RelocateOffset and Position::GetPositionOffsetTo to help offset manipulations - BIG thanks to azazelkon for creating formulas!
*Add function to output debug info for MovementInfo and SpellCastTargets
*Throw ByteBufferException on incorrect packGUID read
*Add rfinish function to finish bytebuffer read.

--HG--
branch : trunk
2010-08-08 20:32:14 +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
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
e03c873bcf * Move weather management to new WeatherMgr (yes, I care that much about the weather - I really do).
--HG--
branch : trunk
2010-08-08 05:06:13 +02:00
XTZGZoReX
909e332579 * Rename: BattleGround -> Battleground.
--HG--
branch : trunk
2010-08-08 04:37:24 +02:00
silinoron
36fffd9550 Properly fix problems with applying/removing mods on disarmed items.
--HG--
branch : trunk
2010-08-07 16:40:33 -07:00
silinoron
5aa6bb2169 Fix an exploit allowing druids to gain substantial stat increases.
Fixes issue #3316

--HG--
branch : trunk
2010-08-07 16:19:52 -07:00
XTZGZoReX
14aeb09945 * This should help with the Linux build; thanks to Machiavelli/click.
* VehicleScript is now bound to the database (`creature_template`.`ScriptName`) and only works for creature vehicles.

--HG--
branch : trunk
2010-08-07 15:26:24 +02:00
XTZGZoReX
360e028331 * Add new TransportScript::OnRelocate hook.
* TransportScript::OnUpdate is now called on every tick, not just on movement update.

--HG--
branch : trunk
2010-08-07 14:17:32 +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