Commit graph

189 commits

Author SHA1 Message Date
VladimirMangos
5d84dbb492 [9749] Partly revert "[9736] Added more usable interface for grid visits"
In part related broadcasts by explicit provided Map pointer (in different object GetMap() requested)

This is must fix recent crashes in Map::MessageBroadcast
2010-04-15 09:25:15 +04:00
SilverIce
e3f3f3410a [9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-12 15:15:55 +04:00
SilverIce
53eeebf2fe [9725] removed PlayerNotifier and related Map::UpdatePlayerVisibility function, used UpdateObjectVisibility instead
(based on SilverIce's repo commit e226019)

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

Note: this changes not affect in any good/bad way recent problem with player guids.
2010-04-11 06:27:57 +04:00
hunuza
6750ce9185 [9650] Some corpse related clean ups.
Old bones remove code anyway was dead, so remove it.

Signed-off-by: hunuza <hunuza@gmail.com>
2010-03-31 16:40:47 +02:00
VladimirMangos
5c7f6356d6 [9644] Changes in emotes work.
Waypoint/db script/event ai/'.npc playemote' emote data now auto select by emote id way to execute:
oneshot or persistent state

So if in referenced DB data wrongly used state emote as oneshot case this will work in different way now.
2010-03-30 22:13:55 +04:00
XTZGZoReX
51fd11c92c [9638] Replace all C assert()s with MaNGOS ASSERT() macro. 2010-03-29 19:29:42 +02:00
balrok
1b2eefd721 [9598] update battlegrounds per map + cleanup at delete
this will be useful, if we have multithreaded mapupdates one day

since i couldn't reproduce any errors regarding to self deletions of
battlegrounds i removed the m_deleteThis variable
2010-03-17 00:47:22 +01:00
VladimirMangos
e692862827 [9593] Fixed bug in instance binding in case heroic/25-man raids difficulties
In fact typo in my old commit at adding support MapDifficulty.dbc.
2010-03-16 18:15:29 +03:00
NoFantasy
29b2c80449 [9577] Implement SCRIPT_COMMAND_DESPAWN_SELF (self = creature in this context)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-12 17:32:24 +01:00
NoFantasy
dbbc45828a [9576] Implement SCRIPT_COMMAND_CREATE_ITEM to use when no spell exist
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-12 16:19:34 +01:00
VladimirMangos
a12fecab0d [9575] Use ObjectGuid in Map object stores/world access/search. 2010-03-12 14:38:38 +03:00
VladimirMangos
c4f3578226 [9571] Create and use ObjectGuidGenerator/IdGenerator template classes.
* This is let finally hide guid structure in ObjectGuid.h/.cpp code.
* Shared related code.

NOTE: while switch to use new clasess one more problem has been detected
with not-safe code in .pdump work for future per-map multi-threading.
It's need rewrited before will possible safe use in like case.
For current single world thread case it's safe.
2010-03-11 16:32:09 +03:00
VladimirMangos
530580876f [9565] Add detection code for partly cave area 3780 2010-03-10 17:26:28 +03:00
VladimirMangos
244d25189c [9433] Implement detection subzones 4716 and 4740 of zone 4395. 2010-02-22 18:53:49 +03:00
VladimirMangos
5af05a314e [9405] Make all movements instant applied.
* Drop delayed moves list in Map code
* Apply movement coords update always at call including movement to different cell/grid.
* Instead removed functionality mark creature as need move notify broadcast at next tick, do it.

This must resolve porblesm with CreatureRelocation in past not always update position to new expected at call
And in resul next code fail or work in strange way. Mark creature for notifier call at next Update
let safe main part remopved functionality implemented in another way: prevent cascade (or infinity chain)
in move updates. In fiture possible implement move notify call not at each tick for save time.
2010-02-18 01:09:33 +03:00
VladimirMangos
54559b5c03 [9401] Resolve porblems with waypoints moved/etc after [9400]
* Move movegen Interrupt/Reset calls from CreatureRelocation that called and from another movegens.
* Add this called to NearTeleportTo creature case and new MonsterMove* functions that considered
  as special moves similar instant movegens.
* NearTeleportTo/MonsterMove functions recomended used instead explicit use CreatureReolcation+SendMosterMOve pairs
  for proper reaction at movement from creature movement generators.
2010-02-17 17:22:43 +03:00
Lynx3d
c044d64618 [9400] Creature relocation acts like instant movement generator, so current generator expects interrupt/reset calls to react properly.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-16 23:09:28 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
AlexDereka
4338c9105d [9324] Fix some gcc warnings 2010-02-08 02:27:34 +03:00
VladimirMangos
7c20d0a1d8 [9311] Switch to support client 3.2.2 (build 11403)
Merge branch '330'

You need regenerate dbc/map/vmap files. Use updated ad.exe for this.
2010-02-05 22:41:25 +03:00
SilverIce
0c8fccbd47 [9307] Grid containers, cleanup
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-05 01:46:40 +03:00
VladimirMangos
07e699b8d3 [9304] Propertly detect underground area 4425 2010-02-04 23:21:12 +03:00
VladimirMangos
55bc9e8da7 Include build in to .map files data.
This let not update map fiels format version at switch to new build
for prevent use wrong .map files. Build checked at loading.
2010-02-03 16:17:13 +03:00
tomrus88
b85417df73 Movement packets cleanup. 2010-02-01 17:03:04 +03:00
NoFantasy
76748cb75a [9268] Fix one areaflag for city subarea
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-30 13:34:38 +01:00
NoFantasy
2b3971ed26 [9249] Move instance call OnPlayerEnter() to after really added to map
Also clarify log message and comment for function.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-24 16:10:28 +01:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
VladimirMangos
e15f548bed Merge branch 'master' into 330 2010-01-08 16:03:27 +03:00
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