Commit graph

546 commits

Author SHA1 Message Date
NoFantasy
7bdf05901d [10296] Move ChooseDisplayId to Creature class for access from script side
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 21:08:58 +02:00
NoFantasy
25d9fd265b [10293] Correct a not exitan...non-existin... a word that is often spelled wrong
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 18:26:08 +02:00
NoFantasy
ccd8f4f825 [10290] Simplify startup check for creature models
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 17:32:45 +02:00
NoFantasy
2ae0badf48 [10289] Adjust creature models system
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>
2010-07-30 16:40:17 +02:00
VladimirMangos
c6b52bf285 Clarify related table in error message for unknown mangos string entries 2010-07-29 16:08:35 +04:00
Toinan67
6302659d58 [10281] Send proper account amount in guild in SMSG_GUILD_INFO packet.
Data seen for example in client command /guildinfo output.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-28 23:34:50 +04:00
NoFantasy
fb1e8c01ef [10270] Implement basic system for reputation spillover
* 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>
2010-07-25 17:05:34 +02:00
Patman64
647acd8caa [10269] Fixed typo in CONDITION_QUESTAVAILABLE fail case.
Not affect mostly code work, because used only for not existed quest data,
that checked at loading. So only possible at reload quest templates with
drop related quest.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-25 11:21:57 +04:00
VladimirMangos
d9a7a2ba12 [10266] Implement CONDITION_ACHIEVEMENT and CONDITION_ACHIEVEMENT_REALM 2010-07-25 00:02:25 +04:00
VladimirMangos
e3befa2072 [10254] Remove dependence auction data from auctioneer guid.
* 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
2010-07-24 01:45:59 +04:00
NoFantasy
61990de6dd [10252] Implement reputation_reward_rate for quests and creatures
* 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>
2010-07-23 17:50:36 +02:00
VladimirMangos
20a5551739 [10207] Implement ITEM_FLAGS2_EXT_COST_REQUIRES_GOLD use instead sign of ExtendedCost field. 2010-07-17 19:23:38 +04:00
VladimirMangos
9882bc811f [10206] Implement ITEM_FLAGS2_HORDE_ONLY and ITEM_FLAGS2_ALLIANCE_ONLY
* Check item_template data
* Check at equip/use
* Skip at loot if not compatible
* Skip in vendor list if not compatible
2010-07-17 08:21:23 +04:00
VladimirMangos
f8efc2b5b3 [10197] Add to playercreateinfo original player orientation field.
It still not filled. Patch with correct values welcomed ;)
2010-07-15 22:25:27 +04:00
Laise
a32b3063a2 [10156] Add shared object for auras of same spell and move spell proc code to its own file, also spread procs by auras and effect indexes. 2010-07-07 19:08:26 +03:00
crackm
52e4c0ab17 [10146] Implement SCRIPT_COMMAND_PLAY_MOVIE (19)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-03 23:58:41 +04:00
VladimirMangos
d81c9175d8 Update build checks for mangosd/realmd. 2010-07-02 05:34:27 +04:00
VladimirMangos
fdcbd7d5f5 [10120] Check expected creature_model_info data for player races 2010-06-29 12:06:02 +04:00
VladimirMangos
cd0bbabf9a [10118] Check gameobject scale at loading (strict DB error filter)
This let avoid check scale value at it
2010-06-29 11:02:37 +04:00
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
a504b4d200 [10106] More modes for .go commands
* Now '.go' command can be used with creature_entry/gameobject_entry shift links (output of .lookup creature/object commands)
* Now '.go object' command sipport id-mode and name part mode similar .go creature case: .go object id #gameobject_id or .go object $namepart.
* HandleGoHelper use in more commands also.
2010-06-26 17:26:00 +04:00
VladimirMangos
e203a235ba [10105] Condition CONDITION_ZONEID (4) extanded way work.
* Condition CONDITION_ZONEID renamed CONDITION_AREAID and now work also with subzone area ids
* Second arg of condition cna be 0 or 1 now in in case 1 check "not in area" case
* Also all condition related error output include condition id.
2010-06-25 14:51:57 +04:00
NoFantasy
a0bbb0fec5 [10067] Allow item INVTYPE_RELIC to be equipped by npc from creature_equip_template
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-17 00:29:43 +02:00
VladimirMangos
a7b80733df [10043] Fixed share quest in case completed objectives.
* Also fixed CONDITION_QUESTTAKEN for same case.
* Aslo fixed exclusive prev quests check.
2010-06-07 23:48:20 +04:00
VladimirMangos
5eabf12111 [10042] Implement CONDITION_QUESTAVAILABLE.
Also do come constatification of quest status check functions
and fix one unsafe use std::map operator[].
Never never use std::map operator [] for _read_ access.
Good chance corrupt related structure state ;)
Not in found case but in general.
2010-06-07 22:35:47 +04:00
VladimirMangos
54f2f507cf [10024] New LogFilter_DbStrictedCheck filter for DB devs
It's enable by default (prevent show related output) but
in disbled case allow show useful for DB developers different
more stricted DB check output at server loading, including

* Absent GO trap template referecned in some another GO template
* Not set (0) unit class in creature_template
* Absent disenchanting loot for items marked as disanchantble

