Commit graph

26 commits

Author SHA1 Message Date
balrok
1d362eace4 [8845] fixed some gcc warnings 2009-11-20 12:57:19 +01: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
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
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
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
a75d9893a6 [8106] Revert "Fixed instance heroic/raid reset cooldown at switch normal/heroic difficalty."
This reverts commit 655bb6125abcba28318b2074e1624bb4eb21cadd.

After discussion with Wyk3d fix considered as wrong way.
2009-07-02 09:20:45 +04:00
BonDit
ae0cb69135 Fixed instance heroic/raid reset cooldown at switch normal/heroic difficalty.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-02 09:20:13 +04:00
tomrus88
02bcc56919 Added placeholders for new battlegrounds, some other stuff. 2009-06-25 19:08:53 +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
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
AlexDereka
9ab8c6edd3 [7727] Use more simple code for element erase. 2009-04-28 00:00:19 +04:00
AlexDereka
995988039b [7726] Fixed memory leak in InstanceSaveMgr. 2009-04-27 21:57:11 +04:00
AlexDereka
c9d51a6dc7 [7716] Fixed some typos and possible crashes. 2009-04-26 18:49:07 +04:00
zhenya
b3490d3b74 [7486] Fixed possible crash and wrong data in instance state save (or not save).
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-18 15:47:30 +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
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
zhenya
c5f20ff9a9 [7248] Check battlemaster_entry data at loading. Code cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-08 04:22:46 +03:00
begemot
9bede601a2 [7151] Startup log cleanup and beautification.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-01-23 04:29:35 +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
balrok
2e08a63da7 [6884] Replaced iterator++ with ++iterator in for-loop-headers
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
    *)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done

and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script

Signed-off-by: hunuza <hunuza@gmail.com>
2008-12-07 19:49:45 +01:00
VladimirMangos
88b1974df6 Fixed warnings, unused code and typos.
Including fix  _SCallback for 3 params, triggred mode correct call for .cast back and .cast target.
Remove outdated code for support old 19421 (and ranks) implementation in client data.
2008-11-05 05:06:35 +03:00
hunuza
fa37c291d6 Replace some PQuery() calls with more simple Query() 2008-11-02 23:22:18 +01:00
TheLuda
800ee76535 Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/ 2008-10-14 00:29:20 +02:00