TrinityCore
Loading...
Searching...
No Matches
WorldPackets::Spells Namespace Reference

Classes

class  AddRunePower
 
struct  AuraDataInfo
 
struct  AuraInfo
 
class  AuraUpdate
 
class  CancelAura
 
class  CancelAutoRepeatSpell
 
class  CancelCast
 
class  CancelChannelling
 
class  CancelGrowthAura
 
class  CancelModSpeedNoControlAuras
 
class  CancelMountAura
 
class  CancelOrphanSpellVisual
 
class  CancelSpellVisual
 
class  CancelSpellVisualKit
 
class  CastFailed
 
class  CastSpell
 
class  CategoryCooldown
 
class  ClearAllSpellCharges
 
class  ClearCooldown
 
class  ClearCooldowns
 
class  ClearSpellCharges
 
class  ClearTarget
 
struct  ContentTuningParams
 
class  CooldownEvent
 
struct  CreatureImmunities
 
class  CustomLoadScreen
 
class  DispelFailed
 
class  GetMirrorImageData
 
class  KeyboundOverride
 
struct  LearnedSpellInfo
 
class  LearnedSpells
 
class  MirrorImageComponentedData
 
class  MirrorImageCreatureData
 
class  MissileCancel
 
class  MissileTrajectoryCollision
 
struct  MissileTrajectoryRequest
 
struct  MissileTrajectoryResult
 
class  ModifyCooldown
 
class  MountResult
 
class  NotifyMissileTrajectoryCollision
 
class  OpenItem
 
class  PetCancelAura
 
class  PetCastFailed
 
class  PetCastSpell
 
class  PlayOrphanSpellVisual
 
class  PlaySpellVisual
 
class  PlaySpellVisualKit
 
class  RequestCategoryCooldowns
 
class  ResurrectRequest
 
class  ResyncRunes
 
struct  RuneData
 
class  SelfRes
 
class  SendKnownSpells
 
class  SendSpellCharges
 
class  SendSpellHistory
 
class  SendUnlearnSpells
 
class  SetActionButton
 
class  SetSpellCharges
 
class  SetSpellModifier
 
struct  SpellAmmo
 
struct  SpellCastData
 
struct  SpellCastLogData
 
struct  SpellCastRequest
 
struct  SpellCastVisual
 
class  SpellChannelStart
 
struct  SpellChannelStartInterruptImmunities
 
class  SpellChannelUpdate
 
struct  SpellChargeEntry
 
class  SpellClick
 
class  SpellCooldown
 
struct  SpellCooldownStruct
 
struct  SpellCraftingReagent
 
class  SpellDelayed
 
struct  SpellExtraCurrencyCost
 
class  SpellFailedOther
 
class  SpellFailure
 
class  SpellGo
 
struct  SpellHealPrediction
 
struct  SpellHistoryEntry
 
struct  SpellHitStatus
 
struct  SpellLogPowerData
 
struct  SpellMissStatus
 
struct  SpellModifier
 
struct  SpellModifierData
 
struct  SpellPowerData
 
class  SpellPrepare
 
class  SpellStart
 
struct  SpellTargetData
 
struct  SpellTargetedHealPrediction
 
class  SpellVisualLoadScreen
 
struct  SpellWeight
 
class  SupercededSpells
 
struct  TargetLocation
 
class  TradeSkillSetFavorite
 
class  UnlearnedSpells
 
class  UnlearnSkill
 
class  UpdateActionButtons
 
class  UpdateMissileTrajectory
 
class  UseItem
 

Functions

ByteBufferoperator<< (ByteBuffer &data, SpellCastLogData const &spellCastLogData)
 
ByteBufferoperator<< (ByteBuffer &data, ContentTuningParams const &contentTuningParams)
 
ByteBufferoperator>> (ByteBuffer &data, SpellCastVisual &visual)
 
ByteBufferoperator<< (ByteBuffer &data, SpellCastVisual const &visual)
 
ByteBufferoperator<< (ByteBuffer &data, AuraDataInfo const &auraData)
 