This all cases can or hard fixed in one step or show false cases y different reasons.
That why filter active by default.
2010-06-03 14:45:14 +04:00
VladimirMangos
e823b30f4f [10021] Move item disenchanting static req. checks to server start. 2010-06-02 14:58:35 +04:00
VladimirMangos
5e526ef0d9 [10014] Revert "[10013] Implement CONDITION_QUESTTARGET"
This reverts commit 4e460746c0947f6cfc1f1150a8eb90257819eae2.
2010-06-01 02:26:45 +04:00
VladimirMangos
59367bc19f [10013] Implement CONDITION_QUESTTARGET
For cases when loot dependent from some quest objective complete state.
2010-06-01 01:13:59 +04:00
VladimirMangos
94888e52cd [9974] Restore raid functionality broken after one from 3.3.x switches.
* Fixed typo in raid converting code that triggering raid disband at server restart.
* Fixed current subgroup show for character and update group memebers data at move its
  in diff subgroups.
2010-05-26 00:27:07 +04:00
VladimirMangos
67b8ca03b5 [9957] Alow sell item for money and extanded coset without momey in same time.
npc_vendor.ExtandedCost can be negative now that meaning:
price excluded default item BuyPrice and use only abs(ExtandedCost) items).
For example expected used for item 36908.
2010-05-22 19:49:07 +04:00
VladimirMangos
6d5d8778fa [9912] Partly revert [9911] :/ 2010-05-16 09:51:52 +04:00
VladimirMangos
112afc260c [9911] Check script using and existance at creature_movement_scripts load. 2010-05-16 09:26:48 +04:00
NoFantasy
312a076491 [9891] Implement *_scripts for creature_movement
New field script_id in creature_movement can be filled for each waypoint point and run the corresponding script from creature_movement_scripts.
Script_id can be any value and several points/creatures can share the same script (with limits of course, such as script depending on location and other factors).

DB projects are advised to move current text, spells and emotes data in creature_movement fields as these fields are strictly no longer needed and may be fully removed in the future.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-14 12:16:54 +02:00
NoFantasy
31ec245b68 [9889] Extend features available for SCRIPT_COMMAND_TALK
* Allow other than Creature to talk.
* Add "buddy-talk", using creature entry in datalong2 (the npc who will do the talk instead of the original source). Value in datalong3 is how far to look for the buddy.
* Add data_flags making it possible to have conversations between units, controlling who does the talking and to whom, including make player do the talking when player is not already the source.

Notes and details are added in the comments for SCRIPT_COMMAND_TALK

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-13 16:39:04 +02:00
NoFantasy
b208effca6 [9883] Change SCRIPT_COMMAND_TALK to support CHAT_TYPE_* using enum ChatType
Making data consistent with other, similar tables like EventAI's text tables.
This convert existing data and also adds support for all chat types.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-12 14:09:38 +02:00
NoFantasy
faf3e287c7 [9881] Add additional fields to *_scripts tables for storage of more data.
Currently not in use by any SCRIPT_COMMAND_* but we have secret plans to be revealed in the future!

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-12 12:02:38 +02:00
tomrus88
ff2cda6af1 [9861] Backporting some code chnages from 400 branch.
(based on 400's commit 0f37423)
(based on 400's commit 636cfef)
(based on 400's commit 0bbe3a7)
(based on 400's commit ce86b56)
(based on 400's commit b74c6a8)
2010-05-10 23:45:49 +04:00
NoFantasy
92d26dbebf [9852] Disable forced alteration of specialFlags in quest_template at startup.
This will allow quest 10162 to work properly with the expected data in quest_template (no specialFlags is needed), but will still give a startup error for spell 33824.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-09 09:56:28 +02: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
3f5eccd8a9 [9830] Implement taxi/transport event scripts support. 2010-05-03 19:39:53 +04:00
VladimirMangos
57dcc84940 [9824] Use in taxi flight movegen original taxipath data. 2010-05-02 06:14:26 +04:00
VladimirMangos
4910add486 [9808] Simplify TaxiPathNodes data use, specially for transport case. 2010-04-29 19:44:21 +04:00
patman128
3032e80bb6 [9795] Implement CONDITION_INSTANCE_SCRIPT (mapid, some_id)
True if mapid fit to called instance map id and instance script confirm success for some_id case.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-26 09:12:48 +04:00
marintrica
6cff390de2 [9781] One more typo in instance_template loading error output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-23 15:24:25 +04:00
VladimirMangos
15dd77873e [9779] Drop trailing whitespaces. 2010-04-23 05:28:51 +04:00
VladimirMangos
88ab56a6e8 [9777] Fixed instance_template error output arg in one from cases. 2010-04-22 23:50:09 +04:00
VladimirMangos
48254e3879 Cleanups in instance_template and map entrance DBC data. 2010-04-17 15:24:49 +04:00
VladimirMangos
25c2a76b63 [9716] Allow to vendor have same items in list with different extanded price. 2010-04-10 05:41:30 +04:00
insider42
da253087cb [9715] Implement required basic elements for dual spec learn gossips.
Required DB data for real work. This is final part required at core side for support.

Also note that commit include

* generic implementation money cost gossip menu items so let
  implement in DB many money cost gossip operations with _fixed_ cost.
* useful CONDITION_SPELL that let implemtn menu item visible if specific
  spell known/don't known also wide used case for diff gossips.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-10 03:09:09 +04:00