Commit graph

208 commits

Author SHA1 Message Date
Schmoozerd
78b0ffe4eb [11946] Add commits for death in statistics, fix some engrish
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-10 20:08:08 +02:00
Schmoozerd
43dd16ff60 [11945] Fix a bunch of counter achievements. Some still require more work
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-10 19:55:02 +02:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
Schmoozerd
49a504141a [11786] Enable additional db achievement requirements for criterias of type 41
* Enable 'achievement_criteria_requirement' support for achievement criterias of type 41 (ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM)
* Drop unneeded check for max type (this is done in default case in switch)

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-09-04 23:43:57 +02:00
VladimirMangos
cc11366d6b [11702] Alsways attempt generate randomProperty for item in at create if value not pre-selected.
This resolve all existed cases when we miss assign random property id.

Also move random property/suffix check from item creating to server load time.
2011-06-30 19:19:02 +04:00
VladimirMangos
c870ef324d [11590] Cleanups for barGoLink
* Rename barGoLink -> BarGoLink as expected by mangos code style
* Add uint32/uint6 constructor versions for BarGoLink,
  and remove lot casts required before for BarGoLink use
2011-06-03 12:02:49 +04:00
zergtmn
3ecf19a05a [11431] Make gcc happy again 2011-05-06 22:18:42 +06:00
zergtmn
6498941ead [11430] Introduce GuildMgr
Move all guild-related functions from our overpowered ObjectMgr to GuildMgr.
Thx leak for idea.
2011-05-06 19:27:36 +06:00
VladimirMangos
2aef552668 [11295] Load achievment system state before laoding other character data.
This prevent lost detected achievement criteria update or have unexpected criteria update event
at character data loading like skills/spells/itemts/etc.

