Commit graph

363 commits

Author SHA1 Message Date
zergtmn
5cae1c2211 [11539] Implement group guids with HIGHGUID_GROUP 2011-05-25 19:55:35 +06:00
NoFantasy
94080a2d77 [11474] Adjust text of some log messages related to spell target
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-05-12 08:21:47 +02:00
VladimirMangos
ef6a48fe03 [11465] non-ObjectGuid guids in random places.
Only ChannelMgr code wide use uint64 guids now, and Map object stores.
2011-05-10 21:27:49 +04:00
VladimirMangos
06ba42ccba [11435] Fixed IsPositiveEffect triggered spell case and some cleanups
Mostly found in time 400 update.
2011-05-08 01:43:02 +04:00
zergtmn
6498941ead [11430] Introduce GuildMgr
Move all guild-related functions from our overpowered ObjectMgr to GuildMgr.
Thx leak for idea.
2011-05-06 19:27:36 +06:00
unknown
82367bbdea [11398] Get rid of 2 useless timers and drop a problematic diff in session update
Signed-off-by: Neo2003 <Neo.2003@Hotmail.fr)>
2011-04-26 18:39:04 +02:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
unknown
71add7c73b As of patch 3.3.0:
Players below level 10 may not join raids.
2011-04-09 19:41:29 +04:00
Ambal
8fd323a09a [11317] More SQL requests to use prepared statements.
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-04-06 00:13:12 +03:00
zergtmn
0ceb42ff9a [11315] Fix typos in recent commit 2011-04-05 12:42:43 +06:00
VladimirMangos
b92ebd994f [11310] Make .npc add/.gobject add commands work safe.
Reserve at server startup some guods follow last used in static DB spawns guid
for creatures/gameobjects for use in .npc add/.gobject add commands.
This allow safe select guids not used in all map copies. Guids for temporary spawns
used from range frollow after reserved guids range.

This also let select new static spawns guids (added in game chat command) near to already used static guids.
So it let avoid gaps in static guids lists.

Amount reserved guids set in new GuidReserveSize.* config options.
2011-04-03 21:22:58 +04:00
zergtmn
a6d155fc54 [11259] Move scheduled scripts counter to ScriptMgr
Also cleanup forward declarations.
2011-03-16 20:01:10 +05:00
VladimirMangos
5a3f557b19 [11216] Fixed crash at explictly empty string setting for dataDir in mangosd.conf. 2011-03-03 22:06:56 +03:00
SilverIce
724092d9e5 [11193] Optimize visibility update and AI notification code. Optimization decreases amount of visibility and AI notification operations in 8-10 times, and as a result, lowers CPU usage by 30-40%
You need to update your config file, new "Visibility.RelocationLowerLimit" and "Visibility.AIRelocationNotifyDelay' options added

Special thanks to Ambal for code hints and advices
Thanks to Undergarun and kero99 for making tests
2011-02-22 02:37:08 +02:00
VladimirMangos
01f68f4187 [11188] Make sure that all WorldPersistentState objects created before pool system start.
Un-instenceable maps shared pool system state, that initilized once.
For proper initilized pools in like case need have all mon-instanceable maps states created
before it.
2011-02-19 03:47:29 +03:00
SilverIce
d597ffe10e [11183] Use map type dependent visibility distance for gameobject, dynamicobject and corpse visibility checks
Also drop no more needed Visibility.Distance.Object config option
2011-02-18 02:09:47 +02:00
Schmoozerd
bbdd04d1ab [11172] Implement ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN (type 74)
Also implement new criteria requirements:
  - ACHIEVEMENT_CRITERIA_REQUIRE_NTH_BIRTHDAY
  - ACHIEVEMENT_CRITERIA_REQUIRE_KNOWN_TITLE

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-16 02:17:57 +03:00
VladimirMangos
8feaf211f1 [11168] Use MapPersistentState for access to Pool System dynamic data.
* Direct store pool system dynamic data in sPoolMgr replaced by
  shared pool system data object (for all non instanceable maps)
  into WorldPersistentState, and own copies of pool system data
  object in DungeonPersistentState/BattlegroundPersistentState.
  This let have pools with object at many non-instanceable maps,
  and single map pools with unique state for each instance.

* Avoid direct global grid data modify from pool system, and use for this also
  recently added local for MapPersistentState grid spawn data.

