Commit graph

118 commits

Author SHA1 Message Date
NoFantasy
2375a1cb71 [10110] Add function Get/SetObjectScale and update code where scale is set.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 12:39:29 +02:00
VladimirMangos
6ebbcd8dbb [10028] Reward group for shareable quests at cast event to creature/go. 2010-06-04 20:01:57 +04:00
VladimirMangos
d86dcd60d7 [9925] Add more log filters
* damage - different direct damage calculation tracing
* combat - combat state updates, roll attack result and etc
* spell_cast - spell cast progress and aura apply
2010-05-18 12:38:52 +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
15dd77873e [9779] Drop trailing whitespaces. 2010-04-23 05:28:51 +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
VladimirMangos
b658b25ff8 [9618] More use ObjectGuid in spell/etc code 2010-03-25 13:59:46 +03:00
NoFantasy
dbe089b66d [9572] Add script calls for GameObject GossipHello and GossipSelect
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-11 15:35:13 +01:00
Yehonal
31f4850486 [9524] Use cooldown data from gameobejct trap tamplate if provided.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-03-05 10:06:21 +03:00
VladimirMangos
7fb5d850bf [9510] Gameobject casting improvements.
* Add IsHostileTo/IsFriendlyTo and implement expected way checks for diff. world object types.
  For controlled object check redirected to specific owner, for wild gameobject base at gameobject faction.
  If faction not set expected to be hostile to anyone.
* Update grid searchers to be usable with world object instead only unit case.
  Some grid searches lost redundent second object arg, AnyAoETargetUnitInObjectRangeCheck lost hitHidden arg
  (for hitHidden==true case added new AnyAoEVisibleTargetUnitInObjectRangeCheck)
* Updated grid searchers used with gameobject area casts now.
  Note: Gameobject area spell cast animation will still wrong show around cast triggering target instead
  center around gameobject.
* In case gameobject aura apply to target for restored use target itself as caster because
  we not have currently another way apply aura form wild gameobject.
2010-03-04 07:38:26 +03:00
NoFantasy
6ec9dd5d93 [9499] Add replacement spells for GO type 10 that may have dummy spellId in _template
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-01 16:52:25 +01:00
Lynx3d
b2718378ef [9392] Update creature/gameobject pool at despawn instead spawn prepare.
This let solve problem with not despawned creature/gameobject at pool update in case when related grid not loaded.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-15 21:43:06 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
VladimirMangos
87a35b0489 [9317] Call linkedtrap summon in more cases.
* GAMEOBJECT_TYPE_BUTTON can have linked traps
* Spell::EffectSummonObject also can summon objects with linked traps

Thanks to patman128 for research second case.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-07 02:51:45 +03:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
NoFantasy
544d396beb [9205] Move script call GOHello to GameObject::Use
This provide more accurate call in case of delay use from spell effects

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 23:44:33 +01:00
NoFantasy
16c0ff3ef7 [9204] Move remaining handling of GO from SendLoot to GameObject::Use
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 23:06:31 +01:00
NoFantasy
55b6b0eb26 [9201] Fix typo from [9200] and clean up code in function.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 12:02:45 +01:00
NoFantasy
95f9ec5fb2 [9200] Move handling of most GO's from SendLoot() to GameObject::Use()
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 11:45:14 +01:00
NoFantasy
07a5c698ca [9199] Clarify debug log message in GameObject::Use
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-17 10:52:01 +01:00
NoFantasy
dbf0fafbfe [9182] Replace 0 with NULL in a few CastSpell calls (removed where not needed)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-15 01:43:02 +01:00
NoFantasy
0d6b7f144c [9181] Rewrite parts of GameObject use for GO type 10
This implement using autoclose time for type 10 and also sending a custom animation for some.
To avoid duplicate code, remove code from SendLoot() (handled in Use() instead)

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-15 01:23:45 +01:00
NoFantasy
a461652636 [9180] Add function to send custom animation for GameObject
Replace in code where packet used explicit.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-15 01:01:41 +01:00
VladimirMangos
4d90a2e1f2 [9146] More poolmgr cleanps.
* Replace mixed values used type args by function template specializations
* More explcilty show fact that poolmgr work only with db guids.
2010-01-11 12:24:36 +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
DasBlub
ebb063beb9 [9107] Fix most of the gcc warnings
* use UI64FMTD instead of "%u" for uint64 output
* on most *NIX systems, I64FMT is "%016lX" and not "%016llX"
* also fix typo: renamed GridMap::loadHeihgtData to GridMap::loadHeightData

