don't remove pt! 🔥🔥🔥🔥 (#3606)

* don't remove pt! 🔥🔥🔥🔥

* apply water to burns

* clangify

* fix clientside

* clangify

* missed qdebug

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
This commit is contained in:
ebbit1q 2019-03-04 06:55:54 +01:00 committed by Zach H
parent a86aeb00c5
commit abe4f5ca60
3 changed files with 15 additions and 12 deletions

View file

@ -136,14 +136,16 @@ void TableZone::handleDropEventByGrid(const QList<CardDragItem *> &dragItems,
cmd.set_x(gridPoint.x());
cmd.set_y(gridPoint.y());
for (int i = 0; i < dragItems.size(); ++i) {
for (const auto &item : dragItems) {
CardToMove *ctm = cmd.mutable_cards_to_move()->add_card();
ctm->set_card_id(dragItems[i]->getId());
ctm->set_face_down(dragItems[i]->getFaceDown());
if (startZone->getName() != name && dragItems[i]->getItem()->getInfo())
ctm->set_pt(dragItems[i]->getItem()->getInfo()->getPowTough().toStdString());
else
ctm->set_pt(std::string());
ctm->set_card_id(item->getId());
ctm->set_face_down(item->getFaceDown());
if (startZone->getName() != name && !item->getFaceDown()) {
const auto &info = item->getItem()->getInfo();
if (info) {
ctm->set_pt(info->getPowTough().toStdString());
}
}
}
startZone->getPlayer()->sendGameCommand(cmd);