Commit graph

248 commits

Author SHA1 Message Date
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
tomrus88
2d86aa4535 Misc fixes. 2009-09-14 18:11:15 +04:00
Trazom
dffa5d43bd [8477] Implemented "on demand" regeneration of power in Spell::CheckPower (limited to 500ms frequency).
Correctly set UNIT_FLAG2_REGENERATE_POWER to notify client to stop/start regen in bar.
thx. also for nos4r2zod

From original patch was removed usage of getMSTime() and rewrited this part.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-09-06 01:39:13 +02:00
VladimirMangos
7a2df3c309 [8476] Revert some recent cleanup changes, some other fixes and cleanups. 2009-09-05 22:09:37 +04: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
GriffonHeart
349216d5d7 [8204] Avoid call assistance from non-combatants.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-19 05:38:49 +04:00
Ambal
58209ee79a [8182] Store and use Map* pointer in WorldObject instead map ids for speedup
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-15 02:13:52 +04:00
VladimirMangos
21a6a26386 [8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags.
* Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class.
* Cleanups and fix related code.

NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
2009-06-26 01:57:34 +04:00
NoFantasy
ec133404ca [8058] Avoid use error_log in non-scripting DLL code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-21 04:13:07 +04:00
NoFantasy
400c110e1f [8057] Move code from Event AI to class Creature function for reuse in other scripting cases.
Also some outdated and wrong checks remove.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-21 03:39:43 +04:00
NoFantasy
68848314e2 [8040] Implement Creature::ForcedDespawn and ACTION_T_FORCE_DESPAWN for EventAI.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-18 19:11:57 +04:00
Ambal
b76c4c2f3c [8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-06-16 12:47:02 +04:00
VladimirMangos
08fe4933c5 [8015] More dislpay id selection fixes...
* Allow have only A2 or H2 display ids for less strincted DB field data.
* Check model data existance for all provided display ids atserver startup.
* Avoid explicit access to creature info display fields but use display selection functions.
* Rename GetTaxiMount to more clear for returned value GetTaxiMountDisplayId.
* Check display ids in `creature_model_info` at server load.
2009-06-14 21:57:56 +04:00
tomrus88
4236f7c75c Merge branch 'master' into 310 2009-06-05 14:54:05 +04:00
NoFantasy
48fee42129 [7951] Mope call for help code to function form Event AI code to allow use it from C++ scripts also.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-04 05:01:12 +04:00
tomrus88
b9b2e254b5 Merge branch 'master' into 310 2009-06-03 16:03:44 +04:00
NoFantasy
be6e3923d1 [7948] Use SetFaction instead explcit field set, other cleanups.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-03 15:35:33 +04:00
tomrus88
cae3f0a532 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
2009-05-31 12:16:25 +04:00
NoFantasy
27057843ac [7915] Implement more stricted checks and limitations at loading creature addon data.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-30 05:02:59 +04:00
tomrus88
84ed071e16 Merged and fixed some whitespaces. 2009-05-29 10:40:13 +04:00
NoFantasy
84464e5f3f [7908] Extract class data from creature_*_addon bytes0 fields, drop its, amd add unit_class field to creature_template.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-29 05:51:17 +04:00
VladimirMangos
b83f32fc19 [7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state.
Also related cleanup code in field cases and player Player::SetSheath.
2009-05-29 01:05:39 +04:00
tomrus88
f6e2b55e2c Merge branch 'master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-28 10:16:02 +04:00
NoFantasy
56e86ff05f [7896] Rename creature_template class/race fields to trainer_class/trainer_race for clarify use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-26 18:16:15 +04:00
tomrus88
afd82229d7 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
	src/game/SpellEffects.cpp
2009-05-24 10:11:26 +04:00
ApoC
029b49dec8 [7883] Implemented new NPC extra flag CREATURE_FLAG_EXTRA_NOT_TAUNTABLE.
NPC with this flag is immune to apply aura SPELL_AURA_MOD_TAUNT and immune to SPELL_EFFECT_ATTACK_ME by default.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-05-23 20:06:07 +02:00
VladimirMangos
f72a8bc6dc Merge commit 'origin/master' into 310 2009-05-23 01:55:33 +04:00
NoFantasy
8b5fa13011 [7871] Drop unused second arg in InstanceData::OnCreatureCreate.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-22 06:33:08 +04:00
tomrus88
52effd119c Merge commit 'origin/master' into 310
Conflicts:
	src/game/TargetedMovementGenerator.cpp
	win/VC71/shared.vcproj
2009-05-21 20:17:19 +04:00
Neo2003
fa03b3663a Mobs fleeing and getting assistance feature implementaion.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also rename ACTION_T_FLEE to ACTION_T_FLEE_FOR_ASSIST for clear use
2009-05-21 01:33:28 +04:00
VladimirMangos
f332c000d1 [7860] Implement creature event ai ACTION_T_CALL_FOR_HELP for explicit call for help in some script cases. 2009-05-20 22:15:41 +04:00
tomrus88
6734694a90 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-16 00:47:37 +04:00
VladimirMangos
8858aacfb0 [7829] Rename 3d (x,y,.. versions of IsWithinDist/IsWithinDist functions with adding 3d explict posfix to name for avoid wrong use. 2009-05-14 21:42:32 +04:00
VladimirMangos
788cdf9b3a [7826] Avoid use GetDistance* that used slow sqrt call where possible, other related speedups. 2009-05-14 18:51:13 +04:00
tomrus88
7e938af972 Updated to latest PTR client build 9868. 2009-05-05 10:41:22 +04:00
tomrus88
b980e9ac59 Updated to 3.1.2.9855 client build, fixed quests, some work on monster movement. Not tested. 2009-05-02 19:41:00 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
VladimirMangos
721e005b84 [7666] For heroic mode creature use AIName from normal mode version in same way as done for ScriptName.
Also at creature templates loading check that AIName/ScriptName not set for heroic mode creature versions.
2009-04-14 02:28:45 +04:00
VladimirMangos
bd56140537 [7658] Drop dead code. 2009-04-13 03:13:19 +04:00
arrai
5dd3ce31bc [7576] Fixed spell range check for spells with minimal distances 2009-03-28 22:27:39 +01:00
DasMy
6762744452 [7570] respect UNIT_FIELD_COMBATREACH for spell range check
Signed-off-by: arrai <array.of.intellect@gmail.com>
2009-03-28 16:16:46 +01:00
AlexDereka
8a5e4706bc [7506] Remove dual ERROR in logs 2009-03-21 11:47:57 +03:00
balrok
0babfec043 [7424] Codestyle: removed not needed \n in log output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-09 14:20:10 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
VladimirMangos
2b9eeb782e [7362] Use IN_MILISECONDS where appropriate, other cleanups. 2009-03-01 05:22:56 +03:00
VladimirMangos
19c513fc61 [7347] Prevent sql errors at GM-mode corpse save. Apply same chnages and for other pahsemask save part for consistense and safe. 2009-02-27 06:49:16 +03:00
VladimirMangos
872d791ca6 [7335] Implement active objects support.
Active objects triggrering grid loading and updating around self like players.
It can be used for event long run movements or escoring quest travels.
Also can be used for proper implementation far vision spells.
Currently only creatures can be activated by function call (from script) cr->SetActiveObjectState(true);
Please avoid lot amount active objects in same time use. Existance active objects support isn't meaning
that each rabbit must be active creature.

Also added independent grid unloading locks for explicit unloading lock,
lock for used by instance copied grids, lock counter for actiove object spawn grids locks.
Last case required for prevent double spawn active creature walk far away from spawn point.
2009-02-25 13:44:49 +03: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
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