Note: there are still many warnings from the 3rd party libraries g3dlite and ACE. Those warnings won't be fixed with that commit.
Also, a few warnings from MaNGOS are left, they'll be fixed later.

Signed-off-by: XTZGZoReX <xtzgzorex@gmail.com>
2010-01-03 15:30:22 +01:00
NoFantasy
cccb85dbe2 [9017] Fix typo in GO gossipID check for type 10
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-17 22:35:57 +01: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
balrok
56d694b5fb [8846] corrections for my last commit
thx to vladimir and apoc :)
2009-11-20 13:25:54 +01:00
balrok
1d362eace4 [8845] fixed some gcc warnings 2009-11-20 12:57:19 +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
XTZGZoReX
33d475caf3 [8786] Rename some files.
* HostilRefManager.cpp/.h -> HostileRefManager.cpp/.h
 * PoolHandler.cpp/.h -> PoolManager.cpp/.h
2009-11-08 04:21:56 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
d594a29af1 [8779] Not output error at empty item loot for mail template at mail creating. 2009-11-06 02:39:51 +03: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
VladimirMangos
bc1f6c7d3f [8654] Allow loading some type gameobjects without diplay id set.
But make its always inviisble for client.
2009-10-17 02:16:36 +04:00
ApoC
45c9c136ba [8653] Implemented per map guids store.
This patch implements storing guid->object pairs on per map level, this leads
to less locking in ObjectAccessor in case of further multithreaded map update.

For case of cross map guid looking (auras cases) all maps are linked into
ObjectAccessor and can be traversed for this lookup.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-10-17 00:12:31 +02:00
balrok
45f6a474bf [8608] implement BattleGround Alterac Valley
sql won't be included - please look at your database
providers forum

also note, that creature_loot_template id 0
is used for the loot of dead players in this bg
(after a player died and you remove insignia from him..
he not only drops money - he drops some random items too)

further work must be done in better code for adjusting right
levels to creatures - maybe using something similar like it's
done in heroic instances

also quests and creatures needs some scripts in future

thanks to:
netsky - initial start of this patch
bogie - 2nd person writing on this patch
triply, kapatejib, vladimir - code review and suggestions
arrai - for his great tool and help
and all testers / code contributers - I won't write
down a list, else I would forget most probably one ^^
2009-10-09 18:18:22 +02:00
XTZGZoReX
63897d56d7 Move visibility update functions to more appropriate classes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-10-01 19:01:42 +04:00
balrok
b2e32f4ff9 [8570] allow negative spawntimesecs also when NoDamageImmune is 0
thx to crackm for report and investigations :)
2009-09-30 15:09:07 +02:00
balrok
538c5c257e [8548] implement db supported battleground eventindexes
those eventindexes will then be used by the battleground-code to decide
which creature belongs to which objective
for example all creatures in alteracvalley which are standing around a tower
will belong to one eventindex then.. the eventindex will be defined through the code
and must be proper documented for db-devs
2009-09-28 16:41:00 +02:00
Ambal
cfea99ea62 [8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances.
Please, update your config files and check new options:

Visibility.Distance.Continents    = 90
Visibility.Distance.Instances     = 120
Visibility.Distance.BGArenas      = 180

Thanks everyone involved in patch tests!

Signed-off-by: Ambal <pogrebniak@gala.net>
2009-09-21 23:25:29 +03:00
balrok
bd30769dec [8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall

cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code

for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint

also note for coding:
if you do something like
    if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)

Signed-off-by: balrok <der-coole-carl@gmx.net>
2009-09-05 13:47:47 +02:00
Opterman
26a104a05a [8461] Correcting buildUpdateValues for GAMEOBJECT_DYNAMIC flag.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-09-04 01:18:17 +02:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +04:00
VladimirMangos
74d27294aa [8381] Some refactoring work in Unit::m_currentSpells code.
* Restrict access, use enum args, move some repeated code parts to function.
* Make m_selfContainer set only part of Unit::SetCurrentCastedSpell
2009-08-18 02:12:56 +04:00
Ambal
64f11bedf7 [8252] Move DB scripting code from global World to Map.
This one more step to pre-map events proccesing and parallel in future.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 12:20:59 +04:00
VladimirMangos
39833b0069 [8205] Really use trap GO charges and avoid casting in despawned state.
* Drop horribale hack with stored charges amount, use instead GO info charges data as expected.
* Count trap activations as charge uses if it have limited charges.
* Check trap reactions only in ready spawned state.
2009-07-19 07:41:08 +04:00
VladimirMangos
9a0abf0e01 [8183] Some gameobject despanw related fixes
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
* Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
* Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
2009-07-15 06:32:08 +04:00