Commit graph

63 commits

Author SHA1 Message Date
AlexDereka
ef014420a5 [7539] Fixed log output 2009-03-26 00:39:10 +03:00
VladimirMangos
df9caf58cd [7538] Hide some implementation details for reputation/forced faction reaction. 2009-03-25 21:28:04 +03:00
VladimirMangos
59b7d05e8d [7534] Fixed some problems in achievement messages broadcasting.
* Send SMSG_CRITERIA_UPDATE to player itself only. This will fix bug when, for example near player death
  owerwrite another player death count in statistics until next death or relogin.
* Send to near player  CHAT_MSG_ACHIEVEMENT instead CHAT_MSG_GUILD_ACHIEVEMENT
* Not send CHAT_MSG_GUILD_ACHIEVEMENT to player itself.
* Limit around broadcast of SMSG_ACHIEVEMENT_EARNED to CONFIG_LISTEN_RANGE_SAY (same as for CHAT_MSG_ACHIEVEMENT)
2009-03-24 17:59:30 +03:00
VladimirMangos
f4482f247f [7532] Avoid warnings at use size_t with printf fromat strings. 2009-03-24 06:03:22 +03:00
emsy
8fa0ef7ab9 [7530] Fixed counting exalted reputation achievements work for factions with base reputation != 0.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-24 03:44:37 +03:00
VladimirMangos
2215f77ec3 [7478] Avoid rescan data at some achievments triggering for speed.
Only if chnage can affect result
* ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL
* ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS
* ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION
* ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION if
2009-03-17 17:35:46 +03:00
VladimirMangos
4215b65b8c [7477] Implement work ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM 2009-03-17 10:20:34 +03:00
VladimirMangos
95379309e5 [7427] Sort ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE achievements by normal/heroic and check current player mode fit.
Also ignore any ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE achievements with not implemented custom requirements.
2009-03-09 19:00:05 +03:00
VladimirMangos
bf718ea961 [7418] Implement new log filter LogFilter_AchievementUpdates that let avoid achievments updates spam in logs if not needed.
Enabled by default.
2009-03-09 07:59:27 +03:00
VladimirMangos
42b5130931 [7394] Check loot_template.maxcount for max allowed value (255) and make better report for this case.
Also optimize strcture LootStoreItem that let use 4 byte for loot template element in memory instead 5 bytes.
But limit group id to 127 max value. Check this at loading.
2009-03-07 03:54:31 +03:00
VladimirMangos
be74937146 [7393] Implement access to client side holiday ids.
* src/game/GameEvent.* renamed to src/game/GameEventMgr.* for consistence
* `game_event` now have new `holiday` field for store client side holiday id associated with game event
* Added new enum HolidayIds with existed at this moment holiday ids.
* New function "bool IsHolidayActive(HolidayIds id)" added accessabel from scripts for active holidays check.
2009-03-07 03:00:17 +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
10f2648455 [7381] Sort cases in AchievementMgr::UpdateAchievementCriteria and mark some case as not used. 2009-03-05 15:48:12 +03:00
VladimirMangos
8928df7f07 [7380] Implement highest value achievements support. Implement some auction achievements
* ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID:
* ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD: (FIXME: only for online player)
2009-03-05 13:49:37 +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
2d6b8bf068 [7378] Fixed check for ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL for non-class/race specific case. 2009-03-04 04:13:11 +03:00
zhenya
95439564aa [7350] Use more compact and fast way for check class/race achievement.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-27 12:54:33 +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
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
VladimirMangos
7c2e850283 [7312] Use localized DB-based achievement message instead hardcoded string. 2009-02-21 07:51:20 +03:00
ApoC
c9eacd7a23 [7240] Fix logfile spam from AchievementMgr.
Log AchievementMgr::SendAchievementEarned only in debug.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-02-07 14:50:01 +01:00
VladimirMangos
74ec17a273 [7235] New command: .reset achievements 2009-02-07 00:00:23 +03:00
delavega
a26f327314 [7218] Fixed used message CHAT_MSG_GUILD_ACHIEVEMENT format.
Guild members will not recieve achievement messages.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-01 22:37:53 +03:00
VladimirMangos
0418aa5137 [7177] Fixed unexpected error output in logs. 2009-01-25 19:39:31 +03:00
ApoC
475e8cbcf6 [7161] Implemented configurable option to allow/disallow achievements gain for GMs.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-01-24 17:42:21 +01:00
arrai
71cb0f514a [7152] Fixed typo in previous commit 2009-01-23 11:21:16 +01:00
begemot
9bede601a2 [7151] Startup log cleanup and beautification.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-01-23 04:29:35 +03:00
arrai
6ef0e056b0 [7121] Fixed ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT 2009-01-20 01:57:15 +01:00
VladimirMangos
9fba64aeae [7113] Not update/store achievement progress for counter == 0 2009-01-19 13:30:18 +03:00
VladimirMangos
dc19fc4ca3 [7040] Move achievment rewards dat to new DB table. Implement sending item rewards by mail.
Support localization string fields for new table.
Move achievments related code and data from ObjectMgr to new AcievmentGlobalMgr.
2009-01-06 16:21:22 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
arrai
7864c9aee1 [7014] Fixed setting initial value of achievement criteria counter, broken after 21df99d7. With that bug players had to complete an achievement criteria n+1 times 2009-01-03 14:57:23 +01:00
invliD
8d549e8a82 [7001] Fixed ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT
Signed-off-by: arrai <array.of.intellect@gmail.com>
2009-01-02 12:50:11 +01:00
hectolight
802b35fbb8 [6999] Implemented ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT and ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT
Signed-off-by: arrai <array.of.intellect@gmail.com>
2009-01-02 00:05:50 +01:00
Charlie2025
02cc37bcd0 [6974] Set different loglevel for UpdateAchievementCriteria
Signed-off-by: ApoC <apoc@nymfe.net>
2008-12-29 20:35:43 +01:00
VladimirMangos
129c0797a7 Save only changed achievement data at player save. Some code cleanups.
Also increase tempory at stack buffere for utf8 convertion. It used in sql quaries log output and need have apporpriate size support.
2008-12-05 23:44:13 +03:00
tomrus88
60b8f30898 Rune system fix, dk crash fix 2008-12-01 08:19:26 +03:00
VladimirMangos
bd3eca6904 Add and use function for more fast way to get areflag by area id. 2008-11-30 05:17:34 +03:00
arrai
333146baaf Implemented ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA 2008-11-28 23:51:55 +01:00
arrai
d1b5944000 Implemented achievement rewards 2008-11-21 20:10:28 +01:00
arrai
b9e695b727 Implemented ACHIEVEMENT_CRITERIA_TYPE_GAIN_EXALTED_REPUTATION 2008-11-19 19:56:49 +01:00
arrai
4f559eb7e6 Implemented ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION 2008-11-19 19:56:48 +01:00
arrai
56c8d2549c Implemented ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP 2008-11-18 19:17:51 +01:00
arrai
e69e5d8336 Implemented ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS
Use correct locale in SMSG_RESURRECT_REQUEST
2008-11-16 18:51:17 +01:00
arrai
871f2e181c Removed dynamic memory allocations in CriteriaCastSpellRequirements 2008-11-09 21:38:07 +01:00
arrai
73e595ef87 Implemented some spell achievements 2008-11-09 01:31:12 +01:00
arrai
eb0cfe7fec Fixed ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING by using total fall distance instead of fall time. This distance might be used for a more accurate fall damage formula in a later version. 2008-11-08 16:29:44 +01:00
arrai
d7f8a60835 Implemented ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM and ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM
Fixed CMSG_CANCEL_CAST opcode
2008-11-07 16:21:30 +01:00
arrai
3d86187c4a Implemented ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM
Added basic support for timed achievements
2008-11-04 00:54:29 +01:00