Commit graph

314 commits

Author SHA1 Message Date
VladimirMangos
773f58a3d0 [7473] Better support new DK class profession. 2009-03-16 22:39:19 +03:00
Triply
846831e357 [7472] Fixed messages in Eye of Storm Battleground.
Signed-off-by: Triply <triply@getmangos.com>
2009-03-16 18:54:35 +01:00
arrai
4033f789a9 [7470] Fixed possible loot exploit, thanks to leak` for reporting 2009-03-16 17:07:52 +01:00
VladimirMangos
c1b0e7d57a [7466] Use SpellCastResult in SpellMgr.* functions 2009-03-16 11:21:28 +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
VladimirMangos
7cc704149a Small cleanups in item checks code. 2009-03-14 19:20:16 +03: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
VladimirMangos
4e4db62da3 [7452] Drop from DB broken action button data detected at loading. 2009-03-13 20:24:28 +03:00
VladimirMangos
903b810353 [7441] Fixed reward money counting for ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD 2009-03-11 16:34:00 +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
Triply
52696ce029 [7426] Mounted players now can capture tower point in Eye of Storm.
Renamed function isAllowUseBattleGroundObject to CanUseBattleGroundObject

Signed-off-by: Triply <triply@getmangos.com>
2009-03-09 16:40:13 +01: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
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
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
1727657ab5 [7396] Fixed crash at group disband after some player invite decline and offline.
Correctly cleanup invites list at decline.
2009-03-07 07:50:25 +03:00
VladimirMangos
5a8f379a70 [7391] Prevent achievement counter overflow, implement ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE generic support.
Before overflow has been possible at 4294967295 lols for example.

ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE in many cases require check special conditions and targets.
For this allow call it from scripts:
* Add Player::UpdateAchievementCriteria functiona ccessable from scripts
* In emote case it allowed call in form player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote_id, achievement_id, target_unit_ptr);
2009-03-06 22:28:34 +03:00
VladimirMangos
c18d20782b Implement some death related achievements
* ACHIEVEMENT_CRITERIA_TYPE_DEATH (normal and arena types counting)
* ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON (instance types by man limit counting)
  Note: need fixed for cases when max allowed players different from recommended count.
* ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM (environment damage sources by types)

Fixed:
* ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_PLAYER
   - self-kill counting as death from players
   - same team player kill in opposition kills counter.

Also cleanup in Player::EnvironmentalDamage use DBCStructure.h comment.
2009-03-06 04:26:48 +03:00
VladimirMangos
bff0cb8c75 [7379] Implement some money related achievement criteria.
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS:
* ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD:
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING:
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER:
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_MAIL:
* ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY:
2009-03-05 02:49:40 +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
Arthorius
3ab8264189 [7374] Fixed search free slot in Player::CanStoreItems in case specialized bag.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-03 07:40:47 +03:00
VladimirMangos
02dd431846 [7373] Implement expansion check at character loading (for homebind, transport and plain coordinates).
Also move fall damage calucaltion in new function.
2009-03-03 00:47:30 +03:00
VladimirMangos
9983286280 [7372] Cleanup BattleGround::GetClosestGraveYard related code. 2009-03-02 15:56:37 +03:00
Triply
f454ddf6d0 [7371] Correctly select closest graveyard in Player::RepoopAtGraveyard(). Patch provided by balrok Thx.
Signed-off-by: Triply <triply@getmangos.com>
2009-03-02 10:38:08 +01:00
NoFantasy
94de4437f8 [7369] Remove ReqSourceRef in quest_template.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-02 03:31:18 +03:00
Lightguard
2f02dc7642 [7368] Implement unequip unexpected offhand weapons at talent reset (mostly for warror talent case).
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Implemented OffhandCheckAtTalentsReset option for unequip at zone change (default)
and at talent reset itself (can be enabled).
2009-03-02 02:46:59 +03:00
VladimirMangos
de51363151 [7365] Implement potion in combat delay proper work.
Original patch provided by miranda.conrado.
2009-03-01 11:33:08 +03:00
VladimirMangos
2b10d8fd71 [7364] Really implenent server-side anti-cheating cooldown check for spells with SPELL_ATTR_DISABLED_WHILE_ACTIVE.
Move apply cooldown for like spells to aura apply (GO registering for owner in GO summon spell case)
Store "infinity" cooldown for like spells, ignore it at save and reapply it at aura loading.

Note: one problem still exist for like spells: at loading/far teleport spell icon lost diabled state at client.
      Need sedn some unknown data in SendInitialPacketsBeforeAddToMap or SendInitialPacketsAfterAddToMap for restore it state.
2009-03-01 10:21:47 +03:00
VladimirMangos
ed6123c804 [7363] Propertly set cooldown at server side for category spells at cooldown event send to client.
Also support item dependent cooldown set propetly at cooldown event send to client.
Last will used in follow potion cooldown delay in combat patch.
2009-03-01 10:14:45 +03:00
VladimirMangos
2b9eeb782e [7362] Use IN_MILISECONDS where appropriate, other cleanups. 2009-03-01 05:22:56 +03:00
VladimirMangos
b9326100ea [7360] Use defines instead harcoded item prototype array sizes. 2009-03-01 00:32: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
0be003ac90 [7352] Fixed conditions in FillPlayersToBG to correctly kick group only when other team's selection pool is empty. Problem reported by balrok. Thx
Signed-off-by: Triply <triply@getmangos.com>
2009-02-27 11:56:38 +01:00
VladimirMangos
1fca6de6f3 [7349] Implement spell cast depenences from area/quest.aura state store in new table spell_area.
* It allow store requirenments: area, active or rewarded quest (until possible another quest not rewarded),
  aura present at character, character race/gender.
* Listed spell can marked as auto-casted when fit requirents. In this case spell requirements checked at
  zone/subzone update (and then resurraction also), quest start/reward, dummy aura apply.
* Old hardcoded lines for similar check removed from sources and required DB support for work now.
2009-02-27 11:15:36 +03:00
VladimirMangos
9e7e374077 [7348] Remove hack code from IsDeathPersistentSpell.
Re-apply zone dependent auras at resurrection by triggering zone update for player.
2009-02-27 08:04:21 +03:00
VladimirMangos
64158d61b3 [7345] Use in most cases dynamic quest level as expected (player level for quests witl level 0)
Original patch provided by NoFantasy.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-27 01:25:20 +03:00
aerione_alt
ae1a404a04 [7340] Prevent standup at save in result unexpected packet send to client.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-26 04:44:13 +03: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
balrok
8c701f6287 [7326] Not allow have ammo_pouch and a quiver equipped in same time.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-22 06:35:35 +03:00
VladimirMangos
218571a817 [7325] Always have flag UNIT_FLAG2_REGENERATE_POWER set for loaded character.
Original patch provided by nos4r2zod.
2009-02-22 06:19:37 +03:00
VladimirMangos
e7fc5e390b Speedup check in Player::HasQuestForItem and Player::HasQuestForGO, related cleanups. 2009-02-16 19:02:55 +03:00
zhenya
8dc3586889 [7285] More code cleanups in static data structures use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-16 17:10:24 +03:00
Lightguard
8d03a850c6 [7279] Allow equipped items loading at relogin to arena map.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-14 15:08:07 +03:00
VladimirMangos
b052777f71 Implemented limit category check for item/gem at equip or gem inserting. 2009-02-14 12:17:04 +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
bd89568993 [7275] getbattlegroundqueueidfromlevel returns now bg-specific queueids
before this commit, queueids were staticaly given for
9-19,20-29,30-39... but for instance alterac valley needs
51-60,61-70,71-80.. this patch allows this,
if you change the minlevel in battleground_template you also could make
23-32,33-42.. levelranges
not that we always use 10lvl-steps.. this is actually hardcoded..
2009-02-13 10:32:21 +03: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
DiSlord
bb7d68347f [7265] Move feral bonus get to struct ItemPrototype
Signed-off-by: DiSlord <dislord@nomail.com>
2009-02-11 02:04:20 +03:00