ByteBufferoperator<< (ByteBuffer &data, AuraInfo const &aura)
 
ByteBufferoperator>> (ByteBuffer &buffer, Optional< TargetLocation > &location)
 
ByteBufferoperator>> (ByteBuffer &buffer, SpellTargetData &targetData)
 
ByteBufferoperator>> (ByteBuffer &buffer, MissileTrajectoryRequest &trajectory)
 
ByteBufferoperator>> (ByteBuffer &data, SpellCraftingReagent &optionalReagent)
 
ByteBufferoperator>> (ByteBuffer &data, SpellExtraCurrencyCost &extraCurrencyCost)
 
ByteBufferoperator>> (ByteBuffer &buffer, SpellCastRequest &request)
 
ByteBufferoperator<< (ByteBuffer &data, TargetLocation const &targetLocation)
 
ByteBufferoperator<< (ByteBuffer &data, SpellTargetData const &spellTargetData)
 
ByteBufferoperator<< (ByteBuffer &data, SpellMissStatus const &spellMissStatus)
 
ByteBufferoperator<< (ByteBuffer &data, SpellHitStatus const &spellHitStatus)
 
ByteBufferoperator<< (ByteBuffer &data, SpellPowerData const &spellPowerData)
 
ByteBufferoperator<< (ByteBuffer &data, RuneData const &runeData)
 
ByteBufferoperator<< (ByteBuffer &data, MissileTrajectoryResult const &missileTrajectory)
 
ByteBufferoperator<< (ByteBuffer &data, SpellAmmo const &spellAmmo)
 
ByteBufferoperator<< (ByteBuffer &data, CreatureImmunities const &immunities)
 
ByteBufferoperator<< (ByteBuffer &data, SpellHealPrediction const &spellPred)
 
ByteBufferoperator<< (ByteBuffer &data, SpellCastData const &spellCastData)
 
ByteBufferoperator<< (ByteBuffer &data, LearnedSpellInfo const &learnedSpellInfo)
 
ByteBufferoperator<< (ByteBuffer &data, SpellModifierData const &spellModifierData)
 
ByteBufferoperator<< (ByteBuffer &data, SpellModifier const &spellModifier)
 
ByteBufferoperator<< (ByteBuffer &data, SpellCooldownStruct const &cooldown)
 
ByteBufferoperator<< (ByteBuffer &data, SpellHistoryEntry const &historyEntry)
 
ByteBufferoperator<< (ByteBuffer &data, SpellChargeEntry const &chargeEntry)
 
ByteBufferoperator<< (ByteBuffer &data, SpellChannelStartInterruptImmunities const &interruptImmunities)
 
ByteBufferoperator<< (ByteBuffer &data, SpellTargetedHealPrediction const &targetedHealPrediction)
 

Function Documentation

◆ operator<<() [1/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
AuraDataInfo const &  auraData 
)
103{
104 data << auraData.CastID;
105 data << int32(auraData.SpellID);
106 data << auraData.Visual;
107 data << uint16(auraData.Flags);
108 data << uint32(auraData.ActiveFlags);
109 data << uint16(auraData.CastLevel);
110 data << uint8(auraData.Applications);
111 data << int32(auraData.ContentTuningID);
112 data.WriteBit(auraData.CastUnit.has_value());
113 data.WriteBit(auraData.Duration.has_value());
114 data.WriteBit(auraData.Remaining.has_value());
115 data.WriteBit(auraData.TimeMod.has_value());
116 data.WriteBits(auraData.Points.size(), 6);
117 data.WriteBits(auraData.EstimatedPoints.size(), 6);
118 data.WriteBit(auraData.ContentTuning.has_value());
119
120 if (auraData.ContentTuning)
121 data << *auraData.ContentTuning;
122
123 if (auraData.CastUnit)
124 data << *auraData.CastUnit;
125
126 if (auraData.Duration)
127 data << uint32(*auraData.Duration);
128
129 if (auraData.Remaining)
130 data << uint32(*auraData.Remaining);
131
132 if (auraData.TimeMod)
133 data << float(*auraData.TimeMod);
134
135 if (!auraData.Points.empty())
136 data.append(auraData.Points.data(), auraData.Points.size());
137
138 if (!auraData.EstimatedPoints.empty())
139 data.append(auraData.EstimatedPoints.data(), auraData.EstimatedPoints.size());
140
141 return data;
142}
uint8_t uint8
Definition: Define.h:145
int32_t int32
Definition: Define.h:139
uint16_t uint16
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:143
void append(T value)
Definition: ByteBuffer.h:143
bool WriteBit(bool bit)
Definition: ByteBuffer.h:175
void WriteBits(std::size_t value, int32 bits)
Definition: ByteBuffer.h:203
+ Here is the call graph for this function:

