Commit graph

267 commits

Author SHA1 Message Date
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
tomrus88
42f8ce5f3e [7911] Applied coding style. 2009-05-29 19:07:28 +04:00
Ambal
a4eab7e9f2 [7811] do not reload already loaded map coordinats at runtime.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-05-11 13:01:56 +04:00
VladimirMangos
042b520fad [7766] Add hack code for better detection some area 4395 subzones. 2009-05-05 08:43:12 +04:00
AlexDereka
27fabf7ace [7745] Fixed gcc warnings. 2009-05-03 20:25:27 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
VladimirMangos
fc0e1ecdf1 [7690] Move GetCreature/GetGameobject to class Map.
* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
2009-04-20 19:08:13 +04:00
VladimirMangos
6438bf557f [7656] Implement hack way detection for more cave and not cave areas at new continent. 2009-04-12 13:53:31 +04:00
VladimirMangos
361e2eba42 [7625] Drop unexpected published debug related include line 2009-04-06 01:51:34 +04:00
VladimirMangos
8b9d57ebcd [7624] Add hack detection for zone of undead's capital. 2009-04-06 01:20:39 +04:00
VladimirMangos
836d356d67 [7598] Implement proper hide out of range (at another map) transports. Remove duplicate name field. 2009-04-02 01:15:56 +04:00
VladimirMangos
89d9e736a3 [7594] Lost last moment fixes for prev. commit.
This will fix crashes at teleports.
2009-04-01 04:49:12 +04:00
VladimirMangos
5dc0a1ed97 [7593] Map::EnsureGridLoaded related cleanups and fixes:
* Make generic EnsureGridLoaded function and move specialized code to LoadGrid and EnsureGridLoadedAtEnter
* Rename args to gx/gy for low-level grid numbering values.
* Remove redundent LoadMpa call after always case loading maps in EnsureGridCreated
2009-04-01 03:23:35 +04:00
VladimirMangos
8fb9c81e23 [7556] Implement hack way check for cave subzone 4223 detection. 2009-03-28 00:21:22 +03:00
AlexDereka
ef014420a5 [7539] Fixed log output 2009-03-26 00:39:10 +03:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
VladimirMangos
a7fd57cc74 [7487] Avoid attempt use InstanceSave data for non-dungeons.
Also check map existance and correctness at instance data loading.
Removed unused and totally bugged InstanceMap::GetResetTime.
2009-03-18 16:48:54 +03:00
VladimirMangos
1ed2f1e65d [7444] Fixed some recently added and old type conversion warnings. 2009-03-12 11:46:38 +03:00
VladimirMangos
329fb3f9d1 [7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
This in some cases make some zones not explorable if it not have server side data in current maps
but not allow cheating with zone set from client.
2009-03-11 10:08:12 +03:00
DiSlord
6a90d60327 [7428] Add new .map file format use more compact data store and use
Rewrite .map extractor
 + extract more useful data
 + add "-f 0" option for disable size/accuracy optimisation
 + Compatability vs 2.4.3 client data
More fast get .map data
Implement fatigue timer
Rewrite breath timer
Allow absorb/resist for lava/slime environmental damage

Need re-extract map for work.

Signed-off-by: DiSlord <dislord@nomail.com>
2009-03-09 19:38:35 +03:00
balrok
0babfec043 [7424] Codestyle: removed not needed \n in log output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-09 14:20:10 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
GriffonHeart
13ca8d7064 [7397] Implement above ground zone 4395 detection.
By hack code until proper multilevel zone data store not implemented.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-07 09:15:16 +03:00
VladimirMangos
b4dbeb3bc8 [7339] Attempt lock spawn grid only for active non-pet creatures. 2009-02-26 02:45:22 +03:00
VladimirMangos
872d791ca6 [7335] Implement active objects support.
Active objects triggrering grid loading and updating around self like players.
It can be used for event long run movements or escoring quest travels.
Also can be used for proper implementation far vision spells.
Currently only creatures can be activated by function call (from script) cr->SetActiveObjectState(true);
Please avoid lot amount active objects in same time use. Existance active objects support isn't meaning
that each rabbit must be active creature.

Also added independent grid unloading locks for explicit unloading lock,
lock for used by instance copied grids, lock counter for actiove object spawn grids locks.
Last case required for prevent double spawn active creature walk far away from spawn point.
2009-02-25 13:44:49 +03:00
VladimirMangos
9b3daf3933 [7330] Code warnings and style cleanups. Some bugs fixes.
1) comparison singed and unsigned values
2) redundent includes
3) wrong constructor :-part field initilization
4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
5) explicitly list not implemented achievement types.

