Commit graph

210 commits

Author SHA1 Message Date
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
DasBlub
ebb063beb9 [9107] Fix most of the gcc warnings
* use UI64FMTD instead of "%u" for uint64 output
* on most *NIX systems, I64FMT is "%016lX" and not "%016llX"
* also fix typo: renamed GridMap::loadHeihgtData to GridMap::loadHeightData

Note: there are still many warnings from the 3rd party libraries g3dlite and ACE. Those warnings won't be fixed with that commit.
Also, a few warnings from MaNGOS are left, they'll be fixed later.

Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
2010-01-03 15:30:22 +01:00
NoFantasy
e568293d2c [9106] Add script effect for spell 47097
Also add areaflag hack to detect correct areaId

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-03 03:37:02 +01:00
VladimirMangos
aa372cbfda [9103] Make gcc happy with muti-byte char casts and use more readable magic strings. 2010-01-02 20:46:22 +03:00
tomrus88
33cd1a0aca Merge remote branch 'origin/master' into 330 2009-12-30 01:16:15 +03:00
VladimirMangos
dd198ad1ad [9073] Implement hack way detection for cave area 571. 2009-12-27 21:52:50 +03:00
tomrus88
af9318ffa1 Fixed/updated some enums/packets. 2009-12-22 05:12:40 +03:00
VladimirMangos
ed7d561597 [8963] Make bindpoint field private and add required functions for use. 2009-12-10 12:22:17 +03:00
Lightguard
2352576f03 [8884] Fix heroic dungeons maxPlayers issue
Signed-off-by: Lightguard <Lightguard@tauri.hu>
2009-11-29 04:20:30 +03:00
LordJZ
06e90a954a [8865] Fix area detection for zone 4395.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-11-23 13:26:21 +03:00
balrok
1d362eace4 [8845] fixed some gcc warnings 2009-11-20 12:57:19 +01:00
VladimirMangos
398ca010ca [8831] Helper function add and move for diffficulties.
* Use regular naming for 0 spwanmode/difficulty for clean consistence names (used at well known wiki)
* Move difficulty related data access from InstancedMap to Map class.
2009-11-19 03:05:52 +03:00
VladimirMangos
37ba6623bb [8828] Independent instance reset time for different difficulties.
* Store reset time for map/difficulty pairs.
* Use DBC data for reset time and max players instead `instance_template` fields (dropped)
  for each existed map/difficulty pair.
* Fix some "heroic" related checks in spells/etc.
2009-11-18 10:08:41 +03: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
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
6cab460f6b [8739] Call cleaniup code at remove player from Map before Map unlinking.
This fix crash when aura remove triggering spell casting.
2009-10-26 15:23:08 +03:00
VladimirMangos
b49cf2df28 [8725] Fixed bug with crash at forced logout in combat in instance.
In fact this old bug that just has been triggred more often after recent code changes,
so with some chance maybe some other logout related crashes fixed.

Also small cleanup in avoid double calls RemoveFromWorld and CleanupsBeforeDelete in some cases.
2009-10-25 01:07:28 +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
f762b57fea [8703] Remove templates and some used functions from ObjectAccessor. 2009-10-22 02:46:16 +04:00
VladimirMangos
8bf52f7c63 [8678] Move objects updates store and proccessing for send to client in per map way. 2009-10-19 23:46:58 +04:00
ApoC
45c9c136ba [8653] Implemented per map guids store.
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.

For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-17 00:12:31 +02:00
VladimirMangos
d38866cfbc [8590] Restore build at Unix/Linux. 2009-10-06 15:34:33 +04: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
tomrus88
258e19a4a3 Merge commit 'origin/master' into 320 2009-09-22 18:14:06 +04:00
Ambal
cfea99ea62 [8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances.
Please, update your config files and check new options:

Visibility.Distance.Continents    = 90
Visibility.Distance.Instances     = 120
Visibility.Distance.BGArenas      = 180

Thanks everyone involved in patch tests!

Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-21 23:25:29 +03:00
tomrus88
b493c840e1 Merge commit 'origin/master' into 320
Conflicts:
	sql/mangos.sql
2009-09-16 01:35:50 +04:00
Jolan
afe5c9aef8 [8500] Fixed long existed bug with vmaps unloading.
When order of coordinates has been updated for loading case, unloading part escape fixing in past.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-15 06:58:57 +04:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +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
1d5b9f18f3 Merge commit 'origin/master' into 320 2009-07-31 01:07:17 +04:00
Ambal
253d39de21 [8280] Avoid grid loading loading at packet broadcasts.
If player in range then related grid loaded, if not loaded then player
not in range and no reason for loading.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-30 18:17:09 +04:00
tomrus88
f90f3dd987 Merge commit 'origin/master' into 320
Conflicts:
	src/game/ArenaTeam.cpp
2009-07-29 15:17:37 +04:00
Sorya
7f38da23fd [8272] Fixed typos in world 'height' by code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also some other code style fixes.
2009-07-29 10:04:53 +04:00
tomrus88
be8eaf4e46 Just merge commit 'origin/master' into 320
Conflicts:
	src/game/MiscHandler.cpp
2009-07-28 17:05:38 +04:00
VladimirMangos
c547a27dad [8256] Restore DB script loading broken after [8252].
Also propetly decrease scheduled DB script actions at map unloading.
Some code style restore.
2009-07-27 11:31:53 +04:00
Ambal
64f11bedf7 [8252] Move DB scripting code from global World to Map.
This one more step to pre-map events proccesing and parallel in future.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 12:20:59 +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
Ambal
58209ee79a [8182] Store and use Map* pointer in WorldObject instead map ids for speedup
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-15 02:13:52 +04:00
VladimirMangos
a8288b311e [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-02 09:18:42 +04:00
VladimirMangos
9f41772828 [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-01 11:09:34 +04:00
tomrus88
02bcc56919 Added placeholders for new battlegrounds, some other stuff. 2009-06-25 19:08:53 +04:00
Ambal
2b69a914cf [8031] Move player update code to Map::Update.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-17 01:59:41 +04:00
Ambal
b76c4c2f3c [8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-06-16 12:47:02 +04:00
tomrus88
25140ea3cc [8013] Fixed SMSG_RAID_INSTANCE_INFO opcode, some other fixes. 2009-06-14 19:24:56 +04:00
VladimirMangos
2a27a44e2a [7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
  I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
  Please always use UI64LIT(0x00001) instead less portable 0x00001LL
2009-05-30 22:44:20 +04:00