* 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>
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.
* .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.
* Fixed crash at absent optional literal. Thanks to MysteriousSouL for reproting.
* Converted mode commands use new way parsing functions with fixing posible crash cases.
* 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.
Interrupt casting non combat spell spell at neter to combat
and prevent it casting in combat (last checked by client
but better recheck at server for prevent cheating).
Also
* Better single | detection as non-link case (doubled by client)
* Commands .pdump now allow quoted filename (usefull if filename path include whitespaces)
This must fix another way duplicate aura adding to DB error.
It also prevent wrong stacking work for weapon equip bufs
in cases when its allowed for both wepoan indepndently apply.
* Commands .debug update and .modify bit removed as redundent
* Command .debug getvalue now can output values in float/int/hex/bitstring formats
* Command .debug setvalue now ca accept values in int/float/hex/bitstring formats
* Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask
(in 3 modes: |= &= &=~ ) to value in update field
* Command .debug moditemvalue added similar .debug modvalue for item case.
* Command .npc set movetype now propertly update spawned in world creature state.
* Command .modify spell renamed to .debug spellmods and restored to working state.
* Commands .account password and .account set password now allow use quoted strings
for passwords and then now possible set from chat/console passwords with white spaces.
* Many commands converted to new functions without modify functionality
except better error detection in some cases at wrong command syntax use.
* Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
Fixes a problem where database has more than one entry for a spell and target is explicitly provided by script side.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This allow use brackets like 85-89 existed for some maps
if at server allowed levels > 80. Before like players placed
into bracket for level 80 always.
This allow GO's not summoned by any to be processed and use the spells as defined in GO template as expected.
In addition some new checks to determine if GO should despawn and if group membership should be checked or not to allow use.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Now can be used as quotes any strings with symbols ' " [] around.
For example can be used: .additem [Tourch] or .additem "Tourch".
And in similar cases wher before [] or "" only canbe used in commands.
* New functions support propertly extraction shift-links as optional first args
* Also added more safe functions for extraction int32/uint32/float values.
For more wide use new functuons specialized extraction functions also need chnaged to same way work.
This is goal for future work at this part code.
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
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.
Some other code style exist in related code.
* all teleport commands support new areatrigger and areatriger-target shiftlinks
* .go trigger now let select areatrigger or areatrigger target as teleport point
* New commands:
.trigger - show detail info about areatrigger including all requirements
for teleport with shift-links to items/keys/quest
.trigger active - show all currently activated by character areatriggers
.trigger near - show near areatriggers
* .lookup item now show [usable] postfix if item can be used/equipped by selected character.
Both tables (areatrigger / event_id) are used explicit to store ScriptName for script library use.
In addition rename to ScriptName in instance_template
Signed-off-by: NoFantasy <nofantasy@nf.no>
It has been broken in srange way at moving function to SpellAuraHolder :/
Must restore work many additional auras affects
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This version allows using id of some text from database instead of text itself, and will then simplify locales especially from script side.
Thanks to Vladimir who woke up to hundreds of questions and lines of weird test code, helping me out with all the stuff i didn't understand (which was about 75% of the changes done in here :P )
Signed-off-by: NoFantasy <nofantasy@nf.no>
isStart is default true. For transport/taxi cases, it may be false for event id's at arrival (event id ending)
Signed-off-by: NoFantasy <nofantasy@nf.no>