Commit graph

546 commits

Author SHA1 Message Date
XTZGZoReX
b3f3ffa885 [8793] Don't do operations through singleton if already in singleton context.
* Also, some minor things:
   - Remove duplicate sWorldLog define.
   - Add sRealmList macro for RealmList::Instance().
   - Use sLog macro in scripting log functions.
2009-11-08 19:32:59 +01:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
NoFantasy
539072fcbd [8788] Clarify error log message for db_script_string
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-11-08 11:57:03 +01:00
XTZGZoReX
dc725ad6b8 [8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
2009-11-08 03:54:41 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
balrok
c50df41b3c [8775] implement all creature difficulties + support bgs with this
former know as heroic_entry we now have 3 of those
which let us chose different creature_templates for different
map-types

normal maps will need a bit more support to use correct
spawnmodes

but for battlegrounds it works already good:
they are divided by levelrange:
    0-59  == normal spawn -> spiritguides level 60
    60-69 == difficulty=1 -> spritiguides level 70
    70-79 == difficulty=2 -> spiritguides level 80
    80    == difficulty=3 -> spiritguides level 80

this is needed mostly for alterac valley to get
right creature-templates spawned
and with that all creature->SetLevel hacks could
get removed from alterac valley code
2009-11-05 10:48:15 +01:00
NoFantasy
adde82b73c [8774] Implement SCRIPT_COMMAND_KILL_CREDIT (8).
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-11-04 17:45:18 +01:00
VladimirMangos
e078d0dd03 [8769] Implement mails sending at player levelup. 2009-11-03 20:21:11 +03:00
begemot
e83563b671 [8761] typo fix and codestyle
typo was at PetLevelInfo loading
which didn't display the progressbar right when
there was no petlevelinfo available
2009-11-01 21:04:19 +01:00
VladimirMangos
ddd51cca6d [8752] Changes in mail template related server load checks.
* Allow loot for not used in quest mail templates.
  This let use mail template based mails from scripts for example.
* Not allow use same mail template id in more ine quests.
2009-10-29 13:28:01 +03:00
VladimirMangos
fad1fb92f4 [8731] Restore difficulty 1 spawn use for creatures with special difficulty 1 versions.
* Rename creature template `heroic_entry` => `difficulty_entry_1`
  Possible need add 2 more fields for 2-3
* Use 2 more EventAI EFLAG_* flags for 2-3 difficulty support, update checks.
* Update area trigger code.

Note: support for specialized creature version for difficulties 2-3 not added yet
      and will be used same as difficulty 1 mode.

TODO: Rename area triggers heroickey/etc fields ?
2009-10-25 06:23:00 +03:00
tomrus88
3cc7f36006 [8720] Added missing ReqItem 5 and 6 to database.
(backported from commit 7a722b8)
2009-10-24 04:07:57 +04:00
VladimirMangos
d7ae5e3af0 [8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
2009-10-24 01:16:40 +04:00
VladimirMangos
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00
VladimirMangos
d482193cea [8705] Move DynamicObject guid counting from global levle to map.
This is first step in guid counting for map local object types at map level.
Map local countin let
1) have more wide guid space and then more seldom have problems with guid counter overflow
2) possible implement (later) restart map at guid overflow without server shutdown.
3) let use static guids (not for DynamicOPbject that not stored in DB anyway) in instances instead dynamic allocated.
2009-10-22 06:49:35 +04:00
VladimirMangos
ffc2f97d3b [8698] Better way check spawn masks (for specific map)
Also note: i has been totaly wrong in my last notes in prev. commit :((
Old "heroic raid" fine map to new normal 25. Sorry.
2009-10-21 21:31:44 +04:00
VladimirMangos
314687092f [8697] Check creature/GO spawnmask at server loading.
Note: this check only out of range value in masks.
And not detect another possible DB problem:

After last client switch spawnmask for raid dengeons need update for correct work.
In expection same spawn for both normal or both heroic modes:
raid normal spawn mask from 1 to 3 (1|2)
raid heroic spawn mask from 2 to 12 (4|8)

In other case heroic spawn will used for 25-normal mode with empty heroic mode instances.
2009-10-21 19:25:51 +04:00
VladimirMangos
bc1f6c7d3f [8654] Allow loading some type gameobjects without diplay id set.
But make its always inviisble for client.
2009-10-17 02:16:36 +04:00
ApoC
d36a62cee4 [8631] Query fix for PGSQL.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-12 14:34:38 +02:00
VladimirMangos
a9af7f2b1c Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties. 2009-10-06 02:12:02 +04:00
VladimirMangos
59befa2e0e Merge branch 'master' into 320 2009-10-02 19:09:06 +04:00
Triply
0356924cf9 [8560] Optimized guild and arena team loading at startup.
Signed-off-by: Triply <triply@getmangos.com>
2009-09-29 15:41:17 +02:00
tomrus88
6f2b9a7e80 Merge commit 'origin/master' into 320 2009-09-14 16:32:59 +04:00
VladimirMangos
5fb608fec6 [8493] Avoid unexpected multiply error messages at wrong quest_template.RewSpell* 2009-09-13 20:50:35 +04:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +04:00
VladimirMangos
7a2df3c309 [8476] Revert some recent cleanup changes, some other fixes and cleanups. 2009-09-05 22:09:37 +04:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
tomrus88
4a8431f581 Merge commit 'origin/master' into 320
Conflicts:
	src/game/DBCStructure.h
	src/game/DBCfmt.h
	src/game/MiscHandler.cpp
	src/game/ObjectMgr.cpp
2009-09-04 21:16:59 +04:00
VladimirMangos
c8b717ab7d [8449] Deprecate healing/damage item mods and merge internal data in to spell power.
* Report at loading about deprecated ITEM_MOD_SPELL_HEALING_DONE and ITEM_MOD_SPELL_DAMAGE_DONE
  and drop support code.
* Merge healing/damage base spell bonus fields and function to spell power field/function.
2009-09-01 22:45:56 +04:00
VladimirMangos
4d0088e7a9 [8444] Prevent spawn gameobjects with invalid displayid by command.
Also fix mangos string for not existed gameobejct entry.
2009-08-31 23:10:42 +04:00
tomrus88
94fdc7e37e Fix. 2009-08-28 19:14:16 +04:00
tomrus88
2d65ce8b87 Merge commit 'origin/master' into 320 2009-08-28 17:26:09 +04:00
VladimirMangos
5d50bb16b8 [8426] Use upper/lower iterator pairs as result instead 2 function calls. 2009-08-27 10:56:20 +04:00
tomrus88
ed2b97287b Compile fix. 2009-08-24 01:28:12 +04:00
tomrus88
e7353428b1 Fixed one more opcode.
Added startup check for gameobject displayid==0.
2009-08-24 00:59:23 +04:00
tomrus88
935c0a44c2 Merge commit 'origin/master' into 320 2009-08-23 18:57:07 +04:00
Triply
512cb786ee [8408] Optimized guild_member loading during startup. Changed rank ids in guild_rank table.
First start of mangos will take more time then usually, because of guild_rank change. If you want to speed first start up, execute command:
UPDATE guild_rank SET rid = rid - 1;

Signed-off-by: Triply <triply@getmangos.com>
2009-08-23 09:22:34 +02:00
tomrus88
fec1a1954c Merge commit 'origin/master' into 320
Conflicts:
	src/game/MovementHandler.cpp
2009-08-20 16:24:37 +04:00
arrai
65e723ba9e [8387] Fixed error output at creature_template check 2009-08-18 18:56:03 +02:00
tomrus88
f97da77cbd Merge commit 'origin/master' into 320 2009-08-05 14:52:29 +04:00
VladimirMangos
a6413516f9 [8315] Fixed memory leaks (mostly at server shutdown) and code cleanups.
* Fixed leak in BattleGround::m_PlayerScores at BattleGround::Reset,
  add and use BattleGroundScoreMap typedef
* Delete AreaTeam objects stored in global map at shutdown
* Delete Corpse objects stored in global map at shutdown
* Store guild bank log entries as objectes instead pointers in log event lists
2009-08-05 14:27:30 +04:00
tomrus88
4c709772c1 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Player.cpp
	src/game/Totem.cpp
2009-07-21 08:22:30 +04:00
freghar
cd17ada2e5 [8221] Removed trailing whitespaces
With excluded dep/ - as usual.

Signed-off-by: freghar <compmancz@gmail.com>
2009-07-20 17:53:14 +02:00
tomrus88
ca2a2195be Merge commit 'origin/master' into 320 2009-07-17 13:26:56 +04:00
GriffonHeart
cbfbd13146 [8190] Update killing quest objectives base at creature_template KillCredit fields.
Note: for avoid double counting must be removed C++ scripts and EventAI scripts that do same thing in old way.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also implement KillCreditN field check at loading.
2009-07-17 03:45:40 +04:00
tomrus88
1a47420fe8 Merge commit 'origin/master' into 320
Conflicts:
	src/game/Map.cpp
	src/game/MapInstanced.cpp
	src/game/Player.cpp
	src/game/SpellEffects.cpp
	src/game/Totem.cpp
2009-07-15 09:40:13 +04:00
VladimirMangos
9a0abf0e01 [8183] Some gameobject despanw related fixes
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
* Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
* Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
2009-07-15 06:32:08 +04:00
VladimirMangos
c96f8e3d9f [8176] Forbid using some monster movement flags (that can crash client) in creature*_addon tables.moveflag tables field.
Also refactoring creature addon tables loading.
2009-07-13 23:38:27 +04:00
tomrus88
87930a6d07 Merge commit 'origin/master' into 320 2009-07-08 22:08:09 +04:00
VladimirMangos
715470a898 [8126] Improvemets in player/pet/charter name checks.
* Implement new config options for minimal player/pet/charter name length (2 by default)
* Better error reporting at problems in names.
* Add check from max pet/charter name length (same as for player names at client side)
2009-07-05 20:30:33 +04:00