Commit graph

40 commits

Author SHA1 Message Date
XTZGZoReX
63897d56d7 Move visibility update functions to more appropriate classes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-01 19:01:42 +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
SilverIce
91eb757e95 [8489] Fixed player visibility update in case view point different from player itself.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-09-11 22:37:25 +04:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +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
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
Ambal
9f938a9ed4 [8103] More wide use IsInWorld checks and delayed at teleport operations.
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-01 14:00:29 +04:00
Ambal
fe88960e09 [8042] Speedup search creature/pet/vehicle by guid.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-18 22:33:23 +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
tomrus88
8b5d67338f Applied coding style. 2009-06-07 21:38:12 +04:00
Ambal
2aff48cc5d [7810] Moved ZThread related code on ACE framework.
Remove ZThread source code from mangos.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-05-11 12:14:22 +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
f4adf83cd7 [7688] Move Get*IfCanInteractWith to Player including renamed IsGameObjectOfTypeInRange. 2009-04-19 22:54:40 +04:00
VladimirMangos
c33eff13f4 [7540] Move most reputation/force faction reaction code to new ReputationMgr. 2009-03-26 11:28:56 +03:00
VladimirMangos
df9caf58cd [7538] Hide some implementation details for reputation/forced faction reaction. 2009-03-25 21:28:04 +03:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +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
VladimirMangos
722395be75 [7413] Fixed finally problems with node names localization in BattleGroundAB messages.
Also fix build at some platforms.
2009-03-08 14:39:53 +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
balrok
f3ea479f6e removed duplicated includes
i used the following script
(i have no awk-skills :-/ i guess with awk it will look much better)
for i in `ls *.h`
do
    HEADER="#include \\\""`echo $i | sed 's/\./\\\\./'`"\\\"" #a grep-readable #include "file.h"
    # following should deletes the first occurence of a duplicated
    # (#include) line
    # if an include is more then once in this file this script
    # has to be run more often - i don't know a better solution
    grep -cH "$HEADER" *.[hcpp]* | grep -v :1$ | grep -v :0 | sed -r 's/:[0-9]*$//' | xargs sed -i '0,/#include "'$i'"/{//d;}'
done

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

Restored build for x64: WorldSession expected to be fist include in WorldSession.cpp
2009-03-08 02:08:16 +03:00
VladimirMangos
03273a49da factionTemplate->faction can be 0, add appropriate checks to prevent crashes and unexpected work. 2009-03-03 17:13:11 +03:00
VladimirMangos
6786ed1610 [7224] Drop unused code. 2009-02-03 00:42:06 +03:00
VladimirMangos
aa24bd836e [7207] Phase system development continue for DB/in_game objects
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB

TODO: in game commands.
2009-01-31 06:11:50 +03:00
DiSlord
dc05b4cad8 Fixed crash in Get...Object call
Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-28 21:30:31 +03:00
DiSlord
abaa111eaa [7159] Allow GO cast as need (use go coordinates for target select in some cases)
Fixed work all Huter traps target selection
More check in ObjectAccessor::Get Object
More generic work 22 TARGET_CASTER_COORDINATES target type

Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-24 03:44:45 +03:00
VladimirMangos
0798b151cc Small vehicle related code cleanup. 2009-01-24 01:45:57 +03:00
Balrok
ce384c5278 [7123] Cleanup in using STD's containers erase method.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-01-20 20:07:44 +01:00
VladimirMangos
7bae367084 [7039] Implement mangosd.conf options Death.Bones.* for disable bones creating from corpse in world zones or in arena/bg.
Note: in case apply insignia bones still created as required for looting.
2009-01-06 14:49:36 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
tomrus88
397efd4fac Merge branch 'master' into 303
Conflicts:
	src/game/SpellEffects.cpp
2008-11-18 18:08:58 +03:00
hunuza
ac00eee418 Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap() 2008-11-17 17:24:53 +01:00
VladimirMangos
2a3c3195b7 [6835] Check instanceid at search creature by guid. 2008-11-17 14:57:25 +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
tomrus88
768fa2d2de Merge branch 'master' into 303
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/Pet.cpp
	src/game/Player.cpp
2008-11-15 15:35:52 +03:00
hunuza
0d1b8038f5 Move object update from ObjectAccessor to Map update. 2008-11-15 00:31:51 +01:00
tomrus88
871d5f8c99 Small progress with vehicles 2008-11-12 00:49:19 +03:00
tomrus88
204b61c220 Added empty vehicle class, vehicle*.dbc struct's 2008-11-11 00:05:00 +03:00
VladimirMangos
5222f49820 Use (if available) TR1 unordered_map instead hash_map at Unix/Linux (in GCC 4.0.0 and later) and Windows (VC90 and later) 2008-11-08 11:44:13 +03:00
TheLuda
800ee76535 Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/ 2008-10-14 00:29:20 +02:00