~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/Quest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "hero.h"
25
25
#include "playerlist.h"
26
26
#include "stacklist.h"
 
27
#include "history.h"
 
28
 
 
29
std::string Quest::d_tag = "quest";
27
30
using namespace std;
28
31
 
29
32
#define debug(x) {cerr<<__FILE__<<": "<<__LINE__<<": "<<x<<endl<<flush;}
99
102
 
100
103
    return true;
101
104
}
 
105
 
 
106
std::string Quest::getHeroNameForDeadHero()
 
107
{
 
108
  return getHeroNameForDeadHero(d_hero);
 
109
}
 
110
 
 
111
std::string Quest::getHeroNameForDeadHero(Uint32 id)
 
112
{
 
113
  std::list<History *>events;
 
114
  events = Playerlist::getInstance()->getHistoryForHeroId(id);
 
115
  if (events.size() == 0)
 
116
    return "";
 
117
  History *history = events.front();
 
118
  History_HeroEmerges *event = dynamic_cast<History_HeroEmerges*>(history);
 
119
  return event->getHeroName();
 
120
}