package org.selectbf; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Iterator; import java.util.Vector; import org.jdom.Element; public class HospitalManagementBase { private Vector good_deeds; private Vector pending_heals; private boolean persistent = false; public HospitalManagementBase() { good_deeds = new Vector(); pending_heals = new Vector(); } public void registerBeginHealEvent(HealEvent he) { if(he.isFinished()) { good_deeds.add(he); } else { //first checked if player has any pending heals //seems to be a bug in the Logging system that not all heals are ended int player_id = he.getPlayer_id(); for(Iterator i = pending_heals.iterator();i.hasNext();) { HealEvent localhe = (HealEvent) i.next(); if(localhe.getPlayer_id()==player_id) { //any non correct heals become dropped i.remove(); } } pending_heals.add(he); } } public void registerEndHealEvent(Element e) throws SelectBfException { boolean found = false; for(int i = 0; i