Commit graph

124 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
VladimirMangos
24f2d03485 [9702] Drop now redundent item_text table.
* In beggining bad news: at 3.3.3 switch has been forgoted item_instance.data field chnage.
  In result items with texts (mail copy in to inventory, some other) lost text content.
* That why in current commit item_text droped without convertion. In result all itesm with texts
  will lost text. Sorry for this as i think small porblem :(
* Now text stored in item itself.
2010-04-09 02:10:36 +04:00
VladimirMangos
b48da9755f [9699] Drop item text ids generation.
Now item text not used as independent object (real item texts associated with item guid)
2010-04-08 22:42:00 +04:00
tomrus88
d131f137cc Merge remote branch 'origin/master' into 330 2010-04-03 11:33:45 +04:00
Blizzy
09b873a316 [9651] Correct code for quest points of interest.
Adjusting field names and type, and send data accordingly to avoid client crash not using auto-generated id.

Due to the nature of the primary keys, two tables are truncated. Be sure to make backup if you have data you do now want to loose.

In addition, speed up load times of data from quest_poi_points, thanks Hunuza for helping out.
2010-03-31 20:58:40 +02:00
tomrus88
d4647bbeaa Dropped itemtextid field from mail table. 2010-03-25 15:33:22 +03:00
VladimirMangos
a27ff3e79d [9602] Simplify creating mail draft with content text, cleanup includes. 2010-03-18 12:10:47 +03:00
VladimirMangos
ab7840a591 [9580] Add ObjectGuid const& Object::GetObjectGuid() and restore build. 2010-03-13 17:35:47 +03:00
VladimirMangos
c4f3578226 [9571] Create and use ObjectGuidGenerator/IdGenerator template classes.
* This is let finally hide guid structure in ObjectGuid.h/.cpp code.
* Shared related code.

NOTE: while switch to use new clasess one more problem has been detected
with not-safe code in .pdump work for future per-map multi-threading.
It's need rewrited before will possible safe use in like case.
For current single world thread case it's safe.
2010-03-11 16:32:09 +03:00
VladimirMangos
6487c24f29 [9545] Rename ObjectDefines.h -> ObjectGuid.h
Also move unrelated generic defines to Common.h
2010-03-07 20:05:32 +03:00
timmit
a30af12772 [9544] Implement CONDITION_NOITEM.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-03-07 16:50:08 +03:00
VladimirMangos
c9c578b5c3 [9339] Use group ids for indexing groups in DB
* Use group ids in DB
* Pack used group ids at server startup
* Finaly drop group search by leader guid.
2010-02-09 14:36:20 +03:00
VladimirMangos
8e0069f364 [9327] Replace leader based indexing groups by group ids.
* This must repolve problem with loot.
  Before if some mob killed by group member and then leader changed
  then group members can't loot this mob body.
* Possible resolve crashes at loot. Now group storage content not dependent from leader changes.
2010-02-08 08:25:06 +03:00
VladimirMangos
66c8c75914 [9284] Realy fixed crash source added in [9228] now. 2010-02-02 14:52:52 +03:00
VladimirMangos
742f8df025 [9282] Possible fixed crash source added in [9228]
After [9228] groups stored under leader guid keys, but group leader can change
and in result at group disband after leader change group not removed from storage.
2010-02-02 00:57:19 +03:00
VladimirMangos
abce7740f8 [9233] Restore build at *nix after [9228]
Partly undo changes.

Thanks to DasBlub and Lightguard for testing.
2010-01-22 00:34:47 +03:00
zhenya
4178d5bb6a [9228] Speedup groups store and other code work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-21 17:43:27 +03:00
Lightguard
0088d1300c [9216] Fixed hunter pet XP requirements.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also move calculation to function. And avoid use operator[] for access to per-area base xp table data.
2010-01-20 05:05:23 +03:00
tomrus88
22a60b9018 Fixed merge error. 2010-01-10 12:47:53 +03:00
VladimirMangos
e15f548bed Merge branch 'master' into 330 2010-01-08 16:03:27 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
NoFantasy
effe02fb25 [9111] Implement ConditionType CONDITION_LEVEL for PlayerCondition
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-05 01:59:14 +01:00
tomrus88
c745c5072f Merge remote branch 'origin/master' into 330 2009-12-16 02:45:05 +03:00
NoFantasy
4f5ed57fc2 [8976] Implement CONDITION_RACE_CLASS
Condition has independent value1 (race mask) and value2 (class mask) fields and can be used with one or both.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-12 17:53:27 +01:00
tomrus88
7c6cae1af7 Merge remote branch 'origin/master' into 330
Conflicts:
	src/game/ObjectMgr.h
2009-12-11 21:50:24 +03:00
NoFantasy
fb6712f3a3 [8970] Implement CONDITION_AREA_FLAG
Value1 is for "include flag", Value2 for "not include flag"

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-11 18:37:57 +01:00
NoFantasy
5d2189b7b7 [8929] Implement gossip scripts to be used with gossip_menu_option.action_script_id
Note that script is implemented for GOSSIP_OPTION_GOSSIP only (as not expected needed for other gossip options).
Also add a few more startup checks for LoadGossipMenuItems with check for basic errors in fields
2009-12-06 19:46:39 +01:00
NoFantasy
ec0043ac64 [8928] Rename internal names for gossipLocale and also correct reload gossip tables
Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-06 11:55:53 +01:00
NoFantasy
090c8b8854 [8923] Restructure gossip menus and make it possible to build selections by database
As result, gossip for GO is now possible. Moved related data structures and remove useless from code.
Please note that after some time, table npc_gossip will be fully removed (use menuId in _template in relation to gossip_menu as replacement).
Special thanks to GriffonHeart for help with research, discussions and ideas of code and thanks to Vladimir for helpful input.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-12-06 02:27:26 +01:00
tomrus88
d76b728a99 - Quest POI fix. 2009-12-03 19:22:12 +03:00
tomrus88
b09ee8e571 - Implemented quest POI's. May be not perfect, but it works :P 2009-11-14 19:56:01 +03:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
e078d0dd03 [8769] Implement mails sending at player levelup. 2009-11-03 20:21:11 +03:00
VladimirMangos
d7ae5e3af0 [8718] Remove most GetObjectInWorld functions and move some map local to Map
Also mape pet guid counter per-map (in different expecte to be global pet number)
2009-10-24 01:16:40 +04:00
VladimirMangos
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00