Also bugs fixed:
1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
2009-02-24 01:54:53 +03:00
DiSlord
946e4fb036 [7291] Better map height calculation by use client data format.
Need re extract map files by use new ad.exe
Signed-off-by: DiSlord <dislord@nomail.com>
2009-02-17 21:07:12 +03:00
VladimirMangos
8af53064eb [7254] Cleanups and batter checking in homebind/bgEntryPoint code.
* Load homebind data early in Player::LoadFromDB and use instead initital race points
  in cases need some safe point if current coordinate broken by some reason.
* Store BG entry point in to WorldLocation and simplify calls.
* Set bg entry point at GM teleports to battleground for correct
  auto-recall position at battleground end.
2009-02-09 15:50:40 +03:00
VladimirMangos
b5da610388 Phase system development continue.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects.
* Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area
  and multi/random target spells/aggro assistance in phased areas or target selection.
* In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility.

TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
2009-01-31 06:06:01 +03:00
Energy
f26d6151c8 [7141] Implement heroic raid instance mode support.
* Heroic mode player amount for instances in DB. Can be used for any instances but added for heroic raid instance.
* Output transfer error at max playrs limit.
* FIXME notes ;) for raid required implementing store 2 reset time and do global reset for 2 modes. But currently raid have inmmap entry data
same reset time for both cases.
* Update instances list where mounts allowed.
* Simplify and fix code for SMSG_RAID_INSTANCE_INFO.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-01-22 03:27:59 +03:00
ApoC
220aa56fed [7124] Removed virtual keyworld from Map::CanUnload method. This method needn't to be virtual. Method moved all into header file to be inlined.
Fixed problem when instance never unloaded in case low population servers where update time always fit into WORLD_SLEEP_CONST and unload time is multiple of this constant.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-01-20 20:54:23 +01:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
VladimirMangos
bd4fc1b0ae [7005] Request Area/Zone Ids using 3D coordinates.
.map files not have 3D specifci area infor. So use hack way for update areaflag for some cases (areas 4281, 4342)
where exist area dependent auras.
2009-01-02 19:30:43 +03:00
tomrus88
a4b8862803 Merge branch 'master' into 303 2008-11-28 18:15:12 +03:00
Wyk3d
8b707ca072 [6855] Fixed the MapReference loop on map update by storing the iterator in the map. 2008-11-28 13:17:01 +02:00
Wyk3d
316acd590c Fixed a bug with setting the reset schedul when removing players from the map 2008-11-28 08:14:02 +02:00
tomrus88
ed77adf964 Merge branch 'master' into 303 2008-11-27 07:19:12 +03:00
Wyk3d
ce387d8535 [6850] Use the HashMapHolder instead of MapReference in Map::Update for now (the refs can get invalidated during the loop). 2008-11-27 00:24:19 +02:00
tomrus88
13c5aea028 Updated vmap extractor bin's 2008-11-22 23:52:31 +03:00
tomrus88
397efd4fac Merge branch 'master' into 303
Conflicts:
	src/game/SpellEffects.cpp
2008-11-18 18:08:58 +03:00
VladimirMangos
5439dd0fd4 Allow constant only access to m_mapRefManager using Map::GetPlayers() 2008-11-17 14:56:44 +03:00
tomrus88
52b0ab1f89 Merge branch 'master' into 303 2008-11-17 01:50:37 +03:00
hunuza
520fce4b27 Move PlayersNearGrid() to Map class. 2008-11-16 22:29:10 +01:00
hunuza
79558a32d9 Introduce player map references. 2008-11-16 21:47:18 +01:00