mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
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:
parent
a86aeb00c5
commit
abe4f5ca60
3 changed files with 15 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue