TrinityCore / WowPacketParser

World of Warcraft Packet Parser
GNU General Public License v3.0
426 stars 354 forks source link

Possible Future SQL Extraction Idea. Need Feedback #300

Closed Taaboy closed 7 years ago

Taaboy commented 7 years ago

When pursing the data (oppcodes) extracted i have come across some similar entry's with (GUID/low) that match for their spawn locations, way-points and other details, my question is why can't we use the extracted GUID for creature and object tables instead of custom / old guid's that cause a lot of problems when doing sql extraction and inserting into DB. With proper locations and all extracted GUID/low will be unique and so it doesn't clash with other people data and future proofing DB populating

By using the one that extracted there will be no double up's or wrong links to objects , all quest linked to objects will be easier to trace/track down from the extracted data instead of carrying old emu's data that is obselete with obselete creature entry's .

The other data i have been reading is the SMSG_LOOT _RESPONSE

A sample below from Creature entry:121034, http://www.wowhead.com/npc=121034/ravenous-felstalker

ServerToClient: SMSG_LOOT_RESPONSE (0x2627) Length: 64 ConnIdx: 0 Time: 04/02/2017 09:51:16.000 Number: 62
Owner: Full: 0x203CC098807632800053A20000603CD2 Creature/0 R3888/S21410 Map: 1220 Entry: 121034 Low: 6307026
LootObj: Full: 0x3C3CC098800000000053A20000E03CF4 LootObject/0 R3888/S21410 Map: 1220 Low: 14695668
FailureReason: NoLoot (17)
AcquireReason: Corpse (1)
LootMethod: FreeForAll (0)
Threshold: Poor (0)
Coins: 0
ItemCount: 1
CurrencyCount: 0
Acquired: True
AELooting: True
PersonalLooting: False
[0] (LootItem) ItemType: 0
[0] (LootItem) ItemUiType: 4
[0] (LootItem) CanTradeToTapList: False
[0] (LootItem) (ItemInstance) ItemID: 132231 (132231)
[0] (LootItem) (ItemInstance) RandomPropertiesSeed: 0
[0] (LootItem) (ItemInstance) RandomPropertiesID: 0
[0] (LootItem) (ItemInstance) HasItemBonus: False
[0] (LootItem) (ItemInstance) HasModifications: False
[0] (LootItem) Quantity: 1
[0] (LootItem) LootItemType: 0
[0] (LootItem) LootListID: 0

Second Example of multi loots http://www.wowhead.com/npc=110909/kolroz-the-everburning

ServerToClient: SMSG_LOOT_RESPONSE (0x2627) Length: 85 ConnIdx: 0 Time: 04/02/2017 10:14:05.000 Number: 110
Owner: Full: 0x203CC098806C4F40001DF700006039A1 Creature/0 R3888/S7671 Map: 1220 Entry: 110909 Low: 6306209
LootObj: Full: 0x3C3CC09880000000001DF7000160424A LootObject/0 R3888/S7671 Map: 1220 Low: 23085642
FailureReason: NoLoot (17)
AcquireReason: Corpse (1)
LootMethod: FreeForAll (0)
Threshold: Poor (0)
Coins: 0
ItemCount: 2
CurrencyCount: 0
Acquired: True
AELooting: True
PersonalLooting: False
[0] (LootItem) ItemType: 0
[0] (LootItem) ItemUiType: 4
[0] (LootItem) CanTradeToTapList: False
[0] (LootItem) (ItemInstance) ItemID: 140222 (140222)
[0] (LootItem) (ItemInstance) RandomPropertiesSeed: 0
[0] (LootItem) (ItemInstance) RandomPropertiesID: 0
[0] (LootItem) (ItemInstance) HasItemBonus: False
[0] (LootItem) (ItemInstance) HasModifications: False
[0] (LootItem) Quantity: 1
[0] (LootItem) LootItemType: 0
[0] (LootItem) LootListID: 0
[1] (LootItem) ItemType: 0
[1] (LootItem) ItemUiType: 4
[1] (LootItem) CanTradeToTapList: False
[1] (LootItem) (ItemInstance) ItemID: 132199 (132199)
[1] (LootItem) (ItemInstance) RandomPropertiesSeed: 0
[1] (LootItem) (ItemInstance) RandomPropertiesID: 0
[1] (LootItem) (ItemInstance) HasItemBonus: False
[1] (LootItem) (ItemInstance) HasModifications: False
[1] (LootItem) Quantity: 1
[1] (LootItem) LootItemType: 0
[1] (LootItem) LootListID: 1