◆ operator<<() [2/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
AuraInfo const &  aura 
)
145{
146 data << aura.Slot;
147 data.WriteBit(aura.AuraData.has_value());
148 data.FlushBits();
149
150 if (aura.AuraData)
151 data << *aura.AuraData;
152
153 return data;
154}
void FlushBits()
Definition: ByteBuffer.h:155
+ Here is the call graph for this function:

◆ operator<<() [3/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
ContentTuningParams const &  contentTuningParams 
)
170{
171 data << float(contentTuningParams.PlayerItemLevel);
172 data << float(contentTuningParams.TargetItemLevel);
173 data << int16(contentTuningParams.PlayerLevelDelta);
174 data << uint16(contentTuningParams.ScalingHealthItemLevelCurveID);
175 data << uint8(contentTuningParams.TargetLevel);
176 data << uint8(contentTuningParams.Expansion);
177 data << int8(contentTuningParams.TargetScalingLevelDelta);
178 data << uint32(contentTuningParams.Flags);
179 data << int32(contentTuningParams.PlayerContentTuningID);
180 data << int32(contentTuningParams.TargetContentTuningID);
181 data << int32(contentTuningParams.Unused927);
182 data.WriteBits(contentTuningParams.Type, 4);
183 data.FlushBits();
184 return data;
185}
int16_t int16
Definition: Define.h:140
int8_t int8
Definition: Define.h:141
+ Here is the call graph for this function:

◆ operator<<() [4/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
CreatureImmunities const &  immunities 
)
393{
394 data << int32(immunities.School);
395 data << int32(immunities.Value);
396 return data;
397}

◆ operator<<() [5/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
LearnedSpellInfo const &  learnedSpellInfo 
)
478{
479 data << int32(learnedSpellInfo.SpellID);
480 data.WriteBit(learnedSpellInfo.IsFavorite);
481 data.WriteBit(learnedSpellInfo.field_8.has_value());
482 data.WriteBit(learnedSpellInfo.Superceded.has_value());
483 data.WriteBit(learnedSpellInfo.TraitDefinitionID.has_value());
484 data.FlushBits();
485
486 if (learnedSpellInfo.field_8)
487 data << int32(*learnedSpellInfo.field_8);
488
489 if (learnedSpellInfo.Superceded)
490 data << int32(*learnedSpellInfo.Superceded);
491
492 if (learnedSpellInfo.TraitDefinitionID)
493 data << int32(*learnedSpellInfo.TraitDefinitionID);
494
495 return data;
496}
+ Here is the call graph for this function:

◆ operator<<() [6/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
MissileTrajectoryResult const &  missileTrajectory 
)
379{
380 data << uint32(missileTrajectory.TravelTime);
381 data << float(missileTrajectory.Pitch);
382 return data;
383}

◆ operator<<() [7/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
RuneData const &  runeData 
)
368{
369 data << uint8(runeData.Start);
370 data << uint8(runeData.Count);
371 data << uint32(runeData.Cooldowns.size());
372 if (!runeData.Cooldowns.empty())
373 data.append(runeData.Cooldowns.data(), runeData.Cooldowns.size());
374
375 return data;
376}
+ Here is the call graph for this function:

