Commit graph

88 commits

Author SHA1 Message Date
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
f45253ac8b [8393] Fixed format CMSG_FORCE_MOVE_UNROOT_ACK and CMSG_FORCE_MOVE_ROOT_ACK.
Also avoid packet tail warnings spam at rejected movement packets.
2009-08-20 00:15:34 +04:00
VladimirMangos
35121cdd34 [8389] Implement check really read received packet size and warning it not all data read.
* This let more easy catch packet structure chnages at client switch.
* Fixed structure CMSG_GUILD_BANK_SWAP_ITEMS
* Fixed structure CMSG_SPLIT_ITEM, CMSG_SELL_ITEM
* Added read data amount fixes for some other packets.

Thanks to TOM_RUS in help check correct packets structure.

Note: not all packets possible fixed. Please report for not fixed cases at errors:
"opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)"
2009-08-19 00:45:24 +04:00
arrai
6e70c05191 [8386] Fixed areatrigger distance check
Old check caused false positives for trigger #4853
2009-08-18 17:41:28 +02:00
arrai
c34ff46443 [8385] Use 3D coordinates for checking corpse distance at reclaiming 2009-08-18 16:09:10 +02:00
VladimirMangos
2b534cbc23 [8382] Implement ByteArray functions for skip read of fields not needed for server in received packets.
* Use this fucntions in some case.
* Change some packets to form: read fields first check later for better control recieved packets structure.
* Fix CMSG_STAND_STATE_CHANGE packet structure to more correct.
2009-08-18 03:49:50 +04:00
arrai
a24f39a36f [8378] Use exceptions instead of explicit size checking for each packet
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
2009-08-16 23:50:22 +02:00
tomrus88
7c52111fb1 Fixed /played chat command.
(cherry picked from commit 3e49bbe692ea5f44ea2daffdfe970a7201d501f5)

Conflicts:

	src/game/MiscHandler.cpp
	src/game/SharedDefines.h
	src/game/UpdateFields.h
	src/realmd/AuthCodes.h
2009-07-29 15:14:23 +04:00
tomrus88
786e48cdba [8262] Fixed work /played client chat command.
Thanks to The_Game_Maste for prepering patch for master branch.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-28 01:03:59 +04:00
SilverIce
0cf083eb55 [8231] Use more safe destination buffer size for zlib compression.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-07-22 15:59:36 +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
VladimirMangos
c129b0a1bd [8185] Allow set visible gm level for in gm list and in who list checks.
* GM.InGMList replaced by GM.InGMList.Level with default value 3 (visible any gm levels)
* GM.InWhoList replaced by GM.InWhoList.Level with default value 3 (visible any gm levels)

