View Issue Details

IDProjectCategoryView StatusLast Update
0000024EresseaGeneralpublic2004-03-30 06:37
ReporterEnno Assigned ToEnno  
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
Summary0000024: Falsche Vertrautenzauber löschen
Description

Die Vertrautenzauber dieser Woche müssen gelöscht werden.

Der Code ist getestet, und es gibt eine Liste der Zauber, die sie wirklich haben sollten. Fehlt noch ein Skript, dass überflüssige Zauber löscht

TagsNo tags attached.
Faction
Game
Report370

Relationships

has duplicate 0000022 closedEnno Vertrauten-Zauber 

Activities

Enno

Enno

2004-03-09 00:08

administrator   ~0000044

Der erste Versuch, das zu reparieren, hat heute Abend nicht geklappt. Da muss ich nochmal mit dem Debugger dran.

Es ist einigermassen lästig, dass die Zauber über ihre integer-id gehandhabt werden, und nicht über echte pointer oder zumindest einen halbwegs lesbaren string.

Enno

Enno

2004-03-09 20:10

administrator   ~0000048

Erledigt, das Datenfile ist angepasst. Skript hat endlich funktioniert:

function fix_unit(unit) local spell for spell in unit.spells do local found = 0 local fsp for fsp in unit.familiarspells do if fsp.name==spell.name then found = 1 break end end if found==0 then unit:remove_spell(spell) end end end

file = "" .. get_turn() if read_game(file)~=0 then print("could not read game") return -1 end

local faction for faction in factions() do local unit for unit in faction.units do local spell for spell in unit.familiarspells do fix_unit(unit) break end end end

file = "" .. get_turn() if write_game(file .. ".fix")~=0 then print("could not write game") return -1 end

Issue History

Date Modified Username Field Change
2004-03-07 23:05 Enno New Issue
2004-03-07 23:06 Enno Assigned To => Enno
2004-03-07 23:06 Enno Priority normal => high
2004-03-07 23:06 Enno Severity feature => block
2004-03-07 23:06 Enno Status new => assigned
2004-03-07 23:07 Enno Runde/Turn => 370
2004-03-08 20:12 Enno Relationship added has duplicate 0000022
2004-03-09 00:08 Enno Note Added: 0000044
2004-03-09 20:10 Enno Status assigned => resolved
2004-03-09 20:10 Enno Resolution open => fixed
2004-03-09 20:10 Enno Note Added: 0000048
2004-03-30 06:37 Enno Status resolved => closed