◆ operator<<() [8/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellAmmo const &  spellAmmo 
)
386{
387 data << int32(spellAmmo.DisplayID);
388 data << int8(spellAmmo.InventoryType);
389 return data;
390}

◆ operator<<() [9/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellCastData const &  spellCastData 
)
408{
409 data << spellCastData.CasterGUID;
410 data << spellCastData.CasterUnit;
411 data << spellCastData.CastID;
412 data << spellCastData.OriginalCastID;
413 data << int32(spellCastData.SpellID);
414 data << spellCastData.Visual;
415 data << uint32(spellCastData.CastFlags);
416 data << uint32(spellCastData.CastFlagsEx);
417 data << uint32(spellCastData.CastTime);
418 data << spellCastData.MissileTrajectory;
419 data << int32(spellCastData.Ammo.DisplayID);
420 data << uint8(spellCastData.DestLocSpellCastIndex);
421 data << spellCastData.Immunities;
422 data << spellCastData.Predict;
423 data.WriteBits(spellCastData.HitTargets.size(), 16);
424 data.WriteBits(spellCastData.MissTargets.size(), 16);
425 data.WriteBits(spellCastData.HitStatus.size(), 16);
426 data.WriteBits(spellCastData.MissStatus.size(), 16);
427 data.WriteBits(spellCastData.RemainingPower.size(), 9);
428 data.WriteBit(spellCastData.RemainingRunes.has_value());
429 data.WriteBits(spellCastData.TargetPoints.size(), 16);
430 data.FlushBits();
431
432 for (SpellMissStatus const& missStatus : spellCastData.MissStatus)
433 data << missStatus;
434
435 data << spellCastData.Target;
436
437 for (ObjectGuid const& hitTarget : spellCastData.HitTargets)
438 data << hitTarget;
439
440 for (ObjectGuid const& missTarget : spellCastData.MissTargets)
441 data << missTarget;
442
443 for (SpellHitStatus const& hitStatus : spellCastData.HitStatus)
444 data << hitStatus;
445
446 for (SpellPowerData const& power : spellCastData.RemainingPower)
447 data << power;
448
449 if (spellCastData.RemainingRunes)
450 data << *spellCastData.RemainingRunes;
451
452 for (TargetLocation const& targetLoc : spellCastData.TargetPoints)
453 data << targetLoc;
454
455 return data;
456}
Definition: ObjectGuid.h:258
Definition: SpellPackets.h:330
Definition: SpellPackets.h:338
Definition: SpellPackets.h:347
Definition: SpellPackets.h:223
+ Here is the call graph for this function:

◆ operator<<() [10/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellCastLogData const &  spellCastLogData 
)
151{
152 data << int64(spellCastLogData.Health);
153 data << int32(spellCastLogData.AttackPower);
154 data << int32(spellCastLogData.SpellPower);
155 data << int32(spellCastLogData.Armor);
156 data.WriteBits(spellCastLogData.PowerData.size(), 9);
157 data.FlushBits();
158
159 for (WorldPackets::Spells::SpellLogPowerData const& powerData : spellCastLogData.PowerData)
160 {
161 data << int32(powerData.PowerType);
162 data << int32(powerData.Amount);
163 data << int32(powerData.Cost);
164 }
165
166 return data;
167}
int64_t int64
Definition: Define.h:138
Definition: CombatLogPacketsCommon.h:31
int32 Amount
Definition: CombatLogPacketsCommon.h:35
int32 Cost
Definition: CombatLogPacketsCommon.h:36
int32 PowerType
Definition: CombatLogPacketsCommon.h:34
+ Here is the call graph for this function:

◆ operator<<() [11/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellCastVisual const &  visual 
)
196{
197 data << int32(visual.SpellXSpellVisualID);
198 data << int32(visual.ScriptVisualID);
199
200 return data;
201}

◆ operator<<() [12/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellChannelStartInterruptImmunities const &  interruptImmunities 
)
842{
843 data << int32(interruptImmunities.SchoolImmunities);
844 data << int32(interruptImmunities.Immunities);
845 return data;
846}

