In addition to adding fields for text id storage (in total 4 text id's), also added a comments field for developers notes in scripts (it may help those being old of age to remember what goes on in a script).
Signed-off-by: NoFantasy <nofantasy@nf.no>
Table creature_model_info store creature entry to use model from (or explicit model). The selection is based on a base modelId and racemask.
Hacks for shapeshift models removed (data included in SQL update)
Dropped no longer needed creature_model_info.modelid_other_team, as creature_model_info can and should be used instead (sorry, this is what happen when author doesn't do full research :) )
Signed-off-by: NoFantasy <nofantasy@nf.no>
Read doc/EventAI.txt for details.
SQL query to update existing scripts are included (convert from using ACTION_T_SET_UNIT_FIELD, field 68)
Signed-off-by: NoFantasy <nofantasy@nf.no>
Template can be used for several cases:
* Unique creature that are already spawned in database (requires creature.MovementType=2 like guid based creature_movement)
* Summoned creature that has a pre-defined path (requires creature_template.MovementType=2)
Note that creature_template.MovementType=2 should be used with care, and must not be used for creatures that may be summoned in random locations in world.
Added additional startup checks for existing creature_movement-table
Signed-off-by: NoFantasy <nofantasy@nf.no>
Also
* Show response text if added at view.
* Show tickets amount at console .ticket use instead unexpected no player error.
* Allow use ticket number in .ticket respond case.
* Some code cleanups.
* .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.
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.
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
* 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>
Let script library know when some event is about to start. Event id's may be found in several sources, such as spells, GO's and transport/taxi paths.
Database scripts may be prevented by returning true from script side whenever needed. If false, DB script will run like normal.
New database table event_id_scripts will need a ScriptName for the event id, in same way as for example areatrigger_scripts.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This change will:
* make it easier to use cached data directly without any modifications
* correct issues regarding invisible models
* simplify certain aspects of model selection itself and make it somehow easier to control and maintain special cases.
Two new fields added to creature_model_info, to store modelid_alternative and modelid_other_team
* _alternative holds an alt. model, for cases where gender are the same, or is not male/female.
* _other_team is generally used for totem models, but may have future use.
This commit will possibly break a few things (visually) and will require DB projects to update their creature_template models data.
It is advised to use cache data as-is, and in addition fill creature_model_info for certain models, totems in particular, for expected appearance.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Database table needs data for each faction that should give spillover to other faction(s). One faction may give spillover to max 4 other spillover factions.
* The spillover rate is multiplied with the points after bonuses and reward rate is set, Rate is given as: 0.5 for 50% gain, -1.0 for 100% loss, etc
* It is possible to restrict spillover faction by rank. If player has a higher rank with the spillover faction given in database, no spillover will be given towards this faction
Signed-off-by: NoFantasy <nofantasy@nf.no>
NOTE: sql update remove forbided by commit duplicates from pool_* tables in random way.
So for more porper results DB better manually check and fix before apply it.
This is mostly note for DB projects devs.
* Field `auctioneerguid` replaced by `houseid` and table reanmed to `auction`
(it list auctions and `id` is auction id).
* Update related code.
* SQL update fill `houseid` field by old `auctioneerguid`
BUT: SQL update expect that you world DB named `mangos`.
If this not true for your case you need modify SQL update BEFORE APPLY
in 2 placed in part "mangos.creature AS c, mangos.creature_template AS ct"
* Another small possitive result: now possible easy select auctions related
to some auction store (1-3 is one team actions, 4-6 another team auction,
and 7 is neutral auction store for both teams
* In addition, implement "flat" reputation for quests, where a value in RewRepValueN is given. Human diplomacy will not affect the total. The rate however will be applied, where a faction is defined with a rate for quests. Value in database are expected to be *100 of the actual value given (before rate are applied).
* New database storage can contain rates for quest/creature/spell reputation and will affect the base value given as reward. When for example the quest reward for a faction should receive 30% more reputation points, the rate can be set to 1.3.
* This will fix issues with certain quests that are using the expected RewRepValueId but where the outcome has been lower than expected.
* Note that if the rate is set to 0.0 it will disable reputation gain for the faction and type.
* Reputation rate for spells (spell effect) is not yet implemented
Signed-off-by: NoFantasy <nofantasy@nf.no>
Maybe command not so useful for stable case because spell can be learned,
but it example how can be packet allowed depndent from player possibility
when some functionality base at many packets recieved from client.
Same way possible can be used for auction anywhere, maybe some other cases.
Also it will very usefull for 2.x/1.x branches where no another way... ;)
* Drop some food action buttons
* Drop attack spells for caster classes
* Use expected simlifed spell version 20154 (it replaced by full version at learn spell 53408 and similar)
In code used helper code for support 2 versions as fake non-stacking ranks.
* Some other old "max ranks" of talents and spells now are permanent bonuses known from start (only "max rank" for spell exist)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Thanks to Shauren for research flag ITEM_FLAGS2_COST_REQUIRES_GOLD meaning
and inspiring in general what must be done long time ago with field rename
and other enum values listing.