Commit f6725b1a authored by nanahira's avatar nanahira

Merge branch 'master' of https://github.com/Fluorohydride/ygopro

parents 43f624d2 1daa9a14
......@@ -132,7 +132,7 @@ void ClientCard::UpdateInfo(char* buf) {
int l = BufferIO::ReadInt8(buf);
int s = BufferIO::ReadInt8(buf);
BufferIO::ReadInt8(buf);
ClientCard* ecard = mainGame->dField.GetCard(c, l, s);
ClientCard* ecard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s);
equipTarget = ecard;
ecard->equipped.insert(this);
}
......@@ -143,7 +143,7 @@ void ClientCard::UpdateInfo(char* buf) {
int l = BufferIO::ReadInt8(buf);
int s = BufferIO::ReadInt8(buf);
BufferIO::ReadInt8(buf);
ClientCard* tcard = mainGame->dField.GetCard(c, l, s);
ClientCard* tcard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s);
cardTarget.insert(tcard);
tcard->ownerTarget.insert(this);
}
......
......@@ -717,6 +717,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
return false;
}
void DeckBuilder::GetHoveredCard() {
hovered_pos = 0;
hovered_code = 0;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root)
return;
......@@ -724,8 +726,6 @@ void DeckBuilder::GetHoveredCard() {
int x = pos.X;
int y = pos.Y;
int pre_code = hovered_code;
hovered_pos = 0;
hovered_code = 0;
is_lastcard = 0;
if(x >= 314 && x <= 794) {
if(y >= 164 && y <= 435) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment