Commit graph

51 commits

Author SHA1 Message Date
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
NoFantasy
a716d51c82 [7306] Updated POI icons defines.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-19 21:15:10 +03:00
Neo2003
7d8dc0eeef Implemented gameobjects and creatures grouping (pools of them)
Groups (called pools) can be also member of any game event

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
Signed-off-by: freghar <compmancz@gmail.com>
2009-02-18 20:19:57 +01: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
zhenya
22656b33e3 [7283] Use map for trainer spells for fast find data by spell id.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-15 22:49:12 +03:00
NoFantasy
3b4402b88b [7278] In case gossip flag use gossip menu instead quest menu as client expected.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-14 14:21:16 +03:00
balrok
804166739d typo IsCanIneract -> IsCanInteract 2009-02-08 11:27:33 +03:00
VladimirMangos
5a4358dda9 [7250] Use bg type ids enum insted raw values and catch some bugs in result for fixing.
* Replace max bg type checks by DBC valid index check
* Use in functions and fields BattlegroundTypeId type instead uint32
* Fixed wrong use bg queue ids instead bg type ids in queue update/remove function calls.
  Many bg have same raw values for type id and queue id but some can be affected by this bug:
  BATTLEGROUND_EY, BATTLEGROUND_SA, and all areans (with small arena/team size exceptions)
* Move Battlemaster to bg type ids map fron ObjectMgr to BatteleGroundMgr.
* Remobe redundent for header itself includes for BG headers.
* Use Auction location enum instead raw valus.
2009-02-08 11:05:11 +03:00
zhenya
a1eaf1af6f [7225] Correctly clear trainer and vendor data.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-02-03 02:01:41 +03:00
VladimirMangos
e83be70aca [7220] Check creature spells data at server startup. 2009-02-02 18:11:00 +03:00
VladimirMangos
4602ff9c21 [7214] Phase system continue development - Commands and fixes.
* Fixed creature/gameobject save from game (used in commands code only)
* Implement .modify phase (for player), .npc setphase (for creature/pet), .gobject phase (for gameobjects) commands
  for set phasemask of selected object. In player/pet case temporary until in game phase switch/re-login/GM-mode change.
  In creature/gameobject case change saved in DB.
* Add to .gps output phasemask value print. Allow use .gps command with creature/gameobject shift-link
  (work for objects loaded in game in command time).
2009-02-01 08:13:16 +03:00
VladimirMangos
aa24bd836e [7207] Phase system development continue for DB/in_game objects
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB

TODO: in game commands.
2009-01-31 06:11:50 +03:00
VladimirMangos
b5da610388 Phase system development continue.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects.
* Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area
  and multi/random target spells/aggro assistance in phased areas or target selection.
* In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility.

TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
2009-01-31 06:06:01 +03:00
VladimirMangos
ac9b14d70c [7116] Correctly show quest/gossip menues.
In case non defeault gossip text with quest only
In case empty quest and gossip menus and gossip text.
2009-01-20 00:05:03 +03:00
DiSlord
17004d59d4 [7111] Fixes in Spell Effect immunes
Correct totem immunes for dot/leech/Fear/Transform auras (immune only to effect)
Correct log if all effects immuned by Effect Immune
Move check for IMMUNITY_STATE to Unit::IsImmunedToSpellEffect

Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-19 02:57:50 +03:00
DiSlord
d12944d8f2 [7045] Some additional check
More correct spell select for creatures if spell PreventionType == SPELL_PREVENTION_TYPE_SILENCE
Also add check for PreventionType == SPELL_PREVENTION_TYPE_PACIFY

Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-07 17:59:26 +03:00
DiSlord
4b9af01d42 [7023] Remove not used useCharges for IsImmunedToSpell/IsImmunedToDamage
Signed-off-by: DiSlord <dislord@nomail.com>
2009-01-04 23:20:21 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
tomrus88
db64bf6b80 Merge branch 'master' into 303
I hope it merged correctly...

Conflicts:
	contrib/extractor/ad.exe
	src/game/MovementHandler.cpp
	src/game/Player.h
2008-12-11 12:22:37 +03:00
hunuza
2e2055c469 [6892] Some small code clean ups and optimisations.
Signed-off-by: hunuza <hunuza@gmail.com>
2008-12-10 16:42:56 +01:00
tomrus88
ef69f6b80c Merge branch 'master' into 303
Conflicts:
	src/game/Player.cpp
	src/shared/revision_nr.h
2008-12-09 00:32:47 +03:00
Neo2003
09c27ec667 [6887] Position dead flying creatures on ground at creature loading.
Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
2008-12-07 22:02:17 +01:00
Neo2003
211f987aa9 Make flying creatures fall on ground when killed.
Fix also fly speed computation for creatures.

Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
2008-12-07 22:00:53 +01:00
balrok
2e08a63da7 [6884] Replaced iterator++ with ++iterator in for-loop-headers
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
    *)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done

and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script