My question is it possible to make a sql builder to extract that data to the creature loot table and the creature/object tables with correct extracted data.

This WPP is a powerful tool with alot of future templates and fast tracking the progression of the DB and Core. And also help with custom emu scripts for custom objects/creatures that most times cause problems.

With the possibility with the latest alter to the DB of AI for individual creature table.

Taaboy

Aokromes commented 7 years ago

guids are dynamic on retail, and different maps can share same guids because they are hosted on different servers.

r00ty-tc commented 7 years ago

In case you're skeptical, you can go ahead and try it. Go to location with creatures that is quiet (no other players). Attach sniffer, kill one single creature. Observe it respawn (hopefully in the same spot). There are areas where all spots are used and it works best.

Look at sniff file, you'll see the respawned creature has a new low id.

Low ID is not used for identification at all.

Taaboy commented 7 years ago

1 guids are dynamic on retail, Well that might have been true but what i am seeing now and doing find entry and lows for broken isle they seem to be the same guid, but hey i am could be missing and the notepad++ could be missing some finds but @ 6gig of PKTs and had to break them down to smaller and split to opcodes and looking thru the SMSG_UPDATE_OBJECT , it is telling a different story, and if they are dynamic the entry and guid's can be easier to update and remove old from patch / expansion.

2 - different maps can share same guids.= This has map / entry/low all on the one line and example and also there is area and phase that counters that , as Legion has no fix level no more in the latest expansion area and creatures level up to your level as you go thru content.

Excluding 2 areas that are maxed lvl and alot of elites,Surmaur? and Broken Shore.So we can't have different entry's to the creature table for the variable different levels of creatures. So i feel that we should look into the change i am willing to give up the PKT missing the account sensitive data, from pre 7.2.

And atm i can't sniff as sniffer is out of date.

And Why Not use Low ID's / GUID Guid: Full: 0x203CC098806C4F40001DF700006039A1 HEX 6039A1 = 6306209