◆ operator<<() [13/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellChargeEntry const &  chargeEntry 
)
725{
726 data << uint32(chargeEntry.Category);
727 data << uint32(chargeEntry.NextRecoveryTime);
728 data << float(chargeEntry.ChargeModRate);
729 data << uint8(chargeEntry.ConsumedCharges);
730 return data;
731}

◆ operator<<() [14/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellCooldownStruct const &  cooldown 
)
648{
649 data << uint32(cooldown.SrecID);
650 data << uint32(cooldown.ForcedCooldown);
651 data << float(cooldown.ModRate);
652 return data;
653}

◆ operator<<() [15/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellHealPrediction const &  spellPred 
)
400{
401 data << int32(spellPred.Points);
402 data << uint8(spellPred.Type);
403 data << spellPred.BeaconGUID;
404 return data;
405}

◆ operator<<() [16/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellHistoryEntry const &  historyEntry 
)
667{
668 data << uint32(historyEntry.SpellID);
669 data << uint32(historyEntry.ItemID);
670 data << uint32(historyEntry.Category);
671 data << int32(historyEntry.RecoveryTime);
672 data << int32(historyEntry.CategoryRecoveryTime);
673 data << float(historyEntry.ModRate);
674 data.WriteBit(historyEntry.unused622_1.has_value());
675 data.WriteBit(historyEntry.unused622_2.has_value());
676 data.WriteBit(historyEntry.OnHold);
677 if (historyEntry.unused622_1)
678 data << uint32(*historyEntry.unused622_1);
679 if (historyEntry.unused622_2)
680 data << uint32(*historyEntry.unused622_2);
681 data.FlushBits();
682
683 return data;
684}
+ Here is the call graph for this function:

◆ operator<<() [17/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellHitStatus const &  spellHitStatus 
)
355{
356 data << uint8(spellHitStatus.Reason);
357 return data;
358}

◆ operator<<() [18/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellMissStatus const &  spellMissStatus 
)
345{
346 data.WriteBits(spellMissStatus.Reason, 4);
347 if (spellMissStatus.Reason == SPELL_MISS_REFLECT)
348 data.WriteBits(spellMissStatus.ReflectStatus, 4);
349
350 data.FlushBits();
351 return data;
352}
@ SPELL_MISS_REFLECT
Definition: SharedDefines.h:2741
+ Here is the call graph for this function:

◆ operator<<() [19/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellModifier const &  spellModifier 
)
575{
576 data << uint8(spellModifier.ModIndex);
577 data << uint32(spellModifier.ModifierData.size());
578 for (SpellModifierData const& modData : spellModifier.ModifierData)
579 data << modData;
580
581 return data;
582}
Definition: SpellPackets.h:519

◆ operator<<() [20/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellModifierData const &  spellModifierData 
)
567{
568 data << float(spellModifierData.ModifierValue);
569 data << uint8(spellModifierData.ClassIndex);
570
571 return data;
572}

◆ operator<<() [21/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellPowerData const &  spellPowerData 
)
361{
362 data << int32(spellPowerData.Cost);
363 data << int8(spellPowerData.Type);
364 return data;
365}

◆ operator<<() [22/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellTargetData const &  spellTargetData 
)
315{
316 data.WriteBits(spellTargetData.Flags, 28);
317 data.WriteBit(spellTargetData.SrcLocation.has_value());
318 data.WriteBit(spellTargetData.DstLocation.has_value());
319 data.WriteBit(spellTargetData.Orientation.has_value());
320 data.WriteBit(spellTargetData.MapID.has_value());
321 data.WriteBits(spellTargetData.Name.size(), 7);
322 data.FlushBits();
323
324 data << spellTargetData.Unit;
325 data << spellTargetData.Item;
326
327 if (spellTargetData.SrcLocation)
328 data << *spellTargetData.SrcLocation;
329
330 if (spellTargetData.DstLocation)
331 data << *spellTargetData.DstLocation;
332
333 if (spellTargetData.Orientation)
334 data << *spellTargetData.Orientation;
335
336 if (spellTargetData.MapID)
337 data << *spellTargetData.MapID;
338
339 data.WriteString(spellTargetData.Name);
340
341 return data;
342}
void WriteString(std::string const &str)
Definition: ByteBuffer.h:500
+ Here is the call graph for this function:

◆ operator<<() [23/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
SpellTargetedHealPrediction const &  targetedHealPrediction 
)
849{
850 data << targetedHealPrediction.TargetGUID;
851 data << targetedHealPrediction.Predict;
852 return data;
853}

◆ operator<<() [24/24]

ByteBuffer & WorldPackets::Spells::operator<< ( ByteBuffer data,
TargetLocation const &  targetLocation 
)
306{
307 data << targetLocation.Transport;
308 data << float(targetLocation.Location.m_positionX);
309 data << float(targetLocation.Location.m_positionY);
310 data << float(targetLocation.Location.m_positionZ);
311 return data;
312}

◆ operator>>() [1/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer buffer,
MissileTrajectoryRequest trajectory 
)
210{
211 buffer >> trajectory.Pitch;
212 buffer >> trajectory.Speed;
213 return buffer;
214}
float Pitch
Definition: SpellPackets.h:242
float Speed
Definition: SpellPackets.h:243

◆ operator>>() [2/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer buffer,
Optional< TargetLocation > &  location 
)
169{
170 location.emplace();
171 buffer >> location->Transport;
172 buffer >> location->Location.m_positionX;
173 buffer >> location->Location.m_positionY;
174 buffer >> location->Location.m_positionZ;
175 return buffer;
176}

◆ operator>>() [3/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer buffer,
SpellCastRequest request 
)
235{
236 buffer >> request.CastID;
237 buffer >> request.Misc[0];
238 buffer >> request.Misc[1];
239 buffer >> request.SpellID;
240 buffer >> request.Visual;
241 buffer >> request.MissileTrajectory;
242 buffer >> request.CraftingNPC;
243 request.OptionalCurrencies.resize(buffer.read<uint32>());
244 request.OptionalReagents.resize(buffer.read<uint32>());
245
246 for (SpellExtraCurrencyCost& optionalCurrency : request.OptionalCurrencies)
247 buffer >> optionalCurrency;
248
249 request.SendCastFlags = buffer.ReadBits(5);
250 bool hasMoveUpdate = buffer.ReadBit();
251 request.Weight.resize(buffer.ReadBits(2));
252 bool hasCraftingOrderID = buffer.ReadBit();
253 buffer >> request.Target;
254
255 if (hasCraftingOrderID)
256 request.CraftingOrderID = buffer.read<uint64>();
257
258 for (SpellCraftingReagent& optionalReagent : request.OptionalReagents)
259 buffer >> optionalReagent;
260
261 if (hasMoveUpdate)
262 {
263 request.MoveUpdate.emplace();
264 buffer >> *request.MoveUpdate;
265 }
266
267 for (SpellWeight& weight : request.Weight)
268 {
269 buffer.ResetBitPos();
270 weight.Type = buffer.ReadBits(2);
271 buffer >> weight.ID;
272 buffer >> weight.Quantity;
273 }
274
275 return buffer;
276}
uint64_t uint64
Definition: Define.h:142
uint32 ReadBits(int32 bits)
Definition: ByteBuffer.h:209
void ResetBitPos()
Definition: ByteBuffer.h:166
T read()
Definition: ByteBuffer.h:443
bool ReadBit()
Definition: ByteBuffer.h:191
Optional< MovementInfo > MoveUpdate
Definition: SpellPackets.h:275
int32 SpellID
Definition: SpellPackets.h:270
uint8 SendCastFlags
Definition: SpellPackets.h:272
SpellCastVisual Visual
Definition: SpellPackets.h:271
Array< SpellExtraCurrencyCost, 5 > OptionalCurrencies
Definition: SpellPackets.h:278
ObjectGuid CastID
Definition: SpellPackets.h:269
Array< SpellCraftingReagent, 3 > OptionalReagents
Definition: SpellPackets.h:277
Optional< uint64 > CraftingOrderID
Definition: SpellPackets.h:279
MissileTrajectoryRequest MissileTrajectory
Definition: SpellPackets.h:274
int32 Misc[2]
Definition: SpellPackets.h:281
SpellTargetData Target
Definition: SpellPackets.h:273
std::vector< SpellWeight > Weight
Definition: SpellPackets.h:276
ObjectGuid CraftingNPC
Definition: SpellPackets.h:280
Definition: SpellPackets.h:254
Definition: SpellPackets.h:262
+ Here is the call graph for this function:

◆ operator>>() [4/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer buffer,
SpellTargetData targetData 
)
179{
180 buffer.ResetBitPos();
181
182 targetData.Flags = buffer.ReadBits(28);
183 bool hasSrcLocation = buffer.ReadBit();
184 bool hasDstLocation = buffer.ReadBit();
185 bool hasOrientation = buffer.ReadBit();
186 bool hasMapID = buffer.ReadBit();
187 uint32 nameLength = buffer.ReadBits(7);
188
189 buffer >> targetData.Unit;
190 buffer >> targetData.Item;
191
192 if (hasSrcLocation)
193 buffer >> targetData.SrcLocation;
194
195 if (hasDstLocation)
196 buffer >> targetData.DstLocation;
197
198 if (hasOrientation)
199 targetData.Orientation = buffer.read<float>();
200
201 if (hasMapID)
202 targetData.MapID = buffer.read<int32>();
203
204 targetData.Name = buffer.ReadString(nameLength);
205
206 return buffer;
207}
std::string ReadString(uint32 length, bool requireValidUtf8=true)
Definition: ByteBuffer.cpp:79
Optional< float > Orientation
Definition: SpellPackets.h:235
Optional< TargetLocation > SrcLocation
Definition: SpellPackets.h:233
uint32 Flags
Definition: SpellPackets.h:230
ObjectGuid Item
Definition: SpellPackets.h:232
ObjectGuid Unit
Definition: SpellPackets.h:231
Optional< TargetLocation > DstLocation
Definition: SpellPackets.h:234
std::string Name
Definition: SpellPackets.h:237
Optional< int32 > MapID
Definition: SpellPackets.h:236
+ Here is the call graph for this function:

◆ operator>>() [5/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer data,
SpellCastVisual visual 
)
188{
189 data >> visual.SpellXSpellVisualID;
190 data >> visual.ScriptVisualID;
191
192 return data;
193}
int32 SpellXSpellVisualID
Definition: CombatLogPacketsCommon.h:87
int32 ScriptVisualID
Definition: CombatLogPacketsCommon.h:88

◆ operator>>() [6/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer data,
SpellCraftingReagent optionalReagent 
)
217{
218 data >> optionalReagent.ItemID;
219 data >> optionalReagent.DataSlotIndex;
220 data >> optionalReagent.Quantity;
221 if (data.ReadBit())
222 optionalReagent.Unknown_1000 = data.read<uint8>();
223
224 return data;
225}
int32 Quantity
Definition: SpellPackets.h:257
Optional< uint8 > Unknown_1000
Definition: SpellPackets.h:258
int32 ItemID
Definition: SpellPackets.h:255
int32 DataSlotIndex
Definition: SpellPackets.h:256
+ Here is the call graph for this function:

◆ operator>>() [7/7]

ByteBuffer & WorldPackets::Spells::operator>> ( ByteBuffer data,
SpellExtraCurrencyCost extraCurrencyCost 
)
228{
229 data >> extraCurrencyCost.CurrencyID;
230 data >> extraCurrencyCost.Count;
231 return data;
232}
int32 Count
Definition: SpellPackets.h:264
int32 CurrencyID
Definition: SpellPackets.h:263