Commit graph

106 commits

Author SHA1 Message Date
Triply
73d12d7ccf replaced if( bla ) with if (bla) for applying mangos coding style
replaced it with sed -i 's/if( \(.*\) )$/if (\1)/' BattleGround*
written by triply

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-04-07 16:13:46 +00:00
Triply
c916f78abb [7631] Removed useless method BattleGroundQueue::BGEndedRemoveInvites
Moved method BattleGroundMrg::InvitePlayer to BattleGroundQueue::InviteGroupToBG
Added some comments to RemindInvite and RemoveInvite events.
Optimalise code.

Signed-off-by: Triply <triply@getmangos.com>
2009-04-07 16:23:10 +02:00
VladimirMangos
c33eff13f4 [7540] Move most reputation/force faction reaction code to new ReputationMgr. 2009-03-26 11:28:56 +03:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
Triply
7dd997617e [7460] Fixed possible cheating in rated arena by ressurection after relog.
Fix: Do not allow to remove insignia from players in arena!
Fixed ending arena match when last player of team logs out.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-14 22:33:34 +01:00
Triply
74006886e9 [7457] Fixed set Bg raid leader to party or raid leader who entered Bg.
Removed useless code from my previous patch.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-14 20:22:17 +01:00
Triply
b45b075668 [7455] Implemented condition that player can be in 2 groups in 1 time - BG raid and normal group / raid.
Patch is tested, but can cause problems / unexpected behaviour.
TODO: set raid leader of battleground raid to raid leader who entered BG
TODO: when player leaves group, he is removed from GroupQueueInfo, and for him is created new GroupQueueInfo in normal queue.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-14 17:01:30 +01:00
Triply
571c56ff07 [7449] Fixed BG queue invitation status showed on client. Fixed BG starting timer and BG ending timer.
TODO: make bg queue update player's status each minute.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-13 00:09:50 +01:00
balrok
b6064c373e [7437] Fixed client visible instance ids for battlegrounds. Patch provided by balrok. Thx.
Signed-off-by: Triply <triply@getmangos.com>
2009-03-10 16:52:24 +01:00
balrok
aebcf212dc [7432] Fixed BattleGround's bonus_honor based on player level and reputation rewards. Implement functions for BattleGroundWeekends. Patch originally provided by Balrok. Thx
Correctly assigned some comments.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-09 22:32:11 +01:00
Triply
1c8f8a2e13 [7425] Fixed crash in BattleGround::Update()
Signed-off-by: Triply <triply@getmangos.com>
2009-03-09 15:10:35 +01:00
balrok
18c8e861f4 [7416] Fixed minimap icon for battlegrounds and arenas. Patch provided by Balrok. Thx.
Signed-off-by: Triply <triply@getmangos.com>
2009-03-08 23:25:59 +01:00
Triply
bd0619ce40 [7415] Fixed removing player from battlegrounds
Probably fixed bug with not ending battlegrounds - reported in previous commit message
Fixed player will loose arena rating if
1. he doesn't click on enter rated arena window - and timer will expire
2. he logs out during time he is invited to rated arena match
3. if he logs out during fight in rated arena match
Patch is not tested, i will test it as soon as possible.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-08 22:18:53 +01:00
Triply
ee5feab3eb [7414] Fixed premature finish timer messages for battleground (va_start was broken).
Fixed typo with BattleGroundPlayerMap.
Optimized implementation for removing offline players from battleground.
Fixed typo in BattleGroundMgr::DeleteAllBattleGrounds.
Patch is tested and should work.

TODO there is a bug if you disable premature finish timer, that can cause battlegrounds to be never ending!
TODO rewrite BattleGround::RemovePlayer function - and fix bugs there!
I might not have today enough time to fix those bugs.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-08 13:28:35 +01: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
VladimirMangos
57e715857b [7409] Support localization for messsages in specialized battagorund code BattleGround*.cpp
Note: BattleGroundAB still have problems with team/node localization in result wrong way LANG_ strings used.
2009-03-08 09:52:52 +03:00
VladimirMangos
cdf99bc169 [7408] Fixed last hidden non-localized message case in BattleGround.cpp.
Note:
1) CHAT_MSG_BG_SYSTEM_NEUTRAL not dependent from target guid so use SendMessageToAll
   and cleanup code
2) BattleGround.cpp now not dependent from Chat.h
2009-03-08 08:54:14 +03:00
VladimirMangos
28a8e0c9cf [7407] Implement per-client localization support for battleground broadcast messages. 2009-03-08 08:10:54 +03:00
VladimirMangos
27a2d88796 [7406] Remove string version of BattleGround::SendMessageToAll. Use only string_id versions always. 2009-03-08 05:48:05 +03:00
Triply
8a9942619b [7404] Fixed cheating in rated arena matches by alt+f4.
Signed-off-by: Triply <triply@getmangos.com>
2009-03-08 01:48:41 +01: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
6c39db38f4 removed unneeded World.h includes
this is done by this script:
ack -c "World.h" | ack :1 | sed 's/:1//' | xargs grep -c sWorld | grep :0 | sed 's/:0//' | xargs sed -i '/#include "World.h"/d'
i didn't checked every change but gcc haven't complained
2009-03-08 01:26:52 +03:00
Triply
1ee2320484 [7399] Rewrited BattleGround starting code - moved it to battleground class.
Fixed message color for premature finish warnings.
Fixed .debug bg command won't allow 1v0 arenas now, only battlegrounds 1v0.
Added battleground announcer message removed in [7384].
Patch is tested, everything worked for me. You must execute attached sql file!

