mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
d2ac05729a
Fixed typo in SMSG_TUTORIAL_FLAGS
67 lines
1.9 KiB
C++
67 lines
1.9 KiB
C++
/*
|
|
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "SpellPackets.h"
|
|
|
|
WorldPacket const* WorldPackets::Spell::CategoryCooldown::Write()
|
|
{
|
|
_worldPacket.reserve(4 + 8 * CategoryCooldowns.size());
|
|
|
|
_worldPacket << uint32(CategoryCooldowns.size());
|
|
|
|
for (CategoryCooldownInfo const& cooldown : CategoryCooldowns)
|
|
{
|
|
_worldPacket << uint32(cooldown.Category);
|
|
_worldPacket << int32(cooldown.ModCooldown);
|
|
}
|
|
|
|
return &_worldPacket;
|
|
}
|
|
|
|
WorldPacket const* WorldPackets::Spell::SendKnownSpells::Write()
|
|
{
|
|
_worldPacket.reserve(1 + 4 * KnownSpells.size());
|
|
|
|
_worldPacket.WriteBit(InitialLogin);
|
|
_worldPacket << uint32(KnownSpells.size());
|
|
|
|
for (uint32 spellId : KnownSpells)
|
|
_worldPacket << uint32(spellId);
|
|
|
|
return &_worldPacket;
|
|
}
|
|
|
|
WorldPacket const* WorldPackets::Spell::UpdateActionButtons::Write()
|
|
{
|
|
for (uint32 i = 0; i < MAX_ACTION_BUTTONS; ++i)
|
|
_worldPacket << ActionButtons[i];
|
|
|
|
_worldPacket << Reason;
|
|
|
|
return &_worldPacket;
|
|
}
|
|
|
|
WorldPacket const* WorldPackets::Spell::SendUnlearnSpells::Write()
|
|
{
|
|
_worldPacket << uint32(Spells.size());
|
|
for (uint32 i = 0; i < Spells.size(); ++i)
|
|
_worldPacket << Spells[0];
|
|
|
|
return &_worldPacket;
|
|
}
|
|
|