YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
PokemonEVSelectRequest.cpp
Go to the documentation of this file.
1
#include "
YAPOG/System/StringHelper.hpp
"
2
#include "
YAPOG/Collection/Array.hpp
"
3
#include "
YAPOG/Database/DatabaseStream.hpp
"
4
5
#include "
Database/Requests/Selects/PokemonEVSelectRequest.hpp
"
6
7
namespace
yse
8
{
9
PokemonEVSelectRequest::PokemonEVSelectRequest
(
yap::DatabaseManager
& dm)
10
:
databaseManager_
(dm)
11
{
12
}
13
14
bool
PokemonEVSelectRequest::Select
(
PokemonEVTable
& pokemonTable)
15
{
16
/*
17
yap::String queryString =
18
"SELECT "
19
"account_id, "
20
"pokemon_static_id, "
21
"pokemon_experience, "
22
"pokemon_gender, "
23
"pokemon_nickname, "
24
"pokemon_level, "
25
"pokemon_shiny, "
26
"pokemon_loyalty, "
27
"pokemon_nature, "
28
"pokemon_trading_number, "
29
"pokemon_trader_account_id, "
30
"pokemon_box_number, "
31
"pokemon_box_index, "
32
"pokemon_catch_date "
33
"FROM pokemon "
34
"WHERE pokemon_id = :pokemonID";
35
36
yap::DatabaseStream select (
37
queryString,
38
databaseManager_.GetConnection ());
39
40
select.Write (pokemonTable.GetID ());
41
42
if (select.EndOfStream ())
43
throw yap::DatabaseException ("This pokemon doesn't exist !");
44
45
pokemonTable.SetAccountID (select.ReadID ());
46
pokemonTable.SetStaticID (select.ReadID ());
47
pokemonTable.SetExperience (select.ReadUInt ());
48
pokemonTable.SetGender (select.ReadUInt ());
49
pokemonTable.SetNickname (select.ReadString ());
50
pokemonTable.SetLevel (select.ReadUInt ());
51
pokemonTable.SetShiny (select.ReadBool ());
52
pokemonTable.SetLoyalty (select.ReadInt ());
53
pokemonTable.SetNature (select.ReadID ());
54
pokemonTable.SetTradingNumber (select.ReadUInt ());
55
pokemonTable.SetTraderAccountID (select.ReadID ());
56
pokemonTable.SetBoxNumber (select.ReadUInt ());
57
pokemonTable.SetBoxIndex (select.ReadID ());
58
pokemonTable.SetCatchDate (select.ReadString ());
59
60
if (!select.EndOfStream ())
61
throw yap::DatabaseException ("Pokemon information loading error !");
62
*/
63
64
return
false
;
65
}
66
67
}
// namespace yse
YAPOG.Server
src
Database
Requests
Selects
PokemonEVSelectRequest.cpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1