Signed-off-by: Triply <triply@getmangos.com>
2009-03-07 11:23:23 +01:00
Triply
17100c67a8 [7388] Fixed battleground premature warning message. SQL files are attached, you must execute them!
Fix for message's color will be soon.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-06 13:24:55 +01:00
Triply
bfa785fdb8 [7384] Removed some comments.
Fixed problem that queues doesn't invite new players to already running battlegrounds.
Some other fixes for announce system will be soon.

Signed-off-by: Triply <triply@getmangos.com>
2009-03-05 22:25:39 +01:00
VladimirMangos
9983286280 [7372] Cleanup BattleGround::GetClosestGraveYard related code. 2009-03-02 15:56:37 +03:00
Triply
a81d174288 [7353] Fixed problem with joining rated arena matches. Thanks to balrok for help.
Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 14:20:31 +01:00
Triply
3560d9de54 [7351] Fixed removing normal horde groups from queue.
Fixed Reflective shield - patch provided by Rastik. Thx

Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 11:08:57 +01:00
Triply
8f995ce904 [7336] Implemented new BattleGroundQueue invitation system. Now it supports premade group versus premade group matches.
Added 2 new config options - InvitationType and PremadeGroupWaitForMatch - you can find more info in default config file.
This patch can cause crashes.

Signed-off-by: Triply <triply@getmangos.com>
2009-02-25 19:21:31 +01:00
VladimirMangos
41f85080dd [7293] Not attempt respawn/instance tables for battleground/arena templates (instance id == 0) 2009-02-18 00:37:35 +03:00
Triply
1eadd9b7b4 [7276] Rewrited fix for same faction arena matches
Added better Object-oriented calls to BattleGround::Reset()
Added more checks to CreateBattleGround() method
This commit doesn't fix anything
2009-02-13 14:47:10 +01:00
balrok
b75157946c [7269] Use enum type for battleground queue type ids, and related cleanups.
* renamed a variable to make the content of it more clear: type->arenaslot
* renamed BattleGroundQueueTypeId-variables to bgQueueTypeId
  just to make it easier reading the code (cause there existed
  3 different names for this..)
* renamed GetBattleGroundQueueId to GetBattleGroundQueueTypeId
  again this is just for better understanding
* Renamed [GS]etQueueType and m_Queue_type
* Renamed to [GS]etQueueId and m_QueueId

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-12 09:00:28 +03:00
VladimirMangos
6bacf2239f [7257] Fixed unexpected errors in log and non-freed memory at battleground system shutdown. 2009-02-10 06:13:18 +03:00
GriffonHeart
75121a5823 [7255] Allows saving characters in Battle Grounds.
* Now player can join to BG after logout during 5 minutes, if BG in progress.
* All players after server crash or restart should appear at the battlemaster

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-09 16:15:29 +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
5a4358dda9 [7250] Use bg type ids enum insted raw values and catch some bugs in result for fixing.
* Replace max bg type checks by DBC valid index check
* Use in functions and fields BattlegroundTypeId type instead uint32
* Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
  Many bg have same raw values for type id and queue id but some can be affected by this bug:
  BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
* Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
* Remobe redundent for header itself includes for BG headers.
* Use Auction location enum instead raw valus.
2009-02-08 11:05:11 +03:00
GriffonHeart
6afcf1a1ef [7229] Add area limitation checks for battleground/arena spells.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Spell sorted by 2 list and map ids lists replaced by map type checking in patch.
2009-02-05 04:59:42 +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
ApoC
1718653e63 [7130] Changet all *::Update(time_t) to *::Update(uint32), there is no need to use time_t (mostly 64b) because time diffs are very small numbers and the base calculation of diff is done as uint32.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-01-21 02:48:32 +01:00
ApoC
d469a604eb [7110] Make some methods in BattleGroundMgr static.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-01-18 21:25:18 +01:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
tomrus88
71b1065c8b Merge branch 'master' into 303
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/Chat.h
	src/game/Player.h
	src/game/World.h
	src/game/debugcmds.cpp
2008-12-16 07:30:23 +03:00
ApoC
a5331ab517 [6910] Implemented rewritten arenas. Original author w12x@getmangos.com
Many thanks also to:
  Balrok@github.com for long time updating.
  Triply@github.com for great work in rewriting process.
  All who I forget to name.
Signed-off-by: ApoC <apoc@nymfe.net>
2008-12-16 00:17:24 +01:00
tomrus88
afc4d91ed8 Merge branch 'master' into 303 2008-11-30 15:00:46 +03:00
hunuza
d0ea9cbb23 [6864] Fixed typos in [6863]. 2008-11-30 12:37:06 +01:00
tomrus88
ee7f7a0a08 Merge branch 'master' into 303
Conflicts:
	src/game/Player.cpp
	src/mangosd/mangosd.conf.dist.in
2008-11-30 14:05:56 +03:00
hunuza
e19433fa73 [6863] Arena team related clean ups and adding parts of w12x's arena patch. 2008-11-30 11:41:16 +01:00
tomrus88
78ec66babc Merge branch 'master' into 303
Conflicts:
	contrib/extractor/System.cpp
	contrib/extractor/ad.exe
	src/game/WorldSocket.cpp
2008-11-06 15:50:47 +03:00
hunuza
90828fa699 Cache highest arena team/guild ids. Some code clean up. 2008-11-05 16:58:57 +01:00
tomrus88
d4ab3ca463 Merge branch 'master' into 303 2008-11-04 18:28:39 +03:00