aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2019-07-14 14:20:39 +0200
committerccrs <ccrs@users.noreply.github.com>2019-07-14 14:20:39 +0200
commit6826b8cb2cafd3f64c40357c53e10b8ceaea6b8a (patch)
tree1302e4bd46c9cdb231e67e92a38d187474384918
parentbbb9d94acc47ac809da93fd9cc4555a4e82fc52e (diff)
Build: fix build error
In file included from /home/circleci/project/src/server/game/Entities/Player/Player.cpp:19: In file included from /home/circleci/project/src/server/game/Entities/Player/Player.h:22: In file included from /home/circleci/project/src/server/game/Entities/Unit/Unit.h:22: In file included from /home/circleci/project/src/server/game/Entities/Object/Object.h:22: In file included from /home/circleci/project/src/common/Common.h:23: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory:63: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h:46: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33: /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h:136:23: fatal error: no matching constructor for initialization of 'WorldPackets::Spells::ResyncRune' { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h:475:8: note: in instantiation of function template specialization '__gnu_cxx::new_allocator<WorldPackets::Spells::ResyncRune>::construct<WorldPackets::Spells::ResyncRune, unsigned char &, unsigned int &>' requested here { __a.construct(__p, std::forward<_Args>(__args)...); } ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc:103:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<WorldPackets::Spells::ResyncRune> >::construct<WorldPackets::Spells::ResyncRune, unsigned char &, unsigned int &>' requested here _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, ^ /home/circleci/project/src/server/game/Entities/Player/Player.cpp:24611:22: note: in instantiation of function template specialization 'std::vector<WorldPackets::Spells::ResyncRune, std::allocator<WorldPackets::Spells::ResyncRune> >::emplace_back<unsigned char &, unsigned int &>' requested here packet.Runes.emplace_back(type, cooldown); ^ /home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided struct ResyncRune ^ /home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided /home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided 1 error generated.
-rw-r--r--src/server/game/Entities/Player/Player.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 147798a8c42..badbec9377b 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -24606,9 +24606,10 @@ void Player::ResyncRunes() const
packet.Count = MAX_RUNES;
for (uint32 itr = 0; itr < MAX_RUNES; ++itr)
{
- uint8 type = GetCurrentRune(itr);
- uint32 cooldown = uint32(255) - ((GetRuneCooldown(itr) * uint32(255)) / uint32(RUNE_BASE_COOLDOWN)); // cooldown time (0-255)
- packet.Runes.emplace_back(type, cooldown);
+ WorldPackets::Spells::ResyncRune resyncRune;
+ resyncRune.RuneType = GetCurrentRune(itr);
+ resyncRune.Cooldown = uint8(255) - uint8(GetRuneCooldown(itr) * uint32(255) / uint32(RUNE_BASE_COOLDOWN)); // cooldown time (0-255)
+ packet.Runes.emplace_back(resyncRune);
}
SendDirectMessage(packet.Write());
}