Commit graph

516 commits

Author SHA1 Message Date
VladimirMangos
e79a92cd3b [8431] Avoid unlearn class skills at unlearn spell learned at skill learn. 2009-08-28 11:39:40 +04:00
VladimirMangos
5d50bb16b8 [8426] Use upper/lower iterator pairs as result instead 2 function calls. 2009-08-27 10:56:20 +04:00
VladimirMangos
45dd7140b5 [8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point.
  Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
  so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
  Without additional changes and not implemented (you will see empty area without creatures in likes case)

* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
2009-08-26 08:30:40 +04:00
VladimirMangos
208c84556e [8416] Fixed problem with double cast form passives at loading.
* Drop learning form passives at form psell learning, and cast it explictly from code in all cases.
* Drop cast form passives at learning.
* Note: talents that have dependent form time passives still work in original way: learned and casted at learn if need.
* Drop hack for spell 24907 casting at form apply: it casted fines as result normal triggered effect in related form spell.

Original patch provided by nos4r2zod.
2009-08-25 08:45:49 +04:00
Triply
efa24ced49 [8409] Fixed guild creation date loading, and added another guild loading optimization - last one.
Signed-off-by: Triply <triply@getmangos.com>
2009-08-23 18:13:09 +02:00
Triply
38fa6b241c [8402] Optimalized guild_eventlog and guild_bank_eventlog loading from database.
Added config options to set count of eventlog records stored in DB.
Attached SQL files will DROP existing and create new tables. Make sure you create backup (if you need old data).
Renamed few variables in Guild class.
Signed-off-by: Triply <triply@getmangos.com>
2009-08-21 09:42:21 +02:00
VladimirMangos
74d27294aa [8381] Some refactoring work in Unit::m_currentSpells code.
* Restrict access, use enum args, move some repeated code parts to function.
* Make m_selfContainer set only part of Unit::SetCurrentCastedSpell
2009-08-18 02:12:56 +04:00
ApoC
a7564128bb [8373] Correctly set bgInstanceID to 0 when log in into alredy ended BG.
This should fix problem that players who logged off during BG are after every
next login into game teleported to BG entry position.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-08-15 22:35:31 +02:00
NoFantasy
88cf55928c [8355] Implement QUEST_STATUS_FAILED and simplify related code.
Use FailQuest for all quests that can fail and remove no longer needed function FailedTimedQuest.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2009-08-12 13:08:47 +02:00
VladimirMangos
93ed08e886 [8343] Extand level allowed range for item use to upper values if it end at max player level.
Also add DEFAULT_MAX_LEVEL define for store current used client expection about max player level.
For example for current supported this is 80.
2009-08-10 14:22:50 +04:00
ApoC
6d9448dd7f [8339] Improved storing/restoring BG entry point
* Introduced new table character_battleground_data
* Entry point is now stored on BG enter event not join event
* Entry point for dungeons is now correctly set to nearest graveyard
  (this prevent well known assert in GetInstance because of porting to already destroyed instance)
* Teleporting from BG correctly restore mount state
* Teleporting from BG correctly restore taxi flight
  (in multipath flight you will end up in nearest transition point on the route)

Signed-off-by: ApoC <apoc@nymfe.net>
2009-08-09 11:00:37 +02:00
XTZGZoReX
ba170f92f2 [8316] Remove duplicate player stat output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-05 16:22:42 +04:00
VladimirMangos
3c47e6117a [8308] More generic code for new continent spell casting including fly form/mounts.
* Check new continent requirement by SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND in
  SpellMgr::GetSpellAllowedInLocationError.
* Also in this function let ignore any area requirement in GM-mode (except client side checks ofc if use spellbook/item)
* For fly form/mount auras check only speciaal reqirement like special fly skill and ignore it for dead state.
* Drop explicit fly auras drop at zone update, now this part GetSpellAllowedInLocationError functionality.
* Allow in `spell_area` have data deepndent from ghost auras

This all allow implement apply spells 55173/55164 to player ghost wiht DB support in `spell_area`
2009-08-04 23:43:35 +04:00
VladimirMangos
8af151eee7 [8304] Move standup code to login, remove other not needed data change at save.
Now players saved as-is without any modifications.
2009-08-04 12:52:01 +04:00
VladimirMangos
359229100e [8303] Allow save and restore at login forms/stances.
Small changes also to prevent visual "fall" flight form for viewer at login,
and another changes to prevent recasting default warrior stance.
This also resolve bug with not removing some form bonuses at lost form at re-login.
2009-08-04 02:06:30 +04:00
VladimirMangos
8f08d03a14 [8302] Drop now not used Player::MinimalLoadFromDB 2009-08-04 00:14:19 +04:00
VladimirMangos
27e12424e5 [8299] Move zone update form SendInitialPacketsBeforeAddToMap to SendInitialPacketsAfterAddToMap.
This must retore correct apply zone dependent auras at far teleport and login.
Also must be restored chat channels update at far teleport.
2009-08-03 03:01:30 +04:00
Necro
4841fae910 [8294] Some playercreateinfo_action fixes. Also DK food initial amount fix in code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-08-02 09:44:48 +04:00
VladimirMangos
47f96447b8 [8284] Use BuyCound instead Stackable for seelction original items amount for new character. 2009-07-31 18:04:29 +04:00
Ambal
64f11bedf7 [8252] Move DB scripting code from global World to Map.
This one more step to pre-map events proccesing and parallel in future.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 12:20:59 +04:00
VladimirMangos
7ac4dc6f13 [8251] Store in some DB tables only data for first rank.
* Allow add to DB data only for first rank in table `mangos_spell_bonus_data` and `mangos_spell_proc_event`.
* Copy data for other ranks for speedup use at loading for this data and data from `spell_proc_item_enchant`.
2009-07-26 10:46:36 +04:00
nos4r2zod
13b709a10b [8249] Implement support spell_proc_item_enchant table for ppm item enchantments triggering at hit.
* Added a new SQL table, spell_proc_item_enchant, for "custom" ppmRates on Item Enchants that do not use auras.
  With table data this must fix ppm for effect from 8033 and ranks enchanting, and item 6947/10918 and ranks enchanting.

* Implemented SPELLMOD_FREQUENCY_OF_SUCCESS (26).
  That must fix work talent 14113, spell 32645 with ranks, glyph 41094 and item set effect 64917 in frequency part.

Thanks to MaS0n as author alternative patch that partly used in this patch.
Thanks to Thenecromancer as author alternative patch that ideas inspire MaS0n's patch writing and then this patch also.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-26 04:58:46 +04:00
Ambal
fc7871f0a2 [8229] Improve stealth detection code for player case.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-22 12:23:12 +04:00
tomrus88
a0efd034ca [8225] Some fixes from 320 branch.
(backported from commit 4bdcf42)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-21 05:30:58 +04:00
Trogvar
22ed15a76e [8203] Correcttly re-apply level scaled item stat mods at player level change.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-19 05:15:09 +04:00
VladimirMangos
e793f0eeab [8202] Replace raw array index values by enums. 2009-07-19 04:02:42 +04:00
XTZGZoReX
4f53c4ee28 [8193] Use constant instead explicit value in title index checks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-17 19:29:48 +04:00
GriffonHeart
cbfbd13146 [8190] Update killing quest objectives base at creature_template KillCredit fields.
Note: for avoid double counting must be removed C++ scripts and EventAI scripts that do same thing in old way.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also implement KillCreditN field check at loading.
2009-07-17 03:45:40 +04:00
VladimirMangos
9a0abf0e01 [8183] Some gameobject despanw related fixes
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
* Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
* Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases.
2009-07-15 06:32:08 +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
ApoC
5b209bced4 [8165] Correctly add quest talent points count for characters on lvl 55.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-12 00:38:06 +02:00
ApoC
0dc7ea6cc2 [8162] Fixed applying random enchantments to quest rewarded items.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-11 21:52:35 +02:00
VladimirMangos
aed2a9f9b3 [8160] Now finally correct extraction uint16 enchantment id from uint32. 2009-07-11 19:38:16 +04:00
VladimirMangos
fcc1acfa83 [8159] Restore show item enchantments visual effects in character enum list. 2009-07-11 06:28:45 +04:00
NetSky
394cf9264d [8153] Fixed some implicit float->int cast warnings.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-09 11:10:28 +04:00
VladimirMangos
3bfe549a2b [8147] Some fixes and cleanups in mind control and charmed code. Mind control stil not finished.
* Allow command to mind controlled unit attack target at client. Rename related flag to UNIT_FLAG_PLAYER_CONTROLLED.
* Move code for pet action bar remove at client side to new function Player::RemovePetActionBar
* Not allow cast spells with SPELL_AURA_MOD_POSSESS and SPELL_AURA_MOD_POSSESS_PET by non-players and simplify related code base at this.
2009-07-08 20:09:33 +04:00
hunuza
38197b539f [8137] Init player display id + native display id on login.
* Temporary reset of display id on save no longer needed.
* Players always have the right model for their gender.

Signed-off-by: hunuza <hunuza@gmail.com>
2009-07-06 18:18:01 +02:00
VladimirMangos
5d8bd14d38 [8135] Cast quest rewarded spells after mark spell as completed.
Some spell have spell_area requirement for cast (for later re-apply)
2009-07-06 16:13:51 +04:00
VladimirMangos
715470a898 [8126] Improvemets in player/pet/charter name checks.
* Implement new config options for minimal player/pet/charter name length (2 by default)
* Better error reporting at problems in names.
* Add check from max pet/charter name length (same as for player names at client side)
2009-07-05 20:30:33 +04:00
ApoC
2273f7abe0 [8123] Introduced new method Player::RemoveSpellCategoryCooldown(uint32,bool)
This method removes cooldown from all spells from given category
and optionaly sends update to player. By default update is not send.

Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-05 17:36:02 +02:00
VladimirMangos
b4302d61e5 [8121] Cleanup and more safe code in Player::BuyItemFromVendor use.
* Move bag search by bag guid code to WorldSession::HandleBuyItemInSlotOpcode
* Really reject unexisted bag cases.
2009-07-05 17:45:45 +04:00
VladimirMangos
9798dbe5e2 [8116] Fixed low ranks relearn bug, correctly show tlanes at command spell learn.
* Bug showup as paladin talents reset. Thanks to ApoC for reseach problem.
* Now at .learn command use for learn some talent this talent must correctly show as learned in talent dialog.
2009-07-04 23:06:35 +04:00
m4cm4n
7c5f254012 [8113] Fixed setting mover for Posses/Charm auras and Vehicle enter/exit.
Signed-off-by: ApoC <apoc@nymfe.net>
2009-07-04 12:51:15 +02:00
Ambal
9f938a9ed4 [8103] More wide use IsInWorld checks and delayed at teleport operations.
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-01 14:00:29 +04:00
VladimirMangos
9f41772828 [8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
2009-07-01 11:09:34 +04:00
VladimirMangos
1baec77845 [8098] Support uint32 spell ids in code.
* Propertly work with uint32 spell ids in player action bar
* Fix in same time bug with not save equipment set button with id==0
* Merge misc field in character_action and playercreateinfo_action to action field as 3 byte
* Propertly load uint32 spell ids from character_spell
* Fixed types for some pet/creature related structure for spell id storing.
2009-06-30 11:25:32 +04:00
VladimirMangos
f80f45e3c4 [8092] No, one more not safe place found.
Patch inspired bug report connected with alt.patch written by Machiavelli.
2009-06-29 13:35:23 +04:00
VladimirMangos
ac7a7417fe [8091] Check bag size at item protos loading and item slots at invetory loading.
This is single not safe places in work with bag slots in current code.
2009-06-29 12:49:34 +04:00
duckman
7bb9c42e9d [8085] Apply talent rate to all talents points.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-06-28 04:03:02 +04:00
VladimirMangos
2dec2ccbe4 [8084] Correctly show spell icon disabled state at relogin for spells with cooldown delayed until expire. 2009-06-28 02:11:57 +04:00