forked from github/server
familiar crap.
This commit is contained in:
parent
722e66be41
commit
d8a89d7630
|
@ -2177,19 +2177,14 @@ create_newfamiliar(unit * mage, unit * familiar)
|
|||
attrib *afam = a_find(mage->attribs, &at_familiar);
|
||||
attrib *amage = a_find(familiar->attribs, &at_familiarmage);
|
||||
|
||||
if ((afam==NULL || afam->data.v==NULL) && (amage==NULL || amage->data.v==NULL)) {
|
||||
if (afam==NULL) {
|
||||
afam = a_add(&mage->attribs, a_new(&at_familiar));
|
||||
}
|
||||
afam->data.v = familiar;
|
||||
|
||||
if (amage==NULL) {
|
||||
amage = a_add(&familiar->attribs, a_new(&at_familiarmage));
|
||||
}
|
||||
amage->data.v = mage;
|
||||
} else {
|
||||
assert(afam->data.v == familiar);
|
||||
assert(amage->data.v == mage);
|
||||
if (afam->data.v != familiar || amage->data.v != mage) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Diese Attribute beim Tod des Familiars entfernen: */
|
||||
/* Wenn der Magier stirbt, dann auch der Vertraute */
|
||||
|
|
Loading…
Reference in New Issue