arrow crash bugfix

This commit is contained in:
Max-Wilhelm Bruker 2010-09-10 22:40:46 +02:00
parent 8a2f7e94e2
commit e15806db34

View file

@ -761,10 +761,11 @@ ResponseCode Server_ProtocolHandler::cmdCreateArrow(Command_CreateArrow *cmd, Co
return RespNameNotFound; return RespNameNotFound;
Server_Card *startCard = startZone->getCard(cmd->getStartCardId(), false); Server_Card *startCard = startZone->getCard(cmd->getStartCardId(), false);
Server_Card *targetCard = 0; Server_Card *targetCard = 0;
if (!playerTarget) if (!playerTarget) {
targetCard = targetZone->getCard(cmd->getTargetCardId(), false); targetCard = targetZone->getCard(cmd->getTargetCardId(), false);
if (!startCard || (!targetCard && !playerTarget) || (startCard == targetCard) || (startZone->getType() != PublicZone) || (targetZone->getType() != PublicZone)) if ((startZone->getType() != PublicZone) || (targetZone->getType() != PublicZone))
return RespContextError; return RespContextError;
}
Server_ArrowTarget *targetItem; Server_ArrowTarget *targetItem;
if (playerTarget) if (playerTarget)