Achievment system state load by self not dependent from other character data (checked after
all data loading in CheckAllAchievementCriteria() call.
2011-03-28 00:55:44 +04:00
crackm
cc24542aec [11294] corspe -> corpse typos fix.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-03-27 23:45:50 +04:00
zergtmn
37fd225a89 [11292] Strip trailing whitespace after [11284] 2011-03-27 23:40:42 +06:00
Ambal
40ef9cbf2f [11284] Implement prepared statements for INSERT+DELETE+UPDATE SQL requests. Should improve player save performance + lower MySQL server CPU usage.
Note: PostgreSQL does not have prepared statements implemented using native APIs.

Huge thanks to Undergarun, kero99 and Vinolentus.

Signed-off-by: Ambal <pogrebniak@gala.net>
2011-03-25 22:17:59 +02:00
Schmoozerd
bbdd04d1ab [11172] Implement ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN (type 74)
Also implement new criteria requirements:
  - ACHIEVEMENT_CRITERIA_REQUIRE_NTH_BIRTHDAY
  - ACHIEVEMENT_CRITERIA_REQUIRE_KNOWN_TITLE

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-16 02:17:57 +03:00
Shadez
2bb00743e5 [11140] Properly reward faction related titles to player when achievement has been completed
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-02-12 15:01:26 +02:00
VladimirMangos
f73868a703 [11117] Allow for non-instancable maps have InstanceData and instance scripts.
* New table added for non-instanced maps (except BG/arena):
    - `mangos`.`world_template` (script mapping to non instanced data)
    - `characters`.`world` (saved script data string storage)

* InstancedData created for any map types including BGs/arenas, that allow have scripts
  state for any maps, but BG/arena instance data not saved.

Note: Possible structures will renamed later for clarify apply to any type maps,
but avoid for now for simplify changes and hard affect to script library sources.
2011-02-08 04:15:13 +03:00
zergtmn
ad64af1fdb [11094] Fix some C6246 warnings 2011-02-01 23:15:04 +05:00
VladimirMangos
2fd536fe43 [11077] Game event fixes and condition improvments.
* At game events table loading checked not only allowed event ids range but also event existance.
* Renamed CONDITION_ACTIVE_EVENT -> CONDITION_ACTIVE_GAME_EVENT
* Implemented new conditions:
   - CONDITION_NOT_ACTIVE_GAME_EVENT
   - CONDITION_ACTIVE_HOLIDAY
   - CONDITION_NOT_ACTIVE_HOLIDAY

Recomended use holiday version where possible as more portable.
2011-01-28 23:48:52 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
Schmoozerd
e95aee27e0 [10838] Not report error for missing reqs for some quest timed achievements.
This achievements in fact not required any additional checks.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-08 06:12:09 +03:00
VladimirMangos
b305f203b9 [10811] Use ObjectGuids in chat commands.
Still exist 15 GUID_LOPART uses in code.
2010-12-02 07:09:11 +03:00
VladimirMangos
cc0655a402 [10782] Use Team enum types in all appropriate cases and catches bug in result fix.
* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
2010-11-25 01:11:17 +03:00
VladimirMangos
92d98b9fb2 [10670] Restore build at real C++ compilers after recent timed achievements commit. 2010-11-01 09:41:12 +03:00
Schmoozerd
ef5ea6f24f [10667] Timed Achievements, Fail-Support and Opcodes
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-01 05:47:08 +03:00
emsy
e78887e964 [10666] Implement ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_*_RATING
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-01 04:14:15 +03:00
zerg
2fa5fa43bd [10594] Use equal_range instead of lower_bound/upper_bound pairs
(based on zergtmn's repo commit 0499169)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-10-09 01:37:57 +04:00
Darkrulerz
214c65baa1 [10449] Typos in enum names and comments
Also typos find by darkstalker and Neo2003

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-09-06 15:48:37 +04:00
VladimirMangos
acd0716297 [10432] Rename ASSERT -> MANGOS_ASSERT and related fixes
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.

In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
2010-09-02 05:13:16 +04:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
Schmoozerd
3dd8c72a00 [10356] Drop unneeded groupFlag and rename it properly
(based on Schmoozerd's repo commit 1e8c842)

Also drop `achievement_criteria_requirement` data use at start timed achivement:
its will be checked at criteria update (and complete) case. So wrong criteria will
started maybe (timer set but always fail - progress not updated.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-14 00:14:47 +04:00
Schmoozerd
12aa1bc606 [10352] Implement support explcitly started timed achievements.
* Player::StartTimedAchievementCriteria can be used for activate timer
  for specific explicitly starting timed achievement by timedRequirementId
  in script.

* for ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST this done in core.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-08-12 23:28:18 +04:00
VladimirMangos
b0d42a6f67 [10347] Fixed wrong ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION (46) check.
In result wrong check characters complete
exalted reputation achievements at create or any reputation change event
with negative reputation. Fix prevent new cases but not do anything with
already wrongly recieved ahcievements.

Also:
* Avoid use PROGRESS_SET at normal achievment criteria progress update
  becase achivement/counter in normal way can't decrease.
* At achievment criteria progress loading check that progress counter less
  or equal max counter value.
2010-08-12 00:14:19 +04:00
VladimirMangos
4c838a1c31 [10342] Cleanup achievement code and add new commands.
* .achievement - let see achievement state and list criteria with progress data.
                 It provide criteria ids/shift-links for other commands.
* .achievement add - let complete achivement (set all criteria progress to max) with related events.
* .achievement remove - let reset achievement  criteria progress and undo complete state for achievement.
                 Command also partly remove rewards (title part).
* .achievement criteria add - let increase criteria progress at specific amount or to complete state
* .achievement criteria remove - let reset/descrease criteria progress and undo criteria and related achivement complete state if need.
2010-08-11 07:49:46 +04:00
VladimirMangos
373f607a44 [10323] Implement achivement view commands.
This is fist part for achievement related command set.
Edition commands will added in some later commits when ready.

Two command added:

* .lookup achievment $partname - show fit achievements
  (id, shiftlink, complete date for selected player).
  shiftlink included similar data as generated by client for achievement shift-link
  (complete state, complete date, marked completed criteria).

* .character achievements [$playername] - show completed achievements for selected player
2010-08-06 02:15:09 +04:00
NoFantasy
25d9fd265b [10293] Correct a not exitan...non-existin... a word that is often spelled wrong
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 18:26:08 +02:00
SilverIce
e427ce80cc [10052] Camera System
(based on SilverIce's repo commit 4f2f4ab + next 3 more)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-14 07:23:03 +04:00
hunuza
68abd76c97 [9844] Fix some whitespace errors.
Signed-off-by: hunuza <hunuza@gmail.com>
2010-05-07 12:25:12 +02:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
VladimirMangos
6dec6c8a9f [9836] Make log output code more consistent for diff build modes.
* Make possible have debug output if build in release mode.
* But preserver current optimization in avoid debug output args
  calculation if debug ouput disabled if done using DEBUG_LOG
* Implement in same way BASIC_LOG, DETAIL_LOG. Recommended use
  its instead explicit access to sLog
* Use variadic macros for DEBUG_LOG and other new defines.
  All supported VS/GCC have its support as C++ extension.
* Add DEBUG_FILTER_LOG and semilar defines for filered log output and use its.
* Also move recent added debug output for transport events under LOG_FILTER_TRANSPORT_MOVES
2010-05-04 22:29:11 +04:00
VladimirMangos
ead6468b13 [9758] Include SharedDefines.h to AchievementMgr.h for provided used enum type definition. 2010-04-18 12:33:31 +04:00
SilverIce
e3f3f3410a [9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-12 15:15:55 +04:00
ApoC
c6af8b7d3e [9708] Compile fix under GCC.
Signed-off-by: ApoC <apoc@nymfe.net>
2010-04-09 16:25:21 +02:00
crackm
77c930249d [9707] Fixed typo added by Vladimir to patch in [9704].
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also add check to prevent have NONE gender with some other for same entry
in `achievement_reward` and `locales_achievement_reward`.
2010-04-09 16:26:41 +04:00
crackm
12c3227e32 [9704] Add to achievement_reward support gender dependent rewards.
For example for achievement 1793

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-09 07:11:31 +04:00
XTZGZoReX
51fd11c92c [9638] Replace all C assert()s with MaNGOS ASSERT() macro. 2010-03-29 19:29:42 +02:00
VladimirMangos
a27ff3e79d [9602] Simplify creating mail draft with content text, cleanup includes. 2010-03-18 12:10:47 +03:00
balrok
e92e01ebac [9592] fix crash with ACHIEVEMENT_CRITERIA_REQUIRE_INSTANCE_SCRIPT
BattleGroundMap has no GetInstanceData() function
2010-03-16 01:56:33 +01:00
VladimirMangos
c8fd454a79 [9551] Add and use PackedGuid wrapper.
Also
* use more wide bytebuff << >> operators for objects
* use at read packet faisl alsways exception way instead some time used bool results.
2010-03-08 20:23:16 +03:00
VladimirMangos
b47520a500 [9543] Really call ACHIEVEMENT_CRITERIA_TYPE_WIN_BG
Also make more wide set achievement type criterias expected requirement in DB table.

Original patch in achievement call part provided BudIcePenguin.
Prepared to mangos sources by Burned@ru-mangos.ru
2010-03-07 15:34:17 +03:00
VladimirMangos
6b0189fed3 [9426] Really rename to ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL 2010-02-21 03:37:48 +03:00
VladimirMangos
df652c56c0 [9425] More achievement types support.
Implemented new achievement criteria requirement:
* ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM_LVL (item level and item quality equiped in specific slot)

Implemented suppoprt achievement types:
* ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM (required DB data)
* ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL (required DB data)

Also achievment types used only for statistics:
* ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION
* ACHIEVEMENT_CRITERIA_TYPE_WON_AUCTIONS
* ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS
* ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS
* ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM
* ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM
2010-02-21 03:20:26 +03:00