Commit graph

64 commits

Author SHA1 Message Date
VladimirMangos
249fb836ca [11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
2011-05-15 22:04:57 +04:00
VladimirMangos
151e5eae9c [11458] Non-item related uint64 guids replaced by ObjectGUids in Player.h
Also let ObjectAccessor::FindPlayer optimize empty guid case work.
2011-05-09 21:54:09 +04:00
VladimirMangos
a5fe00d6f6 [11438] Clarify code for quest start/source/req items adding/remove at quest start.
* Fix problem with complete quest when quest start item == quest source item.
  And source item not have max items amount setting.
* Avoid remove start item for case when it will re-added at next code line as source item
2011-05-08 05:56:33 +04:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
zergtmn
0b7e78d2a7 [10938] Some adjustments to script calls OnQuestChooseReward replaced with OnQuestRewarded. Also fix compile in VC 8.0 and VC 9.0. 2010-12-30 01:27:13 +05:00
zergtmn
ec6089bbd8 [10935] Move script calls to ScriptMgr
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
2010-12-29 21:48:06 +05:00
zergtmn
2f4e7a9377 [10901] Allow vehicles to have gossip menu
In addition rename IsGameobject -> IsGameObject.
2010-12-21 15:14:52 +05:00
VladimirMangos
10d3d3ce24 [10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
2010-11-07 21:30:55 +03:00
NoFantasy
449a708728 [10660] Make quest for game event be independent of source
Create new table and convert existing data.
Simplify how game event quests are activated during event by adding generic function to set quest active/inactive.
Any quest in game_event_quest are disabled until event start (and deactivated once stopped)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-31 11:35:09 +01:00
NoFantasy
b6e367bf3c [10657] Separate quest_template.QuestFlags from SpecialFlags
Create enum for SpecialFlags (database flags and internally computed)
Added related functions for specialFlags and update code accordingly.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-30 01:14:17 +02:00
NoFantasy
1210c6d978 [10656] Rename quest function HasFlag to HasQuestFlag
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-10-29 21:19:35 +02:00
VladimirMangos
851e15c70a [10635] Convert many opcode handlers to ObjectGuid use.
Also re-enabled anticheating check for bank window open
base at .bank command access rights.
2010-10-21 10:43:14 +04:00
VladimirMangos
31c9efd219 [10629] Drop function GuidHigh2TypeId
Added ObjectGuid version Aura::GetCasterGuid()

But for prevent big problen with backporting AuraHolder
to mangos-0.12 in most cases still used old uint64 version
Aura::GetCasterGUID.

Recommended use new version where possible in clean way
as done for some cases in commit already.
2010-10-20 09:12:43 +04:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02: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
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +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
45cdc67f58 [10338] Create Map version for GetPlayer/GetUnit fucntions
* This let make map local way access for cases when player/all units
  expected to be at same map (for scripts cases for example).
  Ofc, still exist many places where code expect world wide player search.
  Spell casting for support far target cases, groups/guilds/chat/etc packets

* Function Unit::GetUnit depricated and will removed soon.
* Function GetCreatureOrPetOrVehicle renamed to less horriable GetAnyTypeCreature name.
2010-08-10 23:22:11 +04:00
NoFantasy
c0be5c0926 [10032] Remove not needed local declaration of dialog status and rename some to clarify.
Additional cleanup for readability.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-05 13:21:35 +02:00
NoFantasy
2760e7d353 [10031] Replace hard coded quest dialog status value with enum value
Some minor code cleanup for readability.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-05 11:58:56 +02:00
VladimirMangos
d5c7e7b7d2 [9927] Support new raid allowed quest types. 2010-05-18 15:36:50 +04: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
6bcbbc321b Merge branch 'master' into 330 2010-04-07 06:58:42 +04:00
GriffonHeart
fdddf9188a [9686] Implement support weekly quests cooldowns.
Part code provided by zhenya.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-07 04:24:51 +04:00
tomrus88
50bed7c7da Compile fix, not tested. 2010-03-31 05:58:01 +04:00
VladimirMangos
8416702d7c [9579] Use ObjectGuid in some loot code.
Also use ObjectGuidSet instead std::set<ObjectGuid>
2010-03-13 14:06:27 +03:00
VladimirMangos
acde81fc54 [9578] Use ObjectGuid in visibility sets 2010-03-12 22:54:14 +03:00
VladimirMangos
a12fecab0d [9575] Use ObjectGuid in Map object stores/world access/search. 2010-03-12 14:38:38 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
NoFantasy
090c8b8854 [8923] Restructure gossip menus and make it possible to build selections by database
As result, gossip for GO is now possible. Moved related data structures and remove useless from code.
Please note that after some time, table npc_gossip will be fully removed (use menuId in _template in relation to gossip_menu as replacement).
Special thanks to GriffonHeart for help with research, discussions and ideas of code and thanks to Vladimir for helpful input.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-06 02:27:26 +01:00
NoFantasy
a8bd659872 [8900] Move most gossip related functions from Creature to Player class
Adjust arguments passed in functions accordingly, for easier implementation of gossip for Gameobjects in future.
Some additional code cleanup in affected functions.
2009-12-01 14:19:57 +01:00
NoFantasy
10ebadcadf [8871] Avoid use StopMoving when creature is already stopped.
Some additional code cleanup in related code.
2009-11-25 12:16:08 +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
Daveh
71c031b478 [8770] Fix dynamic quest levels.
QuestLevel -1 is now to be used for dynamic quest level instead of older 0. DB support needed for update of quests.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-11-03 22:20:02 +01:00
tomrus88
3cc7f36006 [8720] Added missing ReqItem 5 and 6 to database.
(backported from commit 7a722b8)
2009-10-24 04:07:57 +04:00
VladimirMangos
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00
NoFantasy
b780e2dd80 [8646] Add basic support for QUEST_FLAGS_PARTY_ACCEPT (2).
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-10-14 19:19:49 +02:00
NoFantasy
38aac1a77a [8533] Not remove timed quest and correctly fail when time runs out.
Add function to remove timed quest instead of direct access to set.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-09-25 16:02:53 +02:00
arrai
a24f39a36f [8378] Use exceptions instead of explicit size checking for each packet
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
2009-08-16 23:50:22 +02:00
NoFantasy
2f3aa9bd71 [8087] Cleanup code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-29 02:21:17 +04:00
tomrus88
a57bf5a78b Applied coding style. 2009-05-29 19:23:28 +04:00
tomrus88
e454cb693d Merge branch 'master' into 310
Conflicts:
	src/game/GameObject.h
	src/game/MiscHandler.cpp
	src/game/Player.cpp
	src/game/QueryHandler.cpp
	src/game/QuestHandler.cpp
	src/game/SkillHandler.cpp
	src/game/SpellAuras.cpp
	src/game/SpellEffects.cpp
	src/game/Unit.cpp
	src/game/WorldSession.h
2009-05-29 19:15:43 +04:00
tomrus88
42f8ce5f3e [7911] Applied coding style. 2009-05-29 19:07:28 +04:00
tomrus88
2f15546120 Merge commit 'origin/master' into 310 2009-05-25 21:57:59 +04:00
SeT
0b020154d9 [7894] Avoid show quest sign for trainer under cursor if trianer have unavailable quest.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-25 06:48:06 +04:00
tomrus88
5e26a2a152 Just a few renames. 2009-05-09 16:01:31 +04:00
tomrus88
6821c24268 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-06 09:40:35 +04:00
daveh
6c74fc95df [7774] Fix pet quest giver doesn't update status.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-05 14:32:27 +04:00