Update mangosd.conf if used non default value for old GM.InGMList and GM.InWhoList
2009-07-16 02:54:57 +04: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
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
21a6a26386 [8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags.
* Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class.
* Cleanups and fix related code.

NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
2009-06-26 01:57:34 +04:00
tomrus88
cae3f0a532 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
2009-05-31 12:16:25 +04:00
VladimirMangos
2a27a44e2a [7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define.
  I64FMTD renamed to UI64FMTD for more clear name.
* Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals.
  Please always use UI64LIT(0x00001) instead less portable 0x00001LL
2009-05-30 22:44:20 +04:00
tomrus88
42f8ce5f3e [7911] Applied coding style. 2009-05-29 19:07:28 +04:00
tomrus88
6734694a90 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-16 00:47:37 +04:00
VladimirMangos
788cdf9b3a [7826] Avoid use GetDistance* that used slow sqrt call where possible, other related speedups. 2009-05-14 18:51:13 +04:00
tomrus88
5e26a2a152 Just a few renames. 2009-05-09 16:01:31 +04:00
tomrus88
b5548f9f12 Small fixes. 2009-05-08 18:09:53 +04:00
tomrus88
6821c24268 Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-05-06 09:40:35 +04:00
arrai
fefe56e3c5 [7776] Completed implementation of CMSG_SPELLCLICK
For vehicles, you have to add the correct SPELL_AURA_CONTROL_VEHICLE spells to
npc_spellclick_spells, otherwise you won't be able to use them
2009-05-05 18:58:58 +02:00
tomrus88
b980e9ac59 Updated to 3.1.2.9855 client build, fixed quests, some work on monster movement. Not tested. 2009-05-02 19:41:00 +04:00
tomrus88
d4323e0071 Merge commit 'origin/master' into 310
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/Player.cpp
2009-04-29 11:51:15 +04:00
zhenya
8144f30199 [7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2009-04-29 01:05:21 +04:00
tomrus88
950a4bf13f Merge commit 'origin/master' into 310
Conflicts:
	src/game/Player.cpp
2009-04-28 19:08:53 +04:00
AlexDereka
c9d51a6dc7 [7716] Fixed some typos and possible crashes. 2009-04-26 18:49:07 +04:00
tomrus88
9b20869a32 Merge branch 'master' into 310
Conflicts:
	src/game/Player.cpp
2009-04-12 14:37:33 +04:00
VladimirMangos
199c09640d [7648] Resolve problems with expected fall damage at near teleport.
Move near teleport landing code to WorldSession::HandleMoveTeleportAck.
This make Player::TeleportTo code working in same way for both far/near teleports.
Move mSemaphoreTeleport from WorldObject to Player and merge with DoNotMove (using 2 fields for far/near teleport flag).
Skip movement packets until landing confirmation for near teleport from client.
2009-04-11 11:06:30 +04:00
tomrus88
963aed5e0b Merge branch 'master' into 310
Conflicts:
	src/game/Player.cpp
	src/game/Player.h
	src/game/Unit.cpp
2009-03-26 14:28:37 +03:00
VladimirMangos
c33eff13f4 [7540] Move most reputation/force faction reaction code to new ReputationMgr. 2009-03-26 11:28:56 +03:00
VladimirMangos
df9caf58cd [7538] Hide some implementation details for reputation/forced faction reaction. 2009-03-25 21:28:04 +03:00
VladimirMangos
695ceabe3e [7509] Use defines instead explcit value for talent rank cound (in general and for pets) 2009-03-21 20:14:30 +03:00
tomrus88
28dc20c6e2 Small code cleanup and partial merge with dev branch 2009-03-21 19:07:38 +03:00
tomrus88
a2d3941588 Merged and updated to latest PTR build 9704 2009-03-19 14:18:17 +03:00
tomrus88
31b3ee95ad Merge branch 'master' into 310
Conflicts:
	src/game/Level2.cpp
	src/game/PetHandler.cpp
	src/game/Player.cpp
	src/game/Player.h
	src/game/SkillHandler.cpp
2009-03-11 12:22:58 +03:00
VladimirMangos
329fb3f9d1 [7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
This in some cases make some zones not explorable if it not have server side data in current maps
but not allow cheating with zone set from client.
2009-03-11 10:08:12 +03:00
balrok
54f2dbefa0 [7403] much more unneeded includes removed
now i extended my script:
NAME="Chat"; ack -c $NAME | ack ":1$" | sed 's/:1//' | xargs /usr/bin/ack-grep -l "include \""$NAME".h\"" | xargs /bin/sed -i '/include "'$NAME'.h"/d'

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-08 02:22:17 +03:00
NoFantasy
83affb51fd [7390] Implement heroic instance quest requirement in areatrigger_teleport.
Also more fixes for prev. sql update.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-06 18:23:38 +03:00
tomrus88
6aadc16d7d Merge branch 'master' into 310
Conflicts:
	src/game/Player.cpp
	src/game/QueryHandler.cpp
2009-03-06 08:03:34 +03:00
tomrus88
e6a66cdc54 Updated to new client build 2009-03-04 14:58:11 +03:00
tomrus88
9e1e845e54 Fixed talents display and inspect 2009-03-01 18:20:22 +03:00
VladimirMangos
2b9eeb782e [7362] Use IN_MILISECONDS where appropriate, other cleanups. 2009-03-01 05:22:56 +03:00
tomrus88
ffca6c8c57 Fixed some opcodes 2009-02-27 19:25:11 +03:00
VladimirMangos
a1b5c3cb02 Cleanup code for UNIT_FIELD_BYTES_1 parts.
Move defines to Unit (values can be used with creatures)
Better gameobject barber chairs check at loading.
2009-01-31 05:55:10 +03:00
delavega
b7d11eb418 [7090] Crash fix CMSG_REQUEST_ACCOUNT_DATA in case empty data string.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-01-15 03:13:41 +03:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
VladimirMangos
18fb4db8f2 [6993] Fixing FFA PvP player flags for 3.0.3 2008-12-31 14:11:05 +03:00