* Implemented proper API for update pool system data in MapPersistentStates
  from GameEvent system.

* Initialize pool system state at MapPersistendState creating.
  For shared pool system state for non-instanceable maps initilized at first map state
  creating.

Now pool system propertly work in instance also!
2011-02-15 14:40:56 +03:00
VladimirMangos
108feb993d [11127] Rename src/game/InstanceSaveMgr.* -> src/game/MapPersistentStateMgr.* 2011-02-10 05:35:07 +03:00
VladimirMangos
dde16bc48c [11126] Rewrite InstanceSaveMgr related code.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
  This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.

* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
   - MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
   - DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
   - BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())

   Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.

* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
  return DungeonPersistentState (same pointer in fact with proper subcalss type)

* InstanceResetScheduler renamed to DungeonResetScheduler
2011-02-10 05:20:56 +03:00
VladimirMangos
6cfa64db97 [11123] Move respawn data to InstanceSave.
This make prev commit more useful.
In future InstanceSave also planned store local pools state.
2011-02-09 06:09:32 +03:00
VladimirMangos
f73868a703 [11117] Allow for non-instancable maps have InstanceData and instance scripts.
* New table added for non-instanced maps (except BG/arena):
    - `mangos`.`world_template` (script mapping to non instanced data)
    - `characters`.`world` (saved script data string storage)

* InstancedData created for any map types including BGs/arenas, that allow have scripts
  state for any maps, but BG/arena instance data not saved.

Note: Possible structures will renamed later for clarify apply to any type maps,
but avoid for now for simplify changes and hard affect to script library sources.
2011-02-08 04:15:13 +03:00
Ambal
631ce36680 [11045] Rewrite internals of DB layer. Simplify code and use less locking. Spawn and use separate connections for sync and async DB requests. Implement database connection pool for SELECT queries. Up to maximum 16 connections supported. Disable 'autocommit' mode for MySQL.
UPDATE YOUR CONFIGS!

Defaults:
LoginDatabaseConnections = 1
WorldDatabaseConnections = 1
CharacterDatabaseConnections = 1

If you are not using <mtmaps> patch do not change the default settings - this is useless. You can try following option in your MySQL config to squeeze even more performance from your DB:

[mysqld]
transaction-isolation = READ-COMMITTED

Great thanks to Undergarun, kero99 and selector for making tests and providing very useful feedback and DB statistics! Have fun :)

Signed-off-by: Ambal <pogrebniak@gala.net>
2011-01-19 22:05:20 +02:00
XTZGZoReX
2d87d68b4e [10626] CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY -> CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATELY 2011-01-16 18:47:52 +01:00
VladimirMangos
39e7b19267 [10989] Implement post-3.1 and later fishing changes.
* Fishing now prowide junk loot at fail skill check.
  This can be disabled for old way work using SkillFail.Loot.Fishing option.
  Junk loot expected to be listed in fishing_loot_template entry 0.

* Fishing can gain skill grow at skill fail check case.
  Controlled by SkillFail.Gain.Fishing option.

* Fishing from fishing pool gameobject can't be fail.
  Controlled by SkillFail.Possible.FishingPool
2011-01-09 14:37:56 +03:00
Pat S
46fdc3af97 [10979] Add extra ghost speed rate for BGs: Death.Ghost.RunSpeed.Battleground
Also recently added option renamed to Death.Ghost.RunSpeed.World

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-07 07:46:41 +03:00
Pat S
af50b352b2 [10977] Add ghost speed rate in config: Death.Ghost.RunSpeed.
Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-01-07 06:45:25 +03:00
VladimirMangos
5f2aef756a [10970] Implement mass mail send infrastructure.
It expected to be used in 2 case: some gameevent must send mails at start/end,
and this can be useful in game commands. Both case wil implemented in later commits.

* New MassMailMgr can accept tasks for send mass mails in safe way for map update threads context/etc.
* It work in way:
   - By provided race mask or more generic SQL query string in async query selected affected characters
   - At query result ready at next world tick update in safe common part of tick code some from mails
     from queued mas mail tasks send.
   - Amount mails limited MassMailer.SendPerTick confir option (10 by default). This done for prevent
     high server load/lags at send too many mails in one tick (mail send all existed characters in DB
     who match to seelction criteria)
   - Manager not persistant for server shutdowns so any not send mails in queue lost at shutdown.
     But with default setting 10K mail send in 20 secs (10000/50/10). Adding more safe execution
     for this case will make related code lot more slow and req. many DB tables and code support.