Signed-off-by: hunuza <hunuza@gmail.com>
2008-12-07 19:49:45 +01:00
tomrus88
518d7f6297 Merge branch 'master' into 303 2008-12-01 08:21:10 +03:00
balrok
8347cba493 [6866] Fixed: Only dungeons, not all instancable maps should modify aggro-behaviour.
This has no functional effect until the battlegrounds are instanced.

Signed-off-by: hunuza <hunuza@gmail.com>
2008-11-30 14:58:22 +01:00
tomrus88
287ec91d73 Fixed compile error 2008-11-27 16:26:27 +03:00
tomrus88
af6acab8f8 Merge branch 'master' into 303
Conflicts:
	src/game/Creature.cpp
2008-11-26 19:44:03 +03:00
ApoC
64fd2dc881 [6846] Fixed some more typos. Added post check for assistance conditions into event execute.
Signed-off-by: ApoC <apoc@nymfe.net>
2008-11-24 03:03:30 +01:00
ApoC
359d4d7dd3 [6844] Implemented configurable assistance aggro delaying. Some typos fixed.
Do not forget to update your config files.
Signed-off-by: ApoC <apoc@nymfe.net>
2008-11-24 01:55:53 +01:00
arrai
688693029e Fixed unintialized Creature::m_isVehicle 2008-11-22 18:13:14 +01:00
tomrus88
397efd4fac Merge branch 'master' into 303
Conflicts:
	src/game/SpellEffects.cpp
2008-11-18 18:08:58 +03:00
hunuza
ac00eee418 Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap() 2008-11-17 17:24:53 +01:00
tomrus88
e738198eb4 Merge branch 'master' into 303
Conflicts:
	src/game/ItemPrototype.h
	src/game/ObjectMgr.cpp
	src/shared/Database/SQLStorage.cpp
2008-11-16 17:20:43 +03:00
Wyk3d
766654c85d [6828] Added script name indexing for creature, gameobject, item, areatrigger and instance scripts.
* loaded all distinct script names into one vector at server startup
* added custom loaders to convert the script names to indices
* converted all the script lookup functions to use the index instead of the name
2008-11-16 03:20:16 +02:00
tomrus88
14d312ad22 More work on vehicles 2008-11-12 23:20:59 +03:00
tomrus88
871d5f8c99 Small progress with vehicles 2008-11-12 00:49:19 +03:00
tomrus88
6fae544fbe Merge branch 'master' into 303
Conflicts:
	src/game/WorldSocket.cpp
	src/shared/Database/DBCStructure.h
	src/shared/Database/DBCfmt.cpp
2008-11-10 01:10:52 +03:00
evilstar
1da8ff0043 [6812] Implement localization of creature/gameobject name that say/yell.
Original patch deeply rewrited.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2008-11-09 13:19:08 +03:00
tomrus88
7974d1cb94 Merge branch 'master' into 303
Conflicts:
	src/game/Player.cpp
	src/game/Spell.cpp
2008-11-08 16:52:28 +03:00
VladimirMangos
4476d483d4 Fixed comment text and code indentifiers spelling.
GetFieldNames part provided by Paradox.
2008-11-06 19:22:23 +03:00
hunuza
79cb959991 Removed some unnecessary database queries.
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
2008-11-03 14:22:54 +03:00
hunuza
f2852a95b7 Removed some unnecessary database queries.
Removed unnecessary database queries in some command handlers.
Replaced them with access to cached data or queries for only the needed data.
Move database access in gossip select code to less often called place.
2008-11-02 15:58:24 +01:00
tomrus88
cffc766fb6 Merge commit 'origin/master' into 303
Conflicts:
	src/game/SpellEffects.cpp
	src/game/World.cpp
2008-11-01 08:10:24 +03:00
VladimirMangos
41b876b395 [2008_10_31_01_mangos_creature_template.sql] Creature related code and DB cleanups.
* Rename 2 creature_template fields to more clean names and related code update also.
* Use enum values instead raw values for type_flags, use halper functions instead code repeating.
* Move tamed pet creating code to new function.
2008-10-31 20:45:22 +03:00
tomrus88
8d733e8f8a Merge branch 'master' into 303 2008-10-28 23:04:02 +03:00
GriffonHeart
94e29ce6a8 [2008_10_27_01_npc_option.sql,2008_10_27_02_locales_npc_option.sql] Implement npc_option localization support, also store in DB BoxText/BoxMoney/Coded.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2008-10-27 22:20:25 +03:00
VladimirMangos
9e6390d88d Load npc_options at server startup, use cached data at creature gossip menu init.
Also new .reload table command added. Note: currently it will not affect creatures that have gossim memu created at command use moment.
2008-10-27 16:43:31 +03:00
tomrus88
9c8864f134 Updated objects stuff 2008-10-26 10:20:52 +03:00
TheLuda
adc46ef907 Applied new coding standard, see http://github.com/mangos/mangos/wikis/codingstandards for more. 2008-10-15 18:26:08 +02:00