Browse Source

Correctly initialize battleID for teleport action

Ivan Savenko 2 years ago
parent
commit
e57276b7c5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/spells/effects/Teleport.cpp

+ 2 - 0
lib/spells/effects/Teleport.cpp

@@ -12,6 +12,7 @@
 #include "Teleport.h"
 #include "Teleport.h"
 #include "Registry.h"
 #include "Registry.h"
 #include "../ISpellMechanics.h"
 #include "../ISpellMechanics.h"
+#include "../../battle/IBattleState.h"
 #include "../../battle/CBattleInfoCallback.h"
 #include "../../battle/CBattleInfoCallback.h"
 #include "../../battle/Unit.h"
 #include "../../battle/Unit.h"
 #include "../../networkPacks/PacksForClientBattle.h"
 #include "../../networkPacks/PacksForClientBattle.h"
@@ -76,6 +77,7 @@ void Teleport::apply(ServerCallback * server, const Mechanics * m, const EffectT
 	const auto destination = target[1].hexValue;
 	const auto destination = target[1].hexValue;
 
 
 	BattleStackMoved pack;
 	BattleStackMoved pack;
+	pack.battleID = m->battle()->getBattle()->getBattleID();
 	pack.distance = 0;
 	pack.distance = 0;
 	pack.stack = targetUnit->unitId();
 	pack.stack = targetUnit->unitId();
 	std::vector<BattleHex> tiles;
 	std::vector<BattleHex> tiles;