2011-01-06 06:10:15 +03:00
VladimirMangos
9ae7104251 [10950] Check for scripting lib that it build with exactly same mangos rev.
This prevent use outdated script DLL with hidden possible incompatibilities
in used from core inline functions  or defines.
2011-01-02 20:19:21 +03:00
NoFantasy
0da3463758 [10949] Fix the word accessable -> accessible in log message
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-01-02 01:30:21 +01:00
VladimirMangos
20e7cdb55e [10948] Fixed typo in enum names 2011-01-02 00:23:56 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
84b5ee3b43 [10945] Restore check scripting lib API at load.
Also report result of script library load/reload to chat/console.
2011-01-01 18:39:09 +03:00
VladimirMangos
7a2478ff4f [10942] Implement .reload npc_text. 2010-12-30 23:41:54 +03:00
zergtmn
ec6089bbd8 [10935] Move script calls to ScriptMgr
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
2010-12-29 21:48:06 +05:00
Ambal
b11820593c [10924] Send time diff between Update() calls for object - should help with mob respawn on inactive grids etc. Based on patches by VladimirMangos and cipherCOM. All issues from previous patches should be finally fixed now.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-12-27 22:27:20 +02:00
zergtmn
0d6f990e4e [10912] Move scripting related functions from ObjectMgr to ScriptMgr 2010-12-24 00:23:37 +05:00
VladimirMangos
f7eb7a434e [10879] Remove support unused option SocketSelectTime in mangosd.conf 2010-12-15 23:00:34 +03:00
VladimirMangos
1d8f222621 [10867] Implement templates for trainer spell data in npc_trainer_template.
New table let avoid duplication similar trainer spells for different trainers.
2010-12-13 16:39:53 +03:00
Ambal
5f539117a4 [10848] New system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Thank you for all your feedback!
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-12-09 20:21:41 +02:00
SeTM
1fbc09e1fd [10809] Remove diplicate World::GetQueueSize and rename functions to consistence naming
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-02 02:38:44 +03:00
Ambal
f67d89f109 [10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-11-16 21:08:28 +02:00
tomrus88
76dfdd336f Backports from 400 branch. 2010-11-15 18:01:45 +03:00
VladimirMangos
c9dacb9940 [10718] Partly revert "[10687] UInt32 timer class copies instead using time_t timers for mstime cases."
This reverts commit 967877fefd91e00895f9790dc006b532b94d41b7
in part MapManager/World timers.

Main reason: unclear source cases wrong mstime diff generation at WorldRunnable level at *nix systems.
So need have existed in past hacks that skip its.
2010-11-10 17:55:20 +03:00
VladimirMangos
3b0e926788 [10717] Revert "[10716][10688] New version of patch for send real diff from last update."
This reverts commit 8398a55fa274471daae115e00c627b299a3fdbbd.
This reverts commit 06e2d6859ba3d7fd47be72c23a64e68ae039701f.
2010-11-10 06:29:49 +03:00
VladimirMangos
534ff29f15 [10711] Check localization data for existance main table entres.
Data will skipped for nonexistent entries, and reported with
disabled LogFilter_DbStrictedCheck filter.
2010-11-09 20:26:59 +03:00
blueboy
ee8cc71e38 [10692] Fixed wrongly use %d for guids in DB queries.
This can affect correct result in cases big guid values
(out of range for possitive part of int32 range) at x86 platforms.

Some other cases addded in addition to original patch fixes
where %d wrongly/unsafe used for unsigned values.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-07 22:10:37 +03:00
VladimirMangos
10d3d3ce24 [10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
2010-11-07 21:30:55 +03:00
VladimirMangos
e219ee99bb [10688] New version of patch for send real diff from last update.
In new version last update time stopred for specific Cell that store all world objects
placed in it. All objects of Cell updated (or not updated) in same time.

Original version provided by ciphercom.
2010-11-06 22:59:54 +03:00
VladimirMangos
464908f453 [10687] UInt32 timer class copies instead using time_t timers for mstime cases.
Also cleanup weather update code and some random code cleanups.
2010-11-06 22:51:40 +03:00