``` [6] UpdateType: CreateObject1 [6] Object Guid: Full: 0x203CC098806C4F40001DF700006039A1 Creature/0 R3888/S7671 Map: 1220 Entry: 110909 Low: 6306209 [6] Object Type: Unit (3) [6] NoBirthAnim: False [6] EnablePortals: False [6] PlayHoverAnim: False [6] HasMovementUpdate: True [6] HasMovementTransport: False [6] Stationary: False [6] HasCombatVictim: False [6] HasServerTime: False [6] HasVehicleCreate: False [6] HasAnimKitCreate: False [6] HasRotation: False [6] HasAreaTrigger: False [6] HasGameObject: False [6] HasSmoothPhasing: False [6] ThisIsYou: False [6] SceneObjCreate: False [6] HasPlayerCreateData: False [6] MoverGUID: Full: 0x203CC098806C4F40001DF700006039A1 Creature/0 R3888/S7671 Map: 1220 Entry: 110909 Low: 6306209 [6] MoveTime: 738293325 [6] Position: X: -184.3419 Y: 7513.068 Z: 98.52885 [6] Orientation: 1.316019 [6] Pitch: 0 [6] StepUpStartElevation: 0 [6] MoveIndex: 0 [6] Movement Flags: Forward (1) [6] Extra Movement Flags: None (0) [6] Has Transport Data: False [6] Has Fall Data: False [6] HasSpline: True [6] HeightChangeFailed: False [6] RemoteTimeValid: False [6] WalkSpeed: 4 [6] RunSpeed: 4 [6] RunBackSpeed: 4.5 [6] SwimSpeed: 4.72222 [6] SwimBackSpeed: 2.5 [6] FlightSpeed: 7 [6] FlightBackSpeed: 4.5 [6] TurnRate: 3.141593 [6] PitchRate: 3.141593 [6] MovementForceCount: 0 [6] HasMovementSpline: True [6] ID: 105021578 [6] Destination: X: -178.3455 Y: 7536.019 Z: 98.11111 [6] MovementSplineMove: True [6] SplineFlags: Walkmode (2097152) [6] Elapsed: 3068 [6] Duration: 8848 [6] DurationModifier: 1 [6] NextDurationModifier: 1 [6] Face: 0 [6] HasJumpGravity: False [6] HasSpecialTime: False [6] PointsCount: 6 [6] Mode: Linear (0) [6] HasSplineFilterKey: False [6] HasSpellEffectExtraData: False [6] [0] Points: X: -180.9516 Y: 7498.297 Z: 98.04848 [6] [1] Points: X: -183.5036 Y: 7502.393 Z: 98.4862 [6] [2] Points: X: -186.0556 Y: 7506.489 Z: 98.92392 [6] [3] Points: X: -183.2832 Y: 7517.134 Z: 98.28476 [6] [4] Points: X: -178.3455 Y: 7536.019 Z: 98.11111 [6] [5] Points: X: -178.3455 Y: 7536.019 Z: 98.11111 [6] PauseTimesCount: 0 [6] OBJECT_FIELD_GUID: 6306209/8.836881E-39 [6] 1: 1963776/2.751836E-39 [6] OBJECT_FIELD_TYPE: 2154581824/-9.946663E-39 [6] OBJECT_FIELD_ENTRY: 540852376/1.598794E-19 [6] UNIT_FIELD_SUMMON: 9/1.261169E-44 [6] UNIT_FIELD_SUMMON + 1: 110909/1.554166E-40 [6] UNIT_FIELD_CRITTER + 1: 1065353216/1 [6] UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER + 6: 512/7.174648E-43 [6] UNIT_VIRTUAL_ITEM_SLOT_ID: 20785340/3.474304E-38 [6] UNIT_VIRTUAL_ITEM_SLOT_ID + 2: 266554/3.735217E-40 [6] UNIT_FIELD_RANGEDATTACKTIME: 20785340/3.474304E-38 [6] UNIT_FIELD_COMBATREACH: 266554/3.735217E-40 [6] UNIT_FIELD_NATIVEDISPLAYID: 5/7.006492E-45 [6] UNIT_FIELD_STAT0: 110/1.541428E-43 [6] UNIT_FIELD_STAT2: 98/1.373272E-43 [6] UNIT_FIELD_STAT3: 110/1.541428E-43 [6] UNIT_FIELD_POSSTAT0: 16/2.242078E-44 [6] UNIT_FIELD_NEGSTAT2: 32768/4.591775E-41 [6] UNIT_FIELD_NEGSTAT3: 4196352/5.880342E-39 [6] UNIT_FIELD_RESISTANCES_HOLY: 2000/2.802597E-42 [6] UNIT_FIELD_RESISTANCES_FIRE: 2000/2.802597E-42 [6] UNIT_FIELD_RESISTANCES_FROST: 1067030938/1.2 [6] UNIT_FIELD_RESISTANCES_SHADOW: 1082130432/4 [6] UNIT_FIELD_RESISTANCES_ARCANE: 63810/8.941686E-41 [6] UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_ARMOR: 63810/8.941686E-41 [6] UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_FROST: 1065353216/1 [6] UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_SHADOW: 1065353216/1 [6] UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_ARCANE: 1065353216/1 [6] UNIT_FIELD_BASE_MANA: 1065353216/1 [6] UNIT_FIELD_BASE_HEALTH: 1065353216/1 [6] UNIT_FIELD_BYTES_2: 1065353216/1 [6] UNIT_END + 13: 220000/3.082857E-40 [6] UNIT_END + 15: 1/1.401298E-45 [6] UNIT_END + 42: 1065353216/1 [6] UNIT_END + 56: 100/1.401298E-43 [6] UNIT_END + 59: 4294967295/NaN ```

Please before going this is not true go over the example and if you want more i can gladly help their, and if i am completely wrong atleast we are looking at the data and seeing changes.

Taaboy

DDuarte commented 7 years ago

I wish what you were saying is true, @Taaboy. It would make everyone lives a LOT easier. But unfortunately, it is not. Low guids don't mean anything useful (to us, at least).

Regarding loot, SMSG_LOOT_RESPONSE is not equivalent to our loot tables. What SMSG_LOOT_RESPONSE tells us is that X drops Y, but doesn't say anything regarding loot modes, drop chances, loot groups, reference loots, etc.