code stringlengths 3 1.01M | repo_name stringlengths 5 116 | path stringlengths 3 311 | language stringclasses 30 values | license stringclasses 15 values | size int64 3 1.01M |
|---|---|---|---|---|---|
; MD5.asm
; -- Primary functions for hashing data in RAM and storing in the CRYPT process' memory.
; -- Command in SHELL_MODE will have two modes: one to retrieve the most recently-computed hash,
; ---- and another to compute an MD5 from a starting loc in memory for a specific length.
; Important to note is that the algorithm's granularity is a per-byte hashing,
; -- meaning it is impossible to hash exactly 315 bits with this algorithm.
; -- It would instead round to the next whole byte (8-bit boundary).
; Include the MD5 internal functions file.
%include "libraries/crypto/md5/MD5_GUTS.asm"
; 1 KiB into the base ptr of the Crypto Platform process is the MD5 RAM section
CRYPTO_MD5_BUFFER_BASE_OFFSET equ 0x00000400
; This section is 2096 bytes long. Subject to change, because I don't know how RAM-intense the MD5 algo will be,
; ... but a large buffer is needed for potentially-large data.
CRYPTO_MD5_BUFFER_MEMCPY_ZONE_SIZE equ 0x00000800
CRYPTO_MD5_BUFFER_LENGTH equ (CRYPTO_MD5_BUFFER_MEMCPY_ZONE_SIZE + 0x30) ;+48 for the result stuff at the beginning
; Initialize the MD5 memory pointers.
CRYPTO_MD5_INIT:
push edi
mov edi, dword [CRYPTO_BUFFER_BASE_POINTER] ; EDI = base of Crypto Plat process.
add edi, CRYPTO_MD5_BUFFER_BASE_OFFSET ; + Offset to start of MD5-reserved memory.
push edi
add edi, MD5_RESULT_OFFSET ; Go to the ptr where the hex output is stored.
mov dword [MD5_RESULT_POINTER], edi ; Store the base result pointer.
pop edi ; EDI = MD5 base
push edi
add edi, MD5_RESULT_STRING_OFFSET ; Go to the ptr where the ASCII output is stored.
mov dword [MD5_RESULT_ASCII_POINTER], edi ; Store the base ASCII result pointer.
pop edi ; EDI = MD5 base
push edi
add edi, MD5_MEMCPY_ZONE_OFFSET ; Go to the ptr where the parsed data is copied.
mov dword [MD5_MEMCPY_ZONE_POINTER], edi ; Store the base of the MEMCPY zone.
pop edi ; EDI = MD5 base
;mov [edi], dword 0x78563412 ;TEST CODE (works)
.leaveCall:
pop edi
ret
; INPUTS:
; ARG1 = Buffer Base
; ARG2 = Buffer Length
; OUTPUTS: none, CF on error.
; -- The core MD5 function wrapper that will take an input and process the unique hash digest string into RAM.
; ---- There will be a separate function to output the results in both ASCII and pure Hexadecimal.
; DEFINITIONS:
; 'PASS': One complete hashing (4-round sequence) over a 16-byte segment of the input. There are 4 passes at minimum.
; 'ROUND': One subsection of the computation algorithm that involves one of the interal F-I functions.
; 'BLOCK': A 64-byte segment of the input buffer. There is always at least ONE of these, due to the 512-bit nature of the MD5 algorithm.
; 'INPUT BUFFER': The data to be hashed, both referenced and computed at a BYTE granularity.
MD5_COMPUTE_HASH:
FunctionSetup
pushad
ZERO eax,ebx,ecx,edx
mov edi, dword [MD5_RESULT_POINTER] ; EDI = base ptr to 16-byte result storage.
mov esi, dword [ebp+8] ; ESI = Base of buffer
mov ecx, dword [ebp+12] ; ECX = Length --> NEEDS HARD LIMIT BASED ON AVAILABLE RAM AND PASS COUNTER (16,320 is looking likely)
; Copy the content to the internal buffer to be padded out.
push edi
mov edi, dword [MD5_MEMCPY_ZONE_POINTER]
MEMCPY esi,edi,ecx
pop edi
call MD5_INTERNAL_GET_PASS_COUNT ; EAX = # passes // BX = lengthof(last 64-byte block of data) mod 64
func(MD5_INTERNAL_PAD_DATA,ecx) ; Using that information, pad the input buffer to the necessary length.
; AL is still pass count. Begin computation.
and eax, 0x000000FF ; all other data in EAX is unimportant.
ZERO ecx ; prepare counter variable.
;shl al, 2 ; multiply pass count by 4, since the 64-byte chunks are computed 16 bytes at a time.
mov cl, al ; Set the counter with the new pass value.
push ecx ; --save counter
push edi ; initial push of edi
mov esi, dword [MD5_MEMCPY_ZONE_POINTER] ; ESI = starting base of mem to hash.
; setup the initial four A,B,C,D values, respectively.
; ! This may be invalid due to endianness, if the algo doesn't work and all else is solid, modify this.
mov eax, dword 0x67452301
mov ebx, dword 0xefcdab89
mov ecx, dword 0x98badcfe
mov edx, dword 0x10325476
jmp .pass_skipInitialPush
.pass:
push ecx ; save counter...
push edi ; save base ptr position in case it changes inside the pass function.
mov eax, dword [edi] ; EAX = 1st DWORD
mov ebx, dword [edi+4] ; EBX = 2nd
mov ecx, dword [edi+8] ; ECX = 3rd
mov edx, dword [edi+12] ; EDX = 4th
.pass_skipInitialPush:
call MD5_INTERNAL_PASS
; Store the results of the complex computations.
pop edi ; restore in case of change
mov dword [edi], eax
mov dword [edi+4], ebx
mov dword [edi+8], ecx
mov dword [edi+12], edx
add esi, 64;16; next segment of the block
; restore the counter, and loop
pop ecx
loop .pass
; Should be finished. Need to also convert the string to ASCII.
.leaveCall:
;call MD5_INTERNAL_CLEAN_VARIABLES ; Clean up the guts.
popad
FunctionLeave
| ZacharyPuhl/OrchidOS_x86 | src/libraries/crypto/md5/MD5.asm | Assembly | gpl-3.0 | 4,905 |
package ms.test.model;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class PersonRest {
private List<Person> persons;
public List<Person> getPersons() {
return persons;
}
public void setPersons(List<Person> persons) {
this.persons = persons;
}
}
| mssalvo/msAction | msActionExample/src/ms/test/model/PersonRest.java | Java | gpl-3.0 | 335 |
Parkings = new Meteor.Collection("parkings");
| chompomonim/parkings-meteor | lib/model.js | JavaScript | gpl-3.0 | 46 |
'use strict';
const BaseController = require('../controllers/base');
const UploadModel = require('../models/file-upload');
const config = require('../../../config');
const uuid = require('uuid');
const path = require('path');
module.exports = class UploadController extends BaseController {
get(req, res, next) {
const docs = req.sessionModel.get('existing-authority-documents') || [];
if (docs.length) {
this.emit('complete', req, res);
}
super.get(req, res, next);
}
process(req, res, next) {
const file = req.files['existing-authority-upload'];
if (file && file.truncated) {
const err = new this.ValidationError('existing-authority-upload', {
type: 'filesize',
arguments: [config.upload.maxfilesize]
}, req, res);
return next({
'existing-authority-upload': err
});
}
if (file && file.data && file.data.length) {
req.form.values['existing-authority-filename'] = file.name;
const model = new UploadModel(file);
return model.save()
.then(result => {
req.form.values['existing-authority-upload'] = result.url;
req.form.values['existing-authority-type'] = file.mimetype;
})
.then(() => next())
.catch(e => {
if (e.code === 'FileExtensionNotAllowed') {
const err = new this.ValidationError('existing-authority-upload', {
type: 'filetype',
arguments: [path.extname(file.name)]
}, req, res);
return next({
'existing-authority-upload': err
});
}
return next(e);
});
}
return next();
}
saveValues(req, res, next) {
const files = req.sessionModel.get('existing-authority-documents') || [];
files.push({
id: uuid.v1(),
url: req.form.values['existing-authority-upload'],
description:
req.form.values['existing-authority-description'] || req.form.values['existing-authority-filename'],
type: req.form.values['existing-authority-type']
});
req.sessionModel.set('existing-authority-documents', files);
const existingAuthorityAttrs = [
'existing-authority-add-another',
'existing-authority-description',
'existing-authority-filename',
'existing-authority-upload',
'existing-authority-type'
];
super.saveValues(req, res, err => {
req.sessionModel.unset(existingAuthorityAttrs);
next(err);
});
}
};
| UKHomeOffice/firearms | apps/common/controllers/existing-authority-documents.js | JavaScript | gpl-3.0 | 2,499 |
# Machinery — A Systems Management Toolkit for Linux
# Synopsis
`machinery` SUBCOMMAND \[options\] <br>
`machinery` help [SUBCOMMAND]
# Conceptual Overview
Machinery's core concept is the complete representation of a system by a
universal system description.
System descriptions are managed independently of the described
systems which allows for system state conservation and offline preparation of
modifications.
Machinery's subcommands work on the system description as the connecting
element.
System descriptions are obtained by inspecting systems, importing from other
formats, manual creation or merging existing descriptions.
Machinery can store and modify system descriptions to allow changes to
described state of the system.
System descriptions can be compared to find similarities and differences
between them or analyzed to deepen the knowledge about particular aspects of
the system.
System descriptions may be exported to other formats and can be used to
migrate or replicate systems.
Subcommands can be combined in different ways to accommodate higher-level work
flows and use cases.
These are some implemented and planned use cases:
Migrate a physical system to a virtual environment:
- Inspect a system to obtain a system description
- Export the system description to a Kiwi configuration
- Build a cloud image from the configuration
- Deploy the image to the cloud
Migrate a system while changing the configuration:
- Inspect a system to obtain a system description
- Modify the system description
- Build image for deployment
Using Machinery as an extension from other formats:
- Import AutoYaST profile as system description
- Build image for deployment
Machinery provides an extensible set of tools which can be combined to create
higher-level work flows.
It is designed for environments which focus on automation, integration
of diverse tools and accountable management.
Machinery integrates with existing configuration management solutions to
address use cases currently not covered by them.
## The machinery Command
Machinery is implemented as a command line tool named `machinery`. The
`machinery` command has several subcommands for specific tasks. All
subcommands work with the same system description identified by an optional
name which can be used by all subcommands.
## System Description
The System Description format and file structure is documented in the machinery
wiki: [System Description Format](https://github.com/SUSE/machinery/wiki/System-Description-Format).
Machinery validates descriptions on load. It checks that the JSON structure of
the manifest file, which contains the primary and meta data of a description, is
correct and it adheres to the schema. Validation errors are reported as warnings.
It also checks that the information about extracted files is consistent. Missing
files or extra files without reference in the manifest are treated also as
warnings. All other issues are errors which need to be fixed so that Machinery
can use the description.
To manually validate a description use the `machinery validate` command.
## Scopes
The system description is structured into "scopes". A scope covers a specific
part of the configuration of the inspected system such as installed packages,
repositories, or changed configuration files.
For example, if you are only interested in the installed packages, limit the
scope to `packages`. This will output only the requested information.
See the [Scopes documentation](machinery_main_scopes.1/) for a list of all supported scopes.
# Options for All Subcommands
<!--- These are 'global' options of machinery -->
* `--version`:
Displays version of `machinery` tool. Exit when done.
* `--debug`:
Enable debug mode. Machinery writes additional information into the log
file which can be useful to track down problems.
# Files and Devices
* `~/.machinery/machinery.config`:
Configuration file.
* `~/.machinery/machinery.log`:
Central log file, in the format date, time, process id, and log message.
* `em1 (openSUSE 13.2 / openSUSE leap)`, `eth0` (SLE11) and `lan0` (SLE12):
First network device is used when DHCP in built image is enabled.
# Environment
* `MACHINERY_LOG_FILE`:
Location of Machinery's log file (defaults to `~/.machinery/machinery.log`).
# Copyright
Copyright \(c) 2013-2016 [SUSE LLC](http://www.suse.com)
| bear454/machinery | manual/docs/machinery_main_general.1.md | Markdown | gpl-3.0 | 4,416 |
using System;
namespace PeterPiper.Hl7.V2.Support.Content.Convert
{
public interface IBase64
{
byte[] Decode();
void Encode(byte[] item);
}
}
| angusmillar/PeterPiper | PeterPiper/Hl7/V2/Support/Content/Convert/IBase64.cs | C# | gpl-3.0 | 159 |
# coding=utf-8
# Title:大幂次运算
# 给你两个正整数a(0 < a < 100000)和n(0 <= n <=100000000000),计算(a^n) % 20132013并输出结果
import math
# Test
a,n =10000,10000000
# Answer
ret = 1 #余数
def PowerMod(a, n, ret):
if n == 0:
return ret
if n % 2: # n为奇数
ret = ret * a % 20132013
return PowerMod(a*a%20132013, n/2, ret) #n为偶数。a^n %m = (a^2^n/2)%m = ((a^2%m)^n/2)%m
print PowerMod(a, n, ret) | RYLF/pythontip | 33.py | Python | gpl-3.0 | 479 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MediaCloud\Vendor\Symfony\Component\HttpFoundation\Session\Storage;
use MediaCloud\Vendor\Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy;
/**
* Allows session to be started by PHP and managed by Symfony.
*
* @author Drak <drak@zikula.org>
*/
class PhpBridgeSessionStorage extends NativeSessionStorage
{
/**
* @param AbstractProxy|\SessionHandlerInterface|null $handler
*/
public function __construct($handler = null, MetadataBag $metaBag = null)
{
if (!\extension_loaded('session')) {
throw new \LogicException('PHP extension "session" is required.');
}
$this->setMetadataBag($metaBag);
$this->setSaveHandler($handler);
}
/**
* {@inheritdoc}
*/
public function start()
{
if ($this->started) {
return true;
}
$this->loadSession();
return true;
}
/**
* {@inheritdoc}
*/
public function clear()
{
// clear out the bags and nothing else that may be set
// since the purpose of this driver is to share a handler
foreach ($this->bags as $bag) {
$bag->clear();
}
// reconnect the bags to the session
$this->loadSession();
}
}
| Interfacelab/ilab-media-tools | lib/mcloud-symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php | PHP | gpl-3.0 | 1,526 |
/*
* #%L
* API Interface Project
* %%
* Copyright (C) 2011 MACHIZAUD Andréa
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
package org.eisti.labs.game;
import org.junit.Test;
import java.util.Arrays;
import static org.eisti.labs.game.Ply.Coordinate.columnIndex2Label;
import static org.eisti.labs.game.Ply.Coordinate.columnLabel2index;
import static org.junit.Assert.assertArrayEquals;
/**
* @author MACHIZAUD Andréa
* @version 7/12/11
*/
public class PlyTest {
private static final int WIDTH = 40;
@Test
public void testColumnTranslation() throws Exception {
int[] columnIndex = new int[WIDTH];
for (int i = WIDTH; i-- > 0; )
columnIndex[i] = i;
String[] columnLabels = new String[WIDTH];
for (int i = WIDTH; i-- > 0; )
columnLabels[i] = columnIndex2Label(i);
int[] reverseColumnIndexes = new int[WIDTH];
for (int i = WIDTH; i-- > 0; )
reverseColumnIndexes[i] = columnLabel2index(columnLabels[i]);
System.out.println("Previsualise column indexes : " + Arrays.toString(columnIndex));
System.out.println("Previsualise column labels : " + Arrays.toString(columnLabels));
System.out.println("Previsualise reverse column indexes : " + Arrays.toString(reverseColumnIndexes));
assertArrayEquals("Translation failed",
columnIndex,
reverseColumnIndexes);
}
}
| theblackunknown/ia-framework | api/src/test/java/org/eisti/labs/game/PlyTest.java | Java | gpl-3.0 | 2,073 |
/*
* This file is protected by Copyright. Please refer to the COPYRIGHT file
* distributed with this source distribution.
*
* This file is part of GNUHAWK.
*
* GNUHAWK is free software: you can redistribute it and/or modify is under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* GNUHAWK is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see http://www.gnu.org/licenses/.
*/
#include "or_ii_4i.h"
//
// This file contains the bindings to the hosted block
//
//
// For GNU Radio blocks with getter and setter methods, the associated property can be bound
// directly to the block's getter and/or setter.
//
// void component_class_i::createBlock()
// {
// ...
// this->registerGetter("property_x", &gnuradio_class::getter_for_x);
// this->registerSetter("property_y", &gnuradio_class::setter_for_y);
// this->registerGetterSetter("property_z", &gnuradio_class::getter_for_z,
// &gnuradio_class::setter_for_z);
// ...
// }
//
// To bind to a setter via the REDHAWK component class
//
// void component_class_i::setterForPropertyX()
// {
// if ( validGRBlock() ) {
// gr_sptr->set_property_x(this->property_x);
// }
// }
//
// void component_class_i::createBlock()
// {
// ...
// this->setPropertyChangeListener("property_x", this, &component_class_i::setterForPropertyX);
// ...
// }
//
// To bind to a getter via the REDHAWK component class
//
// double component_class_i::getterForPropertyX()
// {
// if ( validGRBlock() ) {
// return this->gr_sptr->get_property_x();
// }
// return 0.0;
// }
// void component_class_i::createBlock()
// {
// ...
// this->registerGetValue("property_x", this, &component_class_i::getterForPropertyX);
// ...
// }
or_ii_4i_i::or_ii_4i_i(const char *uuid, const char *label) :
or_ii_4i_base(uuid, label)
{
}
or_ii_4i_i::~or_ii_4i_i()
{
}
// createBlock
//
// Create the actual GNU Radio Block to that will perform the work method. The resulting
// block object is assigned to gr_stpr
//
// Add property change callbacks for getter/setter methods
//
void or_ii_4i_i::createBlock()
{
//
// gr_sptr = xxx_make_xxx( args );
//
try {
gr_sptr = gr_make_or_ii();
} catch (...) {
return;
}
//
// Use setThrottle method to enable the throttling of consumption/production of data by the
// service function. The affect of the throttle will try to pause the execution of the
// service function for a specified duration. This duration is calculated using the getTargetDuration() method
// and the actual processing time to perform the work method.
//
// This is turned ON by default for "output" only components
//
// setThrottle( bool onoff );
//
// Use maintainTimeStamp to enable proper data flow of timestamp with input and output data.
// if turned on (true)
// The timestamp from the input source will be used and maintained based on the output rate and
// the number of samples produced
// if turned off
// then the timestamp from the input source is passed through if available or the time of day
//
// maintainTimestamp( bool onoff );
setupIOMappings();
}
//
// createOutputSRI
//
// For each output mapping defined, a call to createOutputSRI will be issued with the associated output index.
// This default SRI and StreamID will be saved to the mapping and pushed down stream via pushSRI.
//
// @param oidx : output stream index number to associate the returned SRI object with
// @param in_idx : input stream index number to associate the returned SRI object with
// @return sri : default SRI object passed down stream over a RedHawk port
//
BULKIO::StreamSRI or_ii_4i_i::createOutputSRI( int32_t oidx, int32_t &in_idx)
{
//
// oidx is the stream number that you are returning an SRI context for
//
in_idx = 0;
BULKIO::StreamSRI sri = BULKIO::StreamSRI();
sri.hversion = 1;
sri.xstart = 0.0;
sri.xdelta = 1;
sri.xunits = BULKIO::UNITS_TIME;
sri.subsize = 0;
sri.ystart = 0.0;
sri.ydelta = 0.0;
sri.yunits = BULKIO::UNITS_NONE;
sri.mode = 0;
std::ostringstream t;
t << naming_service_name.c_str() << "_" << oidx;
std::string sid = t.str();
sri.streamID = CORBA::string_dup(sid.c_str());
return sri;
}
| RedhawkSDR/integration-gnuhawk | components/or_ii_4i/cpp/or_ii_4i.cpp | C++ | gpl-3.0 | 4,915 |
/*
* Copyright (C) 2014 Sheng Cao <sca6096@gmail.com>. All rights reserved.
*
* The file is part of English-Semantics-Extraction.
*
* English-Semantics-Extraction is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Please contact sca6096@gmail.com if you need additional information
* or have any questions.
*/
package net.cs6096.semanticmapping.deprecated;
import net.cs6096.semanticmapping.util.IOUtil;
import net.cs6096.semanticmapping.util.JavaCodeUtil;
import net.cs6096.semanticmapping.util.StringUtil;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringBufferInputStream;
import java.util.ArrayList;
import java.util.HashSet;
public class AutomaticGrammarGeneration {
private static ArrayList<String> rawRules = null;
private static ArrayList<String>[] rawRulesAdjacencyList = null;
public static void readInput() throws Exception {
String rawString = IOUtil.readFile("newRules.txt");
rawString = JavaCodeUtil.deleteComment(rawString);
BufferedReader br1 = new BufferedReader(new InputStreamReader(new StringBufferInputStream(rawString)));
rawRules = new ArrayList();
for (;;){
String nextLine = br1.readLine();
if (nextLine == null) break;
rawRules.add(nextLine);
}
rawRulesAdjacencyList = new ArrayList[rawRules.size()];
for (int i = 0; i < rawRules.size(); i++) {
ArrayList<String> currentTokenizedRule = StringUtil.tokenize(rawRules.get(i));
rawRulesAdjacencyList[i] = currentTokenizedRule;
}
}
public static void main(String[] args) throws Exception {
readInput();
// generateEnumFile();
// generateGrammarSetFile();
// generateExperimentalGrammarSetFile();
System.out.println("DONE");
}
public static void generateExperimentalGrammarSetFile() throws Exception {
StringBuilder ruleFileText = new StringBuilder();
String ruleHeader = "package net.shengcao.semanticmapping.grammarset;\n" + "import java.util.ArrayList;\n"
+ "public class EnglishContextFreeGrammarSet {\n" + "\tpublic static ArrayList<RewriteRule> applyingRules=new ArrayList<>();\n" + "\tstatic {\n";
ruleFileText.append(ruleHeader);
int foundRuleCount = 0;
for (int idx = 0;idx < rawRulesAdjacencyList.length; idx++){
ArrayList<String> e = rawRulesAdjacencyList[idx];
if (e.size() <= 1)
continue;
ruleFileText.append("{\n");
ruleFileText.append(" RewriteRule currentRule = " + "new RewriteRule(");
for (int i = 0; i < e.size(); i++) {
if (i != 0)
ruleFileText.append(", ");
ruleFileText.append("EnglishTypeEnum." + e.get(i));
}
ruleFileText.append(");\n");
ruleFileText.append(" currentRule.applyingConceptDimensionModifier = new ConceptDimensionModifier(\n");
int addedCommand = 0;
for (;;){
if (idx >= rawRulesAdjacencyList.length) break;
ArrayList<String> nextRule = rawRulesAdjacencyList[idx];
if (nextRule.size() <= 1) idx++;
if (!nextRule.get(0).contains("$")) break;
if (addedCommand > 0) ruleFileText.append(", ");
StringBuilder newCommandString = new StringBuilder();
newCommandString.append(", new Command(");
for (int j = 0; j < nextRule.size(); j++){
if (j != 0){
newCommandString.append(", ");
}
newCommandString.append("\""+nextRule.get(j)+"\"");
}
newCommandString.append(")");
ruleFileText.append(newCommandString);
ruleFileText.append("\n");
addedCommand++;
idx++;
}
ruleFileText.append(" );\n");
ruleFileText.append(" applyingRules.add(currentRule);\n");
ruleFileText.append("}\n");
foundRuleCount++;
}
System.out.println("found " + foundRuleCount + " grammar rules");
String ruleTail = "\n"
+ "\t}\n"
+ "}\n"
+ "\n"
+ "\n";
ruleFileText.append(ruleTail);
// IOUtil.writeFile("./generated/EnglishContextFreeGrammarSet.java",
// ruleFileText.toString());
IOUtil.writeFile("./experiment/EnglishContextFreeGrammarSet.java", ruleFileText.toString());
}
public static void generateEnumFile() throws Exception {
HashSet<String> typeSet = new HashSet<>();
for (ArrayList<String> e: rawRulesAdjacencyList){
if (e.size() > 0){
if (!e.get(0).contains("$")){
typeSet.addAll(e);
}
}
}
StringBuilder enumFileText = new StringBuilder();
enumFileText.append("// generated enum\n");
enumFileText.append("package net.shengcao.semanticmapping.grammarset;\n");
enumFileText.append("public enum EnglishTypeEnum {");
{
int used = 0;
for (String e : typeSet) {
if (used != 0) {
enumFileText.append(", ");
}
enumFileText.append(e);
used++;
// System.out.println(e);
}
System.out.println("found " + used + " types of part of speech");
}
enumFileText.append("}");
IOUtil.writeFile("./src/net/shengcao/semanticmapping/grammarset/EnglishTypeEnum.java", enumFileText.toString());
}
public static void generateGrammarSetFile() throws Exception {
StringBuilder ruleFileText = new StringBuilder();
String ruleHeader = "package net.shengcao.semanticmapping.grammarset;\n" + "import java.util.ArrayList;\n"
+ "public class EnglishContextFreeGrammarSet {\n" + "\tpublic static ArrayList<RewriteRule> applyingRules=new ArrayList<>();\n" + "\tstatic {\n";
ruleFileText.append(ruleHeader);
int foundRuleCount = 0;
for (ArrayList<String> e : rawRulesAdjacencyList) {
if (e.size() <= 1)
continue;
if (e.get(0).contains("$")) continue;
ruleFileText.append("{\n");
ruleFileText.append(" RewriteRule currentRule = " + "new RewriteRule(");
for (int i = 0; i < e.size(); i++) {
if (i != 0)
ruleFileText.append(", ");
ruleFileText.append("EnglishTypeEnum." + e.get(i));
}
ruleFileText.append(");\n");
ruleFileText.append(" applyingRules.add(currentRule);\n");
ruleFileText.append("}\n");
foundRuleCount++;
}
System.out.println("found " + foundRuleCount + " grammar rules");
String ruleTail = "\n"
+ "\t}\n"
+ "}\n"
+ "\n"
+ "\n";
ruleFileText.append(ruleTail);
// IOUtil.writeFile("./generated/EnglishContextFreeGrammarSet.java",
// ruleFileText.toString());
IOUtil.writeFile("./src/net/shengcao/semanticmapping/grammarset/EnglishContextFreeGrammarSet.java", ruleFileText.toString());
}
}
| cs6096/java-english-semantics-extraction | src/net/cs6096/semanticmapping/deprecated/AutomaticGrammarGeneration.java | Java | gpl-3.0 | 6,905 |
/*
LUFA Library
Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
*/
/** \file
*
* Header file for Descriptors.c.
*/
#ifndef _DESCRIPTORS_H_
#define _DESCRIPTORS_H_
/* Includes: */
#include <avr/pgmspace.h>
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
/** Endpoint number of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPNUM 2
/** Endpoint number of the CDC device-to-host data IN endpoint. */
#define CDC_TX_EPNUM 3
/** Endpoint number of the CDC host-to-device data OUT endpoint. */
#define CDC_RX_EPNUM 4
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
/** Endpoint number of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPNUM 1
/** Size in bytes of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPSIZE 8
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
* vary between devices, and which describe the device's usage to the host.
*/
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
// CDC Control Interface
USB_Descriptor_Interface_Association_t CDC_IAD;
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
USB_Descriptor_Endpoint_t CDC_DataInEndpoint;
// Mouse HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MouseHID;
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
} USB_Descriptor_Configuration_t;
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
const void** const DescriptorAddress)
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif
| Codingboy/ucuni | extlib/LUFA-120219/Demos/Device/ClassDriver/VirtualSerialMouse/Descriptors.h | C | gpl-3.0 | 3,843 |
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace PlexLander.Migrations
{
public partial class InitialCreate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Apps",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Icon = table.Column<string>(nullable: true),
Name = table.Column<string>(nullable: true),
Url = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Apps", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PlexSessions",
columns: table => new
{
Email = table.Column<string>(nullable: false),
Token = table.Column<string>(nullable: false),
SessionStart = table.Column<DateTime>(nullable: false),
Thumbnail = table.Column<string>(nullable: true),
Username = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexSessions", x => new { x.Email, x.Token });
});
migrationBuilder.CreateTable(
name: "PlexServer",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Endpoint = table.Column<string>(nullable: true),
Hostname = table.Column<string>(nullable: true),
PlexAuthenticationEmail = table.Column<string>(nullable: true),
PlexAuthenticationToken = table.Column<string>(nullable: true),
Port = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PlexServer", x => x.Id);
table.ForeignKey(
name: "FK_PlexServer_PlexSessions_PlexAuthenticationEmail_PlexAuthenticationToken",
columns: x => new { x.PlexAuthenticationEmail, x.PlexAuthenticationToken },
principalTable: "PlexSessions",
principalColumns: new[] { "Email", "Token" },
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_PlexServer_PlexAuthenticationEmail_PlexAuthenticationToken",
table: "PlexServer",
columns: new[] { "PlexAuthenticationEmail", "PlexAuthenticationToken" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Apps");
migrationBuilder.DropTable(
name: "PlexServer");
migrationBuilder.DropTable(
name: "PlexSessions");
}
}
}
| bloodsplatter/PlexLander | PlexLander/Migrations/20180131203242_InitialCreate.cs | C# | gpl-3.0 | 3,523 |
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\author Wojtek Slominski, Jagiellonian Univ., Physics Dept.
\date 2005--2012
\copyright Creative Commons license CC-BY-NC 3.0
_____________________________________________________________*/
#include <cstdlib>
#include <cmath>
#include <cstring>
/*
#include <stdio.h>
#include <float.h>
#include <iostream.h>
*/
using namespace std;
#include "emsg.h"
#include "tblipol.h"
#include "MDipol.h"
//*************************************************************************
static void MDlocate(real_type *x, real_type *xx[], int *npt, int dim, int *ix) {
int dd;
for(dd=0; dd < dim; dd++) {
require(npt[dd] > 1, "MDlocate: too little points to interpolate.");
ix[dd] = FindIndexR(xx[dd], npt[dd], x[dd]);
require(ix[dd] >= 0 && ix[dd] < (npt[dd]-1),
"MDlocate: x[%d] = %g out of range.", dd, x[dd]);
}
}
//*************************************************************************
static int Index(const int *ind, int *npt, int dim){
if(dim==1) return ind[0];
return ind[dim-1] + npt[dim-1]*Index(ind, npt, dim-1);
}
#ifdef TEST
cout << exp(x[0]) << ", " << exp(x[1]) << endl;
//cout << npt[0] << ", " << npt[1] << endl;
cout << ix[0] << ", " << ix[1] << endl;
cout << exp(xx[1][ix[1]]) << ", " << exp(xx[1][ix[1]+1]) << endl;
cout << "y0 = " << y0 << "\n----------------" << endl;
//cin.ignore(100,'\n');
#endif
//*************************************************************************
static real_type Psi(int n, int dim, int *npt, const int *ix, real_type lam[], real_type yy[]){
if(n==0) return yy[Index(ix,npt,dim)];
//int *k0 = new int[dim];
int *ix1 = new int[dim];
//memcpy(k0,k,dim*sizeof(int));
memcpy(ix1,ix,dim*sizeof(int));
//k0[n] = 0;
ix1[n-1]++;
real_type v =
lam[n-1]*Psi(n-1,dim,npt,ix1,lam,yy) + (1-lam[n-1])*Psi(n-1,dim,npt,ix,lam,yy);
delete[] ix1;
return v;
}
//*************************************************************************
real_type LinIpol(real_type *x, real_type *xx[], real_type yy[],
int *npt, int dim/* =1*/) {
//--- linear interpolation in arbitrary # of dimensions
// yy[n1][n2]...[n_dim]
// i[dim] + n[dim]*(i[dim-1] + n[dim-1]*i[dim-2] + ...)
real_type val;
int *ix = new int[dim];
MDlocate(x, xx, npt, dim, ix);
//--- x --> lambda
real_type* lam = new real_type[dim];
for(int n=0; n < dim; n++)
lam[n] = (x[n]-xx[n][ix[n]])/(xx[n][ix[n]+1]-xx[n][ix[n]]);
val = Psi(dim,dim,npt,ix,lam,yy);
delete[] ix;
delete[] lam;
return val;
}
| veprbl/herafitter | DiffDIS/src/MDipol.cc | C++ | gpl-3.0 | 2,543 |
using System;
using System.Drawing;
using CNCMaps.Engine.Drawables;
using CNCMaps.Engine.Game;
using CNCMaps.Engine.Rendering;
using CNCMaps.FileFormats;
using CNCMaps.FileFormats.Map;
using CNCMaps.Shared;
using NLog;
namespace CNCMaps.Engine.Map {
public interface OwnableObject {
string Owner { get; set; }
short Health { get; set; }
short Direction { get; set; }
bool OnBridge { get; set; }
}
public class GameObject {
public GameObject() {
Id = IdCounter++;
}
public virtual MapTile Tile { get; set; }
public virtual MapTile BottomTile {
get { return Tile; }
set { throw new InvalidOperationException("Override this property if you want to use it"); }
}
public virtual MapTile TopTile {
get { return Tile; }
set { throw new InvalidOperationException("Override this property if you want to use it"); }
}
public GameCollection Collection { get; set; }
public Drawable Drawable {
get {
if (_drawable == null) _drawable = Collection?.GetDrawable(this);
return _drawable;
}
set { _drawable = value; }
}
public Palette Palette { get; set; }
public override string ToString() {
if (this is NamedObject) return (this as NamedObject).Name;
else if (this is NumberedObject) return (this as NumberedObject).Number.ToString();
return GetType().ToString();
}
public LightingType Lighting {
get { return Drawable != null ? Drawable.Props.LightingType : LightingType.Full; }
}
public int Id { get; set; }
private static int IdCounter = 0;
public int DrawOrderIndex = -1;
public bool RequiresBoundsInvalidation = true;
public bool RequiresFrameInvalidation = true;
private Rectangle cachedBounds = Rectangle.Empty;
private Drawable _drawable;
public Rectangle GetBounds() {
if (RequiresBoundsInvalidation && Drawable != null) {
cachedBounds = Drawable.GetBounds(this);
RequiresBoundsInvalidation = false;
}
return cachedBounds;
}
}
public class NumberedObject : GameObject {
public virtual int Number { get; protected set; }
}
public class NamedObject : GameObject {
public string Name { get; protected set; }
}
public class AircraftObject : NamedObject, OwnableObject {
public AircraftObject(string owner, string name, short health, short direction, bool onBridge) {
Owner = owner;
Name = name;
Health = health;
Direction = direction;
OnBridge = onBridge;
}
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
public short Health { get; set; }
public short Direction { get; set; }
public bool OnBridge { get; set; }
public string Owner { get; set; }
}
public class InfantryObject : NamedObject, OwnableObject {
public InfantryObject(string owner, string name, short health, short direction, bool onBridge) {
Owner = owner;
Name = name;
Health = health;
Direction = direction;
OnBridge = onBridge;
}
public short Health { get; set; }
public short Direction { get; set; }
public bool OnBridge { get; set; }
public string Owner { get; set; }
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
}
public class LightSource : StructureObject {
public double LightVisibility { get; set; }
public double LightIntensity { get; set; }
public double LightRedTint { get; set; }
public double LightGreenTint { get; set; }
public double LightBlueTint { get; set; }
// not yet used
Lighting scenario;
static Logger logger = LogManager.GetCurrentClassLogger();
public LightSource() : base("nobody", "", 0, 0) { }
public LightSource(IniFile.IniSection lamp, Lighting scenario)
: base("nobody", lamp.Name, 0, 0) {
Initialize(lamp, scenario);
}
void Initialize(IniFile.IniSection lamp, Lighting scenario) {
logger.Trace("Loading LightSource {0} at ({1},{2})", lamp.Name, Tile);
// Read and assume default values
LightVisibility = lamp.ReadDouble("LightVisibility", 5000.0);
LightIntensity = lamp.ReadDouble("LightIntensity", 0.0);
LightRedTint = lamp.ReadDouble("LightRedTint", 1.0);
LightGreenTint = lamp.ReadDouble("LightGreenTint", 1.0);
LightBlueTint = lamp.ReadDouble("LightBlueTint", 1.0);
this.scenario = scenario;
}
/// <summary>
/// Applies a lamp to this object's palette if it's in range
/// </summary>
/// <param name="lamp">The lamp to apply</param>
/// <returns>Whether the palette was replaced, meaning it needs to be recalculated</returns>
public bool ApplyLamp(GameObject obj, bool ambientOnly = false) {
var lamp = this;
const double TOLERANCE = 0.001;
if (Math.Abs(lamp.LightIntensity) < TOLERANCE)
return false;
var drawLocation = obj.Tile;
double sqX = (lamp.Tile.Rx - drawLocation.Rx) * (lamp.Tile.Rx - drawLocation.Rx);
double sqY = (lamp.Tile.Ry - (drawLocation.Ry)) * (lamp.Tile.Ry - (drawLocation.Ry));
double distance = Math.Sqrt(sqX + sqY);
// checks whether we're in range
if ((0 < lamp.LightVisibility) && (distance < lamp.LightVisibility / 256)) {
double lsEffect = (lamp.LightVisibility - 256 * distance) / lamp.LightVisibility;
// we don't want to apply lamps to shared palettes, so clone first
if (obj.Palette.IsShared)
obj.Palette = obj.Palette.Clone();
obj.Palette.ApplyLamp(lamp, lsEffect, ambientOnly);
return true;
}
else
return false;
}
}
public class OverlayObject : NumberedObject {
public byte OverlayID {
get { return (byte)Number; }
set { Number = value; }
}
public byte OverlayValue { get; set; }
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
public OverlayObject(byte overlayID, byte overlayValue) {
OverlayID = overlayID;
OverlayValue = overlayValue;
}
public bool IsGeneratedVeins = false;
public override string ToString() {
return string.Format("{0} ({1})", Drawable != null ? Drawable.Name : OverlayID.ToString(), OverlayValue);
}
}
public class SmudgeObject : NamedObject {
public SmudgeObject(string name) {
Name = name;
}
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
}
public class StructureObject : NamedObject, OwnableObject {
public StructureObject(string owner, string name, short health, short direction) {
Owner = owner;
Name = name;
Health = health;
Direction = direction;
}
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
public short Health { get; set; }
public short Direction { get; set; }
public bool OnBridge { get; set; }
public string Owner { get; set; }
public string Upgrade1 { get; set; }
public string Upgrade2 { get; set; }
public string Upgrade3 { get; set; }
public int WallBuildingFrame { get; set; }
}
public class TerrainObject : NamedObject {
public TerrainObject(string name) {
Name = name;
}
}
public class UnitObject : NamedObject, OwnableObject {
public UnitObject(string owner, string name, short health, short direction, bool onBridge) {
Owner = owner;
Name = name;
Health = health;
Direction = direction;
OnBridge = onBridge;
}
public override MapTile BottomTile { get; set; }
public override MapTile TopTile { get; set; }
public short Health { get; set; }
public short Direction { get; set; }
public bool OnBridge { get; set; }
public string Owner { get; set; }
}
public class AnimationObject : NamedObject {
public AnimationObject(string name, Drawable drawable) {
Name = name;
Drawable = drawable;
}
//public override MapTile BottomTile { get; set; }
//public override MapTile TopTile { get; set; }
}
} | zzattack/ccmaps-net | CNCMaps.Engine/Map/GameObjects.cs | C# | gpl-3.0 | 7,953 |
/*
===========================================================================
Return to Castle Wolfenstein single player GPL Source Code
Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company.
This file is part of the Return to Castle Wolfenstein single player GPL Source Code (RTCW SP Source Code).
RTCW SP Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
RTCW SP Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with RTCW SP Source Code. If not, see <http://www.gnu.org/licenses/>.
In addition, the RTCW SP Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the RTCW SP Source Code. If not, please request a copy in writing from id Software at the address below.
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
===========================================================================
*/
// tr_shade.c
#include "tr_local.h"
/*
THIS ENTIRE FILE IS BACK END
This file deals with applying shaders to surface data in the tess struct.
*/
/*
================
R_ArrayElementDiscrete
This is just for OpenGL conformance testing, it should never be the fastest
================
*/
#ifndef USE_OPENGLES
static void APIENTRY R_ArrayElementDiscrete( GLint index ) {
qglColor4ubv( tess.svars.colors[ index ] );
if ( glState.currenttmu ) {
qglMultiTexCoord2fARB( 0, tess.svars.texcoords[ 0 ][ index ][0], tess.svars.texcoords[ 0 ][ index ][1] );
qglMultiTexCoord2fARB( 1, tess.svars.texcoords[ 1 ][ index ][0], tess.svars.texcoords[ 1 ][ index ][1] );
} else {
qglTexCoord2fv( tess.svars.texcoords[ 0 ][ index ] );
}
qglVertex3fv( tess.xyz[ index ] );
}
#endif
/*
===================
R_DrawStripElements
===================
*/
#ifdef USE_OPENGLES
#define MAX_INDEX 4096
glIndex_t sindexes[MAX_INDEX];
int num_sindexed;
void AddIndexe(GLint idx) {
sindexes[num_sindexed++]=idx;
}
#endif
#ifndef USE_OPENGLES
static int c_vertexes; // for seeing how long our average strips are
static int c_begins;
static void R_DrawStripElements( int numIndexes, const glIndex_t *indexes, void ( APIENTRY *element )( GLint ) ) {
int i;
int last[3] = { -1, -1, -1 };
qboolean even;
c_begins++;
if ( numIndexes <= 0 ) {
return;
}
qglBegin( GL_TRIANGLE_STRIP );
// prime the strip
element( indexes[0] );
element( indexes[1] );
element( indexes[2] );
c_vertexes += 3;
last[0] = indexes[0];
last[1] = indexes[1];
last[2] = indexes[2];
even = qfalse;
for ( i = 3; i < numIndexes; i += 3 )
{
// odd numbered triangle in potential strip
if ( !even ) {
// check previous triangle to see if we're continuing a strip
if ( ( indexes[i + 0] == last[2] ) && ( indexes[i + 1] == last[1] ) ) {
element( indexes[i + 2] );
c_vertexes++;
assert( indexes[i + 2] < tess.numVertexes );
even = qtrue;
}
// otherwise we're done with this strip so finish it and start
// a new one
else
{
qglEnd();
qglBegin( GL_TRIANGLE_STRIP );
c_begins++;
element( indexes[i + 0] );
element( indexes[i + 1] );
element( indexes[i + 2] );
c_vertexes += 3;
even = qfalse;
}
} else
{
// check previous triangle to see if we're continuing a strip
if ( ( last[2] == indexes[i + 1] ) && ( last[0] == indexes[i + 0] ) ) {
element( indexes[i + 2] );
c_vertexes++;
even = qfalse;
}
// otherwise we're done with this strip so finish it and start
// a new one
else
{
qglEnd();
qglBegin( GL_TRIANGLE_STRIP );
c_begins++;
element( indexes[i + 0] );
element( indexes[i + 1] );
element( indexes[i + 2] );
c_vertexes += 3;
even = qfalse;
}
}
// cache the last three vertices
last[0] = indexes[i + 0];
last[1] = indexes[i + 1];
last[2] = indexes[i + 2];
}
qglEnd();
}
#endif // USE_OPENGLES
/*
==================
R_DrawElements
Optionally performs our own glDrawElements that looks for strip conditions
instead of using the single glDrawElements call that may be inefficient
without compiled vertex arrays.
==================
*/
void R_DrawElements( int numIndexes, const glIndex_t *indexes ) {
#ifdef USE_OPENGLES
qglDrawElements( GL_TRIANGLES,
numIndexes,
GL_INDEX_TYPE,
indexes );
return;
#else
int primitives;
primitives = r_primitives->integer;
// default is to use triangles if compiled vertex arrays are present
if ( primitives == 0 ) {
if ( qglLockArraysEXT ) {
primitives = 2;
} else {
primitives = 1;
}
}
if ( primitives == 2 ) {
qglDrawElements( GL_TRIANGLES,
numIndexes,
GL_INDEX_TYPE,
indexes );
return;
}
if ( primitives == 1 ) {
R_DrawStripElements( numIndexes, indexes, qglArrayElement );
return;
}
if ( primitives == 3 ) {
R_DrawStripElements( numIndexes, indexes, R_ArrayElementDiscrete );
return;
}
// anything else will cause no drawing
#endif
}
/*
=============================================================
SURFACE SHADERS
=============================================================
*/
shaderCommands_t tess;
static qboolean setArraysOnce;
/*
=================
R_BindAnimatedImage
=================
*/
void R_BindAnimatedImage( textureBundle_t *bundle ) {
int64_t index;
if ( bundle->isVideoMap ) {
ri.CIN_RunCinematic( bundle->videoMapHandle );
ri.CIN_UploadCinematic( bundle->videoMapHandle );
return;
}
if ( bundle->numImageAnimations <= 1 ) {
if ( bundle->isLightmap && ( backEnd.refdef.rdflags & RDF_SNOOPERVIEW ) ) {
GL_Bind( tr.whiteImage );
} else {
GL_Bind( bundle->image[0] );
}
return;
}
// it is necessary to do this messy calc to make sure animations line up
// exactly with waveforms of the same frequency
index = tess.shaderTime * bundle->imageAnimationSpeed * FUNCTABLE_SIZE;
index >>= FUNCTABLE_SIZE2;
if ( index < 0 ) {
index = 0; // may happen with shader time offsets
}
// Windows x86 doesn't load renderer DLL with 64 bit modulus
//index %= bundle->numImageAnimations;
while ( index >= bundle->numImageAnimations ) {
index -= bundle->numImageAnimations;
}
if ( bundle->isLightmap && ( backEnd.refdef.rdflags & RDF_SNOOPERVIEW ) ) {
GL_Bind( tr.whiteImage );
} else {
GL_Bind( bundle->image[ index ] );
}
}
/*
================
DrawTris
Draws triangle outlines for debugging
================
*/
static void DrawTris( shaderCommands_t *input ) {
GL_Bind( tr.whiteImage );
qglColor3f( 1,1,1 );
GL_State( GLS_POLYMODE_LINE | GLS_DEPTHMASK_TRUE );
if ( r_showtris->integer == 1 ) {
qglDepthRange( 0, 0 );
}
qglDisableClientState( GL_COLOR_ARRAY );
qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
qglVertexPointer( 3, GL_FLOAT, 16, input->xyz ); // padded for SIMD
if ( qglLockArraysEXT ) {
qglLockArraysEXT( 0, input->numVertexes );
GLimp_LogComment( "glLockArraysEXT\n" );
}
#ifdef USE_OPENGLES
qglDrawElements( GL_LINE_STRIP,
input->numIndexes,
GL_INDEX_TYPE,
input->indexes );
#else
R_DrawElements( input->numIndexes, input->indexes );
#endif
if ( qglUnlockArraysEXT ) {
qglUnlockArraysEXT();
GLimp_LogComment( "glUnlockArraysEXT\n" );
}
qglDepthRange( 0, 1 );
}
/*
================
DrawNormals
Draws vertex normals for debugging
================
*/
static void DrawNormals( shaderCommands_t *input ) {
int i;
vec3_t temp;
GL_Bind( tr.whiteImage );
qglColor3f( 1,1,1 );
if ( r_shownormals->integer == 1 ) {
qglDepthRange( 0, 0 ); // never occluded
}
GL_State( GLS_POLYMODE_LINE | GLS_DEPTHMASK_TRUE );
#ifdef USE_OPENGLES
vec3_t vtx[2];
//*TODO* save states for texture & color array
#else
qglBegin( GL_LINES );
#endif
for ( i = 0 ; i < input->numVertexes ; i++ ) {
#ifndef USE_OPENGLES
qglVertex3fv( input->xyz[i] );
#endif
VectorMA( input->xyz[i], 2, input->normal[i], temp );
#ifdef USE_OPENGLES
memcpy(vtx, input->xyz[i], sizeof(GLfloat)*3);
memcpy(vtx+1, temp, sizeof(GLfloat)*3);
qglVertexPointer (3, GL_FLOAT, 16, vtx);
qglDrawArrays(GL_LINES, 0, 2);
#else
qglVertex3fv( temp );
#endif
}
#ifdef USE_OPENGLES
//*TODO* restaure state for texture & color
#else
qglEnd();
#endif
qglDepthRange( 0, 1 );
}
/*
==============
RB_BeginSurface
We must set some things up before beginning any tesselation,
because a surface may be forced to perform a RB_End due
to overflow.
==============
*/
void RB_BeginSurface( shader_t *shader, int fogNum ) {
shader_t *state = ( shader->remappedShader ) ? shader->remappedShader : shader;
tess.numIndexes = 0;
tess.numVertexes = 0;
tess.shader = state;
tess.fogNum = fogNum;
tess.dlightBits = 0; // will be OR'd in by surface functions
tess.xstages = state->stages;
tess.numPasses = state->numUnfoggedPasses;
tess.currentStageIteratorFunc = state->optimalStageIteratorFunc;
tess.shaderTime = backEnd.refdef.floatTime - tess.shader->timeOffset;
if ( tess.shader->clampTime && tess.shaderTime >= tess.shader->clampTime ) {
tess.shaderTime = tess.shader->clampTime;
}
// done.
}
/*
===================
DrawMultitextured
output = t0 * t1 or t0 + t1
t0 = most upstream according to spec
t1 = most downstream according to spec
===================
*/
static void DrawMultitextured( shaderCommands_t *input, int stage ) {
shaderStage_t *pStage;
pStage = tess.xstages[stage];
// Ridah
if ( tess.shader->noFog && pStage->isFogged ) {
R_FogOn();
} else if ( tess.shader->noFog && !pStage->isFogged ) {
R_FogOff(); // turn it back off
} else if ( backEnd.projection2D ) {
R_FogOff();
} else { // make sure it's on
R_FogOn();
}
// done.
GL_State( pStage->stateBits );
// this is an ugly hack to work around a GeForce driver
// bug with multitexture and clip planes
#ifndef USE_OPENGLES
if ( backEnd.viewParms.isPortal ) {
qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
#endif
//
// base
//
GL_SelectTexture( 0 );
qglTexCoordPointer( 2, GL_FLOAT, 0, input->svars.texcoords[0] );
R_BindAnimatedImage( &pStage->bundle[0] );
//
// lightmap/secondary pass
//
GL_SelectTexture( 1 );
qglEnable( GL_TEXTURE_2D );
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
if ( r_lightmap->integer ) {
GL_TexEnv( GL_REPLACE );
} else {
GL_TexEnv( tess.shader->multitextureEnv );
}
qglTexCoordPointer( 2, GL_FLOAT, 0, input->svars.texcoords[1] );
R_BindAnimatedImage( &pStage->bundle[1] );
R_DrawElements( input->numIndexes, input->indexes );
//
// disable texturing on TEXTURE1, then select TEXTURE0
//
//qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
qglDisable( GL_TEXTURE_2D );
GL_SelectTexture( 0 );
}
/*
===================
ProjectDlightTexture
Perform dynamic lighting with another rendering pass
===================
*/
static void ProjectDlightTexture_scalar( void ) {
int i, l;
vec3_t origin;
float *texCoords;
byte *colors;
byte clipBits[SHADER_MAX_VERTEXES];
float texCoordsArray[SHADER_MAX_VERTEXES][2];
byte colorArray[SHADER_MAX_VERTEXES][4];
glIndex_t hitIndexes[SHADER_MAX_INDEXES];
int numIndexes;
float scale;
float radius;
vec3_t floatColor;
float modulate = 0.0f;
if ( !backEnd.refdef.num_dlights ) {
return;
}
if ( backEnd.refdef.rdflags & RDF_SNOOPERVIEW ) { // no dlights for snooper
return;
}
for ( l = 0 ; l < backEnd.refdef.num_dlights ; l++ ) {
dlight_t *dl;
if ( !( tess.dlightBits & ( 1 << l ) ) ) {
continue; // this surface definately doesn't have any of this light
}
texCoords = texCoordsArray[0];
colors = colorArray[0];
dl = &backEnd.refdef.dlights[l];
VectorCopy( dl->transformed, origin );
radius = dl->radius;
scale = 1.0f / radius;
if(r_greyscale->integer)
{
float luminance;
luminance = LUMA(dl->color[0], dl->color[1], dl->color[2]) * 255.0f;
floatColor[0] = floatColor[1] = floatColor[2] = luminance;
}
else if(r_greyscale->value)
{
float luminance;
luminance = LUMA(dl->color[0], dl->color[1], dl->color[2]) * 255.0f;
floatColor[0] = LERP(dl->color[0] * 255.0f, luminance, r_greyscale->value);
floatColor[1] = LERP(dl->color[1] * 255.0f, luminance, r_greyscale->value);
floatColor[2] = LERP(dl->color[2] * 255.0f, luminance, r_greyscale->value);
}
else
{
floatColor[0] = dl->color[0] * 255.0f;
floatColor[1] = dl->color[1] * 255.0f;
floatColor[2] = dl->color[2] * 255.0f;
}
for ( i = 0 ; i < tess.numVertexes ; i++, texCoords += 2, colors += 4 ) {
int clip = 0;
vec3_t dist;
VectorSubtract( origin, tess.xyz[i], dist );
backEnd.pc.c_dlightVertexes++;
texCoords[0] = 0.5f + dist[0] * scale;
texCoords[1] = 0.5f + dist[1] * scale;
if( !r_dlightBacks->integer &&
// dist . tess.normal[i]
( dist[0] * tess.normal[i][0] +
dist[1] * tess.normal[i][1] +
dist[2] * tess.normal[i][2] ) < 0.0f ) {
clip = 63;
} else {
if ( texCoords[0] < 0.0f ) {
clip |= 1;
} else if ( texCoords[0] > 1.0f ) {
clip |= 2;
}
if ( texCoords[1] < 0.0f ) {
clip |= 4;
} else if ( texCoords[1] > 1.0f ) {
clip |= 8;
}
texCoords[0] = texCoords[0];
texCoords[1] = texCoords[1];
// modulate the strength based on the height and color
if ( dist[2] > radius ) {
clip |= 16;
modulate = 0.0f;
} else if ( dist[2] < -radius ) {
clip |= 32;
modulate = 0.0f;
} else {
dist[2] = Q_fabs(dist[2]);
if ( dist[2] < radius * 0.5f ) {
modulate = 1.0f;
} else {
modulate = 2.0f * (radius - dist[2]) * scale;
}
}
}
clipBits[i] = clip;
colors[0] = ri.ftol(floatColor[0] * modulate);
colors[1] = ri.ftol(floatColor[1] * modulate);
colors[2] = ri.ftol(floatColor[2] * modulate);
colors[3] = 255;
}
// build a list of triangles that need light
numIndexes = 0;
for ( i = 0 ; i < tess.numIndexes ; i += 3 ) {
int a, b, c;
a = tess.indexes[i];
b = tess.indexes[i+1];
c = tess.indexes[i+2];
if ( clipBits[a] & clipBits[b] & clipBits[c] ) {
continue; // not lighted
}
hitIndexes[numIndexes] = a;
hitIndexes[numIndexes+1] = b;
hitIndexes[numIndexes+2] = c;
numIndexes += 3;
}
if ( !numIndexes ) {
continue;
}
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglTexCoordPointer( 2, GL_FLOAT, 0, texCoordsArray[0] );
qglEnableClientState( GL_COLOR_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, colorArray );
//----(SA) creating dlight shader to allow for special blends or alternate dlight texture
{
shader_t *dls = dl->dlshader;
if ( dls ) {
for ( i = 0; i < dls->numUnfoggedPasses; i++ )
{
shaderStage_t *stage = dls->stages[i];
R_BindAnimatedImage( &dls->stages[i]->bundle[0] );
GL_State( stage->stateBits | GLS_DEPTHFUNC_EQUAL );
R_DrawElements( numIndexes, hitIndexes );
backEnd.pc.c_totalIndexes += numIndexes;
backEnd.pc.c_dlightIndexes += numIndexes;
}
} else
{
R_FogOff();
GL_Bind( tr.dlightImage );
// include GLS_DEPTHFUNC_EQUAL so alpha tested surfaces don't add light
// where they aren't rendered
GL_State( GLS_SRCBLEND_DST_COLOR | GLS_DSTBLEND_ONE | GLS_DEPTHFUNC_EQUAL );
R_DrawElements( numIndexes, hitIndexes );
backEnd.pc.c_totalIndexes += numIndexes;
backEnd.pc.c_dlightIndexes += numIndexes;
// Ridah, overdraw lights several times, rather than sending
// multiple lights through
for ( i = 0; i < dl->overdraw; i++ ) {
R_DrawElements( numIndexes, hitIndexes );
backEnd.pc.c_totalIndexes += numIndexes;
backEnd.pc.c_dlightIndexes += numIndexes;
}
R_FogOn();
}
}
}
}
static void ProjectDlightTexture( void ) {
#if idppc_altivec
if (com_altivec->integer) {
// must be in a separate translation unit or G3 systems will crash.
ProjectDlightTexture_altivec();
return;
}
#endif
ProjectDlightTexture_scalar();
}
/*
===================
RB_FogPass
Blends a fog texture on top of everything else
===================
*/
static void RB_FogPass( void ) {
fog_t *fog;
int i;
if ( tr.refdef.rdflags & RDF_SNOOPERVIEW ) { // no fog pass in snooper
return;
}
qglEnableClientState( GL_COLOR_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, tess.svars.colors );
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglTexCoordPointer( 2, GL_FLOAT, 0, tess.svars.texcoords[0] );
fog = tr.world->fogs + tess.fogNum;
for ( i = 0; i < tess.numVertexes; i++ ) {
*( int * )&tess.svars.colors[i] = fog->colorInt;
}
RB_CalcFogTexCoords( ( float * ) tess.svars.texcoords[0] );
GL_Bind( tr.fogImage );
if ( tess.shader->fogPass == FP_EQUAL ) {
GL_State( GLS_SRCBLEND_SRC_ALPHA | GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA | GLS_DEPTHFUNC_EQUAL );
} else {
GL_State( GLS_SRCBLEND_SRC_ALPHA | GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA );
}
R_DrawElements( tess.numIndexes, tess.indexes );
}
/*
===============
ComputeColors
===============
*/
static void ComputeColors( shaderStage_t *pStage ) {
int i;
//
// rgbGen
//
switch ( pStage->rgbGen )
{
case CGEN_IDENTITY:
memset( tess.svars.colors, 0xff, tess.numVertexes * 4 );
break;
default:
case CGEN_IDENTITY_LIGHTING:
memset( tess.svars.colors, tr.identityLightByte, tess.numVertexes * 4 );
break;
case CGEN_LIGHTING_DIFFUSE:
RB_CalcDiffuseColor( ( unsigned char * ) tess.svars.colors );
break;
case CGEN_EXACT_VERTEX:
memcpy( tess.svars.colors, tess.vertexColors, tess.numVertexes * sizeof( tess.vertexColors[0] ) );
break;
case CGEN_CONST:
for ( i = 0; i < tess.numVertexes; i++ ) {
*(int *)tess.svars.colors[i] = *(int *)pStage->constantColor;
}
break;
case CGEN_VERTEX:
if ( tr.identityLight == 1 ) {
memcpy( tess.svars.colors, tess.vertexColors, tess.numVertexes * sizeof( tess.vertexColors[0] ) );
} else
{
for ( i = 0; i < tess.numVertexes; i++ )
{
tess.svars.colors[i][0] = tess.vertexColors[i][0] * tr.identityLight;
tess.svars.colors[i][1] = tess.vertexColors[i][1] * tr.identityLight;
tess.svars.colors[i][2] = tess.vertexColors[i][2] * tr.identityLight;
tess.svars.colors[i][3] = tess.vertexColors[i][3];
}
}
break;
case CGEN_ONE_MINUS_VERTEX:
if ( tr.identityLight == 1 ) {
for ( i = 0; i < tess.numVertexes; i++ )
{
tess.svars.colors[i][0] = 255 - tess.vertexColors[i][0];
tess.svars.colors[i][1] = 255 - tess.vertexColors[i][1];
tess.svars.colors[i][2] = 255 - tess.vertexColors[i][2];
}
} else
{
for ( i = 0; i < tess.numVertexes; i++ )
{
tess.svars.colors[i][0] = ( 255 - tess.vertexColors[i][0] ) * tr.identityLight;
tess.svars.colors[i][1] = ( 255 - tess.vertexColors[i][1] ) * tr.identityLight;
tess.svars.colors[i][2] = ( 255 - tess.vertexColors[i][2] ) * tr.identityLight;
}
}
break;
case CGEN_FOG:
{
fog_t *fog;
fog = tr.world->fogs + tess.fogNum;
for ( i = 0; i < tess.numVertexes; i++ ) {
*( int * )&tess.svars.colors[i] = fog->colorInt;
}
}
break;
case CGEN_WAVEFORM:
RB_CalcWaveColor( &pStage->rgbWave, ( unsigned char * ) tess.svars.colors );
break;
case CGEN_ENTITY:
RB_CalcColorFromEntity( ( unsigned char * ) tess.svars.colors );
break;
case CGEN_ONE_MINUS_ENTITY:
RB_CalcColorFromOneMinusEntity( ( unsigned char * ) tess.svars.colors );
break;
}
//
// alphaGen
//
switch ( pStage->alphaGen )
{
case AGEN_SKIP:
break;
case AGEN_IDENTITY:
if ( pStage->rgbGen != CGEN_IDENTITY ) {
if ( ( pStage->rgbGen == CGEN_VERTEX && tr.identityLight != 1 ) ||
pStage->rgbGen != CGEN_VERTEX ) {
for ( i = 0; i < tess.numVertexes; i++ ) {
tess.svars.colors[i][3] = 0xff;
}
}
}
break;
case AGEN_CONST:
if ( pStage->rgbGen != CGEN_CONST ) {
for ( i = 0; i < tess.numVertexes; i++ ) {
tess.svars.colors[i][3] = pStage->constantColor[3];
}
}
break;
case AGEN_WAVEFORM:
RB_CalcWaveAlpha( &pStage->alphaWave, ( unsigned char * ) tess.svars.colors );
break;
case AGEN_LIGHTING_SPECULAR:
RB_CalcSpecularAlpha( ( unsigned char * ) tess.svars.colors );
break;
case AGEN_ENTITY:
RB_CalcAlphaFromEntity( ( unsigned char * ) tess.svars.colors );
break;
case AGEN_ONE_MINUS_ENTITY:
RB_CalcAlphaFromOneMinusEntity( ( unsigned char * ) tess.svars.colors );
break;
// Ridah
case AGEN_NORMALZFADE:
{
float alpha, range, lowest, highest, dot;
vec3_t worldUp;
qboolean zombieEffect = qfalse;
if ( VectorCompare( backEnd.currentEntity->e.fireRiseDir, vec3_origin ) ) {
VectorSet( backEnd.currentEntity->e.fireRiseDir, 0, 0, 1 );
}
if ( backEnd.currentEntity->e.hModel ) { // world surfaces dont have an axis
VectorRotate( backEnd.currentEntity->e.fireRiseDir, backEnd.currentEntity->e.axis, worldUp );
} else {
VectorCopy( backEnd.currentEntity->e.fireRiseDir, worldUp );
}
lowest = pStage->zFadeBounds[0];
if ( lowest == -1000 ) { // use entity alpha
lowest = backEnd.currentEntity->e.shaderTime;
zombieEffect = qtrue;
}
highest = pStage->zFadeBounds[1];
if ( highest == -1000 ) { // use entity alpha
highest = backEnd.currentEntity->e.shaderTime;
zombieEffect = qtrue;
}
range = highest - lowest;
for ( i = 0; i < tess.numVertexes; i++ ) {
dot = DotProduct( tess.normal[i], worldUp );
// special handling for Zombie fade effect
if ( zombieEffect ) {
alpha = (float)backEnd.currentEntity->e.shaderRGBA[3] * ( dot + 1.0 ) / 2.0;
alpha += ( 2.0 * (float)backEnd.currentEntity->e.shaderRGBA[3] ) * ( 1.0 - ( dot + 1.0 ) / 2.0 );
if ( alpha > 255.0 ) {
alpha = 255.0;
} else if ( alpha < 0.0 ) {
alpha = 0.0;
}
tess.svars.colors[i][3] = (byte)( alpha );
continue;
}
if ( dot < highest ) {
if ( dot > lowest ) {
if ( dot < lowest + range / 2 ) {
alpha = ( (float)pStage->constantColor[3] * ( ( dot - lowest ) / ( range / 2 ) ) );
} else {
alpha = ( (float)pStage->constantColor[3] * ( 1.0 - ( ( dot - lowest - range / 2 ) / ( range / 2 ) ) ) );
}
if ( alpha > 255.0 ) {
alpha = 255.0;
} else if ( alpha < 0.0 ) {
alpha = 0.0;
}
// finally, scale according to the entity's alpha
if ( backEnd.currentEntity->e.hModel ) {
alpha *= (float)backEnd.currentEntity->e.shaderRGBA[3] / 255.0;
}
tess.svars.colors[i][3] = (byte)( alpha );
} else {
tess.svars.colors[i][3] = 0;
}
} else {
tess.svars.colors[i][3] = 0;
}
}
}
break;
// done.
case AGEN_VERTEX:
if ( pStage->rgbGen != CGEN_VERTEX ) {
for ( i = 0; i < tess.numVertexes; i++ ) {
tess.svars.colors[i][3] = tess.vertexColors[i][3];
}
}
break;
case AGEN_ONE_MINUS_VERTEX:
for ( i = 0; i < tess.numVertexes; i++ )
{
tess.svars.colors[i][3] = 255 - tess.vertexColors[i][3];
}
break;
case AGEN_PORTAL:
{
unsigned char alpha;
for ( i = 0; i < tess.numVertexes; i++ )
{
float len;
vec3_t v;
VectorSubtract( tess.xyz[i], backEnd.viewParms.or.origin, v );
len = VectorLength( v );
len /= tess.shader->portalRange;
if ( len < 0 ) {
alpha = 0;
} else if ( len > 1 ) {
alpha = 0xff;
} else
{
alpha = len * 0xff;
}
tess.svars.colors[i][3] = alpha;
}
}
break;
}
//
// fog adjustment for colors to fade out as fog increases
//
if ( tess.fogNum ) {
switch ( pStage->adjustColorsForFog )
{
case ACFF_MODULATE_RGB:
RB_CalcModulateColorsByFog( ( unsigned char * ) tess.svars.colors );
break;
case ACFF_MODULATE_ALPHA:
RB_CalcModulateAlphasByFog( ( unsigned char * ) tess.svars.colors );
break;
case ACFF_MODULATE_RGBA:
RB_CalcModulateRGBAsByFog( ( unsigned char * ) tess.svars.colors );
break;
case ACFF_NONE:
break;
}
}
// if in greyscale rendering mode turn all color values into greyscale.
if(r_greyscale->integer)
{
int scale;
for(i = 0; i < tess.numVertexes; i++)
{
scale = LUMA(tess.svars.colors[i][0], tess.svars.colors[i][1], tess.svars.colors[i][2]);
tess.svars.colors[i][0] = tess.svars.colors[i][1] = tess.svars.colors[i][2] = scale;
}
}
else if(r_greyscale->value)
{
float scale;
for(i = 0; i < tess.numVertexes; i++)
{
scale = LUMA(tess.svars.colors[i][0], tess.svars.colors[i][1], tess.svars.colors[i][2]);
tess.svars.colors[i][0] = LERP(tess.svars.colors[i][0], scale, r_greyscale->value);
tess.svars.colors[i][1] = LERP(tess.svars.colors[i][1], scale, r_greyscale->value);
tess.svars.colors[i][2] = LERP(tess.svars.colors[i][2], scale, r_greyscale->value);
}
}
}
/*
===============
ComputeTexCoords
===============
*/
static void ComputeTexCoords( shaderStage_t *pStage ) {
int i;
int b;
for ( b = 0; b < NUM_TEXTURE_BUNDLES; b++ ) {
int tm;
//
// generate the texture coordinates
//
switch ( pStage->bundle[b].tcGen )
{
case TCGEN_IDENTITY:
memset( tess.svars.texcoords[b], 0, sizeof( float ) * 2 * tess.numVertexes );
break;
case TCGEN_TEXTURE:
for ( i = 0 ; i < tess.numVertexes ; i++ ) {
tess.svars.texcoords[b][i][0] = tess.texCoords[i][0][0];
tess.svars.texcoords[b][i][1] = tess.texCoords[i][0][1];
}
break;
case TCGEN_LIGHTMAP:
for ( i = 0 ; i < tess.numVertexes ; i++ ) {
tess.svars.texcoords[b][i][0] = tess.texCoords[i][1][0];
tess.svars.texcoords[b][i][1] = tess.texCoords[i][1][1];
}
break;
case TCGEN_VECTOR:
for ( i = 0 ; i < tess.numVertexes ; i++ ) {
tess.svars.texcoords[b][i][0] = DotProduct( tess.xyz[i], pStage->bundle[b].tcGenVectors[0] );
tess.svars.texcoords[b][i][1] = DotProduct( tess.xyz[i], pStage->bundle[b].tcGenVectors[1] );
}
break;
case TCGEN_FOG:
RB_CalcFogTexCoords( ( float * ) tess.svars.texcoords[b] );
break;
case TCGEN_ENVIRONMENT_MAPPED:
RB_CalcEnvironmentTexCoords( ( float * ) tess.svars.texcoords[b] );
break;
case TCGEN_FIRERISEENV_MAPPED:
RB_CalcFireRiseEnvTexCoords( ( float * ) tess.svars.texcoords[b] );
break;
case TCGEN_BAD:
return;
}
//
// alter texture coordinates
//
for ( tm = 0; tm < pStage->bundle[b].numTexMods ; tm++ ) {
switch ( pStage->bundle[b].texMods[tm].type )
{
case TMOD_NONE:
tm = TR_MAX_TEXMODS; // break out of for loop
break;
case TMOD_SWAP:
RB_CalcSwapTexCoords( ( float * ) tess.svars.texcoords[b] );
break;
case TMOD_TURBULENT:
RB_CalcTurbulentTexCoords( &pStage->bundle[b].texMods[tm].wave,
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_ENTITY_TRANSLATE:
RB_CalcScrollTexCoords( backEnd.currentEntity->e.shaderTexCoord,
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_SCROLL:
RB_CalcScrollTexCoords( pStage->bundle[b].texMods[tm].scroll,
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_SCALE:
RB_CalcScaleTexCoords( pStage->bundle[b].texMods[tm].scale,
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_STRETCH:
RB_CalcStretchTexCoords( &pStage->bundle[b].texMods[tm].wave,
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_TRANSFORM:
RB_CalcTransformTexCoords( &pStage->bundle[b].texMods[tm],
( float * ) tess.svars.texcoords[b] );
break;
case TMOD_ROTATE:
RB_CalcRotateTexCoords( pStage->bundle[b].texMods[tm].rotateSpeed,
( float * ) tess.svars.texcoords[b] );
break;
default:
ri.Error( ERR_DROP, "ERROR: unknown texmod '%d' in shader '%s'", pStage->bundle[b].texMods[tm].type, tess.shader->name );
break;
}
}
}
}
extern void R_Fog( glfog_t *curfog );
/*
==============
SetIteratorFog
set the fog parameters for this pass
==============
*/
void SetIteratorFog( void ) {
// changed for problem when you start the game with r_fastsky set to '1'
// if(r_fastsky->integer || backEnd.refdef.rdflags & RDF_NOWORLDMODEL ) {
if ( backEnd.refdef.rdflags & RDF_NOWORLDMODEL ) {
R_FogOff();
return;
}
if ( backEnd.refdef.rdflags & RDF_DRAWINGSKY ) {
if ( glfogsettings[FOG_SKY].registered ) {
R_Fog( &glfogsettings[FOG_SKY] );
} else {
R_FogOff();
}
return;
}
if ( skyboxportal && backEnd.refdef.rdflags & RDF_SKYBOXPORTAL ) {
if ( glfogsettings[FOG_PORTALVIEW].registered ) {
R_Fog( &glfogsettings[FOG_PORTALVIEW] );
} else {
R_FogOff();
}
} else {
if ( glfogNum > FOG_NONE ) {
R_Fog( &glfogsettings[FOG_CURRENT] );
} else {
R_FogOff();
}
}
}
/*
** RB_IterateStagesGeneric
*/
static void RB_IterateStagesGeneric( shaderCommands_t *input ) {
int stage;
for ( stage = 0; stage < MAX_SHADER_STAGES; stage++ )
{
shaderStage_t *pStage = tess.xstages[stage];
if ( !pStage ) {
break;
}
ComputeColors( pStage );
ComputeTexCoords( pStage );
if ( !setArraysOnce ) {
qglEnableClientState( GL_COLOR_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, input->svars.colors );
}
//
// do multitexture
//
if ( pStage->bundle[1].image[0] != 0 ) {
DrawMultitextured( input, stage );
} else
{
int fadeStart, fadeEnd;
if ( !setArraysOnce ) {
qglTexCoordPointer( 2, GL_FLOAT, 0, input->svars.texcoords[0] );
}
//
// set state
//
R_BindAnimatedImage( &pStage->bundle[0] );
// Ridah, per stage fogging (detail textures)
if ( tess.shader->noFog && pStage->isFogged ) {
R_FogOn();
} else if ( tess.shader->noFog && !pStage->isFogged ) {
R_FogOff(); // turn it back off
} else if ( backEnd.projection2D ) {
R_FogOff();
} else { // make sure it's on
R_FogOn();
}
// done.
//----(SA) fading model stuff
fadeStart = backEnd.currentEntity->e.fadeStartTime;
if ( fadeStart ) {
fadeEnd = backEnd.currentEntity->e.fadeEndTime;
if ( fadeStart > tr.refdef.time ) { // has not started to fade yet
GL_State( pStage->stateBits );
} else
{
int i;
unsigned int tempState;
float alphaval;
if ( fadeEnd < tr.refdef.time ) { // entity faded out completely
continue;
}
alphaval = (float)( fadeEnd - tr.refdef.time ) / (float)( fadeEnd - fadeStart );
tempState = pStage->stateBits;
// remove the current blend, and don't write to Z buffer
tempState &= ~( GLS_SRCBLEND_BITS | GLS_DSTBLEND_BITS | GLS_DEPTHMASK_TRUE );
// set the blend to src_alpha, dst_one_minus_src_alpha
tempState |= ( GLS_SRCBLEND_SRC_ALPHA | GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA );
GL_State( tempState );
GL_Cull( CT_FRONT_SIDED );
// modulate the alpha component of each vertex in the render list
for ( i = 0; i < tess.numVertexes; i++ ) {
tess.svars.colors[i][0] *= alphaval;
tess.svars.colors[i][1] *= alphaval;
tess.svars.colors[i][2] *= alphaval;
tess.svars.colors[i][3] *= alphaval;
}
}
} else {
GL_State( pStage->stateBits );
}
//----(SA) end
//
// draw
//
R_DrawElements( input->numIndexes, input->indexes );
}
// allow skipping out to show just lightmaps during development
if ( r_lightmap->integer && ( pStage->bundle[0].isLightmap || pStage->bundle[1].isLightmap ) ) {
break;
}
}
}
/*
** RB_StageIteratorGeneric
*/
void RB_StageIteratorGeneric( void ) {
shaderCommands_t *input;
shader_t *shader;
input = &tess;
shader = input->shader;
RB_DeformTessGeometry();
//
// log this call
//
if ( r_logFile->integer ) {
// don't just call LogComment, or we will get
// a call to va() every frame!
GLimp_LogComment( va( "--- RB_StageIteratorGeneric( %s ) ---\n", tess.shader->name ) );
}
// set GL fog
SetIteratorFog();
//
// set face culling appropriately
//
GL_Cull( shader->cullType );
// set polygon offset if necessary
if ( shader->polygonOffset ) {
qglEnable( GL_POLYGON_OFFSET_FILL );
qglPolygonOffset( r_offsetFactor->value, r_offsetUnits->value );
}
//
// if there is only a single pass then we can enable color
// and texture arrays before we compile, otherwise we need
// to avoid compiling those arrays since they will change
// during multipass rendering
//
if ( tess.numPasses > 1 || shader->multitextureEnv ) {
setArraysOnce = qfalse;
qglDisableClientState( GL_COLOR_ARRAY );
qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
} else
{
setArraysOnce = qtrue;
qglEnableClientState( GL_COLOR_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, tess.svars.colors );
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglTexCoordPointer( 2, GL_FLOAT, 0, tess.svars.texcoords[0] );
}
//
// lock XYZ
//
qglVertexPointer( 3, GL_FLOAT, 16, input->xyz ); // padded for SIMD
if ( qglLockArraysEXT ) {
qglLockArraysEXT( 0, input->numVertexes );
GLimp_LogComment( "glLockArraysEXT\n" );
}
//
// enable color and texcoord arrays after the lock if necessary
//
if ( !setArraysOnce ) {
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglEnableClientState( GL_COLOR_ARRAY );
}
//
// call shader function
//
RB_IterateStagesGeneric( input );
//
// now do any dynamic lighting needed
//
if ( tess.dlightBits && tess.shader->sort <= SS_OPAQUE
&& !( tess.shader->surfaceFlags & ( SURF_NODLIGHT | SURF_SKY ) ) ) {
ProjectDlightTexture();
}
//
// now do fog
//
if ( tess.fogNum && tess.shader->fogPass ) {
RB_FogPass();
}
//
// unlock arrays
//
if ( qglUnlockArraysEXT ) {
qglUnlockArraysEXT();
GLimp_LogComment( "glUnlockArraysEXT\n" );
}
//
// reset polygon offset
//
if ( shader->polygonOffset ) {
qglDisable( GL_POLYGON_OFFSET_FILL );
}
}
/*
** RB_StageIteratorVertexLitTexture
*/
void RB_StageIteratorVertexLitTexture( void ) {
shaderCommands_t *input;
shader_t *shader;
input = &tess;
shader = input->shader;
//
// compute colors
//
RB_CalcDiffuseColor( ( unsigned char * ) tess.svars.colors );
//
// log this call
//
if ( r_logFile->integer ) {
// don't just call LogComment, or we will get
// a call to va() every frame!
GLimp_LogComment( va( "--- RB_StageIteratorVertexLitTexturedUnfogged( %s ) ---\n", tess.shader->name ) );
}
// set GL fog
SetIteratorFog();
//
// set face culling appropriately
//
GL_Cull( shader->cullType );
//
// set arrays and lock
//
qglEnableClientState( GL_COLOR_ARRAY );
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, tess.svars.colors );
qglTexCoordPointer( 2, GL_FLOAT, 16, tess.texCoords[0][0] );
qglVertexPointer( 3, GL_FLOAT, 16, input->xyz );
if ( qglLockArraysEXT ) {
qglLockArraysEXT( 0, input->numVertexes );
GLimp_LogComment( "glLockArraysEXT\n" );
}
//
// call special shade routine
//
R_BindAnimatedImage( &tess.xstages[0]->bundle[0] );
GL_State( tess.xstages[0]->stateBits );
R_DrawElements( input->numIndexes, input->indexes );
//
// now do any dynamic lighting needed
//
if ( tess.dlightBits && tess.shader->sort <= SS_OPAQUE ) {
ProjectDlightTexture();
}
//
// now do fog
//
if ( tess.fogNum && tess.shader->fogPass ) {
RB_FogPass();
}
//
// unlock arrays
//
if ( qglUnlockArraysEXT ) {
qglUnlockArraysEXT();
GLimp_LogComment( "glUnlockArraysEXT\n" );
}
}
//define REPLACE_MODE
void RB_StageIteratorLightmappedMultitexture( void ) {
shaderCommands_t *input;
shader_t *shader;
input = &tess;
shader = input->shader;
//
// log this call
//
if ( r_logFile->integer ) {
// don't just call LogComment, or we will get
// a call to va() every frame!
GLimp_LogComment( va( "--- RB_StageIteratorLightmappedMultitexture( %s ) ---\n", tess.shader->name ) );
}
// set GL fog
SetIteratorFog();
//
// set face culling appropriately
//
GL_Cull( shader->cullType );
//
// set color, pointers, and lock
//
GL_State( GLS_DEFAULT );
qglVertexPointer( 3, GL_FLOAT, 16, input->xyz );
#ifdef REPLACE_MODE
qglDisableClientState( GL_COLOR_ARRAY );
qglColor3f( 1, 1, 1 );
qglShadeModel( GL_FLAT );
#else
qglEnableClientState( GL_COLOR_ARRAY );
qglColorPointer( 4, GL_UNSIGNED_BYTE, 0, tess.constantColor255 );
#endif
//
// select base stage
//
GL_SelectTexture( 0 );
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
R_BindAnimatedImage( &tess.xstages[0]->bundle[0] );
qglTexCoordPointer( 2, GL_FLOAT, 16, tess.texCoords[0][0] );
//
// configure second stage
//
GL_SelectTexture( 1 );
qglEnable( GL_TEXTURE_2D );
if ( r_lightmap->integer ) {
GL_TexEnv( GL_REPLACE );
} else {
GL_TexEnv( GL_MODULATE );
}
//----(SA) modified for snooper
if ( tess.xstages[0]->bundle[1].isLightmap && ( backEnd.refdef.rdflags & RDF_SNOOPERVIEW ) ) {
GL_Bind( tr.whiteImage );
} else {
R_BindAnimatedImage( &tess.xstages[0]->bundle[1] );
}
qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
qglTexCoordPointer( 2, GL_FLOAT, 16, tess.texCoords[0][1] );
//
// lock arrays
//
if ( qglLockArraysEXT ) {
qglLockArraysEXT( 0, input->numVertexes );
GLimp_LogComment( "glLockArraysEXT\n" );
}
R_DrawElements( input->numIndexes, input->indexes );
//
// disable texturing on TEXTURE1, then select TEXTURE0
//
qglDisable( GL_TEXTURE_2D );
qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
GL_SelectTexture( 0 );
#ifdef REPLACE_MODE
GL_TexEnv( GL_MODULATE );
qglShadeModel( GL_SMOOTH );
#endif
//
// now do any dynamic lighting needed
//
if ( tess.dlightBits && tess.shader->sort <= SS_OPAQUE ) {
ProjectDlightTexture();
}
//
// now do fog
//
if ( tess.fogNum && tess.shader->fogPass ) {
RB_FogPass();
}
//
// unlock arrays
//
if ( qglUnlockArraysEXT ) {
qglUnlockArraysEXT();
GLimp_LogComment( "glUnlockArraysEXT\n" );
}
}
/*
** RB_EndSurface
*/
void RB_EndSurface( void ) {
shaderCommands_t *input;
input = &tess;
if ( input->numIndexes == 0 ) {
return;
}
if ( input->indexes[SHADER_MAX_INDEXES - 1] != 0 ) {
ri.Error( ERR_DROP, "RB_EndSurface() - SHADER_MAX_INDEXES hit" );
}
if ( input->xyz[SHADER_MAX_VERTEXES - 1][0] != 0 ) {
ri.Error( ERR_DROP, "RB_EndSurface() - SHADER_MAX_VERTEXES hit" );
}
if ( tess.shader == tr.shadowShader ) {
RB_ShadowTessEnd();
return;
}
// for debugging of sort order issues, stop rendering after a given sort value
if ( r_debugSort->integer && r_debugSort->integer < tess.shader->sort ) {
return;
}
if ( skyboxportal ) {
// world
if ( !( backEnd.refdef.rdflags & RDF_SKYBOXPORTAL ) ) {
if ( tess.currentStageIteratorFunc == RB_StageIteratorSky ) { // don't process these tris at all
return;
}
}
// portal sky
else {
if ( !drawskyboxportal ) {
if ( !( tess.currentStageIteratorFunc == RB_StageIteratorSky ) ) { // /only/ process sky tris
return;
}
}
}
}
//
// update performance counters
//
backEnd.pc.c_shaders++;
backEnd.pc.c_vertexes += tess.numVertexes;
backEnd.pc.c_indexes += tess.numIndexes;
backEnd.pc.c_totalIndexes += tess.numIndexes * tess.numPasses;
//
// call off to shader specific tess end function
//
tess.currentStageIteratorFunc();
//
// draw debugging stuff
//
if ( r_showtris->integer ) {
DrawTris( input );
}
if ( r_shownormals->integer ) {
DrawNormals( input );
}
// clear shader so we can tell we don't have any unclosed surfaces
tess.numIndexes = 0;
GLimp_LogComment( "----------\n" );
}
| rtcwcoop/rtcwcoop | code/renderer/tr_shade.c | C | gpl-3.0 | 39,633 |
/*
* Created on Mar 16, 2005
*/
package org.flexdock.docking.props;
import java.util.Map;
import org.flexdock.docking.DockingConstants;
import org.flexdock.docking.RegionChecker;
import org.flexdock.util.TypedHashtable;
/**
* @author Christopher Butler
*/
@SuppressWarnings(value = { "serial" })
public class BasicDockingPortPropertySet extends TypedHashtable implements DockingPortPropertySet, DockingConstants {
public static String getRegionInsetKey(String region) {
if(NORTH_REGION.equals(region))
return REGION_SIZE_NORTH;
if(SOUTH_REGION.equals(region))
return REGION_SIZE_SOUTH;
if(EAST_REGION.equals(region))
return REGION_SIZE_EAST;
if(WEST_REGION.equals(region))
return REGION_SIZE_WEST;
return null;
}
public BasicDockingPortPropertySet() {
super();
}
public BasicDockingPortPropertySet(int initialCapacity) {
super(initialCapacity);
}
public BasicDockingPortPropertySet(int initialCapacity, float loadFactor) {
super(initialCapacity, loadFactor);
}
public BasicDockingPortPropertySet(Map t) {
super(t);
}
public RegionChecker getRegionChecker() {
return (RegionChecker)get(REGION_CHECKER);
}
public Boolean isSingleTabsAllowed() {
return getBoolean(SINGLE_TABS);
}
public Integer getTabPlacement() {
return getInt(TAB_PLACEMENT);
}
public Float getRegionInset(String region) {
String key = getRegionInsetKey(region);
return key==null? null: (Float)get(key);
}
public void setRegionChecker(RegionChecker checker) {
put(REGION_CHECKER, checker);
}
public void setSingleTabsAllowed(boolean allowed) {
put(SINGLE_TABS, allowed);
}
public void setTabPlacement(int placement) {
put(TAB_PLACEMENT, placement);
}
public void setRegionInset(String region, float inset) {
String key = getRegionInsetKey(region);
if(key!=null) {
put(key, new Float(inset));
}
}
}
| SuperMap-iDesktop/SuperMap-iDesktop-Cross | Controls/src/main/java/org/flexdock/docking/props/BasicDockingPortPropertySet.java | Java | gpl-3.0 | 2,115 |
import unittest
from ctauto.exceptions import CTAutoMissingEndOfMetablockError, \
CTAutoBrokenEndOfMetablockError, \
CTAutoInvalidMetablockError, \
CTAutoInvalidIdError, \
CTAutoMissingEndOfStringError, \
CTAutoInvalidStringError, \
CTAutoIncompleteEscapeSequence, \
CTAutoInvalidEscapeSequence, \
CTAutoTrailingCharacterAfterQuotedText, \
CTAutoInvalidNumberError
from ctauto.blocks import Block, MetaBlock
from ctauto.tokens import SimpleTextToken, QuotedTextToken, NumericToken, \
DotToken, LeftSquareBracketToken, RightSquareBracketToken
from ctauto.parser import EndOfFileCharacter, Parser, TemplateParser
_TEST_CONTENT = "<% metacode 1 %>\n" \
"#include <stdio.h>\n" \
"\n" \
"int main(void)\n" \
"{\n" \
" <% metacode 2 %>\n" \
" // <% metacode 3 %>\n" \
" return 0;\n" \
" <% metacode 4 . [ 1 ] %>\n" \
"}\n"
class TestParser(unittest.TestCase):
def test_parse(self):
class TestParser(Parser):
def reset(self, content, source):
self.source = source
self.content = content
self.indexes = []
self.characters = []
return self.first
def finalize(self):
return self.indexes, self.characters
def first(self, index, character):
self.indexes.append(index)
self.characters.append(character)
return self.second
def second(self, index, character):
self.indexes.append(index)
self.characters.append(character)
return self.third
def third(self, index, character):
if character is EndOfFileCharacter:
self.indexes.append(index)
self.characters.append(character)
return
self.indexes[-1] = index
self.characters[-1] = character
return self.third
parser = TestParser()
indexes, characters = parser.parse(_TEST_CONTENT, "test")
self.assertEqual(parser.source, "test")
self.assertEqual(parser.content, _TEST_CONTENT)
length = len(_TEST_CONTENT)
self.assertEqual(indexes, [0, length-1, length])
self.assertEqual(characters, ['<', '\n', EndOfFileCharacter])
class TestTemplateParser(unittest.TestCase):
def test_template_parse(self):
parser = TemplateParser()
blocks = parser.parse(_TEST_CONTENT, "test")
self.assertEqual(parser.source, "test")
self.assertEqual(parser.content, _TEST_CONTENT)
self.assertEqual(len(blocks), 8)
block = blocks[0]
self.assertIsInstance(block, MetaBlock)
self.assertEqual(block.content, " metacode 1 ")
self.assertEqual(block.tokens,
[SimpleTextToken(1, "metacode"),
NumericToken(1, "1")])
block = blocks[1]
self.assertIsInstance(block, Block)
self.assertEqual(block.content, "\n"
"#include <stdio.h>\n"
"\n"
"int main(void)\n"
"{\n"
" ")
block = blocks[2]
self.assertIsInstance(block, MetaBlock)
self.assertEqual(block.content, " metacode 2 ")
self.assertEqual(block.tokens,
[SimpleTextToken(6, "metacode"),
NumericToken(6, "2")])
block = blocks[3]
self.assertIsInstance(block, Block)
self.assertEqual(block.content, "\n"
" // ")
block = blocks[4]
self.assertIsInstance(block, MetaBlock)
self.assertEqual(block.content, " metacode 3 ")
self.assertEqual(block.tokens,
[SimpleTextToken(7, "metacode"),
NumericToken(7, "3")])
block = blocks[5]
self.assertIsInstance(block, Block)
self.assertEqual(block.content, "\n"
" return 0;\n"
" ")
block = blocks[6]
self.assertIsInstance(block, MetaBlock)
self.assertEqual(block.content, " metacode 4 . [ 1 ] ")
self.assertEqual(block.tokens,
[SimpleTextToken(9, "metacode"),
NumericToken(9, "4"),
DotToken(9),
LeftSquareBracketToken(9),
NumericToken(9, "1"),
RightSquareBracketToken(9)])
block = blocks[7]
self.assertIsInstance(block, Block)
self.assertEqual(block.content, "\n"
"}\n")
def test_invalid_ends_of_metablock(self):
parser = TemplateParser()
with self.assertRaises(CTAutoMissingEndOfMetablockError):
parser.parse("<% %", "test")
with self.assertRaises(CTAutoBrokenEndOfMetablockError):
parser.parse("<% %!", "test")
def test_invalid_metablock(self):
parser = TemplateParser()
with self.assertRaises(CTAutoInvalidMetablockError):
parser.parse("<% ! %>", "test")
def test_end_of_metablock_while_skipping_whitespaces(self):
parser = TemplateParser()
with self.assertRaises(CTAutoMissingEndOfMetablockError):
parser.parse(" <% ", "test")
def test_multiline_metablock(self):
parser = TemplateParser()
blocks = parser.parse("<%\tx\n\ty\n\tz\n\tt%>", "test")
self.assertEqual(blocks[0].tokens,
[SimpleTextToken(1, "x"),
SimpleTextToken(2, "y"),
SimpleTextToken(3, "z"),
SimpleTextToken(4, "t")])
def test_simple_text_token(self):
parser = TemplateParser()
blocks = parser.parse("<%test%>", "test")
self.assertEqual(blocks[0].tokens, [SimpleTextToken(1, "test")])
blocks = parser.parse("<% test %>", "test")
self.assertEqual(blocks[0].tokens, [SimpleTextToken(1, "test")])
with self.assertRaises(CTAutoMissingEndOfMetablockError):
parser.parse("<%s test", "test")
with self.assertRaises(CTAutoInvalidIdError):
parser.parse("<%s test! %>", "test")
def test_quoted_text_token(self):
parser = TemplateParser()
blocks = parser.parse("<%\"test\"%>", "test")
self.assertEqual(blocks[0].tokens, [QuotedTextToken(1, "test")])
blocks = parser.parse("<% \"test \\\\ \\\"test\\\" \\n \\t \\r \\a\" %>", "test")
self.assertEqual(blocks[0].tokens, [QuotedTextToken(1, "test \\ \"test\" \n \t \r \\a")])
with self.assertRaises(CTAutoMissingEndOfStringError):
parser.parse("<%\"test%>", "test")
with self.assertRaises(CTAutoInvalidStringError):
parser.parse("<%\"test\n%>", "test")
with self.assertRaises(CTAutoIncompleteEscapeSequence):
parser.parse("<% \"test \\", "test")
with self.assertRaises(CTAutoInvalidEscapeSequence):
parser.parse("<% \"test \\\n test\" %>", "test")
with self.assertRaises(CTAutoMissingEndOfMetablockError):
parser.parse("<% \"test\"", "test")
with self.assertRaises(CTAutoTrailingCharacterAfterQuotedText):
parser.parse("<% \"test\"test %>", "test")
def test_numeric_token(self):
parser = TemplateParser()
blocks = parser.parse("<% 1234567890 %>", "test")
self.assertEqual(blocks[0].tokens, [NumericToken(1, "1234567890")])
blocks = parser.parse("<%1234567890%>", "test")
self.assertEqual(blocks[0].tokens, [NumericToken(1, "1234567890")])
with self.assertRaises(CTAutoMissingEndOfMetablockError):
parser.parse("<%1234567890", "test")
with self.assertRaises(CTAutoInvalidNumberError):
parser.parse("<% 1234567890test %>", "test")
def test_simple_token_as_terminator(self):
parser = TemplateParser()
blocks = parser.parse("<% test.test %>", "test")
self.assertEqual(blocks[0].tokens,
[SimpleTextToken(1, "test"),
DotToken(1),
SimpleTextToken(1, "test")])
blocks = parser.parse("<% 1234567890[test %>", "test")
self.assertEqual(blocks[0].tokens,
[NumericToken(1, "1234567890"),
LeftSquareBracketToken(1),
SimpleTextToken(1, "test")])
blocks = parser.parse("<% \"test\"]test %>", "test")
self.assertEqual(blocks[0].tokens,
[QuotedTextToken(1, "test"),
RightSquareBracketToken(1),
SimpleTextToken(1, "test")])
test_suite = unittest.TestSuite([unittest.defaultTestLoader.loadTestsFromTestCase(TestParser),
unittest.defaultTestLoader.loadTestsFromTestCase(TestTemplateParser)])
if __name__ == '__main__':
unittest.main()
| vasili-v/ctauto | test/test_parser.py | Python | gpl-3.0 | 9,771 |
/***************************************************************************
Neutrino-GUI - DBoxII-Project
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
***********************************************************
Module Name: moviebrowser.cpp .
Description: Implementation of the CMovieBrowser class
This class provides a filebrowser window to view, select and start a movies from HD.
This class does replace the Filebrowser
Date: Nov 2005
Author: Günther@tuxbox.berlios.org
based on code of Steffen Hehn 'McClean'
(C) 2009-2015 Stefan Seyfried
****************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <global.h>
#include <driver/screen_max.h>
#include <algorithm>
#include <cstdlib>
#include "moviebrowser.h"
#include "filebrowser.h"
#include <gui/widget/hintbox.h>
#include <gui/widget/helpbox.h>
#include <gui/widget/icons.h>
#include <gui/components/cc.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/stringinput.h>
#include <gui/widget/stringinput_ext.h>
#include <gui/widget/keyboard_input.h>
#include <dirent.h>
#include <sys/stat.h>
#include <gui/nfs.h>
#include <neutrino.h>
#include <sys/vfs.h> // for statfs
#include <sys/mount.h>
#include <utime.h>
#include <unistd.h>
#include <gui/pictureviewer.h>
#include <gui/customcolor.h>
#include <driver/record.h>
#include <driver/display.h>
#include <system/helpers.h>
#include <system/ytcache.h>
#include <zapit/debug.h>
#include <driver/moviecut.h>
#include <timerdclient/timerdclient.h>
#include <system/hddstat.h>
extern CPictureViewer * g_PicViewer;
#define my_scandir scandir64
#define my_alphasort alphasort64
typedef struct stat64 stat_struct;
typedef struct dirent64 dirent_struct;
#define my_stat stat64
#define TRACE printf
#define NUMBER_OF_MOVIES_LAST 40 // This is the number of movies shown in last recored and last played list
#define MESSAGEBOX_BROWSER_ROW_ITEM_COUNT 20
const CMenuOptionChooser::keyval MESSAGEBOX_BROWSER_ROW_ITEM[MESSAGEBOX_BROWSER_ROW_ITEM_COUNT] =
{
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME },
{ MB_INFO_FILEPATH, LOCALE_MOVIEBROWSER_INFO_PATH },
{ MB_INFO_TITLE, LOCALE_MOVIEBROWSER_INFO_TITLE },
{ MB_INFO_SERIE, LOCALE_MOVIEBROWSER_INFO_SERIE },
{ MB_INFO_INFO1, LOCALE_MOVIEBROWSER_INFO_INFO1 },
{ MB_INFO_MAJOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR },
{ MB_INFO_MINOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MINOR },
{ MB_INFO_INFO2, LOCALE_MOVIEBROWSER_INFO_INFO2 },
{ MB_INFO_PARENTAL_LOCKAGE, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE },
{ MB_INFO_CHANNEL, LOCALE_MOVIEBROWSER_INFO_CHANNEL },
{ MB_INFO_BOOKMARK, LOCALE_MOVIEBROWSER_MENU_MAIN_BOOKMARKS },
{ MB_INFO_QUALITY, LOCALE_MOVIEBROWSER_INFO_QUALITY },
{ MB_INFO_PREVPLAYDATE, LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE },
{ MB_INFO_RECORDDATE, LOCALE_MOVIEBROWSER_INFO_RECORDDATE },
{ MB_INFO_PRODDATE, LOCALE_MOVIEBROWSER_INFO_PRODYEAR },
{ MB_INFO_COUNTRY, LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY },
{ MB_INFO_GEOMETRIE, LOCALE_MOVIEBROWSER_INFO_VIDEOFORMAT },
{ MB_INFO_AUDIO, LOCALE_MOVIEBROWSER_INFO_AUDIO },
{ MB_INFO_LENGTH, LOCALE_MOVIEBROWSER_INFO_LENGTH },
{ MB_INFO_SIZE, LOCALE_MOVIEBROWSER_INFO_SIZE }
};
#define MESSAGEBOX_YES_NO_OPTIONS_COUNT 2
const CMenuOptionChooser::keyval MESSAGEBOX_YES_NO_OPTIONS[MESSAGEBOX_YES_NO_OPTIONS_COUNT] =
{
{ 0, LOCALE_MESSAGEBOX_NO },
{ 1, LOCALE_MESSAGEBOX_YES }
};
#define MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT 3
const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCK_OPTIONS[MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT] =
{
{ 1, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_YES },
{ 0, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO },
{ 2, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO_TEMP }
};
#define MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT 6
const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT] =
{
{ 0, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_0YEAR },
{ 6, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_6YEAR },
{ 12, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_12YEAR },
{ 16, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_16YEAR },
{ 18, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_18YEAR },
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS }
};
#define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0)
#define TITLE_FONT_COLOR COL_MENUHEAD_TEXT
#define TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]
#define FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]
#define INTER_FRAME_SPACE 4 // space between e.g. upper and lower window
const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
{
LOCALE_MOVIEBROWSER_SHORT_FILENAME,
LOCALE_MOVIEBROWSER_SHORT_PATH,
LOCALE_MOVIEBROWSER_SHORT_TITLE,
LOCALE_MOVIEBROWSER_SHORT_SERIE,
LOCALE_MOVIEBROWSER_SHORT_INFO1,
LOCALE_MOVIEBROWSER_SHORT_GENRE_MAJOR,
LOCALE_MOVIEBROWSER_SHORT_GENRE_MINOR,
LOCALE_MOVIEBROWSER_SHORT_INFO2,
LOCALE_MOVIEBROWSER_SHORT_PARENTAL_LOCKAGE,
LOCALE_MOVIEBROWSER_SHORT_CHANNEL,
LOCALE_MOVIEBROWSER_SHORT_BOOK,
LOCALE_MOVIEBROWSER_SHORT_QUALITY,
LOCALE_MOVIEBROWSER_SHORT_PREVPLAYDATE,
LOCALE_MOVIEBROWSER_SHORT_RECORDDATE,
LOCALE_MOVIEBROWSER_SHORT_PRODYEAR,
LOCALE_MOVIEBROWSER_SHORT_COUNTRY,
LOCALE_MOVIEBROWSER_SHORT_FORMAT,
LOCALE_MOVIEBROWSER_SHORT_AUDIO,
LOCALE_MOVIEBROWSER_SHORT_LENGTH,
LOCALE_MOVIEBROWSER_SHORT_SIZE,
NONEXISTANT_LOCALE
};
/* default row size in percent for any element */
#define MB_ROW_WIDTH_FILENAME 22
#define MB_ROW_WIDTH_FILEPATH 22
#define MB_ROW_WIDTH_TITLE 35
#define MB_ROW_WIDTH_SERIE 15
#define MB_ROW_WIDTH_INFO1 15
#define MB_ROW_WIDTH_MAJOR_GENRE 15
#define MB_ROW_WIDTH_MINOR_GENRE 8
#define MB_ROW_WIDTH_INFO2 25
#define MB_ROW_WIDTH_PARENTAL_LOCKAGE 4
#define MB_ROW_WIDTH_CHANNEL 15
#define MB_ROW_WIDTH_BOOKMARK 4
#define MB_ROW_WIDTH_QUALITY 10
#define MB_ROW_WIDTH_PREVPLAYDATE 12
#define MB_ROW_WIDTH_RECORDDATE 12
#define MB_ROW_WIDTH_PRODDATE 8
#define MB_ROW_WIDTH_COUNTRY 8
#define MB_ROW_WIDTH_GEOMETRIE 8
#define MB_ROW_WIDTH_AUDIO 8
#define MB_ROW_WIDTH_LENGTH 10
#define MB_ROW_WIDTH_SIZE 12
const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] =
{
MB_ROW_WIDTH_FILENAME,
MB_ROW_WIDTH_FILEPATH,
MB_ROW_WIDTH_TITLE,
MB_ROW_WIDTH_SERIE,
MB_ROW_WIDTH_INFO1,
MB_ROW_WIDTH_MAJOR_GENRE,
MB_ROW_WIDTH_MINOR_GENRE,
MB_ROW_WIDTH_INFO2,
MB_ROW_WIDTH_PARENTAL_LOCKAGE,
MB_ROW_WIDTH_CHANNEL,
MB_ROW_WIDTH_BOOKMARK,
MB_ROW_WIDTH_QUALITY,
MB_ROW_WIDTH_PREVPLAYDATE,
MB_ROW_WIDTH_RECORDDATE,
MB_ROW_WIDTH_PRODDATE,
MB_ROW_WIDTH_COUNTRY,
MB_ROW_WIDTH_GEOMETRIE,
MB_ROW_WIDTH_AUDIO,
MB_ROW_WIDTH_LENGTH,
MB_ROW_WIDTH_SIZE,
0 //MB_ROW_WIDTH_MAX_NUMBER
};
static MI_MOVIE_INFO* playing_info;
//------------------------------------------------------------------------
// sorting
//------------------------------------------------------------------------
#define FILEBROWSER_NUMBER_OF_SORT_VARIANTS 5
bool sortDirection = 0;
bool compare_to_lower(const char a, const char b)
{
return tolower(a) < tolower(b);
}
// sort operators
bool sortByTitle(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (std::lexicographical_compare(a->epgTitle.begin(), a->epgTitle.end(), b->epgTitle.begin(), b->epgTitle.end(), compare_to_lower))
return true;
if (std::lexicographical_compare(b->epgTitle.begin(), b->epgTitle.end(), a->epgTitle.begin(), a->epgTitle.end(), compare_to_lower))
return false;
return a->file.Time < b->file.Time;
}
bool sortByGenre(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (std::lexicographical_compare(a->epgInfo1.begin(), a->epgInfo1.end(), b->epgInfo1.begin(), b->epgInfo1.end(), compare_to_lower))
return true;
if (std::lexicographical_compare(b->epgInfo1.begin(), b->epgInfo1.end(), a->epgInfo1.begin(), a->epgInfo1.end(), compare_to_lower))
return false;
return sortByTitle(a,b);
}
bool sortByChannel(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (std::lexicographical_compare(a->epgChannel.begin(), a->epgChannel.end(), b->epgChannel.begin(), b->epgChannel.end(), compare_to_lower))
return true;
if (std::lexicographical_compare(b->epgChannel.begin(), b->epgChannel.end(), a->epgChannel.begin(), a->epgChannel.end(), compare_to_lower))
return false;
return sortByTitle(a,b);
}
bool sortByFileName(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (std::lexicographical_compare(a->file.getFileName().begin(), a->file.getFileName().end(), b->file.getFileName().begin(), b->file.getFileName().end(), compare_to_lower))
return true;
if (std::lexicographical_compare(b->file.getFileName().begin(), b->file.getFileName().end(), a->file.getFileName().begin(), a->file.getFileName().end(), compare_to_lower))
return false;
return a->file.Time < b->file.Time;
}
bool sortByRecordDate(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->file.Time > b->file.Time ;
else
return a->file.Time < b->file.Time ;
}
bool sortBySize(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->file.Size > b->file.Size;
else
return a->file.Size < b->file.Size;
}
bool sortByAge(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->parentalLockAge > b->parentalLockAge;
else
return a->parentalLockAge < b->parentalLockAge;
}
bool sortByQuality(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->quality > b->quality;
else
return a->quality < b->quality;
}
bool sortByDir(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->dirItNr > b->dirItNr;
else
return a->dirItNr < b->dirItNr;
}
bool sortByLastPlay(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
return a->dateOfLastPlay > b->dateOfLastPlay;
else
return a->dateOfLastPlay < b->dateOfLastPlay;
}
bool (* const sortBy[MB_INFO_MAX_NUMBER+1])(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b) =
{
&sortByFileName, //MB_INFO_FILENAME = 0,
&sortByDir, //MB_INFO_FILEPATH = 1,
&sortByTitle, //MB_INFO_TITLE = 2,
NULL, //MB_INFO_SERIE = 3,
&sortByGenre, //MB_INFO_INFO1 = 4,
NULL, //MB_INFO_MAJOR_GENRE = 5,
NULL, //MB_INFO_MINOR_GENRE = 6,
NULL, //MB_INFO_INFO2 = 7,
&sortByAge, //MB_INFO_PARENTAL_LOCKAGE = 8,
&sortByChannel, //MB_INFO_CHANNEL = 9,
NULL, //MB_INFO_BOOKMARK = 10,
&sortByQuality, //MB_INFO_QUALITY = 11,
&sortByLastPlay, //MB_INFO_PREVPLAYDATE = 12,
&sortByRecordDate, //MB_INFO_RECORDDATE = 13,
NULL, //MB_INFO_PRODDATE = 14,
NULL, //MB_INFO_COUNTRY = 15,
NULL, //MB_INFO_GEOMETRIE = 16,
NULL, //MB_INFO_AUDIO = 17,
NULL, //MB_INFO_LENGTH = 18,
&sortBySize, //MB_INFO_SIZE = 19,
NULL //MB_INFO_MAX_NUMBER = 20
};
CMovieBrowser::CMovieBrowser(): configfile ('\t')
{
init();
}
CMovieBrowser::~CMovieBrowser()
{
//TRACE("[mb] del\n");
hide();
m_dir.clear();
m_dirNames.clear();
m_vMovieInfo.clear();
m_vHandleBrowserList.clear();
m_vHandleRecordList.clear();
m_vHandlePlayList.clear();
m_vHandleSerienames.clear();
clearListLines();
if (CChannelLogo) {
delete CChannelLogo;
CChannelLogo = NULL;
}
}
void CMovieBrowser::clearListLines()
{
for (int i = 0; i < MB_MAX_ROWS; i++)
{
m_browserListLines.lineArray[i].clear();
m_FilterLines.lineArray[i].clear();
}
m_browserListLines.Icon.clear();
m_browserListLines.marked.clear();
for (int i = 0; i < 2; i++)
{
m_recordListLines.lineArray[i].clear();
m_playListLines.lineArray[i].clear();
}
m_recordListLines.marked.clear();
m_playListLines.marked.clear();
}
void CMovieBrowser::clearSelection()
{
//TRACE("[mb]->%s\n", __func__);
for (unsigned i = 0; i < m_vMovieInfo.size(); i++)
m_vMovieInfo[i].marked = false;
m_pcBrowser->clearMarked();
m_pcLastPlay->clearMarked();
m_pcLastRecord->clearMarked();
}
void CMovieBrowser::fileInfoStale(void)
{
m_file_info_stale = true;
m_seriename_stale = true;
// Also release memory buffers, since we have to reload this stuff next time anyhow
m_dirNames.clear();
m_vMovieInfo.clear();
m_vHandleBrowserList.clear();
m_vHandleRecordList.clear();
m_vHandlePlayList.clear();
m_vHandleSerienames.clear();
clearListLines();
}
void CMovieBrowser::init(void)
{
bool reinit_rows = false;
int i = 0;
//TRACE("[mb]->init\n");
initGlobalSettings();
loadSettings(&m_settings);
m_file_info_stale = true;
m_seriename_stale = true;
framebuffer = CFrameBuffer::getInstance();
m_pcBrowser = NULL;
m_pcLastPlay = NULL;
m_pcLastRecord = NULL;
m_pcInfo = NULL;
m_pcFilter = NULL;
m_windowFocus = MB_FOCUS_BROWSER;
m_textTitle = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD);
m_currentStartPos = 0;
m_movieSelectionHandler = NULL;
m_currentBrowserSelection = 0;
m_currentRecordSelection = 0;
m_currentPlaySelection = 0;
m_prevBrowserSelection = 0;
m_prevRecordSelection = 0;
m_prevPlaySelection = 0;
m_storageType = MB_STORAGE_TYPE_NFS;
m_parentalLock = m_settings.parentalLock;
// check g_setting values
if (m_settings.gui >= MB_GUI_MAX_NUMBER)
m_settings.gui = MB_GUI_MOVIE_INFO;
if (m_settings.sorting.direction >= MB_DIRECTION_MAX_NUMBER)
m_settings.sorting.direction = MB_DIRECTION_DOWN;
if (m_settings.sorting.item >= MB_INFO_MAX_NUMBER)
m_settings.sorting.item = MB_INFO_TITLE;
if (m_settings.filter.item >= MB_INFO_MAX_NUMBER)
m_settings.filter.item = MB_INFO_MAX_NUMBER;
if (m_settings.parentalLockAge >= MI_PARENTAL_MAX_NUMBER)
m_settings.parentalLockAge = MI_PARENTAL_OVER18;
if (m_settings.parentalLock >= MB_PARENTAL_LOCK_MAX_NUMBER)
m_settings.parentalLock = MB_PARENTAL_LOCK_OFF;
/* convert from old pixel-based to new percent values */
if (m_settings.browserFrameHeight > 100)
m_settings.browserFrameHeight = 50;
if (m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT)
m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT;
if (m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT)
m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT;
/* the old code had row widths in pixels, not percent. Check if we have
* an old configuration (one of the rows hopefully was larger than 100 pixels... */
for (i = 0; i < m_settings.browserRowNr; i++)
{
if (m_settings.browserRowWidth[i] > 100)
{
printf("[moviebrowser] old row config detected - converting...\n");
reinit_rows = true;
break;
}
}
if (reinit_rows)
{
for (i = 0; i < m_settings.browserRowNr; i++)
m_settings.browserRowWidth[i] = m_defaultRowWidth[m_settings.browserRowItem[i]];
}
initFrames();
initRows();
/* save settings here, because exec() will load them again... */
if (reinit_rows)
saveSettings(&m_settings);
refreshLastPlayList();
refreshLastRecordList();
refreshBrowserList();
refreshFilterList();
g_PicViewer->getSupportedImageFormats(PicExts);
show_mode = MB_SHOW_RECORDS; //FIXME
CChannelLogo = NULL;
}
void CMovieBrowser::initGlobalSettings(void)
{
//TRACE("[mb]->initGlobalSettings\n");
m_settings.gui = MB_GUI_MOVIE_INFO;
m_settings.lastPlayMaxItems = NUMBER_OF_MOVIES_LAST;
m_settings.lastRecordMaxItems = NUMBER_OF_MOVIES_LAST;
m_settings.browser_serie_mode = 0;
m_settings.serie_auto_create = 0;
m_settings.sorting.item = MB_INFO_TITLE;
m_settings.sorting.direction = MB_DIRECTION_DOWN;
m_settings.filter.item = MB_INFO_MAX_NUMBER;
m_settings.filter.optionString = "";
m_settings.filter.optionVar = 0;
m_settings.parentalLockAge = MI_PARENTAL_OVER18;
m_settings.parentalLock = MB_PARENTAL_LOCK_OFF;
m_settings.storageDirMovieUsed = true;
m_settings.storageDirRecUsed = true;
m_settings.reload = true;
m_settings.remount = false;
for (int i = 0; i < MB_MAX_DIRS; i++)
{
m_settings.storageDir[i] = "";
m_settings.storageDirUsed[i] = 0;
}
/***** Browser List **************/
m_settings.browserFrameHeight = 50; /* percent */
m_settings.browserRowNr = 6;
m_settings.browserRowItem[0] = MB_INFO_CHANNEL;
m_settings.browserRowItem[1] = MB_INFO_TITLE;
m_settings.browserRowItem[2] = MB_INFO_RECORDDATE;
m_settings.browserRowItem[3] = MB_INFO_SIZE;
m_settings.browserRowItem[4] = MB_INFO_LENGTH;
m_settings.browserRowItem[5] = MB_INFO_INFO1;
m_settings.browserRowItem[6] = MB_INFO_MAX_NUMBER;
m_settings.browserRowItem[7] = MB_INFO_MAX_NUMBER;
m_settings.browserRowItem[8] = MB_INFO_MAX_NUMBER;
m_settings.browserRowWidth[0] = m_defaultRowWidth[m_settings.browserRowItem[0]]; //300;
m_settings.browserRowWidth[1] = m_defaultRowWidth[m_settings.browserRowItem[1]]; //100;
m_settings.browserRowWidth[2] = m_defaultRowWidth[m_settings.browserRowItem[2]]; //80;
m_settings.browserRowWidth[3] = m_defaultRowWidth[m_settings.browserRowItem[3]]; //50;
m_settings.browserRowWidth[4] = m_defaultRowWidth[m_settings.browserRowItem[4]]; //30;
m_settings.browserRowWidth[5] = m_defaultRowWidth[m_settings.browserRowItem[5]]; //30;
m_settings.browserRowWidth[6] = m_defaultRowWidth[m_settings.browserRowItem[6]];
m_settings.browserRowWidth[7] = m_defaultRowWidth[m_settings.browserRowItem[7]];
m_settings.browserRowWidth[8] = m_defaultRowWidth[m_settings.browserRowItem[8]];
m_settings.ts_only = 0;
m_settings.ytmode = cYTFeedParser::MOST_POPULAR;
m_settings.ytorderby = cYTFeedParser::ORDERBY_PUBLISHED;
m_settings.ytresults = 10;
m_settings.ytregion = "default";
m_settings.ytquality = 37;
m_settings.ytconcconn = 4;
m_settings.ytsearch_history_max = 0;
m_settings.ytsearch_history_size = 0;
}
void CMovieBrowser::initFrames(void)
{
m_pcFontFoot = FOOT_FONT;
m_pcFontTitle = TITLE_FONT;
//TRACE("[mb]->%s\n", __func__);
m_cBoxFrame.iWidth = framebuffer->getScreenWidthRel();
m_cBoxFrame.iHeight = framebuffer->getScreenHeightRel();
m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth);
m_cBoxFrame.iY = getScreenStartY(m_cBoxFrame.iHeight);
m_cBoxFrameTitleRel.iX = 0;
m_cBoxFrameTitleRel.iY = 0;
m_cBoxFrameTitleRel.iWidth = m_cBoxFrame.iWidth;
m_cBoxFrameTitleRel.iHeight = m_pcFontTitle->getHeight();
const int pic_h = 39;
m_cBoxFrameTitleRel.iHeight = std::max(m_cBoxFrameTitleRel.iHeight, pic_h);
m_cBoxFrameBrowserList.iX = m_cBoxFrame.iX;
m_cBoxFrameBrowserList.iY = m_cBoxFrame.iY + m_cBoxFrameTitleRel.iHeight;
m_cBoxFrameBrowserList.iWidth = m_cBoxFrame.iWidth;
m_cBoxFrameBrowserList.iHeight = m_cBoxFrame.iHeight * m_settings.browserFrameHeight / 100;
m_cBoxFrameFootRel.iX = 0;
m_cBoxFrameFootRel.iHeight = refreshFoot(false);
m_cBoxFrameFootRel.iY = m_cBoxFrame.iHeight - m_cBoxFrameFootRel.iHeight;
m_cBoxFrameFootRel.iWidth = m_cBoxFrameBrowserList.iWidth;
m_cBoxFrameLastPlayList.iX = m_cBoxFrameBrowserList.iX;
m_cBoxFrameLastPlayList.iY = m_cBoxFrameBrowserList.iY ;
m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (INTER_FRAME_SPACE>>1);
m_cBoxFrameLastPlayList.iHeight = m_cBoxFrameBrowserList.iHeight;
m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + INTER_FRAME_SPACE;
m_cBoxFrameLastRecordList.iY = m_cBoxFrameLastPlayList.iY;
m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - INTER_FRAME_SPACE;
m_cBoxFrameLastRecordList.iHeight = m_cBoxFrameLastPlayList.iHeight;
m_cBoxFrameInfo.iX = m_cBoxFrameBrowserList.iX;
m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + INTER_FRAME_SPACE;
m_cBoxFrameInfo.iWidth = m_cBoxFrameBrowserList.iWidth;
m_cBoxFrameInfo.iHeight = m_cBoxFrame.iHeight - m_cBoxFrameBrowserList.iHeight - INTER_FRAME_SPACE - m_cBoxFrameFootRel.iHeight - m_cBoxFrameTitleRel.iHeight;
m_cBoxFrameFilter.iX = m_cBoxFrameInfo.iX;
m_cBoxFrameFilter.iY = m_cBoxFrameInfo.iY;
m_cBoxFrameFilter.iWidth = m_cBoxFrameInfo.iWidth;
m_cBoxFrameFilter.iHeight = m_cBoxFrameInfo.iHeight;
}
void CMovieBrowser::initRows(void)
{
//TRACE("[mb]->%s\n", __func__);
/***** Last Play List **************/
m_settings.lastPlayRowNr = 2;
m_settings.lastPlayRow[0] = MB_INFO_TITLE;
m_settings.lastPlayRow[1] = MB_INFO_PREVPLAYDATE;
/* the "last played" / "last recorded" windows have only half the width, so
multiply the relative width with 2 */
m_settings.lastPlayRowWidth[1] = m_defaultRowWidth[m_settings.lastPlayRow[1]] * 2 + 1;
m_settings.lastPlayRowWidth[0] = 100 - m_settings.lastPlayRowWidth[1];
/***** Last Record List **************/
m_settings.lastRecordRowNr = 2;
m_settings.lastRecordRow[0] = MB_INFO_TITLE;
m_settings.lastRecordRow[1] = MB_INFO_RECORDDATE;
m_settings.lastRecordRowWidth[1] = m_defaultRowWidth[m_settings.lastRecordRow[1]] * 2 + 1;
m_settings.lastRecordRowWidth[0] = 100 - m_settings.lastRecordRowWidth[1];
}
void CMovieBrowser::defaultSettings(MB_SETTINGS* /*settings*/)
{
unlink(MOVIEBROWSER_SETTINGS_FILE);
configfile.clear();
initGlobalSettings();
}
bool CMovieBrowser::loadSettings(MB_SETTINGS* settings)
{
//TRACE("[mb]->%s\n", __func__);
bool result = configfile.loadConfig(MOVIEBROWSER_SETTINGS_FILE);
if (!result) {
TRACE("CMovieBrowser::loadSettings failed\n");
return result;
}
settings->gui = (MB_GUI)configfile.getInt32("mb_gui", MB_GUI_MOVIE_INFO);
settings->lastPlayMaxItems = configfile.getInt32("mb_lastPlayMaxItems", NUMBER_OF_MOVIES_LAST);
settings->lastRecordMaxItems = configfile.getInt32("mb_lastRecordMaxItems", NUMBER_OF_MOVIES_LAST);
settings->browser_serie_mode = configfile.getInt32("mb_browser_serie_mode", 0);
settings->serie_auto_create = configfile.getInt32("mb_serie_auto_create", 0);
settings->ts_only = configfile.getInt32("mb_ts_only", 0);
settings->sorting.item = (MB_INFO_ITEM)configfile.getInt32("mb_sorting_item", MB_INFO_RECORDDATE);
settings->sorting.direction = (MB_DIRECTION)configfile.getInt32("mb_sorting_direction", MB_DIRECTION_UP);
settings->filter.item = (MB_INFO_ITEM)configfile.getInt32("mb_filter_item", MB_INFO_MAX_NUMBER);
settings->filter.optionString = configfile.getString("mb_filter_optionString", "");
settings->filter.optionVar = configfile.getInt32("mb_filter_optionVar", 0);
settings->parentalLockAge = (MI_PARENTAL_LOCKAGE)configfile.getInt32("mb_parentalLockAge", MI_PARENTAL_OVER18);
settings->parentalLock = (MB_PARENTAL_LOCK)configfile.getInt32("mb_parentalLock", MB_PARENTAL_LOCK_ACTIVE);
settings->storageDirRecUsed = (bool)configfile.getInt32("mb_storageDir_rec", true);
settings->storageDirMovieUsed = (bool)configfile.getInt32("mb_storageDir_movie", true);
settings->reload = (bool)configfile.getInt32("mb_reload", true);
settings->remount = (bool)configfile.getInt32("mb_remount", false);
for (int i = 0; i < MB_MAX_DIRS; i++)
{
settings->storageDir[i] = configfile.getString("mb_dir_" + to_string(i), "");
settings->storageDirUsed[i] = configfile.getInt32("mb_dir_used" + to_string(i), false);
}
/* these variables are used for the listframes */
settings->browserFrameHeight = configfile.getInt32("mb_browserFrameHeight", 50);
settings->browserRowNr = configfile.getInt32("mb_browserRowNr", 0);
for (int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++)
{
settings->browserRowItem[i] = (MB_INFO_ITEM)configfile.getInt32("mb_browserRowItem_" + to_string(i), MB_INFO_MAX_NUMBER);
settings->browserRowWidth[i] = configfile.getInt32("mb_browserRowWidth_" + to_string(i), 50);
}
settings->ytmode = configfile.getInt32("mb_ytmode", cYTFeedParser::MOST_POPULAR);
settings->ytorderby = configfile.getInt32("mb_ytorderby", cYTFeedParser::ORDERBY_PUBLISHED);
settings->ytresults = configfile.getInt32("mb_ytresults", 10);
settings->ytquality = configfile.getInt32("mb_ytquality", 37); // itag value (MP4, 1080p)
settings->ytconcconn = configfile.getInt32("mb_ytconcconn", 4); // concurrent connections
settings->ytregion = configfile.getString("mb_ytregion", "default");
settings->ytsearch = configfile.getString("mb_ytsearch", "");
settings->ytthumbnaildir = configfile.getString("mb_ytthumbnaildir", "/tmp/ytparser");
settings->ytvid = configfile.getString("mb_ytvid", "");
settings->ytsearch_history_max = configfile.getInt32("mb_ytsearch_history_max", 10);
settings->ytsearch_history_size = configfile.getInt32("mb_ytsearch_history_size", 0);
if (settings->ytsearch_history_size > settings->ytsearch_history_max)
settings->ytsearch_history_size = settings->ytsearch_history_max;
settings->ytsearch_history.clear();
for (int i = 0; i < settings->ytsearch_history_size; i++) {
std::string s = configfile.getString("mb_ytsearch_history_" + to_string(i));
if (!s.empty())
settings->ytsearch_history.push_back(configfile.getString("mb_ytsearch_history_" + to_string(i), ""));
}
settings->ytsearch_history_size = settings->ytsearch_history.size();
return (result);
}
bool CMovieBrowser::saveSettings(MB_SETTINGS* settings)
{
bool result = true;
TRACE("[mb]->%s\n", __func__);
configfile.setInt32("mb_lastPlayMaxItems", settings->lastPlayMaxItems);
configfile.setInt32("mb_lastRecordMaxItems", settings->lastRecordMaxItems);
configfile.setInt32("mb_browser_serie_mode", settings->browser_serie_mode);
configfile.setInt32("mb_serie_auto_create", settings->serie_auto_create);
configfile.setInt32("mb_ts_only", settings->ts_only);
configfile.setInt32("mb_gui", settings->gui);
configfile.setInt32("mb_sorting_item", settings->sorting.item);
configfile.setInt32("mb_sorting_direction", settings->sorting.direction);
configfile.setInt32("mb_filter_item", settings->filter.item);
configfile.setString("mb_filter_optionString", settings->filter.optionString);
configfile.setInt32("mb_filter_optionVar", settings->filter.optionVar);
configfile.setInt32("mb_storageDir_rec", settings->storageDirRecUsed);
configfile.setInt32("mb_storageDir_movie", settings->storageDirMovieUsed);
configfile.setInt32("mb_parentalLockAge", settings->parentalLockAge);
configfile.setInt32("mb_parentalLock", settings->parentalLock);
configfile.setInt32("mb_reload", settings->reload);
configfile.setInt32("mb_remount", settings->remount);
for (int i = 0; i < MB_MAX_DIRS; i++)
{
configfile.setString("mb_dir_" + to_string(i), settings->storageDir[i]);
configfile.setInt32("mb_dir_used" + to_string(i), settings->storageDirUsed[i]); // do not save this so far
}
/* these variables are used for the listframes */
configfile.setInt32("mb_browserFrameHeight", settings->browserFrameHeight);
configfile.setInt32("mb_browserRowNr",settings->browserRowNr);
for (int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++)
{
configfile.setInt32("mb_browserRowItem_" + to_string(i), settings->browserRowItem[i]);
configfile.setInt32("mb_browserRowWidth_" + to_string(i), settings->browserRowWidth[i]);
}
configfile.setInt32("mb_ytmode", settings->ytmode);
configfile.setInt32("mb_ytorderby", settings->ytorderby);
configfile.setInt32("mb_ytresults", settings->ytresults);
configfile.setInt32("mb_ytquality", settings->ytquality);
configfile.setInt32("mb_ytconcconn", settings->ytconcconn);
configfile.setString("mb_ytregion", settings->ytregion);
configfile.setString("mb_ytsearch", settings->ytsearch);
configfile.setString("mb_ytthumbnaildir", settings->ytthumbnaildir);
configfile.setString("mb_ytvid", settings->ytvid);
settings->ytsearch_history_size = settings->ytsearch_history.size();
if (settings->ytsearch_history_size > settings->ytsearch_history_max)
settings->ytsearch_history_size = settings->ytsearch_history_max;
configfile.setInt32("mb_ytsearch_history_max", settings->ytsearch_history_max);
configfile.setInt32("mb_ytsearch_history_size", settings->ytsearch_history_size);
std::list<std::string>:: iterator it = settings->ytsearch_history.begin();
for (int i = 0; i < settings->ytsearch_history_size; i++, ++it)
configfile.setString("mb_ytsearch_history_" + to_string(i), *it);
if (configfile.getModifiedFlag())
configfile.saveConfig(MOVIEBROWSER_SETTINGS_FILE);
return (result);
}
int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey)
{
int returnval = menu_return::RETURN_REPAINT;
if (actionKey == "loaddefault")
{
defaultSettings(&m_settings);
}
else if (actionKey == "show_movie_info_menu")
{
if (m_movieSelectionHandler != NULL)
return showMovieInfoMenu(m_movieSelectionHandler);
}
else if (actionKey == "save_movie_info")
{
m_movieInfo.saveMovieInfo(*m_movieSelectionHandler);
}
else if (actionKey == "save_movie_info_all")
{
std::vector<MI_MOVIE_INFO*> * current_list=NULL;
if (m_windowFocus == MB_FOCUS_BROWSER) current_list = &m_vHandleBrowserList;
else if (m_windowFocus == MB_FOCUS_LAST_PLAY) current_list = &m_vHandlePlayList;
else if (m_windowFocus == MB_FOCUS_LAST_RECORD) current_list = &m_vHandleRecordList ;
if (current_list == NULL || m_movieSelectionHandler == NULL)
return returnval;
CHintBox loadBox(LOCALE_MOVIEBROWSER_HEAD,g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE));
loadBox.paint();
for (unsigned int i = 0; i< current_list->size();i++)
{
if (!((*current_list)[i]->parentalLockAge != 0 && movieInfoUpdateAllIfDestEmptyOnly == true) &&
movieInfoUpdateAll[MB_INFO_TITLE])
(*current_list)[i]->parentalLockAge = m_movieSelectionHandler->parentalLockAge;
if (!(!(*current_list)[i]->serieName.empty() && movieInfoUpdateAllIfDestEmptyOnly == true) &&
movieInfoUpdateAll[MB_INFO_SERIE])
(*current_list)[i]->serieName = m_movieSelectionHandler->serieName;
if (!(!(*current_list)[i]->productionCountry.empty() && movieInfoUpdateAllIfDestEmptyOnly == true) &&
movieInfoUpdateAll[MB_INFO_COUNTRY])
(*current_list)[i]->productionCountry = m_movieSelectionHandler->productionCountry;
if (!((*current_list)[i]->genreMajor!=0 && movieInfoUpdateAllIfDestEmptyOnly == true) &&
movieInfoUpdateAll[MB_INFO_MAJOR_GENRE])
(*current_list)[i]->genreMajor = m_movieSelectionHandler->genreMajor;
if (!((*current_list)[i]->quality!=0 && movieInfoUpdateAllIfDestEmptyOnly == true) &&
movieInfoUpdateAll[MB_INFO_QUALITY])
(*current_list)[i]->quality = m_movieSelectionHandler->quality;
m_movieInfo.saveMovieInfo(*((*current_list)[i]));
}
loadBox.hide();
}
else if (actionKey == "reload_movie_info")
{
loadMovies(false);
updateMovieSelection();
}
else if (actionKey == "run")
{
if (parent) parent->hide();
exec(NULL);
}
else if (actionKey == "book_clear_all")
{
m_movieSelectionHandler->bookmarks.start =0;
m_movieSelectionHandler->bookmarks.end =0;
m_movieSelectionHandler->bookmarks.lastPlayStop =0;
for (int i = 0; i < MI_MOVIE_BOOK_USER_MAX; i++)
{
m_movieSelectionHandler->bookmarks.user[i].name.empty();
m_movieSelectionHandler->bookmarks.user[i].length =0;
m_movieSelectionHandler->bookmarks.user[i].pos =0;
}
}
else if (actionKey == "show_menu")
{
showMenu(true);
saveSettings(&m_settings);
}
else if (actionKey == "show_ytmenu")
{
showYTMenu(true);
saveSettings(&m_settings);
}
return returnval;
}
int CMovieBrowser::exec(const char* path)
{
bool res = false;
menu_ret = menu_return::RETURN_REPAINT;
TRACE("[mb]->%s\n", __func__);
int returnDefaultOnTimeout = true;
neutrino_msg_t msg;
neutrino_msg_data_t data;
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
loadSettings(&m_settings);
initFrames();
// Clear all, to avoid 'jump' in screen
m_vHandleBrowserList.clear();
m_vHandleRecordList.clear();
m_vHandlePlayList.clear();
clearListLines();
m_selectedDir = path;
if (m_settings.remount == true)
{
TRACE("[mb] remount\n");
/* FIXME: add hintbox ? */
//umount automount dirs
for (int i = 0; i < NETWORK_NFS_NR_OF_ENTRIES; i++)
{
if (g_settings.network_nfs[i].automount)
umount2(g_settings.network_nfs[i].local_dir.c_str(), MNT_FORCE);
}
CFSMounter::automount();
}
if (paint() == false)
return menu_ret;// paint failed due to less memory, exit
bool loop = true;
bool result;
int timeout = g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
while (loop)
{
framebuffer->blit();
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
result = onButtonPress(msg);
if (result == false)
{
if (msg == CRCInput::RC_timeout && returnDefaultOnTimeout)
{
TRACE("[mb] Timerevent\n");
loop = false;
}
else if (msg == CRCInput::RC_ok)
{
for (unsigned int i = 0; i < m_vMovieInfo.size(); i++) {
if (m_vMovieInfo[i].marked) {
TRACE("[mb] has selected\n");
res = true;
break;
}
}
if (res)
break;
m_currentStartPos = 0;
if (m_movieSelectionHandler != NULL)
{
// If there is any available bookmark, show the bookmark menu
if (m_movieSelectionHandler->bookmarks.lastPlayStop != 0 ||
m_movieSelectionHandler->bookmarks.start != 0)
{
TRACE("[mb] stop: %d start:%d \n",m_movieSelectionHandler->bookmarks.lastPlayStop,m_movieSelectionHandler->bookmarks.start);
m_currentStartPos = showStartPosSelectionMenu(); // display start menu m_currentStartPos =
}
if (show_mode == MB_SHOW_YT)
cYTCache::getInstance()->useCachedCopy(m_movieSelectionHandler);
if (m_currentStartPos >= 0) {
playing_info = m_movieSelectionHandler;
TRACE("[mb] start pos: %d s\n",m_currentStartPos);
res = true;
loop = false;
} else
refresh();
}
}
else if ((show_mode == MB_SHOW_YT) && (msg == (neutrino_msg_t) g_settings.key_record) && m_movieSelectionHandler)
{
m_movieSelectionHandler->source = (show_mode == MB_SHOW_YT) ? MI_MOVIE_INFO::YT : MI_MOVIE_INFO::NK;
if (cYTCache::getInstance()->addToCache(m_movieSelectionHandler)) {
const char *format = g_Locale->getText(LOCALE_MOVIEBROWSER_YT_CACHE_ADD);
char buf[1024];
snprintf(buf, sizeof(buf), format, m_movieSelectionHandler->file.Name.c_str());
CHintBox hintBox(LOCALE_MOVIEBROWSER_YT_CACHE, buf);
hintBox.paint();
sleep(1);
hintBox.hide();
}
}
else if (msg == CRCInput::RC_home)
{
loop = false;
}
else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites) {
//FIXME do nothing ?
}
else if (msg == NeutrinoMessages::STANDBY_ON ||
msg == NeutrinoMessages::SHUTDOWN ||
msg == NeutrinoMessages::SLEEPTIMER)
{
menu_ret = menu_return::RETURN_EXIT_ALL;
loop = false;
g_RCInput->postMsg(msg, data);
}
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
{
TRACE("[mb]->exec: getInstance\n");
menu_ret = menu_return::RETURN_EXIT_ALL;
loop = false;
}
}
if (msg <= CRCInput::RC_MaxRC)
timeoutEnd = CRCInput::calcTimeoutEnd(timeout); // calcualate next timeout
}
hide();
framebuffer->blit();
//TRACE(" return %d\n",res);
m_prevBrowserSelection = m_currentBrowserSelection;
m_prevRecordSelection = m_currentRecordSelection;
m_prevPlaySelection = m_currentPlaySelection;
saveSettings(&m_settings);
// make stale if we should reload the next time, but not if movie has to be played
if (m_settings.reload == true && res == false)
{
TRACE("[mb] force reload next time\n");
fileInfoStale();
}
//CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
return (res);
}
void CMovieBrowser::hide(void)
{
//TRACE("[mb]->%s\n", __func__);
framebuffer->paintBackground();
if (m_pcFilter != NULL)
m_currentFilterSelection = m_pcFilter->getSelectedLine();
delete m_pcFilter;
m_pcFilter = NULL;
if (m_pcBrowser != NULL)
m_currentBrowserSelection = m_pcBrowser->getSelectedLine();
delete m_pcBrowser;
m_pcBrowser = NULL;
if (m_pcLastPlay != NULL)
m_currentPlaySelection = m_pcLastPlay->getSelectedLine();
delete m_pcLastPlay;
m_pcLastPlay = NULL;
if (m_pcLastRecord != NULL)
m_currentRecordSelection = m_pcLastRecord->getSelectedLine();
delete m_pcLastRecord;
m_pcLastRecord = NULL;
delete m_pcInfo;
m_pcInfo = NULL;
}
int CMovieBrowser::paint(void)
{
TRACE("[mb]->%s\n", __func__);
//CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD));
Font* font = NULL;
m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE,
&m_cBoxFrameBrowserList);
m_pcLastPlay = new CListFrame(&m_playListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE,
&m_cBoxFrameLastPlayList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_PLAYLIST),
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
m_pcLastRecord = new CListFrame(&m_recordListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE,
&m_cBoxFrameLastRecordList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_RECORDLIST),
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
m_pcFilter = new CListFrame(&m_FilterLines, font, CListFrame::SCROLL | CListFrame::TITLE,
&m_cBoxFrameFilter, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_FILTER),
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]);
m_pcInfo = new CTextBox(" ", NULL, CTextBox::TOP | CTextBox::SCROLL, &m_cBoxFrameInfo);
if (m_pcBrowser == NULL || m_pcLastPlay == NULL ||
m_pcLastRecord == NULL || m_pcInfo == NULL || m_pcFilter == NULL)
{
TRACE("[mb] paint, ERROR: not enought memory to allocate windows");
if (m_pcFilter != NULL)delete m_pcFilter;
if (m_pcBrowser != NULL)delete m_pcBrowser;
if (m_pcLastPlay != NULL) delete m_pcLastPlay;
if (m_pcLastRecord != NULL)delete m_pcLastRecord;
if (m_pcInfo != NULL) delete m_pcInfo;
m_pcInfo = NULL;
m_pcLastPlay = NULL;
m_pcLastRecord = NULL;
m_pcBrowser = NULL;
m_pcFilter = NULL;
return (false);
}
clearSelection();
if (m_file_info_stale == true) {
loadMovies();
} else {
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFilterList();
}
// get old movie selection and set position in windows
m_currentBrowserSelection = m_prevBrowserSelection;
m_currentRecordSelection = m_prevRecordSelection;
m_currentPlaySelection = m_prevPlaySelection;
m_pcBrowser->setSelectedLine(m_currentBrowserSelection);
m_pcLastRecord->setSelectedLine(m_currentRecordSelection);
m_pcLastPlay->setSelectedLine(m_currentPlaySelection);
updateMovieSelection();
refreshTitle();
refreshFoot();
refreshLCD();
if (m_settings.gui == MB_GUI_FILTER)
m_settings.gui = MB_GUI_MOVIE_INFO;
onSetGUIWindow(m_settings.gui);
return (true);
}
void CMovieBrowser::refresh(void)
{
TRACE("[mb]->%s\n", __func__);
refreshTitle();
if (m_pcBrowser != NULL && m_showBrowserFiles == true)
m_pcBrowser->refresh();
if (m_pcLastPlay != NULL && m_showLastPlayFiles == true)
m_pcLastPlay->refresh();
if (m_pcLastRecord != NULL && m_showLastRecordFiles == true)
m_pcLastRecord->refresh();
if (m_pcInfo != NULL && m_showMovieInfo == true)
refreshMovieInfo();
if (m_pcFilter != NULL && m_showFilter == true)
m_pcFilter->refresh();
refreshFoot();
refreshLCD();
}
std::string CMovieBrowser::getCurrentDir(void)
{
return(m_selectedDir);
}
CFile* CMovieBrowser::getSelectedFile(void)
{
//TRACE("[mb]->%s: %s\n", __func__, m_movieSelectionHandler->file.Name.c_str());
if (m_movieSelectionHandler != NULL)
return(&m_movieSelectionHandler->file);
else
return(NULL);
}
bool CMovieBrowser::getSelectedFiles(CFileList &flist, P_MI_MOVIE_LIST &mlist)
{
flist.clear();
mlist.clear();
P_MI_MOVIE_LIST *handle_list = &m_vHandleBrowserList;
if (m_windowFocus == MB_FOCUS_LAST_PLAY)
handle_list = &m_vHandlePlayList;
if (m_windowFocus == MB_FOCUS_LAST_RECORD)
handle_list = &m_vHandleRecordList;
for (unsigned int i = 0; i < handle_list->size(); i++) {
if ((*handle_list)[i]->marked) {
flist.push_back((*handle_list)[i]->file);
mlist.push_back((*handle_list)[i]);
}
}
return (!flist.empty());
}
std::string CMovieBrowser::getScreenshotName(std::string movie, bool is_dir)
{
std::string ext;
std::string ret;
size_t found;
if (is_dir)
found = movie.size();
else
found = movie.find_last_of(".");
if (found == string::npos)
return "";
vector<std::string>::iterator it = PicExts.begin();
while (it < PicExts.end()) {
ret = movie;
ext = *it;
ret.replace(found, ret.length() - found, ext);
++it;
if (!access(ret, F_OK))
return ret;
}
return "";
}
void CMovieBrowser::refreshMovieInfo(void)
{
TRACE("[mb]->%s m_vMovieInfo.size %d\n", __func__, (int)m_vMovieInfo.size());
//reset text before new init, m_pcInfo must be clean
std::string emptytext = " ";
m_pcInfo->setText(&emptytext);
if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
return;
std::string fname;
if (show_mode == MB_SHOW_YT) {
fname = m_movieSelectionHandler->tfile;
} else {
fname = getScreenshotName(m_movieSelectionHandler->file.Name, S_ISDIR(m_movieSelectionHandler->file.Mode));
if ((fname.empty()) && (m_movieSelectionHandler->file.Name.length() > 18)) {
std::string cover = m_movieSelectionHandler->file.Name;
cover.replace((cover.length()-18),15,""); //covername without yyyymmdd_hhmmss
fname = getScreenshotName(cover);
}
}
bool logo_ok = (!fname.empty());
int flogo_w = 0, flogo_h = 0;
if (logo_ok) {
int picw = (int)(((float)16 / (float)9) * (float)m_cBoxFrameInfo.iHeight);
int pich = m_cBoxFrameInfo.iHeight;
g_PicViewer->getSize(fname.c_str(), &flogo_w, &flogo_h);
g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, picw-2, pich-2);
#ifdef BOXMODEL_APOLLO
/* align for hw blit */
flogo_w = ((flogo_w + 3) / 4) * 4;
#endif
}
m_pcInfo->setText(&m_movieSelectionHandler->epgInfo2, logo_ok ? m_cBoxFrameInfo.iWidth-flogo_w-20 : 0);
static int logo_w = 0;
static int logo_h = 0;
int logo_w_max = m_cBoxFrameTitleRel.iWidth / 4;
//printf("refreshMovieInfo: EpgId %llx id %llx y %d\n", m_movieSelectionHandler->epgEpgId, m_movieSelectionHandler->epgId, m_cBoxFrameTitleRel.iY);
int lx = m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-logo_w-10;
int ly = m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-logo_h)/2;
short pb_hdd_offset = 104;
if (show_mode == MB_SHOW_YT)
pb_hdd_offset = 0;
static uint64_t old_EpgId = 0;
if (CChannelLogo && (old_EpgId != m_movieSelectionHandler->epgEpgId >>16)) {
if (newHeader)
CChannelLogo->clearSavedScreen();
else
CChannelLogo->hide();
delete CChannelLogo;
CChannelLogo = NULL;
}
if (old_EpgId != m_movieSelectionHandler->epgEpgId >>16) {
CChannelLogo = new CComponentsChannelLogo(0, 0, logo_w_max, m_cBoxFrameTitleRel.iHeight,
m_movieSelectionHandler->epgChannel, m_movieSelectionHandler->epgEpgId >>16);
old_EpgId = m_movieSelectionHandler->epgEpgId >>16;
}
if (CChannelLogo && CChannelLogo->hasLogo()) {
lx = m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX+m_cBoxFrameTitleRel.iWidth-CChannelLogo->getWidth()-10;
ly = m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY+ (m_cBoxFrameTitleRel.iHeight-CChannelLogo->getHeight())/2;
CChannelLogo->setXPos(lx - pb_hdd_offset);
CChannelLogo->setYPos(ly);
CChannelLogo->paint();
newHeader = false;
}
if (m_settings.gui != MB_GUI_FILTER && logo_ok) {
lx = m_cBoxFrameInfo.iX+m_cBoxFrameInfo.iWidth - flogo_w -14;
ly = m_cBoxFrameInfo.iY - 1 + (m_cBoxFrameInfo.iHeight-flogo_h)/2;
g_PicViewer->DisplayImage(fname, lx+2, ly+1, flogo_w, flogo_h, CFrameBuffer::TM_NONE);
framebuffer->paintVLineRel(lx, ly, flogo_h+1, COL_WHITE);
framebuffer->paintVLineRel(lx+flogo_w+2, ly, flogo_h+2, COL_WHITE);
framebuffer->paintHLineRel(lx, flogo_w+2, ly, COL_WHITE);
framebuffer->paintHLineRel(lx, flogo_w+2, ly+flogo_h+1, COL_WHITE);
}
framebuffer->blit();
}
void CMovieBrowser::info_hdd_level(bool paint_hdd)
{
if (show_mode == MB_SHOW_YT)
return;
struct statfs s;
long blocks_percent_used =0;
static long tmp_blocks_percent_used = 0;
if (getSelectedFile() != NULL) {
if (::statfs(getSelectedFile()->Name.c_str(), &s) == 0) {
long blocks_used = s.f_blocks - s.f_bfree;
blocks_percent_used = (blocks_used * 1000 / (blocks_used + s.f_bavail) + 5)/10;
}
}
if (tmp_blocks_percent_used != blocks_percent_used || paint_hdd) {
tmp_blocks_percent_used = blocks_percent_used;
const short pbw = 100;
const short border = m_cBoxFrameTitleRel.iHeight/4;
CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2);
pb.setType(CProgressBar::PB_REDRIGHT);
pb.setValues(blocks_percent_used, 100);
pb.paint(false);
}
}
void CMovieBrowser::refreshLCD(void)
{
if (m_vMovieInfo.empty() || m_movieSelectionHandler == NULL)
return;
CVFD::getInstance()->showMenuText(0, m_movieSelectionHandler->epgTitle.c_str(), -1, true); // UTF-8
}
void CMovieBrowser::refreshFilterList(void)
{
TRACE("[mb]->refreshFilterList %d\n",m_settings.filter.item);
std::string string_item;
m_FilterLines.rows = 1;
m_FilterLines.lineArray[0].clear();
m_FilterLines.rowWidth[0] = 100;
m_FilterLines.lineHeader[0] = "";
if (m_vMovieInfo.empty())
return; // exit here if nothing else is to do
if (m_settings.filter.item == MB_INFO_MAX_NUMBER)
{
// show Main List
string_item = g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR);
m_FilterLines.lineArray[0].push_back(string_item);
string_item = g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_INFO1);
m_FilterLines.lineArray[0].push_back(string_item);
string_item = g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PATH);
m_FilterLines.lineArray[0].push_back(string_item);
string_item = g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_SERIE);
m_FilterLines.lineArray[0].push_back(string_item);
}
else
{
std::string tmp = g_Locale->getText(LOCALE_MENU_BACK);
m_FilterLines.lineArray[0].push_back(tmp);
if (m_settings.filter.item == MB_INFO_FILEPATH)
{
for (unsigned int i = 0 ; i < m_dirNames.size(); i++)
m_FilterLines.lineArray[0].push_back(m_dirNames[i]);
}
else if (m_settings.filter.item == MB_INFO_INFO1)
{
for (unsigned int i = 0; i < m_vMovieInfo.size(); i++)
{
bool found = false;
for (unsigned int t = 0; t < m_FilterLines.lineArray[0].size() && found == false; t++)
{
if (strcmp(m_FilterLines.lineArray[0][t].c_str(),m_vMovieInfo[i].epgInfo1.c_str()) == 0)
found = true;
}
if (found == false)
m_FilterLines.lineArray[0].push_back(m_vMovieInfo[i].epgInfo1);
}
}
else if (m_settings.filter.item == MB_INFO_MAJOR_GENRE)
{
for (int i = 0; i < GENRE_ALL_COUNT; i++)
{
std::string tmpl = g_Locale->getText(GENRE_ALL[i].value);
m_FilterLines.lineArray[0].push_back(tmpl);
}
}
else if (m_settings.filter.item == MB_INFO_SERIE)
{
updateSerienames();
for (unsigned int i = 0; i < m_vHandleSerienames.size(); i++)
m_FilterLines.lineArray[0].push_back(m_vHandleSerienames[i]->serieName);
}
}
m_pcFilter->setLines(&m_FilterLines);
}
void CMovieBrowser::refreshLastPlayList(void) //P2
{
//TRACE("[mb]->refreshlastPlayList \n");
std::string string_item;
// Initialise and clear list array
m_playListLines.rows = m_settings.lastPlayRowNr;
for (int row = 0 ;row < m_settings.lastPlayRowNr; row++)
{
m_playListLines.lineArray[row].clear();
m_playListLines.rowWidth[row] = m_settings.lastPlayRowWidth[row];
m_playListLines.lineHeader[row] = g_Locale->getText(m_localizedItemName[m_settings.lastPlayRow[row]]);
}
m_playListLines.marked.clear();
m_vHandlePlayList.clear();
if (m_vMovieInfo.empty()) {
if (m_pcLastPlay != NULL)
m_pcLastPlay->setLines(&m_playListLines);
return; // exit here if nothing else is to do
}
MI_MOVIE_INFO* movie_handle;
// prepare Browser list for sorting and filtering
for (unsigned int file = 0; file < m_vMovieInfo.size(); file++)
{
if (isParentalLock(m_vMovieInfo[file]) == false)
{
movie_handle = &(m_vMovieInfo[file]);
m_vHandlePlayList.push_back(movie_handle);
}
}
// sort the not filtered files
onSortMovieInfoHandleList(m_vHandlePlayList,MB_INFO_PREVPLAYDATE,MB_DIRECTION_DOWN);
for (int handle=0; handle < (int) m_vHandlePlayList.size() && handle < m_settings.lastPlayMaxItems ;handle++)
{
for (int row = 0; row < m_settings.lastPlayRowNr ;row++)
{
if (getMovieInfoItem(*m_vHandlePlayList[handle], m_settings.lastPlayRow[row], &string_item) == false)
{
string_item = "n/a";
if (m_settings.lastPlayRow[row] == MB_INFO_TITLE)
getMovieInfoItem(*m_vHandlePlayList[handle], MB_INFO_FILENAME, &string_item);
}
m_playListLines.lineArray[row].push_back(string_item);
}
m_playListLines.marked.push_back(m_vHandlePlayList[handle]->marked);
}
m_pcLastPlay->setLines(&m_playListLines);
m_currentPlaySelection = m_pcLastPlay->getSelectedLine();
// update selected movie if browser is in the focus
if (m_windowFocus == MB_FOCUS_LAST_PLAY)
updateMovieSelection();
}
void CMovieBrowser::refreshLastRecordList(void) //P2
{
//TRACE("[mb]->refreshLastRecordList \n");
std::string string_item;
// Initialise and clear list array
m_recordListLines.rows = m_settings.lastRecordRowNr;
for (int row = 0 ;row < m_settings.lastRecordRowNr; row++)
{
m_recordListLines.lineArray[row].clear();
m_recordListLines.rowWidth[row] = m_settings.lastRecordRowWidth[row];
m_recordListLines.lineHeader[row] = g_Locale->getText(m_localizedItemName[m_settings.lastRecordRow[row]]);
}
m_recordListLines.marked.clear();
m_vHandleRecordList.clear();
if (m_vMovieInfo.empty()) {
if (m_pcLastRecord != NULL)
m_pcLastRecord->setLines(&m_recordListLines);
return; // exit here if nothing else is to do
}
MI_MOVIE_INFO* movie_handle;
// prepare Browser list for sorting and filtering
for (unsigned int file = 0; file < m_vMovieInfo.size(); file++)
{
if (isParentalLock(m_vMovieInfo[file]) == false)
{
movie_handle = &(m_vMovieInfo[file]);
m_vHandleRecordList.push_back(movie_handle);
}
}
// sort the not filtered files
onSortMovieInfoHandleList(m_vHandleRecordList,MB_INFO_RECORDDATE,MB_DIRECTION_DOWN);
for (int handle=0; handle < (int) m_vHandleRecordList.size() && handle < m_settings.lastRecordMaxItems ;handle++)
{
for (int row = 0; row < m_settings.lastRecordRowNr ;row++)
{
if (getMovieInfoItem(*m_vHandleRecordList[handle], m_settings.lastRecordRow[row], &string_item) == false)
{
string_item = "n/a";
if (m_settings.lastRecordRow[row] == MB_INFO_TITLE)
getMovieInfoItem(*m_vHandleRecordList[handle], MB_INFO_FILENAME, &string_item);
}
m_recordListLines.lineArray[row].push_back(string_item);
}
m_recordListLines.marked.push_back(m_vHandleRecordList[handle]->marked);
}
m_pcLastRecord->setLines(&m_recordListLines);
m_currentRecordSelection = m_pcLastRecord->getSelectedLine();
// update selected movie if browser is in the focus
if (m_windowFocus == MB_FOCUS_LAST_RECORD)
updateMovieSelection();
}
void CMovieBrowser::refreshBrowserList(void) //P1
{
TRACE("[mb]->%s\n", __func__);
std::string string_item;
// Initialise and clear list array
m_browserListLines.rows = m_settings.browserRowNr;
for (int row = 0; row < m_settings.browserRowNr; row++)
{
m_browserListLines.lineArray[row].clear();
m_browserListLines.rowWidth[row] = m_settings.browserRowWidth[row];
m_browserListLines.lineHeader[row] = g_Locale->getText(m_localizedItemName[m_settings.browserRowItem[row]]);
}
m_browserListLines.Icon.clear();
m_browserListLines.marked.clear();
m_vHandleBrowserList.clear();
if (m_vMovieInfo.empty())
{
m_currentBrowserSelection = 0;
m_movieSelectionHandler = NULL;
if (m_pcBrowser != NULL)
m_pcBrowser->setLines(&m_browserListLines);//FIXME last delete test
return; // exit here if nothing else is to do
}
MI_MOVIE_INFO* movie_handle;
// prepare Browser list for sorting and filtering
for (unsigned int file=0; file < m_vMovieInfo.size(); file++)
{
if (isFiltered(m_vMovieInfo[file]) == false &&
isParentalLock(m_vMovieInfo[file]) == false &&
(m_settings.browser_serie_mode == 0 || m_vMovieInfo[file].serieName.empty() || m_settings.filter.item == MB_INFO_SERIE))
{
movie_handle = &(m_vMovieInfo[file]);
m_vHandleBrowserList.push_back(movie_handle);
}
}
// sort the not filtered files
onSortMovieInfoHandleList(m_vHandleBrowserList,m_settings.sorting.item,MB_DIRECTION_AUTO);
for (unsigned int handle=0; handle < m_vHandleBrowserList.size() ;handle++)
{
for (int row = 0; row < m_settings.browserRowNr ;row++)
{
if (getMovieInfoItem(*m_vHandleBrowserList[handle], m_settings.browserRowItem[row], &string_item) == false)
{
string_item = "n/a";
if (m_settings.browserRowItem[row] == MB_INFO_TITLE)
getMovieInfoItem(*m_vHandleBrowserList[handle], MB_INFO_FILENAME, &string_item);
}
m_browserListLines.lineArray[row].push_back(string_item);
}
if (CRecordManager::getInstance()->getRecordInstance(m_vHandleBrowserList[handle]->file.Name) != NULL)
m_browserListLines.Icon.push_back(NEUTRINO_ICON_REC);
else
m_browserListLines.Icon.push_back("");
m_browserListLines.marked.push_back(m_vHandleBrowserList[handle]->marked);
}
m_pcBrowser->setLines(&m_browserListLines);
m_currentBrowserSelection = m_pcBrowser->getSelectedLine();
// update selected movie if browser is in the focus
if (m_windowFocus == MB_FOCUS_BROWSER)
updateMovieSelection();
}
void CMovieBrowser::refreshTitle(void)
{
std::string title = m_textTitle.c_str();
const char *icon = NEUTRINO_ICON_MOVIEPLAYER;
if (show_mode == MB_SHOW_YT) {
title = g_Locale->getText(LOCALE_MOVIEPLAYER_YTPLAYBACK);
title += " : ";
neutrino_locale_t loc = getFeedLocale();
title += g_Locale->getText(loc);
if (loc == LOCALE_MOVIEBROWSER_YT_RELATED || loc == LOCALE_MOVIEBROWSER_YT_SEARCH)
title += " \"" + m_settings.ytsearch + "\"";
icon = NEUTRINO_ICON_YTPLAY;
}
TRACE("[mb]->refreshTitle : %s\n", title.c_str());
int x = m_cBoxFrameTitleRel.iX + m_cBoxFrame.iX;
int y = m_cBoxFrameTitleRel.iY + m_cBoxFrame.iY;
int w = m_cBoxFrameTitleRel.iWidth;
int h = m_cBoxFrameTitleRel.iHeight;
CComponentsHeader header(x, y, w, h, title.c_str(), icon);
header.paint(CC_SAVE_SCREEN_NO);
newHeader = true;
info_hdd_level(true);
}
int CMovieBrowser::refreshFoot(bool show)
{
//TRACE("[mb]->refreshButtonLine\n");
int offset = (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD) ? 0 : 2;
neutrino_locale_t ok_loc = (m_settings.gui == MB_GUI_FILTER && m_windowFocus == MB_FOCUS_FILTER) ? LOCALE_BOOKMARKMANAGER_SELECT : LOCALE_MOVIEBROWSER_FOOT_PLAY;
int ok_loc_len = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_BOOKMARKMANAGER_SELECT), true),
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_PLAY), true));
std::string filter_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_FILTER);
filter_text += m_settings.filter.optionString;
std::string sort_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT);
sort_text += g_Locale->getText(m_localizedItemName[m_settings.sorting.item]);
int sort_text_len = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT), true);
int len = 0;
for (int i = 0; m_localizedItemName[i] != NONEXISTANT_LOCALE; i++)
len = std::max(len, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText(m_localizedItemName[i]), true));
sort_text_len += len;
button_label_ext footerButtons[] = {
{ NEUTRINO_ICON_BUTTON_RED, NONEXISTANT_LOCALE, sort_text.c_str(), sort_text_len, false },
{ NEUTRINO_ICON_BUTTON_GREEN, NONEXISTANT_LOCALE, filter_text.c_str(), 0, true },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_MOVIEBROWSER_FOOT_FOCUS, NULL, 0, false },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_MOVIEBROWSER_FOOT_REFRESH, NULL, 0, false },
{ NEUTRINO_ICON_BUTTON_OKAY, ok_loc, NULL, ok_loc_len, false },
{ NEUTRINO_ICON_BUTTON_MUTE_SMALL, LOCALE_FILEBROWSER_DELETE, NULL, 0, false },
{ NEUTRINO_ICON_BUTTON_PLAY, LOCALE_FILEBROWSER_MARK, NULL, 0, false },
{ NEUTRINO_ICON_BUTTON_MENU_SMALL, LOCALE_MOVIEBROWSER_FOOT_OPTIONS, NULL, 0, false }
};
int cnt = sizeof(footerButtons) / sizeof(button_label_ext);
if (show)
return paintButtons(footerButtons + offset, cnt - offset, m_cBoxFrame.iX+m_cBoxFrameFootRel.iX, m_cBoxFrame.iY+m_cBoxFrameFootRel.iY, m_cBoxFrameFootRel.iWidth, m_cBoxFrameFootRel.iHeight, m_cBoxFrameFootRel.iWidth);
else
return paintButtons(footerButtons, cnt, 0, 0, 0, 0, 0, false, NULL, NULL);
}
bool CMovieBrowser::onButtonPress(neutrino_msg_t msg)
{
// TRACE("[mb]->onButtonPress %d\n",msg);
bool result = onButtonPressMainFrame(msg);
if (result == false)
{
// if Main Frame didnot process the button, the focused window may do
if (m_windowFocus == MB_FOCUS_BROWSER)
result = onButtonPressBrowserList(msg);
else if (m_windowFocus == MB_FOCUS_LAST_PLAY)
result = onButtonPressLastPlayList(msg);
else if (m_windowFocus == MB_FOCUS_LAST_RECORD)
result = onButtonPressLastRecordList(msg);
else if (m_windowFocus == MB_FOCUS_MOVIE_INFO)
result = onButtonPressMovieInfoList(msg);
else if (m_windowFocus == MB_FOCUS_FILTER)
result = onButtonPressFilterList(msg);
}
return (result);
}
bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
{
//TRACE("[mb]->onButtonPressMainFrame: %d\n",msg);
bool result = true;
if (msg == CRCInput::RC_home)
{
if (m_settings.gui == MB_GUI_FILTER)
onSetGUIWindow(MB_GUI_MOVIE_INFO);
else
result = false;
}
else if (msg == (neutrino_msg_t)g_settings.key_volumedown)
{
onSetGUIWindowPrev();
}
else if (msg == (neutrino_msg_t)g_settings.key_volumeup)
{
onSetGUIWindowNext();
}
else if (msg == CRCInput::RC_green)
{
if (m_settings.gui == MB_GUI_MOVIE_INFO)
onSetGUIWindow(MB_GUI_FILTER);
else if (m_settings.gui == MB_GUI_FILTER)
onSetGUIWindow(MB_GUI_MOVIE_INFO);
// no effect if gui is last play or record
}
else if (msg == CRCInput::RC_yellow)
{
onSetFocusNext();
}
else if (msg == CRCInput::RC_blue)
{
if (show_mode == MB_SHOW_YT)
ytparser.Cleanup();
loadMovies();
refresh();
}
else if (msg == CRCInput::RC_red)
{
if (m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD)
{
// sorting is not avialable for last play and record
do
{
if (m_settings.sorting.item + 1 >= MB_INFO_MAX_NUMBER)
m_settings.sorting.item = (MB_INFO_ITEM)0;
else
m_settings.sorting.item = (MB_INFO_ITEM)(m_settings.sorting.item + 1);
} while (sortBy[m_settings.sorting.item] == NULL);
TRACE("[mb]->new sorting %d,%s\n",m_settings.sorting.item,g_Locale->getText(m_localizedItemName[m_settings.sorting.item]));
refreshBrowserList();
refreshFoot();
}
}
else if (msg == CRCInput::RC_spkr)
{
if ((!m_vMovieInfo.empty()) && (m_movieSelectionHandler != NULL)) {
bool onDelete = true;
bool skipAsk = false;
CRecordInstance* inst = CRecordManager::getInstance()->getRecordInstance(m_movieSelectionHandler->file.Name);
if (inst != NULL) {
std::string delName = m_movieSelectionHandler->epgTitle;
if (delName.empty())
delName = m_movieSelectionHandler->file.getFileName();
char buf1[1024];
snprintf(buf1, sizeof(buf1), g_Locale->getText(LOCALE_MOVIEBROWSER_ASK_REC_TO_DELETE), delName.c_str());
if (ShowMsg(LOCALE_RECORDINGMENU_RECORD_IS_RUNNING, buf1,
CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, false) == CMessageBox::mbrNo)
onDelete = false;
else {
CTimerd::RecordingStopInfo recinfo;
recinfo.channel_id = inst->GetChannelId();
recinfo.eventID = inst->GetRecordingId();
CRecordManager::getInstance()->Stop(&recinfo);
g_Timerd->removeTimerEvent(recinfo.eventID);
skipAsk = true;
}
}
if (onDelete)
onDeleteFile(*m_movieSelectionHandler, skipAsk);
}
}
else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info)
{
if (m_movieSelectionHandler != NULL)
{
m_movieInfo.showMovieInfo(*m_movieSelectionHandler);
refresh();
}
}
else if (msg == CRCInput::RC_setup)
{
if (show_mode == MB_SHOW_YT)
showYTMenu();
else
showMenu();
}
else if (msg == CRCInput::RC_text || msg == CRCInput::RC_radio) {
if ((show_mode == MB_SHOW_RECORDS) &&
(ShowMsg(LOCALE_MESSAGEBOX_INFO, msg == CRCInput::RC_radio ? LOCALE_MOVIEBROWSER_COPY : LOCALE_MOVIEBROWSER_COPIES, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes)) {
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_COPYING);
hintBox->paint();
sleep(1);
hintBox->hide();
delete hintBox;
framebuffer->paintBackground(); // clear screen
CMovieCut mc;
bool res = mc.copyMovie(m_movieSelectionHandler, &m_movieInfo, msg == CRCInput::RC_radio);
//g_RCInput->clearRCMsg();
if (res == 0)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_MOVIEBROWSER_COPY_FAILED, CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else
loadMovies();
refresh();
}
}
else if (msg == CRCInput::RC_audio) {
#if 0
if ((m_movieSelectionHandler == playing_info) && (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()))
ShowMsg(LOCALE_MESSAGEBOX_ERROR, "Impossible to cut playing movie.", CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else
#endif
if ((show_mode == MB_SHOW_RECORDS) &&
(ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_CUT, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes)) {
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_CUTTING);
hintBox->paint();
sleep(1);
hintBox->hide();
delete hintBox;
framebuffer->paintBackground(); // clear screen
CMovieCut mc;
bool res = mc.cutMovie(m_movieSelectionHandler, &m_movieInfo);
//g_RCInput->clearRCMsg();
if (!res)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_MOVIEBROWSER_CUT_FAILED, CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else
loadMovies();
refresh();
}
}
else if (msg == CRCInput::RC_games) {
if ((show_mode == MB_SHOW_RECORDS) && m_movieSelectionHandler != NULL) {
if ((m_movieSelectionHandler == playing_info) && (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()))
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_MOVIEBROWSER_TRUNCATE_FAILED_PLAYING, CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else if (m_movieSelectionHandler->bookmarks.end == 0)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_MOVIEBROWSER_BOOK_NO_END, CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else {
if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_TRUNCATE, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) {
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_TRUNCATING);
hintBox->paint();
CMovieCut mc;
bool res = mc.truncateMovie(m_movieSelectionHandler);
hintBox->hide();
delete hintBox;
g_RCInput->clearRCMsg();
if (!res)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_MOVIEBROWSER_TRUNCATE_FAILED, CMessageBox::mbrCancel, CMessageBox::mbCancel, NEUTRINO_ICON_ERROR);
else {
//printf("New movie info: size %lld len %d\n", res, m_movieSelectionHandler->bookmarks.end/60);
m_movieInfo.saveMovieInfo(*m_movieSelectionHandler);
loadMovies();
}
refresh();
}
}
}
} else if (msg == CRCInput::RC_favorites) {
if (m_movieSelectionHandler != NULL) {
if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_MOVIEBROWSER_DELETE_SCREENSHOT, CMessageBox::mbrNo, CMessageBox:: mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) {
std::string fname = getScreenshotName(m_movieSelectionHandler->file.Name, S_ISDIR(m_movieSelectionHandler->file.Mode));
if (!fname.empty())
unlink(fname.c_str());
refresh();
}
}
}
else
{
//TRACE("[mb]->onButtonPressMainFrame none\n");
result = false;
}
return (result);
}
void CMovieBrowser::markItem(CListFrame *list)
{
m_movieSelectionHandler->marked = !m_movieSelectionHandler->marked;
list->setSelectedMarked(m_movieSelectionHandler->marked);
list->scrollLineDown(1);
}
void CMovieBrowser::scrollBrowserItem(bool next, bool page)
{
int mode = -1;
if (show_mode == MB_SHOW_YT && next && ytparser.HaveNext() && m_pcBrowser->getSelectedLine() == m_pcBrowser->getLines() - 1)
mode = cYTFeedParser::NEXT;
if (show_mode == MB_SHOW_YT && !next && ytparser.HavePrev() && m_pcBrowser->getSelectedLine() == 0)
mode = cYTFeedParser::PREV;
if (mode >= 0) {
CHintBox loadBox(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
loadBox.paint();
ytparser.Cleanup();
loadYTitles(mode, m_settings.ytsearch, m_settings.ytvid);
loadBox.hide();
refreshBrowserList();
refreshMovieInfo();
g_RCInput->clearRCMsg();
return;
}
if (next)
page ? m_pcBrowser->scrollPageDown(1) : m_pcBrowser->scrollLineDown(1);
else
page ? m_pcBrowser->scrollPageUp(1) : m_pcBrowser->scrollLineUp(1);
}
bool CMovieBrowser::onButtonPressBrowserList(neutrino_msg_t msg)
{
//TRACE("[mb]->onButtonPressBrowserList %d\n",msg);
bool result = true;
if (msg == CRCInput::RC_up)
scrollBrowserItem(false, false);
else if (msg == CRCInput::RC_down)
scrollBrowserItem(true, false);
else if ((msg == (neutrino_msg_t)g_settings.key_pageup) || (msg == CRCInput::RC_left))
scrollBrowserItem(false, true);
else if ((msg == (neutrino_msg_t)g_settings.key_pagedown) || (msg == CRCInput::RC_right))
scrollBrowserItem(true, true);
else if (msg == CRCInput::RC_play)
markItem(m_pcBrowser);
else
result = false;
if (result == true)
updateMovieSelection();
return (result);
}
bool CMovieBrowser::onButtonPressLastPlayList(neutrino_msg_t msg)
{
//TRACE("[mb]->onButtonPressLastPlayList %d\n",msg);
bool result = true;
if (msg==CRCInput::RC_up)
m_pcLastPlay->scrollLineUp(1);
else if (msg == CRCInput::RC_down)
m_pcLastPlay->scrollLineDown(1);
else if (msg == CRCInput::RC_left || msg == (neutrino_msg_t)g_settings.key_pageup)
m_pcLastPlay->scrollPageUp(1);
else if (msg == CRCInput::RC_right || msg == (neutrino_msg_t)g_settings.key_pagedown)
m_pcLastPlay->scrollPageDown(1);
else if (msg == CRCInput::RC_play)
markItem(m_pcLastPlay);
else
result = false;
if (result == true)
updateMovieSelection();
return (result);
}
bool CMovieBrowser::onButtonPressLastRecordList(neutrino_msg_t msg)
{
//TRACE("[mb]->onButtonPressLastRecordList %d\n",msg);
bool result = true;
if (msg == CRCInput::RC_up)
m_pcLastRecord->scrollLineUp(1);
else if (msg == CRCInput::RC_down)
m_pcLastRecord->scrollLineDown(1);
else if (msg == CRCInput::RC_left || msg == (neutrino_msg_t)g_settings.key_pageup)
m_pcLastRecord->scrollPageUp(1);
else if (msg == CRCInput::RC_right || msg == (neutrino_msg_t)g_settings.key_pagedown)
m_pcLastRecord->scrollPageDown(1);
else if (msg == CRCInput::RC_play)
markItem(m_pcLastRecord);
else
result = false;
if (result == true)
updateMovieSelection();
return (result);
}
bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg)
{
//TRACE("[mb]->onButtonPressFilterList %d,%d\n",msg,m_settings.filter.item);
bool result = true;
if (msg==CRCInput::RC_up)
{
m_pcFilter->scrollLineUp(1);
}
else if (msg == CRCInput::RC_down)
{
m_pcFilter->scrollLineDown(1);
}
else if (msg == (neutrino_msg_t)g_settings.key_pageup)
{
m_pcFilter->scrollPageUp(1);
}
else if (msg == (neutrino_msg_t)g_settings.key_pagedown)
{
m_pcFilter->scrollPageDown(1);
}
else if (msg == CRCInput::RC_ok)
{
int selected_line = m_pcFilter->getSelectedLine();
if (m_settings.filter.item == MB_INFO_MAX_NUMBER)
{
if (selected_line == 0) m_settings.filter.item = MB_INFO_MAJOR_GENRE;
if (selected_line == 1) m_settings.filter.item = MB_INFO_INFO1;
if (selected_line == 2) m_settings.filter.item = MB_INFO_FILEPATH;
if (selected_line == 3) m_settings.filter.item = MB_INFO_SERIE;
refreshFilterList();
m_pcFilter->setSelectedLine(0);
}
else
{
if (selected_line == 0)
{
m_settings.filter.item = MB_INFO_MAX_NUMBER;
m_settings.filter.optionString = "";
m_settings.filter.optionVar = 0;
refreshFilterList();
m_pcFilter->setSelectedLine(0);
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFoot();
}
else
{
updateFilterSelection();
}
}
}
else if (msg == CRCInput::RC_left)
{
m_pcFilter->scrollPageUp(1);
}
else if (msg == CRCInput::RC_right)
{
m_pcFilter->scrollPageDown(1);
}
else
{
// default
result = false;
}
return (result);
}
bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg)
{
// TRACE("[mb]->onButtonPressEPGInfoList %d\n",msg);
bool result = true;
if (msg == CRCInput::RC_up)
m_pcInfo->scrollPageUp(1);
else if (msg == CRCInput::RC_down)
m_pcInfo->scrollPageDown(1);
else
result = false;
return (result);
}
void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler, bool skipAsk)
{
//TRACE("[onDeleteFile] ");
#if 0
int test= movieSelectionHandler.file.Name.find(".ts", movieSelectionHandler.file.Name.length()-3);
if (test == -1) {
// not a TS file, return!!!!!
TRACE("show_ts_info: not a TS file ");
return;
}
#endif
std::string msg = g_Locale->getText(LOCALE_FILEBROWSER_DODELETE1);
msg += "\n ";
if (movieSelectionHandler.file.Name.length() > 40)
{
msg += movieSelectionHandler.file.Name.substr(0,40);
msg += "...";
}
else
msg += movieSelectionHandler.file.Name;
msg += "\n ";
msg += g_Locale->getText(LOCALE_FILEBROWSER_DODELETE2);
if ((skipAsk) || (ShowMsg(LOCALE_FILEBROWSER_DELETE, msg, CMessageBox::mbrYes, CMessageBox::mbYes|CMessageBox::mbNo)==CMessageBox::mbrYes))
{
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_MOVIEBROWSER_DELETE_INFO));
hintBox->paint();
delFile(movieSelectionHandler.file);
std::string fname = getScreenshotName(movieSelectionHandler.file.Name, S_ISDIR(m_movieSelectionHandler->file.Mode));
if (!fname.empty())
unlink(fname.c_str());
CFile file_xml = movieSelectionHandler.file;
if (m_movieInfo.convertTs2XmlName(file_xml.Name))
unlink(file_xml.Name.c_str());
delete hintBox;
g_RCInput->clearRCMsg();
m_vMovieInfo.erase((std::vector<MI_MOVIE_INFO>::iterator)&movieSelectionHandler);
TRACE("List size: %d\n", (int)m_vMovieInfo.size());
updateSerienames();
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshMovieInfo();
refresh();
}
}
void CMovieBrowser::onSetGUIWindow(MB_GUI gui)
{
TRACE("[mb]->onSetGUIWindow: gui %d -> %d\n", m_settings.gui, gui);
m_settings.gui = gui;
m_showMovieInfo = true;
if (gui == MB_GUI_MOVIE_INFO) {
m_showBrowserFiles = true;
m_showLastRecordFiles = false;
m_showLastPlayFiles = false;
m_showFilter = false;
m_pcLastPlay->hide();
m_pcLastRecord->hide();
m_pcFilter->hide();
m_pcBrowser->paint();
onSetFocus(MB_FOCUS_BROWSER);
} else if (gui == MB_GUI_LAST_PLAY) {
clearSelection();
m_showLastRecordFiles = true;
m_showLastPlayFiles = true;
m_showBrowserFiles = false;
m_showFilter = false;
m_pcBrowser->hide();
m_pcFilter->hide();
m_pcLastRecord->paint();
m_pcLastPlay->paint();
onSetFocus(MB_FOCUS_LAST_PLAY);
} else if (gui == MB_GUI_LAST_RECORD) {
clearSelection();
m_showLastRecordFiles = true;
m_showLastPlayFiles = true;
m_showBrowserFiles = false;
m_showFilter = false;
m_pcBrowser->hide();
m_pcFilter->hide();
m_pcLastRecord->paint();
m_pcLastPlay->paint();
onSetFocus(MB_FOCUS_LAST_RECORD);
} else if (gui == MB_GUI_FILTER) {
m_showFilter = true;
m_showMovieInfo = false;
m_pcInfo->hide();
m_pcFilter->paint();
onSetFocus(MB_FOCUS_FILTER);
}
if (m_showMovieInfo) {
m_pcInfo->paint();
refreshMovieInfo();
}
}
void CMovieBrowser::onSetGUIWindowNext(void)
{
if (m_settings.gui == MB_GUI_MOVIE_INFO)
onSetGUIWindow(MB_GUI_LAST_PLAY);
else if (m_settings.gui == MB_GUI_LAST_PLAY)
onSetGUIWindow(MB_GUI_LAST_RECORD);
else
onSetGUIWindow(MB_GUI_MOVIE_INFO);
}
void CMovieBrowser::onSetGUIWindowPrev(void)
{
if (m_settings.gui == MB_GUI_MOVIE_INFO)
onSetGUIWindow(MB_GUI_LAST_RECORD);
else if (m_settings.gui == MB_GUI_LAST_RECORD)
onSetGUIWindow(MB_GUI_LAST_PLAY);
else
onSetGUIWindow(MB_GUI_MOVIE_INFO);
}
void CMovieBrowser::onSetFocus(MB_FOCUS new_focus)
{
TRACE("[mb]->onSetFocus: focus %d -> %d \n", m_windowFocus, new_focus);
clearSelection();
m_windowFocus = new_focus;
m_pcBrowser->showSelection(false);
m_pcLastRecord->showSelection(false);
m_pcLastPlay->showSelection(false);
m_pcFilter->showSelection(false);
if (m_windowFocus == MB_FOCUS_BROWSER)
m_pcBrowser->showSelection(true);
else if (m_windowFocus == MB_FOCUS_LAST_PLAY)
m_pcLastPlay->showSelection(true);
else if (m_windowFocus == MB_FOCUS_LAST_RECORD)
m_pcLastRecord->showSelection(true);
else if (m_windowFocus == MB_FOCUS_FILTER)
m_pcFilter->showSelection(true);
updateMovieSelection();
refreshFoot();
}
void CMovieBrowser::onSetFocusNext(void)
{
TRACE("[mb]->onSetFocusNext: gui %d\n", m_settings.gui);
if (m_settings.gui == MB_GUI_FILTER)
{
if (m_windowFocus == MB_FOCUS_BROWSER)
onSetFocus(MB_FOCUS_FILTER);
else
onSetFocus(MB_FOCUS_BROWSER);
}
else if (m_settings.gui == MB_GUI_MOVIE_INFO)
{
if (m_windowFocus == MB_FOCUS_BROWSER)
onSetFocus(MB_FOCUS_MOVIE_INFO);
else
onSetFocus(MB_FOCUS_BROWSER);
}
else if (m_settings.gui == MB_GUI_LAST_PLAY)
{
if (m_windowFocus == MB_FOCUS_MOVIE_INFO)
onSetFocus(MB_FOCUS_LAST_PLAY);
else if (m_windowFocus == MB_FOCUS_LAST_PLAY)
onSetFocus(MB_FOCUS_MOVIE_INFO);
}
else if (m_settings.gui == MB_GUI_LAST_RECORD)
{
if (m_windowFocus == MB_FOCUS_MOVIE_INFO)
onSetFocus(MB_FOCUS_LAST_RECORD);
else if (m_windowFocus == MB_FOCUS_LAST_RECORD)
onSetFocus(MB_FOCUS_MOVIE_INFO);
}
}
bool CMovieBrowser::onSortMovieInfoHandleList(std::vector<MI_MOVIE_INFO*>& handle_list, MB_INFO_ITEM sort_item, MB_DIRECTION direction)
{
//TRACE("sort: %d\n",direction);
if (handle_list.empty())
return false;
if (sortBy[sort_item] == NULL)
return false;
if (direction == MB_DIRECTION_AUTO)
{
if (sort_item == MB_INFO_QUALITY || sort_item == MB_INFO_PARENTAL_LOCKAGE ||
sort_item == MB_INFO_PREVPLAYDATE || sort_item == MB_INFO_RECORDDATE ||
sort_item == MB_INFO_PRODDATE || sort_item == MB_INFO_SIZE)
sortDirection = 1;
else
sortDirection = 0;
}
else if (direction == MB_DIRECTION_UP)
{
sortDirection = 0;
}
else
{
sortDirection = 1;
}
//TRACE("sort: %d\n",sortDirection);
sort(handle_list.begin(), handle_list.end(), sortBy[sort_item]);
return (true);
}
void CMovieBrowser::updateDir(void)
{
m_dir.clear();
#if 0
// check if there is a movie dir and if we should use it
if (g_settings.network_nfs_moviedir[0] != 0)
{
std::string name = g_settings.network_nfs_moviedir;
addDir(name,&m_settings.storageDirMovieUsed);
}
#endif
// check if there is a record dir and if we should use it
if (!g_settings.network_nfs_recordingdir.empty())
{
addDir(g_settings.network_nfs_recordingdir, &m_settings.storageDirRecUsed);
cHddStat::getInstance()->statOnce();
}
for (int i = 0; i < MB_MAX_DIRS; i++)
{
if (!m_settings.storageDir[i].empty())
addDir(m_settings.storageDir[i],&m_settings.storageDirUsed[i]);
}
}
void CMovieBrowser::loadAllTsFileNamesFromStorage(void)
{
//TRACE("[mb]->loadAllTsFileNamesFromStorage \n");
int i,size;
m_movieSelectionHandler = NULL;
m_dirNames.clear();
m_vMovieInfo.clear();
updateDir();
size = m_dir.size();
for (i=0; i < size;i++)
{
if (*m_dir[i].used == true)
loadTsFileNamesFromDir(m_dir[i].name);
}
TRACE("[mb] Dir%d, Files:%d\n", (int)m_dirNames.size(), (int)m_vMovieInfo.size());
}
static const char * const ext_list[] =
{
"avi", "mkv", "mp4", "flv", "mov", "mpg", "mpeg", "m2ts", "iso"
};
static int ext_list_size = sizeof(ext_list) / sizeof (char *);
bool CMovieBrowser::supportedExtension(CFile &file)
{
std::string::size_type idx = file.getFileName().rfind('.');
if (idx == std::string::npos)
return false;
std::string ext = file.getFileName().substr(idx+1);
bool result = (ext == "ts");
if (!result && !m_settings.ts_only) {
for (int i = 0; i < ext_list_size; i++) {
if (!strcasecmp(ext.c_str(), ext_list[i]))
return true;
}
}
return result;
}
bool CMovieBrowser::addFile(CFile &file, int dirItNr)
{
if (!S_ISDIR(file.Mode) && !supportedExtension(file)) {
//TRACE("[mb] not supported file: '%s'\n", file.Name.c_str());
return false;
}
MI_MOVIE_INFO movieInfo;
movieInfo.file = file;
if(!m_movieInfo.loadMovieInfo(&movieInfo)) {
movieInfo.epgChannel = string(g_Locale->getText(LOCALE_MOVIEPLAYER_HEAD));
movieInfo.epgTitle = file.getFileName();
}
movieInfo.dirItNr = dirItNr;
//TRACE("addFile dir [%s] : [%s]\n", m_dirNames[movieInfo.dirItNr].c_str(), movieInfo.file.Name.c_str());
m_vMovieInfo.push_back(movieInfo);
return true;
}
/************************************************************************
Note: this function is used recursive, do not add any return within the body due to the recursive counter
************************************************************************/
bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname)
{
//TRACE("[mb]->loadTsFileNamesFromDir %s\n",dirname.c_str());
static int recursive_counter = 0; // recursive counter to be used to avoid hanging
bool result = false;
if (recursive_counter > 10)
{
TRACE("[mb]loadTsFileNamesFromDir: return->recoursive error\n");
return (false); // do not go deeper than 10 directories
}
/* check if directory was already searched once */
for (int i = 0; i < (int) m_dirNames.size(); i++)
{
if (strcmp(m_dirNames[i].c_str(),dirname.c_str()) == 0)
{
// string is identical to previous one
TRACE("[mb]Dir already in list: %s\n",dirname.c_str());
return (false);
}
}
/* FIXME hack to fix movie dir path on recursive scan.
dirs without files but with subdirs with files will be shown in path filter */
m_dirNames.push_back(dirname);
int dirItNr = m_dirNames.size() - 1;
/* !!!!!! no return statement within the body after here !!!!*/
recursive_counter++;
CFileList flist;
if (readDir(dirname, &flist) == true)
{
for (unsigned int i = 0; i < flist.size(); i++)
{
if (S_ISDIR(flist[i].Mode)) {
if (m_settings.ts_only || !CFileBrowser::checkBD(flist[i])) {
flist[i].Name += '/';
result |= loadTsFileNamesFromDir(flist[i].Name);
} else
result |= addFile(flist[i], dirItNr);
} else {
result |= addFile(flist[i], dirItNr);
}
}
//result = true;
}
if (!result)
m_dirNames.pop_back();
recursive_counter--;
return (result);
}
bool CMovieBrowser::readDir(const std::string & dirname, CFileList* flist)
{
bool result = true;
//TRACE("readDir_std %s\n",dirname.c_str());
stat_struct statbuf;
dirent_struct **namelist;
int n;
n = my_scandir(dirname.c_str(), &namelist, 0, my_alphasort);
if (n < 0)
{
perror(("[mb] scandir: "+dirname).c_str());
return false;
}
CFile file;
for (int i = 0; i < n;i++)
{
if (namelist[i]->d_name[0] != '.')
{
file.Name = dirname;
file.Name += namelist[i]->d_name;
// printf("file.Name: '%s', getFileName: '%s' getPath: '%s'\n",file.Name.c_str(),file.getFileName().c_str(),file.getPath().c_str());
if (my_stat((file.Name).c_str(),&statbuf) != 0)
fprintf(stderr, "stat '%s' error: %m\n", file.Name.c_str());
else
{
file.Mode = statbuf.st_mode;
file.Time = statbuf.st_mtime;
file.Size = statbuf.st_size;
flist->push_back(file);
}
}
free(namelist[i]);
}
free(namelist);
return(result);
}
bool CMovieBrowser::delFile(CFile& file)
{
bool result = true;
int err = unlink(file.Name.c_str());
TRACE(" delete file: %s\r\n",file.Name.c_str());
if (err)
result = false;
return(result);
}
void CMovieBrowser::updateMovieSelection(void)
{
//TRACE("[mb]->updateMovieSelection %d\n",m_windowFocus);
if (m_vMovieInfo.empty()) return;
bool new_selection = false;
unsigned int old_movie_selection;
if (m_windowFocus == MB_FOCUS_BROWSER)
{
if (m_vHandleBrowserList.empty())
{
// There are no elements in the Filebrowser, clear all handles
m_currentBrowserSelection = 0;
m_movieSelectionHandler = NULL;
new_selection = true;
}
else
{
old_movie_selection = m_currentBrowserSelection;
m_currentBrowserSelection = m_pcBrowser->getSelectedLine();
//TRACE(" sel1:%d\n",m_currentBrowserSelection);
if (m_currentBrowserSelection != old_movie_selection)
new_selection = true;
if (m_currentBrowserSelection < m_vHandleBrowserList.size())
m_movieSelectionHandler = m_vHandleBrowserList[m_currentBrowserSelection];
}
}
else if (m_windowFocus == MB_FOCUS_LAST_PLAY)
{
if (m_vHandlePlayList.empty())
{
// There are no elements in the Filebrowser, clear all handles
m_currentPlaySelection = 0;
m_movieSelectionHandler = NULL;
new_selection = true;
}
else
{
old_movie_selection = m_currentPlaySelection;
m_currentPlaySelection = m_pcLastPlay->getSelectedLine();
//TRACE(" sel2:%d\n",m_currentPlaySelection);
if (m_currentPlaySelection != old_movie_selection)
new_selection = true;
if (m_currentPlaySelection < m_vHandlePlayList.size())
m_movieSelectionHandler = m_vHandlePlayList[m_currentPlaySelection];
}
}
else if (m_windowFocus == MB_FOCUS_LAST_RECORD)
{
if (m_vHandleRecordList.empty())
{
// There are no elements in the Filebrowser, clear all handles
m_currentRecordSelection = 0;
m_movieSelectionHandler = NULL;
new_selection = true;
}
else
{
old_movie_selection = m_currentRecordSelection;
m_currentRecordSelection = m_pcLastRecord->getSelectedLine();
//TRACE(" sel3:%d\n",m_currentRecordSelection);
if (m_currentRecordSelection != old_movie_selection)
new_selection = true;
if (m_currentRecordSelection < m_vHandleRecordList.size())
m_movieSelectionHandler = m_vHandleRecordList[m_currentRecordSelection];
}
}
if (new_selection == true)
{
//TRACE("new\n");
info_hdd_level();
refreshMovieInfo();
refreshLCD();
}
//TRACE("\n");
}
void CMovieBrowser::updateFilterSelection(void)
{
//TRACE("[mb]->updateFilterSelection \n");
if (m_FilterLines.lineArray[0].empty()) return;
bool result = true;
int selected_line = m_pcFilter->getSelectedLine();
if (selected_line > 0)
selected_line--;
if (m_settings.filter.item == MB_INFO_FILEPATH)
{
m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1];
m_settings.filter.optionVar = selected_line;
}
else if (m_settings.filter.item == MB_INFO_INFO1)
{
m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1];
}
else if (m_settings.filter.item == MB_INFO_MAJOR_GENRE)
{
m_settings.filter.optionString = g_Locale->getText(GENRE_ALL[selected_line].value);
m_settings.filter.optionVar = GENRE_ALL[selected_line].key;
}
else if (m_settings.filter.item == MB_INFO_SERIE)
{
m_settings.filter.optionString = m_FilterLines.lineArray[0][selected_line+1];
}
else
{
result = false;
}
if (result == true)
{
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFoot();
}
}
bool CMovieBrowser::addDir(std::string& dirname, int* used)
{
if (dirname.empty()) return false;
if (dirname == "/") return false;
MB_DIR newdir;
newdir.name = dirname;
if (newdir.name.rfind('/') != newdir.name.length()-1 || newdir.name.length() == 0)
newdir.name += '/';
int size = m_dir.size();
for (int i = 0; i < size; i++)
{
if (strcmp(m_dir[i].name.c_str(),newdir.name.c_str()) == 0)
{
// string is identical to previous one
TRACE("[mb] Dir already in list: %s\n",newdir.name.c_str());
return (false);
}
}
TRACE("[mb] new Dir: %s\n",newdir.name.c_str());
newdir.used = used;
m_dir.push_back(newdir);
if (*used == true)
{
m_file_info_stale = true; // we got a new Dir, search again for all movies next time
m_seriename_stale = true;
}
return (true);
}
void CMovieBrowser::loadMovies(bool doRefresh)
{
TRACE("[mb] loadMovies: \n");
CHintBox loadBox((show_mode == MB_SHOW_YT) ? LOCALE_MOVIEPLAYER_YTPLAYBACK : LOCALE_MOVIEBROWSER_HEAD, g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
loadBox.paint();
if (show_mode == MB_SHOW_YT) {
loadYTitles(m_settings.ytmode, m_settings.ytsearch, m_settings.ytvid);
} else {
loadAllTsFileNamesFromStorage(); // P1
m_seriename_stale = true; // we reloded the movie info, so make sure the other list are updated later on as well
updateSerienames();
if (m_settings.serie_auto_create == 1)
autoFindSerie();
}
m_file_info_stale = false;
loadBox.hide();
if (doRefresh)
{
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFilterList();
}
}
void CMovieBrowser::loadAllMovieInfo(void)
{
//TRACE("[mb]->loadAllMovieInfo \n");
for (unsigned int i=0; i < m_vMovieInfo.size();i++)
m_movieInfo.loadMovieInfo(&(m_vMovieInfo[i]));
}
void CMovieBrowser::showHelp(void)
{
CMovieHelp help;
help.exec(NULL,NULL);
}
#define MAX_STRING 30
int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
{
/********************************************************************/
/** MovieInfo menu ******************************************************/
/********************************************************************/
/** bookmark ******************************************************/
CIntInput bookStartIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.start, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
CIntInput bookLastIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.lastPlayStop, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
CIntInput bookEndIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.end, 5, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
CMenuWidget bookmarkMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
bookmarkMenu.addIntroItems(LOCALE_MOVIEBROWSER_BOOK_HEAD);
bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_CLEAR_ALL, true, NULL, this, "book_clear_all",CRCInput::RC_blue));
bookmarkMenu.addItem(GenericMenuSeparatorLine);
bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, bookStartIntInput.getValue(), &bookStartIntInput));
bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIEEND, true, bookEndIntInput.getValue(), &bookLastIntInput));
bookmarkMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookLastIntInput.getValue(), &bookEndIntInput));
bookmarkMenu.addItem(GenericMenuSeparatorLine);
for (int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++)
{
CKeyboardInput * pBookNameInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, &movie_info->bookmarks.user[li].name, 20);
CIntInput *pBookPosIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].pos, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
CIntInput *pBookTypeIntInput = new CIntInput(LOCALE_MOVIEBROWSER_EDIT_BOOK, (int *)&movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2);
CMenuWidget* pBookItemMenu = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
pBookItemMenu->addItem(GenericMenuSeparator);
pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name, pBookNameInput));
pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput->getValue(), pBookPosIntInput));
pBookItemMenu->addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput->getValue(), pBookTypeIntInput));
bookmarkMenu.addItem(new CMenuDForwarder(movie_info->bookmarks.user[li].name.c_str(), true, pBookPosIntInput->getValue(), pBookItemMenu));
}
/********************************************************************/
/** serie******************************************************/
CKeyboardInput serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, 20);
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
serieMenu.addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
serieMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName,&serieUserInput));
serieMenu.addItem(GenericMenuSeparatorLine);
for (unsigned int li = 0; li < m_vHandleSerienames.size(); li++)
serieMenu.addItem(new CMenuSelector(m_vHandleSerienames[li]->serieName.c_str(), true, movie_info->serieName));
/********************************************************************/
/** update movie info ******************************************************/
for (unsigned int i = 0; i < MB_INFO_MAX_NUMBER; i++)
movieInfoUpdateAll[i] = 0;
movieInfoUpdateAllIfDestEmptyOnly = true;
CMenuWidget movieInfoMenuUpdate(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
movieInfoMenuUpdate.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE);
movieInfoMenuUpdate.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE_ALL, true, NULL, this, "save_movie_info_all",CRCInput::RC_red));
movieInfoMenuUpdate.addItem(GenericMenuSeparatorLine);
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_UPDATE_IF_DEST_EMPTY_ONLY, (&movieInfoUpdateAllIfDestEmptyOnly), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL,CRCInput::RC_blue));
movieInfoMenuUpdate.addItem(GenericMenuSeparatorLine);
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_TITLE, &movieInfoUpdateAll[MB_INFO_TITLE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_1));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_INFO1, &movieInfoUpdateAll[MB_INFO_INFO1], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_2));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_SERIE, &movieInfoUpdateAll[MB_INFO_SERIE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_3));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY, &movieInfoUpdateAll[MB_INFO_QUALITY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true, NULL, CRCInput::RC_4));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movieInfoUpdateAll[MB_INFO_PARENTAL_LOCKAGE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_5));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movieInfoUpdateAll[MB_INFO_MAJOR_GENRE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_6));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, &movieInfoUpdateAll[MB_INFO_PRODDATE], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_7));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movieInfoUpdateAll[MB_INFO_COUNTRY], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_8));
movieInfoMenuUpdate.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movieInfoUpdateAll[MB_INFO_LENGTH], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,NULL, CRCInput::RC_9));
/********************************************************************/
/** movieInfo ******************************************************/
#define BUFFER_SIZE 100
char dirItNr[BUFFER_SIZE];
char size[BUFFER_SIZE];
strncpy(dirItNr, m_dirNames[movie_info->dirItNr].c_str(),BUFFER_SIZE-1);
snprintf(size,BUFFER_SIZE,"%5" PRIu64 "",movie_info->file.Size>>20);
CKeyboardInput titelUserInput(LOCALE_MOVIEBROWSER_INFO_TITLE, &movie_info->epgTitle, (movie_info->epgTitle.empty() || (movie_info->epgTitle.size() < MAX_STRING)) ? MAX_STRING:movie_info->epgTitle.size());
CKeyboardInput channelUserInput(LOCALE_MOVIEBROWSER_INFO_CHANNEL, &movie_info->epgChannel, MAX_STRING);
CKeyboardInput epgUserInput(LOCALE_MOVIEBROWSER_INFO_INFO1, &movie_info->epgInfo1, 20);
CKeyboardInput countryUserInput(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, &movie_info->productionCountry, 11);
CDateInput dateUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->dateOfLastPlay, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CDateInput recUserDateInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, &movie_info->file.Time, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput lengthUserIntInput(LOCALE_MOVIEBROWSER_INFO_LENGTH, (int *)&movie_info->length, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput yearUserIntInput(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, (int *)&movie_info->productionDate, 4, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CMenuWidget movieInfoMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
movieInfoMenu.addIntroItems(LOCALE_MOVIEBROWSER_INFO_HEAD);
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_SAVE, true, NULL, this, "save_movie_info", CRCInput::RC_red));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD_UPDATE, true, NULL, &movieInfoMenuUpdate, NULL, CRCInput::RC_green));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_HEAD, true, NULL, &bookmarkMenu, NULL, CRCInput::RC_blue));
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_TITLE, true, movie_info->epgTitle, &titelUserInput,NULL, CRCInput::RC_1));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SERIE, true, movie_info->serieName, &serieMenu,NULL, CRCInput::RC_2));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_INFO1, (movie_info->epgInfo1.size() <= MAX_STRING) /*true*/, movie_info->epgInfo1, &epgUserInput,NULL, CRCInput::RC_3));
movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR, &movie_info->genreMajor, GENRE_ALL, GENRE_ALL_COUNT, true,NULL, CRCInput::RC_4, "", true));
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_INFO_QUALITY,&movie_info->quality,true,0,3, NULL));
movieInfoMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE, &movie_info->parentalLockAge, MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true,NULL, CRCInput::RC_6));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODYEAR, true, yearUserIntInput.getValue(), &yearUserIntInput,NULL, CRCInput::RC_7));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY, true, movie_info->productionCountry, &countryUserInput,NULL, CRCInput::RC_8));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_LENGTH, true, lengthUserIntInput.getValue(), &lengthUserIntInput,NULL, CRCInput::RC_9));
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_CHANNEL, true, movie_info->epgChannel, &channelUserInput,NULL, CRCInput::RC_0));//LOCALE_TIMERLIST_CHANNEL
movieInfoMenu.addItem(GenericMenuSeparatorLine);
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PATH, false, dirItNr)); //LOCALE_TIMERLIST_RECORDING_DIR
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE, false, dateUserDateInput.getValue()));//LOCALE_FLASHUPDATE_CURRENTVERSIONDATE
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_RECORDDATE, false, recUserDateInput.getValue()));//LOCALE_FLASHUPDATE_CURRENTVERSIONDATE
movieInfoMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_SIZE, false, size, NULL));
int res = movieInfoMenu.exec(NULL,"");
return res;
}
bool CMovieBrowser::showMenu(bool calledExternally)
{
/* first clear screen */
framebuffer->paintBackground();
int i;
/********************************************************************/
/** directory menu ******************************************************/
CDirMenu dirMenu(&m_dir);
/********************************************************************/
/** options menu **************************************************/
/********************************************************************/
/** parental lock **************************************************/
CMenuWidget parentalMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
parentalMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD);
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED, (int*)(&m_parentalLock), MESSAGEBOX_PARENTAL_LOCK_OPTIONS, MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT, true));
parentalMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_RATE_HEAD, (int*)(&m_settings.parentalLockAge), MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS, MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT, true));
/********************************************************************/
/** optionsVerzeichnisse **************************************************/
CMenuWidget optionsMenuDir(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
optionsMenuDir.addIntroItems(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD);
optionsMenuDir.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_REC_DIR, (int*)(&m_settings.storageDirRecUsed), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenuDir.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_DIR, false, g_settings.network_nfs_recordingdir));
optionsMenuDir.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_MOVIE_DIR, (int*)(&m_settings.storageDirMovieUsed), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenuDir.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_DIR, false, g_settings.network_nfs_moviedir));
optionsMenuDir.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_DIR_HEAD));
COnOffNotifier* notifier[MB_MAX_DIRS];
for (i = 0; i < MB_MAX_DIRS ; i++)
{
CFileChooser *dirInput = new CFileChooser(&m_settings.storageDir[i]);
CMenuForwarder *forwarder = new CMenuDForwarder(LOCALE_MOVIEBROWSER_DIR, m_settings.storageDirUsed[i], m_settings.storageDir[i], dirInput);
notifier[i] = new COnOffNotifier();
notifier[i]->addItem(forwarder);
CMenuOptionChooser *chooser = new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_DIR, &m_settings.storageDirUsed[i], MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true,notifier[i]);
optionsMenuDir.addItem(chooser);
optionsMenuDir.addItem(forwarder);
if (i != (MB_MAX_DIRS - 1))
optionsMenuDir.addItem(GenericMenuSeparator);
}
/********************************************************************/
/** optionsMenuBrowser **************************************************/
int oldRowNr = m_settings.browserRowNr;
int oldFrameHeight = m_settings.browserFrameHeight;
CIntInput playMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, (int *)&m_settings.lastPlayMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput recMaxUserIntInput(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, (int *)&m_settings.lastRecordMaxItems, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput browserFrameUserIntInput(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, (int *)&m_settings.browserFrameHeight, 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CIntInput browserRowNrIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, (int *)&m_settings.browserRowNr, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
CMenuWidget optionsMenuBrowser(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
optionsMenuBrowser.addIntroItems(LOCALE_MOVIEBROWSER_OPTION_BROWSER);
optionsMenuBrowser.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_PLAY_MAX_ITEMS, true, playMaxUserIntInput.getValue(), &playMaxUserIntInput));
optionsMenuBrowser.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LAST_RECORD_MAX_ITEMS, true, recMaxUserIntInput.getValue(), &recMaxUserIntInput));
optionsMenuBrowser.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_FRAME_HIGH, true, browserFrameUserIntInput.getValue(), &browserFrameUserIntInput));
optionsMenuBrowser.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_BROWSER_ROW_HEAD));
optionsMenuBrowser.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_NR, true, browserRowNrIntInput.getValue(), &browserRowNrIntInput));
optionsMenuBrowser.addItem(GenericMenuSeparator);
for (i = 0; i < MB_MAX_ROWS; i++)
{
CIntInput* browserRowWidthIntInput = new CIntInput(LOCALE_MOVIEBROWSER_BROWSER_ROW_WIDTH,(int *)&m_settings.browserRowWidth[i], 3, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
optionsMenuBrowser.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_BROWSER_ROW_ITEM, (int*)(&m_settings.browserRowItem[i]), MESSAGEBOX_BROWSER_ROW_ITEM, MESSAGEBOX_BROWSER_ROW_ITEM_COUNT, true, NULL, CRCInput::convertDigitToKey(i+1), NULL, true, true));
optionsMenuBrowser.addItem(new CMenuDForwarder(LOCALE_MOVIEBROWSER_BROWSER_ROW_WIDTH, true, browserRowWidthIntInput->getValue(), browserRowWidthIntInput));
if (i < MB_MAX_ROWS-1)
optionsMenuBrowser.addItem(GenericMenuSeparator);
}
/********************************************************************/
/** options **************************************************/
CMenuWidget optionsMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
optionsMenu.addIntroItems(LOCALE_EPGPLUS_OPTIONS);
optionsMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_LOAD_DEFAULT, true, NULL, this, "loaddefault", CRCInput::RC_blue));
optionsMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_OPTION_BROWSER, true, NULL, &optionsMenuBrowser,NULL, CRCInput::RC_green));
optionsMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD, true, NULL, &optionsMenuDir,NULL, CRCInput::RC_yellow));
if (m_parentalLock != MB_PARENTAL_LOCK_OFF)
optionsMenu.addItem(new CLockedMenuForwarder(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD, g_settings.parentallock_pincode, true, true, NULL, &parentalMenu,NULL,CRCInput::RC_red));
else
optionsMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_HEAD, true, NULL, &parentalMenu,NULL,CRCInput::RC_red));
optionsMenu.addItem(GenericMenuSeparatorLine);
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_RELOAD_AT_START, (int*)(&m_settings.reload), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_REMOUNT_AT_START, (int*)(&m_settings.remount), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenu.addItem(GenericMenuSeparatorLine);
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_HIDE_SERIES, (int*)(&m_settings.browser_serie_mode), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
optionsMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_SERIE_AUTO_CREATE, (int*)(&m_settings.serie_auto_create), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true));
int ts_only = m_settings.ts_only;
optionsMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_TS_ONLY, (int*)(&m_settings.ts_only), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true ));
//optionsMenu.addItem(GenericMenuSeparator);
/********************************************************************/
/** main menu ******************************************************/
CMovieHelp* movieHelp = new CMovieHelp();
CNFSSmallMenu* nfs = new CNFSSmallMenu();
if (!calledExternally) {
CMenuWidget mainMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
mainMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_info_menu", CRCInput::RC_red));
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_EPGPLUS_OPTIONS, true, NULL, &optionsMenu,NULL, CRCInput::RC_green));
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD, true, NULL, &dirMenu, NULL, CRCInput::RC_yellow));
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, true, NULL, this, "reload_movie_info", CRCInput::RC_blue));
//mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_NFS_HEAD, true, NULL, nfs, NULL, CRCInput::RC_setup));
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help));
//mainMenu.addItem(GenericMenuSeparator);
mainMenu.exec(NULL, " ");
} else
optionsMenu.exec(NULL, "");
// post menu handling
if (m_parentalLock != MB_PARENTAL_LOCK_OFF_TMP)
m_settings.parentalLock = m_parentalLock;
if (m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT)
m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT;
if (m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT)
m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT;
if (m_settings.browserRowNr > MB_MAX_ROWS)
m_settings.browserRowNr = MB_MAX_ROWS;
if (m_settings.browserRowNr < 1)
m_settings.browserRowNr = 1;
for (i = 0; i < m_settings.browserRowNr; i++)
{
if (m_settings.browserRowWidth[i] > 100)
m_settings.browserRowWidth[i] = 100;
if (m_settings.browserRowWidth[i] < 1)
m_settings.browserRowWidth[i] = 1;
}
if (!calledExternally) {
if (ts_only != m_settings.ts_only || dirMenu.isChanged())
loadMovies(false);
if (oldRowNr != m_settings.browserRowNr || oldFrameHeight != m_settings.browserFrameHeight) {
initFrames();
hide();
paint();
} else {
updateSerienames();
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFilterList();
refreshMovieInfo();
refreshTitle();
refreshFoot();
refreshLCD();
}
/* FIXME: refreshXXXList -> setLines -> CListFrame::refresh, too */
//refresh();
} else
saveSettings(&m_settings);
for (i = 0; i < MB_MAX_DIRS; i++)
delete notifier[i];
delete movieHelp;
delete nfs;
return(true);
}
int CMovieBrowser::showStartPosSelectionMenu(void) // P2
{
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
//TRACE("[mb]->showStartPosSelectionMenu\n");
int pos = -1;
int result = 0;
int menu_nr= 0;
int position[MAX_NUMBER_OF_BOOKMARK_ITEMS] ={0};
if (m_movieSelectionHandler == NULL) return(result);
char start_pos[32]; snprintf(start_pos, sizeof(start_pos), "%3d %s",m_movieSelectionHandler->bookmarks.start/60, unit_short_minute);
char play_pos[32]; snprintf(play_pos, sizeof(play_pos), "%3d %s",m_movieSelectionHandler->bookmarks.lastPlayStop/60, unit_short_minute);
char book[MI_MOVIE_BOOK_USER_MAX][32];
CMenuWidgetSelection startPosSelectionMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
startPosSelectionMenu.enableFade(false);
startPosSelectionMenu.addIntroItems(LOCALE_MOVIEBROWSER_START_HEAD, NONEXISTANT_LOCALE, CMenuWidget::BTN_TYPE_CANCEL);
int off = startPosSelectionMenu.getItemsCount();
bool got_start_pos = false;
if (m_movieSelectionHandler->bookmarks.start != 0)
{
got_start_pos = true;
startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, start_pos), true);
position[menu_nr++] = m_movieSelectionHandler->bookmarks.start;
}
if (m_movieSelectionHandler->bookmarks.lastPlayStop != 0)
{
startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, play_pos));
position[menu_nr++] = m_movieSelectionHandler->bookmarks.lastPlayStop;
}
startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_START_RECORD_START, true,NULL), got_start_pos ? false : true);
position[menu_nr++] = 0;
for (int i = 0; i < MI_MOVIE_BOOK_USER_MAX && menu_nr < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++)
{
if (m_movieSelectionHandler->bookmarks.user[i].pos != 0)
{
if (m_movieSelectionHandler->bookmarks.user[i].length >= 0)
position[menu_nr] = m_movieSelectionHandler->bookmarks.user[i].pos;
else
position[menu_nr] = m_movieSelectionHandler->bookmarks.user[i].pos + m_movieSelectionHandler->bookmarks.user[i].length;
snprintf(book[i], sizeof(book[i]),"%5d %s",position[menu_nr]/60, unit_short_minute);
startPosSelectionMenu.addItem(new CMenuForwarder(m_movieSelectionHandler->bookmarks.user[i].name.c_str(), true, book[i]));
menu_nr++;
}
}
startPosSelectionMenu.exec(NULL, "12345");
/* check what menu item was ok'd and set the appropriate play offset*/
result = startPosSelectionMenu.getSelectedLine();
result -= off; // sub-text, separator, back, separator-line
if (result >= 0 && result <= MAX_NUMBER_OF_BOOKMARK_ITEMS)
pos = position[result];
TRACE("[mb] selected bookmark %d position %d \n", result, pos);
return(pos) ;
}
bool CMovieBrowser::isParentalLock(MI_MOVIE_INFO& movie_info)
{
bool result = false;
if (m_parentalLock == MB_PARENTAL_LOCK_ACTIVE && m_settings.parentalLockAge <= movie_info.parentalLockAge)
result = true;
return (result);
}
bool CMovieBrowser::isFiltered(MI_MOVIE_INFO& movie_info)
{
bool result = true;
switch(m_settings.filter.item)
{
case MB_INFO_FILEPATH:
if (m_settings.filter.optionVar == movie_info.dirItNr)
result = false;
break;
case MB_INFO_INFO1:
if (strcmp(m_settings.filter.optionString.c_str(),movie_info.epgInfo1.c_str()) == 0)
result = false;
break;
case MB_INFO_MAJOR_GENRE:
if (m_settings.filter.optionVar == movie_info.genreMajor)
result = false;
break;
case MB_INFO_SERIE:
if (strcmp(m_settings.filter.optionString.c_str(),movie_info.serieName.c_str()) == 0)
result = false;
break;
break;
default:
result = false;
break;
}
return (result);
}
bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM item, std::string* item_string)
{
#define MAX_STR_TMP 100
char str_tmp[MAX_STR_TMP];
bool result = true;
*item_string="";
tm* tm_tmp;
int i=0;
int counter=0;
switch(item)
{
case MB_INFO_FILENAME: // = 0,
*item_string = movie_info.file.getFileName();
break;
case MB_INFO_FILEPATH: // = 1,
if (!m_dirNames.empty())
*item_string = m_dirNames[movie_info.dirItNr];
break;
case MB_INFO_TITLE: // = 2,
*item_string = movie_info.epgTitle;
if (strcmp("not available",movie_info.epgTitle.c_str()) == 0)
result = false;
if (movie_info.epgTitle.empty())
result = false;
break;
case MB_INFO_SERIE: // = 3,
*item_string = movie_info.serieName;
break;
case MB_INFO_INFO1: // = 4,
*item_string = movie_info.epgInfo1;
break;
case MB_INFO_MAJOR_GENRE: // = 5,
snprintf(str_tmp, sizeof(str_tmp),"%2d",movie_info.genreMajor);
*item_string = str_tmp;
break;
case MB_INFO_MINOR_GENRE: // = 6,
snprintf(str_tmp, sizeof(str_tmp),"%2d",movie_info.genreMinor);
*item_string = str_tmp;
break;
case MB_INFO_INFO2: // = 7,
*item_string = movie_info.epgInfo2;
break;
case MB_INFO_PARENTAL_LOCKAGE: // = 8,
snprintf(str_tmp, sizeof(str_tmp),"%2d",movie_info.parentalLockAge);
*item_string = str_tmp;
break;
case MB_INFO_CHANNEL: // = 9,
*item_string = movie_info.epgChannel;
break;
case MB_INFO_BOOKMARK: // = 10,
// we just return the number of bookmarks
for (i = 0; i < MI_MOVIE_BOOK_USER_MAX; i++)
{
if (movie_info.bookmarks.user[i].pos != 0)
counter++;
}
*item_string = to_string(counter);
break;
case MB_INFO_QUALITY: // = 11,
snprintf(str_tmp, sizeof(str_tmp),"%d",movie_info.quality);
*item_string = str_tmp;
break;
case MB_INFO_PREVPLAYDATE: // = 12,
tm_tmp = localtime(&movie_info.dateOfLastPlay);
snprintf(str_tmp, sizeof(str_tmp),"%02d.%02d.%02d",tm_tmp->tm_mday,(tm_tmp->tm_mon)+ 1, tm_tmp->tm_year >= 100 ? tm_tmp->tm_year-100 : tm_tmp->tm_year);
*item_string = str_tmp;
break;
case MB_INFO_RECORDDATE: // = 13,
if (show_mode == MB_SHOW_YT) {
*item_string = movie_info.ytdate;
} else {
tm_tmp = localtime(&movie_info.file.Time);
snprintf(str_tmp, sizeof(str_tmp),"%02d.%02d.%02d",tm_tmp->tm_mday,(tm_tmp->tm_mon) + 1,tm_tmp->tm_year >= 100 ? tm_tmp->tm_year-100 : tm_tmp->tm_year);
*item_string = str_tmp;
}
break;
case MB_INFO_PRODDATE: // = 14,
snprintf(str_tmp, sizeof(str_tmp),"%d",movie_info.productionDate);
*item_string = str_tmp;
break;
case MB_INFO_COUNTRY: // = 15,
*item_string = movie_info.productionCountry;
break;
case MB_INFO_GEOMETRIE: // = 16,
result = false;
break;
case MB_INFO_AUDIO: // = 17,
// we just return the number of audiopids
snprintf(str_tmp, sizeof(str_tmp), "%d", (int)movie_info.audioPids.size());
*item_string = str_tmp;
break;
case MB_INFO_LENGTH: // = 18,
snprintf(str_tmp, sizeof(str_tmp),"%dh %dm", movie_info.length/60, movie_info.length%60);
*item_string = str_tmp;
break;
case MB_INFO_SIZE: // = 19,
snprintf(str_tmp, sizeof(str_tmp),"%4" PRIu64 "",movie_info.file.Size>>20);
*item_string = str_tmp;
break;
case MB_INFO_MAX_NUMBER: // = 20
default:
*item_string="";
result = false;
break;
}
//TRACE(" getMovieInfoItem: %d,>%s<",item,*item_string.c_str());
return(result);
}
void CMovieBrowser::updateSerienames(void)
{
if (m_seriename_stale == false)
return;
m_vHandleSerienames.clear();
for (unsigned int i = 0; i < m_vMovieInfo.size(); i++)
{
if (!m_vMovieInfo[i].serieName.empty())
{
// current series name is not empty, lets see if we already have it in the list, and if not save it to the list.
bool found = false;
for (unsigned int t = 0; t < m_vHandleSerienames.size() && found == false; t++)
{
if (strcmp(m_vHandleSerienames[t]->serieName.c_str(),m_vMovieInfo[i].serieName.c_str()) == 0)
found = true;
}
if (found == false)
m_vHandleSerienames.push_back(&m_vMovieInfo[i]);
}
}
TRACE("[mb]->updateSerienames: %d\n", (int)m_vHandleSerienames.size());
// TODO sort(m_serienames.begin(), m_serienames.end(), my_alphasort);
m_seriename_stale = false;
}
void CMovieBrowser::autoFindSerie(void)
{
TRACE("autoFindSerie\n");
updateSerienames(); // we have to make sure that the seriename array is up to date, otherwise this does not work
// if the array is not stale, the function is left immediately
for (unsigned int i = 0; i < m_vMovieInfo.size(); i++)
{
// For all movie infos, which do not have a seriename, we try to find one.
// We search for a movieinfo with seriename, and than we do check if the title is the same
// in case of same title, we assume both belongs to the same serie
//TRACE("%s ",m_vMovieInfo[i].serieName);
if (m_vMovieInfo[i].serieName.empty())
{
for (unsigned int t=0; t < m_vHandleSerienames.size();t++)
{
//TRACE("%s ",m_vHandleSerienames[i].serieName);
if (m_vMovieInfo[i].epgTitle == m_vHandleSerienames[t]->epgTitle)
{
//TRACE("x");
m_vMovieInfo[i].serieName = m_vHandleSerienames[t]->serieName;
break; // we found a maching serie, nothing to do else, leave for(t=0)
}
}
//TRACE("\n");
}
}
}
void CMovieBrowser::loadYTitles(int mode, std::string search, std::string id)
{
printf("CMovieBrowser::loadYTitles: parsed %d old mode %d new mode %d region %s\n", ytparser.Parsed(), ytparser.GetFeedMode(), m_settings.ytmode, m_settings.ytregion.c_str());
if (m_settings.ytregion == "default")
ytparser.SetRegion("");
else
ytparser.SetRegion(m_settings.ytregion);
ytparser.SetMaxResults(m_settings.ytresults);
ytparser.SetConcurrentDownloads(m_settings.ytconcconn);
ytparser.SetThumbnailDir(m_settings.ytthumbnaildir);
if (!ytparser.Parsed() || (ytparser.GetFeedMode() != mode)) {
if (ytparser.ParseFeed((cYTFeedParser::yt_feed_mode_t)mode, search, id, (cYTFeedParser::yt_feed_orderby_t)m_settings.ytorderby)) {
ytparser.DownloadThumbnails();
} else {
//FIXME show error
DisplayErrorMessage(g_Locale->getText(LOCALE_MOVIEBROWSER_YT_ERROR));
return;
}
}
m_vMovieInfo.clear();
yt_video_list_t &ylist = ytparser.GetVideoList();
for (unsigned i = 0; i < ylist.size(); i++) {
MI_MOVIE_INFO movieInfo;
movieInfo.epgChannel = ylist[i].author;
movieInfo.epgTitle = ylist[i].title;
movieInfo.epgInfo1 = ylist[i].category;
movieInfo.epgInfo2 = ylist[i].description;
movieInfo.length = ylist[i].duration/60 ;
movieInfo.tfile = ylist[i].tfile;
movieInfo.ytdate = ylist[i].published;
movieInfo.ytid = ylist[i].id;
movieInfo.file.Name = ylist[i].title;
movieInfo.ytitag = m_settings.ytquality;
movieInfo.file.Url = ylist[i].GetUrl(&movieInfo.ytitag, false);
movieInfo.file.Time = toEpoch(movieInfo.ytdate);
m_vMovieInfo.push_back(movieInfo);
}
m_currentBrowserSelection = 0;
m_currentRecordSelection = 0;
m_currentPlaySelection = 0;
m_pcBrowser->setSelectedLine(m_currentBrowserSelection);
m_pcLastRecord->setSelectedLine(m_currentRecordSelection);
m_pcLastPlay->setSelectedLine(m_currentPlaySelection);
}
const CMenuOptionChooser::keyval YT_FEED_OPTIONS[] =
{
{ cYTFeedParser::MOST_POPULAR_ALL_TIME, LOCALE_MOVIEBROWSER_YT_MOST_POPULAR_ALL_TIME },
{ cYTFeedParser::MOST_POPULAR, LOCALE_MOVIEBROWSER_YT_MOST_POPULAR }
};
#define YT_FEED_OPTION_COUNT (sizeof(YT_FEED_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
const CMenuOptionChooser::keyval YT_ORDERBY_OPTIONS[] =
{
{ cYTFeedParser::ORDERBY_PUBLISHED, LOCALE_MOVIEBROWSER_YT_ORDERBY_PUBLISHED },
{ cYTFeedParser::ORDERBY_RELEVANCE, LOCALE_MOVIEBROWSER_YT_ORDERBY_RELEVANCE },
{ cYTFeedParser::ORDERBY_VIEWCOUNT, LOCALE_MOVIEBROWSER_YT_ORDERBY_VIEWCOUNT },
{ cYTFeedParser::ORDERBY_RATING, LOCALE_MOVIEBROWSER_YT_ORDERBY_RATING }
};
#define YT_ORDERBY_OPTION_COUNT (sizeof(YT_ORDERBY_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
neutrino_locale_t CMovieBrowser::getFeedLocale(void)
{
neutrino_locale_t ret = LOCALE_MOVIEBROWSER_YT_MOST_POPULAR;
if (m_settings.ytmode == cYTFeedParser::RELATED)
return LOCALE_MOVIEBROWSER_YT_RELATED;
if (m_settings.ytmode == cYTFeedParser::SEARCH)
return LOCALE_MOVIEBROWSER_YT_SEARCH;
for (unsigned i = 0; i < YT_FEED_OPTION_COUNT; i++) {
if (m_settings.ytmode == YT_FEED_OPTIONS[i].key)
return YT_FEED_OPTIONS[i].value;
}
return ret;
}
int CYTCacheSelectorTarget::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
{
MI_MOVIE_INFO::miSource source = (movieBrowser->show_mode == MB_SHOW_YT) ? MI_MOVIE_INFO::YT : MI_MOVIE_INFO::NK;
int selected = movieBrowser->yt_menue->getSelected();
if (actionKey == "cancel_all") {
cYTCache::getInstance()->cancelAll(source);
} else if (actionKey == "completed_clear") {
cYTCache::getInstance()->clearCompleted(source);
} else if (actionKey == "failed_clear") {
cYTCache::getInstance()->clearFailed(source);
} else if (actionKey == "rc_spkr" && movieBrowser->yt_pending_offset && selected >= movieBrowser->yt_pending_offset && selected < movieBrowser->yt_pending_end) {
cYTCache::getInstance()->cancel(&movieBrowser->yt_pending[selected - movieBrowser->yt_pending_offset]);
} else if (actionKey == "rc_spkr" && movieBrowser->yt_completed_offset && selected >= movieBrowser->yt_completed_offset && selected < movieBrowser->yt_completed_end) {
cYTCache::getInstance()->remove(&movieBrowser->yt_completed[selected - movieBrowser->yt_completed_offset]);
} else if (actionKey.empty()) {
if (movieBrowser->yt_pending_offset && selected >= movieBrowser->yt_pending_offset && selected < movieBrowser->yt_pending_end) {
if (ShowMsg (LOCALE_MOVIEBROWSER_YT_CACHE, g_Locale->getText(LOCALE_MOVIEBROWSER_YT_CANCEL_TRANSFER), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes)
cYTCache::getInstance()->cancel(&movieBrowser->yt_pending[selected - movieBrowser->yt_pending_offset]);
else
return menu_return::RETURN_NONE;
} else if (movieBrowser->yt_completed_offset && selected >= movieBrowser->yt_completed_offset && selected < movieBrowser->yt_completed_end) {
// FIXME -- anything sensible to do here?
return menu_return::RETURN_NONE;
} else if (movieBrowser->yt_failed_offset && selected >= movieBrowser->yt_failed_offset && selected < movieBrowser->yt_failed_end){
cYTCache::getInstance()->clearFailed(&movieBrowser->yt_failed[selected - movieBrowser->yt_failed_offset]);
cYTCache::getInstance()->addToCache(&movieBrowser->yt_failed[selected - movieBrowser->yt_failed_offset]);
const char *format = g_Locale->getText(LOCALE_MOVIEBROWSER_YT_CACHE_ADD);
char buf[1024];
snprintf(buf, sizeof(buf), format, movieBrowser->yt_failed[selected - movieBrowser->yt_failed_offset].file.Name.c_str());
CHintBox hintBox(LOCALE_MOVIEBROWSER_YT_CACHE, buf);
hintBox.paint();
sleep(1);
hintBox.hide();
}
} else
return menu_return::RETURN_NONE;
movieBrowser->refreshYTMenu();
return menu_return::RETURN_REPAINT;
}
void CMovieBrowser::refreshYTMenu()
{
for (u_int item_id = (u_int) yt_menue->getItemsCount() - 1; item_id > yt_menue_end - 1; item_id--) {
CMenuItem* m = yt_menue->getItem(item_id);
if (m && !m->isStatic)
delete m;
yt_menue->removeItem(item_id);
}
MI_MOVIE_INFO::miSource source = (show_mode == MB_SHOW_YT) ? MI_MOVIE_INFO::YT : MI_MOVIE_INFO::NK;
double dltotal, dlnow;
time_t dlstart;
yt_pending = cYTCache::getInstance()->getPending(source, &dltotal, &dlnow, &dlstart);
yt_completed = cYTCache::getInstance()->getCompleted(source);
yt_failed = cYTCache::getInstance()->getFailed(source);
yt_pending_offset = 0;
yt_completed_offset = 0;
yt_failed_offset = 0;
yt_pending_end = 0;
yt_completed_end = 0;
yt_failed_end = 0;
if (!yt_pending.empty()) {
yt_menue->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_YT_PENDING));
yt_menue->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_CANCEL, true, NULL, ytcache_selector, "cancel_all"));
yt_menue->addItem(GenericMenuSeparator);
std::string progress;
if (dlstart && (int64_t)dltotal && (int64_t)dlnow) {
time_t done = time(NULL) - dlstart;
time_t left = ((dltotal - dlnow) * done)/dlnow;
progress = "(" + to_string(done) + "s/" + to_string(left) + "s)";
}
int i = 0;
yt_pending_offset = yt_menue->getItemsCount();
for (std::vector<MI_MOVIE_INFO>::iterator it = yt_pending.begin(); it != yt_pending.end(); ++it, ++i) {
yt_menue->addItem(new CMenuForwarder((*it).file.Name, true, progress.c_str(), ytcache_selector));
progress = "";
}
yt_pending_end = yt_menue->getItemsCount();
}
if (!yt_completed.empty()) {
yt_menue->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_YT_COMPLETED));
yt_menue->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_CLEAR, true, NULL, ytcache_selector, "completed_clear"));
yt_menue->addItem(GenericMenuSeparator);
int i = 0;
yt_completed_offset = yt_menue->getItemsCount();
for (std::vector<MI_MOVIE_INFO>::iterator it = yt_completed.begin(); it != yt_completed.end(); ++it, ++i) {
yt_menue->addItem(new CMenuForwarder((*it).file.Name.c_str(), true, NULL, ytcache_selector));
}
yt_completed_end = yt_menue->getItemsCount();
}
if (!yt_failed.empty()) {
yt_menue->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_YT_FAILED));
yt_menue->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_CLEAR, true, NULL, ytcache_selector, "failed_clear"));
yt_menue->addItem(GenericMenuSeparator);
int i = 0;
yt_failed_offset = yt_menue->getItemsCount();
for (std::vector<MI_MOVIE_INFO>::iterator it = yt_failed.begin(); it != yt_failed.end(); ++it, ++i) {
yt_menue->addItem(new CMenuForwarder((*it).file.Name.c_str(), true, NULL, ytcache_selector));
}
yt_failed_end = yt_menue->getItemsCount();
}
CFrameBuffer::getInstance()->Clear(); // due to possible width change
}
class CYTHistory : public CMenuTarget
{
private:
int width;
int selected;
std::string *search;
MB_SETTINGS *settings;
public:
CYTHistory(MB_SETTINGS &_settings, std::string &_search);
int exec(CMenuTarget* parent, const std::string & actionKey);
};
CYTHistory::CYTHistory(MB_SETTINGS &_settings, std::string &_search)
{
width = w_max(40, 10);
selected = -1;
settings = &_settings;
search = &_search;
}
int CYTHistory::exec(CMenuTarget* parent, const std::string &actionKey)
{
if (actionKey.empty()) {
if (parent)
parent->hide();
CMenuWidget* m = new CMenuWidget(LOCALE_MOVIEBROWSER_YT_HISTORY, NEUTRINO_ICON_MOVIEPLAYER, width);
m->addKey(CRCInput::RC_spkr, this, "clearYThistory");
m->setSelected(selected);
m->addItem(GenericMenuSeparator);
m->addItem(GenericMenuBack);
m->addItem(GenericMenuSeparatorLine);
std::list<std::string>::iterator it = settings->ytsearch_history.begin();
for (int i = 0; i < settings->ytsearch_history_size; i++, ++it)
m->addItem(new CMenuForwarder((*it).c_str(), true, NULL, this, (*it).c_str(), CRCInput::convertDigitToKey(i + 1)));
m->exec(NULL, "");
m->hide();
delete m;
return menu_return::RETURN_REPAINT;
}
if (actionKey == "clearYThistory") {
settings->ytsearch_history.clear();
settings->ytsearch_history_size = 0;
return menu_return::RETURN_EXIT;
}
*search = actionKey;
g_RCInput->postMsg((neutrino_msg_t) CRCInput::RC_blue, 0);
return menu_return::RETURN_EXIT;
}
bool CMovieBrowser::showYTMenu(bool calledExternally)
{
framebuffer->paintBackground();
CMenuWidget mainMenu(LOCALE_MOVIEPLAYER_YTPLAYBACK, NEUTRINO_ICON_MOVIEPLAYER);
mainMenu.addIntroItems(LOCALE_MOVIEBROWSER_OPTION_BROWSER);
int select = -1;
CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select);
char cnt[5];
if (!calledExternally) {
for (unsigned i = 0; i < YT_FEED_OPTION_COUNT; i++) {
sprintf(cnt, "%d", YT_FEED_OPTIONS[i].key);
mainMenu.addItem(new CMenuForwarder(YT_FEED_OPTIONS[i].value, true, NULL, selector, cnt, CRCInput::convertDigitToKey(i + 1)), m_settings.ytmode == (int) YT_FEED_OPTIONS[i].key);
}
mainMenu.addItem(GenericMenuSeparatorLine);
bool enabled = (!m_vMovieInfo.empty()) && (m_movieSelectionHandler != NULL);
sprintf(cnt, "%d", cYTFeedParser::RELATED);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_RELATED, enabled, NULL, selector, cnt, CRCInput::RC_red));
mainMenu.addItem(GenericMenuSeparatorLine);
}
std::string search = m_settings.ytsearch;
CKeyboardInput stringInput(LOCALE_MOVIEBROWSER_YT_SEARCH, &search);
if (!calledExternally) {
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_SEARCH, true, search, &stringInput, NULL, CRCInput::RC_green));
mainMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_YT_ORDERBY, &m_settings.ytorderby, YT_ORDERBY_OPTIONS, YT_ORDERBY_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true));
sprintf(cnt, "%d", cYTFeedParser::SEARCH);
mainMenu.addItem(new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, selector, cnt, CRCInput::RC_yellow));
}
CYTHistory ytHistory(m_settings, search);
if (!calledExternally) {
if (m_settings.ytsearch_history_size > 0)
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_HISTORY, true, NULL, &ytHistory, "", CRCInput::RC_blue));
mainMenu.addItem(GenericMenuSeparatorLine);
}
mainMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_YT_MAX_RESULTS, &m_settings.ytresults, true, 10, 50, NULL));
mainMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_YT_MAX_HISTORY, &m_settings.ytsearch_history_max, true, 10, 50, NULL));
std::string rstr = m_settings.ytregion;
CMenuOptionStringChooser * region = new CMenuOptionStringChooser(LOCALE_MOVIEBROWSER_YT_REGION, &rstr, true, NULL, CRCInput::RC_nokey, "", true);
region->addOption("default");
region->addOption("DE");
region->addOption("PL");
region->addOption("RU");
region->addOption("NL");
region->addOption("CZ");
region->addOption("FR");
region->addOption("HU");
region->addOption("US");
mainMenu.addItem(region);
#define YT_QUALITY_OPTION_COUNT 3
CMenuOptionChooser::keyval_ext YT_QUALITY_OPTIONS[YT_QUALITY_OPTION_COUNT] =
{
{ 18, NONEXISTANT_LOCALE, "MP4 270p/360p"},
{ 22, NONEXISTANT_LOCALE, "MP4 720p" },
#if 0
{ 34, NONEXISTANT_LOCALE, "FLV 360p" },
{ 35, NONEXISTANT_LOCALE, "FLV 480p" },
#endif
{ 37, NONEXISTANT_LOCALE, "MP4 1080p" }
};
mainMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_YT_PREF_QUALITY, &m_settings.ytquality, YT_QUALITY_OPTIONS, YT_QUALITY_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true));
mainMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_YT_CONCURRENT_CONNECTIONS, &m_settings.ytconcconn, true, 1, 8));
CFileChooser fc(&m_settings.ytthumbnaildir);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_CACHE_DIR, true, m_settings.ytthumbnaildir, &fc));
yt_menue = &mainMenu;
yt_menue_end = yt_menue->getItemsCount();
CYTCacheSelectorTarget ytcache_sel(this);
ytcache_selector = &ytcache_sel;
yt_menue->addKey(CRCInput::RC_spkr, ytcache_selector, "rc_spkr");
refreshYTMenu();
mainMenu.exec(NULL, "");
ytparser.SetConcurrentDownloads(m_settings.ytconcconn);
ytparser.SetThumbnailDir(m_settings.ytthumbnaildir);
delete selector;
bool reload = false;
int newmode = -1;
if (rstr != m_settings.ytregion) {
m_settings.ytregion = rstr;
if (newmode < 0)
newmode = m_settings.ytmode;
reload = true;
printf("change region to %s\n", m_settings.ytregion.c_str());
}
if (calledExternally)
return true;
printf("MovieBrowser::showYTMenu(): selected: %d\n", select);
if (select >= 0) {
newmode = select;
if (select == cYTFeedParser::RELATED) {
if (m_settings.ytvid != m_movieSelectionHandler->ytid) {
printf("get related for: %s\n", m_movieSelectionHandler->ytid.c_str());
m_settings.ytvid = m_movieSelectionHandler->ytid;
m_settings.ytmode = newmode;
reload = true;
}
}
else if (select == cYTFeedParser::SEARCH) {
printf("search for: %s\n", search.c_str());
if (!search.empty()) {
reload = true;
m_settings.ytsearch = search;
m_settings.ytmode = newmode;
m_settings.ytsearch_history.push_front(search);
std::list<std::string>::iterator it = m_settings.ytsearch_history.begin();
it++;
while (it != m_settings.ytsearch_history.end()) {
if (*it == search)
it = m_settings.ytsearch_history.erase(it);
else
++it;
}
if (m_settings.ytsearch_history.empty())
m_settings.ytsearch_history_size = 0;
else
m_settings.ytsearch_history_size = m_settings.ytsearch_history.size();
if (m_settings.ytsearch_history_size > m_settings.ytsearch_history_max)
m_settings.ytsearch_history_size = m_settings.ytsearch_history_max;
}
}
else if (m_settings.ytmode != newmode) {
m_settings.ytmode = newmode;
reload = true;
}
}
if (reload) {
CHintBox loadBox(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
loadBox.paint();
ytparser.Cleanup();
loadYTitles(newmode, m_settings.ytsearch, m_settings.ytvid);
loadBox.hide();
}
refreshBrowserList();
refreshLastPlayList();
refreshLastRecordList();
refreshFilterList();
refresh();
return true;
}
CMenuSelector::CMenuSelector(const char * OptionName, const bool Active, char * OptionValue, int* ReturnInt,int ReturnIntValue) : CMenuItem()
{
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
optionValueString = NULL;
optionName = OptionName;
optionValue = OptionValue;
active = Active;
returnIntValue = ReturnIntValue;
returnInt = ReturnInt;
}
CMenuSelector::CMenuSelector(const char * OptionName, const bool Active, std::string& OptionValue, int* ReturnInt,int ReturnIntValue) : CMenuItem()
{
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
optionValueString = &OptionValue;
optionName = OptionName;
strncpy(buffer,OptionValue.c_str(),BUFFER_MAX-1);
buffer[BUFFER_MAX-1] = 0;// terminate string
optionValue = buffer;
active = Active;
returnIntValue = ReturnIntValue;
returnInt = ReturnInt;
}
int CMenuSelector::exec(CMenuTarget* /*parent*/)
{
if (returnInt != NULL)
*returnInt= returnIntValue;
if (optionValue != NULL && optionName != NULL)
{
if (optionValueString == NULL)
strcpy(optionValue,optionName);
else
*optionValueString = optionName;
}
return menu_return::RETURN_EXIT;
}
int CMenuSelector::paint(bool selected)
{
CFrameBuffer * frameBuffer = CFrameBuffer::getInstance();
fb_pixel_t color = COL_MENUCONTENT_TEXT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
if (selected)
{
color = COL_MENUCONTENTSELECTED_TEXT;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
}
if (!active)
{
color = COL_MENUCONTENTINACTIVE_TEXT;
bgcolor = COL_MENUCONTENTINACTIVE_PLUS_0;
}
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
int stringstartposName = x + offx + 10;
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height,dx- (stringstartposName - x), optionName, color);
if (selected)
CVFD::getInstance()->showMenuText(0, optionName, -1, true); // UTF-8
return y+height;
}
int CMovieHelp::exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/)
{
Helpbox helpbox;
helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, "Sortierung ändern");
helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, "Filterfenster einblenden");
helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, "Aktives Fenster wechseln");
helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, "Filminfos neu laden");
helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, "Hauptmenü");
helpbox.addLine("+/- Ansicht wechseln");
helpbox.addLine("");
helpbox.addLine("Während der Filmwiedergabe:");
helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, " Markierungsmenu ");
helpbox.addLine(NEUTRINO_ICON_BUTTON_0, " Markierungsaktion nicht ausführen");
helpbox.addLine("");
helpbox.addLine("MovieBrowser $Revision: 1.10 $");
helpbox.addLine("by Günther");
helpbox.show(LOCALE_MESSAGEBOX_INFO);
return(0);
}
/////////////////////////////////////////////////
// MenuTargets
////////////////////////////////////////////////
int CFileChooser::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
{
if (parent != NULL)
parent->hide();
CFileBrowser browser;
browser.Dir_Mode=true;
std::string oldPath = *dirPath;
if (browser.exec(dirPath->c_str())) {
*dirPath = browser.getSelectedFile()->Name;
if (check_dir(dirPath->c_str(), true))
*dirPath = oldPath;
}
return menu_return::RETURN_REPAINT;
}
CDirMenu::CDirMenu(std::vector<MB_DIR>* dir_list)
{
unsigned int i;
changed = false;
dirList = dir_list;
if (dirList->empty())
return;
for (i = 0; i < MAX_DIR; i++)
dirNfsMountNr[i] = -1;
for (i = 0; i < dirList->size() && i < MAX_DIR; i++)
{
for (int nfs = 0; nfs < NETWORK_NFS_NR_OF_ENTRIES; nfs++)
{
int result = -1;
if (!g_settings.network_nfs[nfs].local_dir.empty())
result = (*dirList)[i].name.compare(0,g_settings.network_nfs[nfs].local_dir.size(),g_settings.network_nfs[nfs].local_dir) ;
printf("[CDirMenu] (nfs%d) %s == (mb%d) %s (%d)\n",nfs,g_settings.network_nfs[nfs].local_dir.c_str(),i,(*dirList)[i].name.c_str(),result);
if (result == 0)
{
dirNfsMountNr[i] = nfs;
break;
}
}
}
}
int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey)
{
int returnval = menu_return::RETURN_REPAINT;
if (actionKey.empty())
{
if (parent)
parent->hide();
changed = false;
return show();
}
else if (actionKey.size() == 1)
{
printf("[CDirMenu].exec %s\n",actionKey.c_str());
int number = atoi(actionKey.c_str());
if (number < MAX_DIR)
{
if (dirState[number] == DIR_STATE_SERVER_DOWN)
{
printf("try to start server: %s %s\n","ether-wake", g_settings.network_nfs[dirNfsMountNr[number]].mac.c_str());
if (my_system(2, "ether-wake", g_settings.network_nfs[dirNfsMountNr[number]].mac.c_str()) != 0)
perror("ether-wake failed");
dirOptionText[number] = "STARTE SERVER";
}
else if (dirState[number] == DIR_STATE_NOT_MOUNTED)
{
printf("[CDirMenu] try to mount %d,%d\n",number,dirNfsMountNr[number]);
CFSMounter::MountRes res;
res = CFSMounter::mount(g_settings.network_nfs[dirNfsMountNr[number]].ip,
g_settings.network_nfs[dirNfsMountNr[number]].dir,
g_settings.network_nfs[dirNfsMountNr[number]].local_dir,
(CFSMounter::FSType)g_settings.network_nfs[dirNfsMountNr[number]].type,
g_settings.network_nfs[dirNfsMountNr[number]].username,
g_settings.network_nfs[dirNfsMountNr[number]].password,
g_settings.network_nfs[dirNfsMountNr[number]].mount_options1,
g_settings.network_nfs[dirNfsMountNr[number]].mount_options2);
if (res == CFSMounter::MRES_OK) // if mount is successful we set the state to active in any case
*(*dirList)[number].used = true;
// try to mount
updateDirState();
changed = true;
}
else if (dirState[number] == DIR_STATE_MOUNTED)
{
if (*(*dirList)[number].used == true)
*(*dirList)[number].used = false;
else
*(*dirList)[number].used = true;
//CFSMounter::umount(g_settings.network_nfs_local_dir[dirNfsMountNr[number]]);
updateDirState();
changed = true;
}
}
}
return returnval;
}
extern int pinghost(const std::string &hostname, std::string *ip = NULL);
void CDirMenu::updateDirState(void)
{
unsigned int drivefree = 0;
struct statfs s;
for (unsigned int i = 0; i < dirList->size() && i < MAX_DIR; i++)
{
dirOptionText[i] = "UNBEKANNT";
dirState[i] = DIR_STATE_UNKNOWN;
// 1st ping server
printf("updateDirState: %d: state %d nfs %d\n", i, dirState[i], dirNfsMountNr[i]);
if (dirNfsMountNr[i] != -1)
{
int retvalue = pinghost(g_settings.network_nfs[dirNfsMountNr[i]].ip);
if (retvalue == 0)//LOCALE_PING_UNREACHABLE
{
dirOptionText[i] = "Server, offline";
dirState[i] = DIR_STATE_SERVER_DOWN;
}
else if (retvalue == 1)//LOCALE_PING_OK
{
if (!CFSMounter::isMounted(g_settings.network_nfs[dirNfsMountNr[i]].local_dir))
{
dirOptionText[i] = "Not mounted";
dirState[i] = DIR_STATE_NOT_MOUNTED;
}
else
{
dirState[i] = DIR_STATE_MOUNTED;
}
}
}
else
{
// not a nfs dir, probably IDE? we accept this so far
dirState[i] = DIR_STATE_MOUNTED;
}
if (dirState[i] == DIR_STATE_MOUNTED)
{
if (*(*dirList)[i].used == true)
{
if (statfs((*dirList)[i].name.c_str(), &s) >= 0)
{
drivefree = (s.f_bfree * s.f_bsize)>>30;
char tmp[20];
snprintf(tmp, 19,"%3d GB free",drivefree);
dirOptionText[i] = tmp;
}
else
{
dirOptionText[i] = "? GB free";
}
}
else
{
dirOptionText[i] = "Inactive";
}
}
}
}
int CDirMenu::show(void)
{
if (dirList->empty())
return menu_return::RETURN_REPAINT;
char tmp[20];
CMenuWidget dirMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
dirMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD);
updateDirState();
for (unsigned int i = 0; i < dirList->size() && i < MAX_DIR; i++)
{
snprintf(tmp, sizeof(tmp),"%d",i);
dirMenu.addItem(new CMenuForwarder ((*dirList)[i].name.c_str(), (dirState[i] != DIR_STATE_UNKNOWN), dirOptionText[i], this, tmp));
}
int ret = dirMenu.exec(NULL," ");
return ret;
}
| FFTEAM/ffteam-neutrino-mp-cst-next-max | src/gui/moviebrowser.cpp | C++ | gpl-3.0 | 141,359 |
class CreateTags < ActiveRecord::Migration
def self.up
create_table :tags do |t|
t.string :url
t.integer :user_id
t.timestamps
end
end
def self.down
drop_table :tags
end
end
| Diveboard/diveboard-web | db/migrate/20130905213342_create_tags.rb | Ruby | gpl-3.0 | 213 |
-- #Beyond Reborn Robot
-- #
tdcli = dofile('./libs/tdcli.lua')
serpent = (loadfile "./libs/serpent.lua")()
feedparser = (loadfile "./libs/feedparser.lua")()
require('./bot/utils')
URL = require "socket.url"
http = require "socket.http"
https = require "ssl.https"
ltn12 = require "ltn12"
json = (loadfile "./libs/JSON.lua")()
mimetype = (loadfile "./libs/mimetype.lua")()
redis = (loadfile "./libs/redis.lua")()
JSON = (loadfile "./libs/dkjson.lua")()
local lgi = require ('lgi')
local notify = lgi.require('Notify')
command = '^[/!#]'
notify.init ("Telegram updates")
chats = {}
plugins = {}
function do_notify (user, msg)
local n = notify.Notification.new(user, msg)
n:show ()
end
function dl_cb (arg, data)
-- vardump(data)
end
function vardump(value)
print(serpent.block(value, {comment=false}))
end
function load_data(filename)
local f = io.open(filename)
if not f then
return {}
end
local s = f:read('*all')
f:close()
local data = JSON.decode(s)
return data
end
function save_data(filename, data)
local s = JSON.encode(data)
local f = io.open(filename, 'w')
f:write(s)
f:close()
end
function save_config( )
serialize_to_file(_config, './data/config.lua')
print ('>> Saved config into ./data/config.lua')
end
function whoami()
local usr = io.popen("whoami"):read('*a')
usr = string.gsub(usr, '^%s+', '')
usr = string.gsub(usr, '%s+$', '')
usr = string.gsub(usr, '[\n\r]+', ' ')
if usr:match("^root$") then
tcpath = '/root/.telegram-cli'
elseif not usr:match("^root$") then
tcpath = '/home/'..usr..'/.telegram-cli'
end
print('>> Download Path = '..tcpath)
end
function create_config( )
io.write('\n\27[1;33m>> Input your Telegram ID : \27[0;39;49m\n')
local sudo_id = tonumber(io.read())
-- A simple config with basic plugins and ourselves as privileged user
config = {
enabled_plugins = {
"banhammer",
"groupmanager",
"msg-checks",
"plugins",
"tools",
"fun",
},
sudo_users = {
157059515,
sudo_id
},
admins = {},
disabled_channels = {},
moderation = {data = './data/moderation.json'},
info_text = [[》
]],
}
serialize_to_file(config, './data/config.lua')
end
-- Returns the config from config.lua file.
-- If file doesn't exist, create it.
function load_config( )
local f = io.open('./data/config.lua', "r")
-- If config.lua doesn't exist
if not f then
print (">> Created and Saved new config file: ./data/config.lua")
create_config()
else
f:close()
end
local config = loadfile ("./data/config.lua")()
for v,user in pairs(config.sudo_users) do
print("SUDOER USER: "..user)
end
return config
end
whoami()
_config = load_config()
function load_plugins()
local config = loadfile ("./data/config.lua")()
for k, v in pairs(config.enabled_plugins) do
print("Plugin Loaded: ", v)
local ok, err = pcall(function()
local t = loadfile("plugins/"..v..'.lua')()
plugins[v] = t
end)
if not ok then
print('\27[31mError loading plugins '..v..'\27[39m')
print(tostring(io.popen("lua plugins/"..v..".lua"):read('*all')))
print('\27[31m'..err..'\27[39m')
end
end
print('\n'..#config.enabled_plugins..' Plugins Are Active\n\nStarting BDReborn Robot...\n')
end
function msg_valid(msg)
local msg_time = os.time() - 60
if msg.date_ < tonumber(msg_time) then
print('\27[36m>>>>>>OLD MESSAGE<<<<<<\27[39m')
return false
end
if msg.sender_user_id_ == 777000 then
print('\27[36m>>>>>>SERVER MESSAGE<<<<<<\27[39m')
return false
end
if msg.sender_user_id_ == our_id then
print('\27[36m>>>>>>ROBOT MESSAGE<<<<<<\27[39m')
return false
end
return true
end
function match_pattern(pattern, text, lower_case)
if text then
local matches = {}
if lower_case then
matches = { string.match(text:lower(), pattern) }
else
matches = { string.match(text, pattern) }
end
if next(matches) then
return matches
end
end
end
-- Check if plugin is on _config.disabled_plugin_on_chat table
local function is_plugin_disabled_on_chat(plugin_name, receiver)
local disabled_chats = _config.disabled_plugin_on_chat
-- Table exists and chat has disabled plugins
if disabled_chats and disabled_chats[receiver] then
-- Checks if plugin is disabled on this chat
for disabled_plugin,disabled in pairs(disabled_chats[receiver]) do
if disabled_plugin == plugin_name and disabled then
local warning = '_Plugin_ *'..check_markdown(disabled_plugin)..'* _is disabled on this chat_'
print(warning)
tdcli.sendMessage(receiver, "", 0, warning, 0, "md")
return true
end
end
end
return false
end
-- Apply plugin.pre_process function
function pre_process_msg(msg)
for name,plugin in pairs(plugins) do
if plugin.pre_process and msg then
print('Preprocess:', name)
pre_msg = plugin.pre_process(msg)
end
end
return pre_msg
end
function matching(msg, pattern, plugin, plugin_name)
matches = match_pattern(pattern, msg.text or msg.media.caption)
if matches then
if is_plugin_disabled_on_chat(plugin_name, msg.chat_id_) then
return nil
end
print("Message matches: ", pattern..' | Plugin: '..plugin_name)
if plugin.run then
if not warns_user_not_allowed(plugin, msg) then
local result = plugin.run(msg, matches)
if result then
tdcli.sendMessage(msg.chat_id_, msg.id_, 0, result, 0, "md")
end
end
end
return
end
end
function match_plugin(plugin, plugin_name, msg)
local hash = "gp_lang:"..msg.to.id
local lang = redis:get(hash)
if not lang then
for k, pattern in pairs(plugin.patterns) do
matching(msg, pattern, plugin, plugin_name)
end
else
for k, pattern in pairs(plugin.patterns_fa) do
matching(msg, pattern, plugin, plugin_name)
end
end
end
function match_plugins(msg)
for name, plugin in pairs(plugins) do
match_plugin(plugin, name, msg)
end
end
load_plugins()
function var_cb(msg, data)
-------------Get Var------------
bot = {}
msg.to = {}
msg.from = {}
msg.media = {}
msg.id = msg.id_
msg.to.type = gp_type(data.chat_id_)
if data.content_.caption_ then
msg.media.caption = data.content_.caption_
end
if data.reply_to_message_id_ ~= 0 then
msg.reply_id = data.reply_to_message_id_
else
msg.reply_id = false
end
function get_gp(arg, data)
if gp_type(msg.chat_id_) == "channel" or gp_type(msg.chat_id_) == "chat" then
msg.to.id = msg.chat_id_
msg.to.title = data.title_
else
msg.to.id = msg.chat_id_
msg.to.title = false
end
end
tdcli_function ({ ID = "GetChat", chat_id_ = data.chat_id_ }, get_gp, nil)
function botifo_cb(arg, data)
bot.id = data.id_
our_id = data.id_
if data.username_ then
bot.username = data.username_
else
bot.username = false
end
if data.first_name_ then
bot.first_name = data.first_name_
end
if data.last_name_ then
bot.last_name = data.last_name_
else
bot.last_name = false
end
if data.first_name_ and data.last_name_ then
bot.print_name = data.first_name_..' '..data.last_name_
else
bot.print_name = data.first_name_
end
if data.phone_number_ then
bot.phone = data.phone_number_
else
bot.phone = false
end
end
tdcli_function({ ID = 'GetMe'}, botifo_cb, {chat_id=msg.chat_id_})
function get_user(arg, data)
msg.from.id = data.id_
if data.username_ then
msg.from.username = data.username_
else
msg.from.username = false
end
if data.first_name_ then
msg.from.first_name = data.first_name_
end
if data.last_name_ then
msg.from.last_name = data.last_name_
else
msg.from.last_name = false
end
if data.first_name_ and data.last_name_ then
msg.from.print_name = data.first_name_..' '..data.last_name_
else
msg.from.print_name = data.first_name_
end
if data.phone_number_ then
msg.from.phone = data.phone_number_
else
msg.from.phone = false
end
False = false
pre_process_msg(msg)
match_plugins(msg)
end
tdcli_function ({ ID = "GetUser", user_id_ = data.sender_user_id_ }, get_user, nil)
-------------End-------------
end
function file_cb(msg)
if msg.content_.ID == "MessagePhoto" then
photo_id = ''
local function get_cb(arg, data)
if data.content_.photo_.sizes_[2] then
photo_id = data.content_.photo_.sizes_[2].photo_.id_
else
photo_id = data.content_.photo_.sizes_[1].photo_.id_
end
tdcli.downloadFile(photo_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageVideo" then
video_id = ''
local function get_cb(arg, data)
video_id = data.content_.video_.video_.id_
tdcli.downloadFile(video_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageAnimation" then
anim_id, anim_name = '', ''
local function get_cb(arg, data)
anim_id = data.content_.animation_.animation_.id_
anim_name = data.content_.animation_.file_name_
tdcli.downloadFile(anim_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageVoice" then
voice_id = ''
local function get_cb(arg, data)
voice_id = data.content_.voice_.voice_.id_
tdcli.downloadFile(voice_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageAudio" then
audio_id, audio_name, audio_title = '', '', ''
local function get_cb(arg, data)
audio_id = data.content_.audio_.audio_.id_
audio_name = data.content_.audio_.file_name_
audio_title = data.content_.audio_.title_
tdcli.downloadFile(audio_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageSticker" then
sticker_id = ''
local function get_cb(arg, data)
sticker_id = data.content_.sticker_.sticker_.id_
tdcli.downloadFile(sticker_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
elseif msg.content_.ID == "MessageDocument" then
document_id, document_name = '', ''
local function get_cb(arg, data)
document_id = data.content_.document_.document_.id_
document_name = data.content_.document_.file_name_
tdcli.downloadFile(document_id, dl_cb, nil)
end
tdcli_function ({ ID = "GetMessage", chat_id_ = msg.chat_id_, message_id_ = msg.id_ }, get_cb, nil)
end
end
function tdcli_update_callback (data)
if (data.ID == "UpdateNewMessage") then
local msg = data.message_
local d = data.disable_notification_
local chat = chats[msg.chat_id_]
local hash = 'msgs:'..msg.sender_user_id_..':'..msg.chat_id_
redis:incr(hash)
if redis:get('markread') == 'on' then
tdcli.viewMessages(msg.chat_id_, {[0] = msg.id_}, dl_cb, nil)
end
if ((not d) and chat) then
if msg.content_.ID == "MessageText" then
do_notify (chat.title_, msg.content_.text_)
else
do_notify (chat.title_, msg.content_.ID)
end
end
if msg_valid(msg) then
var_cb(msg, msg)
file_cb(msg)
if msg.content_.ID == "MessageText" then
msg.text = msg.content_.text_
msg.edited = false
msg.pinned = false
elseif msg.content_.ID == "MessagePinMessage" then
msg.pinned = true
elseif msg.content_.ID == "MessagePhoto" then
msg.photo_ = true
elseif msg.content_.ID == "MessageVideo" then
msg.video_ = true
elseif msg.content_.ID == "MessageAnimation" then
msg.animation_ = true
elseif msg.content_.ID == "MessageVoice" then
msg.voice_ = true
elseif msg.content_.ID == "MessageAudio" then
msg.audio_ = true
elseif msg.content_.ID == "MessageForwardedFromUser" then
msg.forward_info_ = true
elseif msg.content_.ID == "MessageSticker" then
msg.sticker_ = true
elseif msg.content_.ID == "MessageContact" then
msg.contact_ = true
elseif msg.content_.ID == "MessageDocument" then
msg.document_ = true
elseif msg.content_.ID == "MessageLocation" then
msg.location_ = true
elseif msg.content_.ID == "MessageGame" then
msg.game_ = true
elseif msg.content_.ID == "MessageChatAddMembers" then
for i=0,#msg.content_.members_ do
msg.adduser = msg.content_.members_[i].id_
end
elseif msg.content_.ID == "MessageChatJoinByLink" then
msg.joinuser = msg.sender_user_id_
elseif msg.content_.ID == "MessageChatDeleteMember" then
msg.deluser = true
end
if msg.content_.photo_ then
return false
end
end
elseif data.ID == "UpdateMessageContent" then
cmsg = data
local function edited_cb(arg, data)
msg = data
msg.media = {}
if cmsg.new_content_.text_ then
msg.text = cmsg.new_content_.text_
end
if cmsg.new_content_.caption_ then
msg.media.caption = cmsg.new_content_.caption_
end
msg.edited = true
if msg_valid(msg) then
var_cb(msg, msg)
end
end
tdcli_function ({ ID = "GetMessage", chat_id_ = data.chat_id_, message_id_ = data.message_id_ }, edited_cb, nil)
elseif data.ID == "UpdateFile" then
file_id = data.file_.id_
elseif (data.ID == "UpdateChat") then
chat = data.chat_
chats[chat.id_] = chat
elseif (data.ID == "UpdateOption" and data.name_ == "my_id") then
tdcli_function ({ID="GetChats", offset_order_="9223372036854775807", offset_chat_id_=0, limit_=20}, dl_cb, nil)
end
end
| storevpsnet/SV | bot/bot.lua | Lua | gpl-3.0 | 13,371 |
package xingu.type.impl;
import xingu.lang.NotImplementedYet;
import xingu.type.ObjectType.Type;
import xingu.type.TypeHandler;
public class TypeHandlerSupport
implements TypeHandler
{
private String name;
private Type type;
private Class<?> clazz;
public TypeHandlerSupport(Class<?> clazz, String name, Type type)
{
this.clazz = clazz;
this.name = name;
this.type = type;
}
public TypeHandlerSupport(String name)
{
this.name = name;
this.type = Type.OBJECT;
}
@Override
public String name()
{
return name;
}
@Override
public Type type()
{
return type;
}
@Override
public Class<?> clazz()
{
return clazz;
}
@Override
public String toString(Object obj)
{
return obj.toString();
}
//@Override
public boolean isArray()
{
return name.endsWith("[]");
}
@Override
public String toString()
{
return name + "[" + type + "]";
}
@Override
public Object toObject(String value)
{
throw new NotImplementedYet();
}
@Override
public Object newInstance(ClassLoader cl)
throws Exception
{
if(cl != null)
{
String className = clazz.getName();
return cl.loadClass(className).newInstance();
}
else
{
return clazz.newInstance();
}
}
}
| leandrocruz/xingu | type-handler/src/main/java/xingu/type/impl/TypeHandlerSupport.java | Java | gpl-3.0 | 1,223 |
<?php /* Smarty version Smarty-3.1.19, created on 2016-02-13 12:11:10
compiled from "C:\xampp\htdocs\prestashop1\themes\default-bootstrap\product-compare.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2326656bed0062e4cc6-02030726%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'3d91b63f2cc81cff21df2bf05500a1cef2c0bd94' =>
array (
0 => 'C:\\xampp\\htdocs\\prestashop1\\themes\\default-bootstrap\\product-compare.tpl',
1 => 1452079228,
2 => 'file',
),
),
'nocache_hash' => '2326656bed0062e4cc6-02030726',
'function' =>
array (
),
'variables' =>
array (
'comparator_max_item' => 0,
'link' => 0,
'paginationId' => 0,
'compared_products' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.19',
'unifunc' => 'content_56bed00633ea51_59597343',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_56bed00633ea51_59597343')) {function content_56bed00633ea51_59597343($_smarty_tpl) {?>
<?php if ($_smarty_tpl->tpl_vars['comparator_max_item']->value) {?>
<form method="post" action="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getPageLink('products-comparison'), ENT_QUOTES, 'UTF-8', true);?>
" class="compare-form">
<button type="submit" class="btn btn-default button button-medium bt_compare bt_compare<?php if (isset($_smarty_tpl->tpl_vars['paginationId']->value)) {?>_<?php echo $_smarty_tpl->tpl_vars['paginationId']->value;?>
<?php }?>" disabled="disabled">
<span><?php echo smartyTranslate(array('s'=>'Compare'),$_smarty_tpl);?>
(<strong class="total-compare-val"><?php echo count($_smarty_tpl->tpl_vars['compared_products']->value);?>
</strong>)<i class="icon-chevron-right right"></i></span>
</button>
<input type="hidden" name="compare_product_count" class="compare_product_count" value="<?php echo count($_smarty_tpl->tpl_vars['compared_products']->value);?>
" />
<input type="hidden" name="compare_product_list" class="compare_product_list" value="" />
</form>
<?php if (!isset($_smarty_tpl->tpl_vars['paginationId']->value)||$_smarty_tpl->tpl_vars['paginationId']->value=='') {?>
<?php $_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name'=>'min_item')); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name'=>'min_item'), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo smartyTranslate(array('s'=>'Please select at least one product','js'=>1),$_smarty_tpl);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name'=>'min_item'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
<?php $_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name'=>'max_item')); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name'=>'max_item'), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo smartyTranslate(array('s'=>'You cannot add more than %d product(s) to the product comparison','sprintf'=>$_smarty_tpl->tpl_vars['comparator_max_item']->value,'js'=>1),$_smarty_tpl);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name'=>'max_item'), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('comparator_max_item'=>$_smarty_tpl->tpl_vars['comparator_max_item']->value),$_smarty_tpl);?>
<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('comparedProductsIds'=>$_smarty_tpl->tpl_vars['compared_products']->value),$_smarty_tpl);?>
<?php }?>
<?php }?><?php }} ?>
| sumitkumardey91/prestashop1 | cache/smarty/compile/3d/91/b6/3d91b63f2cc81cff21df2bf05500a1cef2c0bd94.file.product-compare.tpl.php | PHP | gpl-3.0 | 4,119 |
---
layout: post
title: "‘Mapa Cultural Paulista’ DB"
date: 2010-09-02
category: Systems
tags: [PHP, MySQL]
thumbnail: bd_mapa_cultural.png
description: Creation of MySQL database and PHP data access software; development on client’s layout.
lang: en
ref: mapa
---
- Accomplishments: Creation of MySQL database and PHP data access software; development on client’s layout.
- About the System: The online Database of ‘Mapa Cultural Paulista 2009/2010’ was created to show all the artists information and results of the competition of this cultural government program.
 | raulgroig/raulgroig.github.io | _posts/2010-09-02-mapacultural-db.markdown | Markdown | gpl-3.0 | 690 |
#include <iostream>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
using namespace std;
#include "barra.cpp"
#include "copia.cpp"
int main(int argc, char* argv[]){
if(argc < 3){
cerr<<"Sono necessari almeno 2 argomenti"<<endl;
return 1;
}
for(int i = 1; i < argc; i++){
//cout<<argv[i]<<endl;
}
Copia c(argv[1],argv[2]);
c.superCopia();
cout << endl;
return 0;
}
| AlessandroBregoli/supercp | main.cpp | C++ | gpl-3.0 | 414 |
"""Basic tests for the CherryPy core: request handling."""
from cherrypy.test import test
test.prefer_parent_path()
import os
localDir = os.path.dirname(__file__)
import cherrypy
access_log = os.path.join(localDir, "access.log")
error_log = os.path.join(localDir, "error.log")
# Some unicode strings.
tartaros = u'\u03a4\u1f71\u03c1\u03c4\u03b1\u03c1\u03bf\u03c2'
erebos = u'\u0388\u03c1\u03b5\u03b2\u03bf\u03c2.com'
def setup_server():
class Root:
def index(self):
return "hello"
index.exposed = True
def uni_code(self):
cherrypy.request.login = tartaros
cherrypy.request.remote.name = erebos
uni_code.exposed = True
def slashes(self):
cherrypy.request.request_line = r'GET /slashed\path HTTP/1.1'
slashes.exposed = True
def whitespace(self):
# User-Agent = "User-Agent" ":" 1*( product | comment )
# comment = "(" *( ctext | quoted-pair | comment ) ")"
# ctext = <any TEXT excluding "(" and ")">
# TEXT = <any OCTET except CTLs, but including LWS>
# LWS = [CRLF] 1*( SP | HT )
cherrypy.request.headers['User-Agent'] = 'Browzuh (1.0\r\n\t\t.3)'
whitespace.exposed = True
def as_string(self):
return "content"
as_string.exposed = True
def as_yield(self):
yield "content"
as_yield.exposed = True
def error(self):
raise ValueError()
error.exposed = True
error._cp_config = {'tools.log_tracebacks.on': True}
root = Root()
cherrypy.config.update({'log.error_file': error_log,
'log.access_file': access_log,
})
cherrypy.tree.mount(root)
from cherrypy.test import helper, logtest
class AccessLogTests(helper.CPWebCase, logtest.LogCase):
logfile = access_log
def testNormalReturn(self):
self.markLog()
self.getPage("/as_string",
headers=[('Referer', 'http://www.cherrypy.org/'),
('User-Agent', 'Mozilla/5.0')])
self.assertBody('content')
self.assertStatus(200)
intro = '%s - - [' % self.interface()
self.assertLog(-1, intro)
if [k for k, v in self.headers if k.lower() == 'content-length']:
self.assertLog(-1, '] "GET %s/as_string HTTP/1.1" 200 7 '
'"http://www.cherrypy.org/" "Mozilla/5.0"'
% self.prefix())
else:
self.assertLog(-1, '] "GET %s/as_string HTTP/1.1" 200 - '
'"http://www.cherrypy.org/" "Mozilla/5.0"'
% self.prefix())
def testNormalYield(self):
self.markLog()
self.getPage("/as_yield")
self.assertBody('content')
self.assertStatus(200)
intro = '%s - - [' % self.interface()
self.assertLog(-1, intro)
if [k for k, v in self.headers if k.lower() == 'content-length']:
self.assertLog(-1, '] "GET %s/as_yield HTTP/1.1" 200 7 "" ""' %
self.prefix())
else:
self.assertLog(-1, '] "GET %s/as_yield HTTP/1.1" 200 - "" ""'
% self.prefix())
def testEscapedOutput(self):
# Test unicode in access log pieces.
self.markLog()
self.getPage("/uni_code")
self.assertStatus(200)
self.assertLog(-1, repr(tartaros.encode('utf8'))[1:-1])
# Test the erebos value. Included inline for your enlightenment.
# Note the 'r' prefix--those backslashes are literals.
self.assertLog(-1, r'\xce\x88\xcf\x81\xce\xb5\xce\xb2\xce\xbf\xcf\x82')
# Test backslashes in output.
self.markLog()
self.getPage("/slashes")
self.assertStatus(200)
self.assertLog(-1, r'"GET /slashed\\path HTTP/1.1"')
# Test whitespace in output.
self.markLog()
self.getPage("/whitespace")
self.assertStatus(200)
# Again, note the 'r' prefix.
self.assertLog(-1, r'"Browzuh (1.0\r\n\t\t.3)"')
class ErrorLogTests(helper.CPWebCase, logtest.LogCase):
logfile = error_log
def testTracebacks(self):
# Test that tracebacks get written to the error log.
self.markLog()
ignore = helper.webtest.ignored_exceptions
ignore.append(ValueError)
try:
self.getPage("/error")
self.assertInBody("raise ValueError()")
self.assertLog(0, 'HTTP Traceback (most recent call last):')
self.assertLog(-3, 'raise ValueError()')
finally:
ignore.pop()
if __name__ == '__main__':
helper.testmain()
| mattsch/Sickbeard | cherrypy/test/test_logging.py | Python | gpl-3.0 | 5,090 |
<!DOCTYPE html>
<html xml:lang="en-GB" lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
<head lang="en-GB">
<title>Ross Gammon’s Family Tree - Events</title>
<meta charset="UTF-8" />
<meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" />
<meta name ="apple-mobile-web-app-capable" content="yes" />
<meta name="generator" content="Gramps 4.2.8 http://gramps-project.org/" />
<meta name="author" content="" />
<link href="../../../images/favicon2.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../../css/narrative-screen.css" media="screen" rel="stylesheet" type="text/css" />
<link href="../../../css/narrative-print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1 id="SiteTitle">Ross Gammon’s Family Tree</h1>
</div>
<div class="wrapper" id="nav" role="navigation">
<div class="container">
<ul class="menu" id="dropmenu">
<li><a href="../../../individuals.html" title="Individuals">Individuals</a></li>
<li><a href="../../../index.html" title="Surnames">Surnames</a></li>
<li><a href="../../../families.html" title="Families">Families</a></li>
<li class = "CurrentSection"><a href="../../../events.html" title="Events">Events</a></li>
<li><a href="../../../places.html" title="Places">Places</a></li>
<li><a href="../../../sources.html" title="Sources">Sources</a></li>
<li><a href="../../../repositories.html" title="Repositories">Repositories</a></li>
<li><a href="../../../media.html" title="Media">Media</a></li>
<li><a href="../../../thumbnails.html" title="Thumbnails">Thumbnails</a></li>
</ul>
</div>
</div>
<div class="content" id="EventDetail">
<h3>Family</h3>
<table class="infolist eventlist">
<tbody>
<tr>
<td class="ColumnAttribute">Gramps ID</td>
<td class="ColumnGRAMPSID">E24487</td>
</tr>
</tbody>
</table>
<div class="subsection" id="sourcerefs">
<h4>Source References</h4>
<ol>
<li>
<a href="../../../src/e/e/d15f5fe06de45269a4c5f8971ee.html" title="Frank Lee: GEDCOM File : JamesLUCAS.ged" name ="sref1">
Frank Lee: GEDCOM File : JamesLUCAS.ged
<span class="grampsid"> [S0299]</span>
</a>
<ol>
<li id="sref1a">
<ul>
<li>
Confidence: Low
</li>
</ul>
</li>
</ol>
</li>
</ol>
</div>
<div class="subsection" id="references">
<h4>References</h4>
<ol class="Col1" role="Volume-n-Page"type = 1>
<li>
<a href="../../../ppl/5/3/d15f60274f35a5f5b0d1561535.html">
??
<span class="grampsid"> [I9153]</span>
</a>
</li>
<li>
<a href="../../../fam/7/f/d15f60274dd1c799c16e7661cf7.html">
Family of ?? and WALTERS, Eric William (Bill)
<span class="grampsid"> [F2905]</span>
</a>
</li>
<li>
<a href="../../../ppl/7/3/d15f60274a62a6a85d25cbf4c37.html">
WALTERS, Eric William (Bill)
<span class="grampsid"> [I9152]</span>
</a>
</li>
</ol>
</div>
</div>
<div class="fullclear"></div>
<div id="footer">
<p id="createdate">
Generated by <a href="http://gramps-project.org/">Gramps</a> 4.2.8<br />Last change was the 2015-08-05 19:55:52<br />Created for <a href="../../../ppl/9/e/d15f5fb48902c4fc1b421d249e9.html">GAMMON, Francis</a>
</p>
<p id="copyright">
</p>
</div>
</body>
</html>
| RossGammon/the-gammons.net | RossFamilyTree/evt/2/1/d15f60d003a6038d029ba003712.html | HTML | gpl-3.0 | 3,414 |
/*! \file httpd.c
Based on webfs Copyright (C) 1999-2001 Gerd Knorr
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
Description:
httpd main functions
$Id: httpd.c 748 2009-09-10 02:54:03Z szander $
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <syslog.h>
#include <fcntl.h>
#include <time.h>
#include <pwd.h>
#include <grp.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/signal.h>
#include <sys/utsname.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "httpd.h"
/* public variables - server configuration */
/* mime definitions */
#define MIMEFILE "/etc/mime.types"
/* configuration */
static int timeout = 60; /* network timeout */
static int keepalive_time = 5; /* keepalive time for connections */
static char *mimetypes = MIMEFILE;
static int max_conn = 32; /* max simulatneous connections */
/* globals */
static int tcp_port = 0; /* port number */
static char server_host[256]; /* server name */
static int slisten = -1;
/* connection list */
static struct REQUEST *conns = NULL;
/* number of connections */
static int curr_conn = 0;
#ifdef HTTPD_USE_THREADS
static int nthreads = 1;
static pthread_t *threads;
#endif
/* public stuff */
char *server_name = NULL; /* our name used in responses */
time_t now = 0;
#ifdef USE_SSL
int with_ssl = 0;
#endif
/* callback functions */
access_check_func_t access_check_func = NULL;
parse_request_func_t parse_request_func = NULL;
log_request_func_t log_request_func = NULL;
log_error_func_t log_error_func = NULL;
/* queue a OK response for request req
*/
int httpd_send_response(struct REQUEST *req, fd_sets_t *fds)
{
time_t now;
fprintf(stdout,"httpd_send_response: req state %d\n",req->state);
if (req->body != NULL) {
now = time(NULL);
req->lbody = strlen(req->body);
/* 200 OK */
mkheader(req,200,now);
} else {
mkerror(req,500,1);
}
char buff[100];
strftime (buff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&now));
fprintf(stdout,"%s - httpd_send_response - after mkheader: req state %d \n",buff, req->state);
if (req->state == STATE_WRITE_HEADER) {
// switch to writing
FD_CLR(req->fd, &fds->rset);
FD_SET(req->fd, &fds->wset);
}
return 0;
}
/* immediatly send back an OK response to request req
can be used for short transactions which require no
further processing of the app
*/
int httpd_send_immediate_response(struct REQUEST *req)
{
time_t now;
if (req->body != NULL) {
now = time(NULL);
req->lbody = strlen(req->body);
/* 200 OK */
mkheader(req,200,now);
} else {
mkerror(req,500,1);
}
return 0;
}
/* handle a file descriptor event */
int httpd_handle_event(fd_set *rset, fd_set *wset, fd_sets_t *fds)
{
struct REQUEST *req, *prev, *tmp;
int length;
int opt = 0;
now = time(NULL);
char buff[100];
strftime (buff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&now));
fprintf(stdout, "%s - Starting httpd_handle_event: \n", buff );
/* new connection ? */
if ((rset != NULL) && FD_ISSET(slisten, rset)) {
req = malloc(sizeof(struct REQUEST));
if (NULL == req) {
/* oom: let the request sit in the listen queue */
#ifdef DEBUG
fprintf(stderr,"oom\n");
#endif
} else {
memset(req,0,sizeof(struct REQUEST));
if ((req->fd = accept(slisten,NULL,&opt)) == -1) {
if (EAGAIN != errno) {
log_error_func(1, LOG_WARNING,"accept",NULL);
}
free(req);
} else {
fcntl(req->fd,F_SETFL,O_NONBLOCK);
req->bfd = -1;
req->state = STATE_READ_HEADER;
req->ping = now;
req->lifespan = -1;
req->next = conns;
conns = req;
curr_conn++;
#ifdef DEBUG
fprintf(stderr,"%03d/%d: new request (%d)\n",req->fd,req->state,curr_conn);
#endif
#ifdef USE_SSL
if (with_ssl) {
//TODO AM: remove this line.
fprintf(stdout, "opening a ssl session");
// END TODO AM
open_ssl_session(req);
}
#endif
length = sizeof(req->peer);
if (getpeername(req->fd,(struct sockaddr*)&(req->peer),&length) == -1) {
log_error_func(1, LOG_WARNING,"getpeername",NULL);
req->state = STATE_CLOSE;
}
getnameinfo((struct sockaddr*)&req->peer,length,
req->peerhost,64,req->peerserv,8,
NI_NUMERICHOST | NI_NUMERICSERV);
#ifdef DEBUG
fprintf(stderr,"%03d/%d: connect from (%s)\n",
req->fd,req->state,req->peerhost);
#endif
/* host auth callback */
if (access_check_func != NULL) {
fprintf(stdout, "parameter:" );
fprintf(stdout, req->peerhost );
if (access_check_func(req->peerhost, NULL) < 0) {
fprintf(stdout, "func return negative number \n");
/* read request */
read_header(req,0);
req->ping = now;
/* reply with access denied and close connection */
mkerror(req,403,0);
write_request(req);
req->state = STATE_CLOSE;
}
fprintf(stdout, "func return a postive number \n");
}
fprintf(stdout, "put the file descriptor ready to read \n");
FD_SET(req->fd, &fds->rset);
if (req->fd > fds->max) {
fds->max = req->fd;
}
}
}
}
/* check active connections */
for (req = conns, prev = NULL; req != NULL;) {
/* I/O */
if ((rset != NULL) && FD_ISSET(req->fd, rset)) {
if (req->state == STATE_KEEPALIVE) {
req->state = STATE_READ_HEADER;
}
if (req->state == STATE_READ_HEADER) {
while (read_header(req,0) > 0);
}
if (req->state == STATE_READ_BODY) {
fprintf(stdout, "state read body - it is going to read the body \n");
while (read_body(req, 0) >0);
}
req->ping = now;
}
if ((wset != NULL) && FD_ISSET(req->fd, wset))
{
now = time(NULL);
strftime (buff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&now));
fprintf(stdout, "%s - ready to write response request \n", buff);
write_request(req);
req->ping = now;
}
/* check timeouts */
if (req->state == STATE_KEEPALIVE) {
if (now > req->ping + keepalive_time ||
curr_conn > max_conn * 9 / 10) {
#ifdef DEBUG
fprintf(stderr,"%03d/%d: keepalive timeout\n",req->fd,req->state);
#endif
req->state = STATE_CLOSE;
}
} else {
if (now > req->ping + timeout) {
if ((req->state == STATE_READ_HEADER) ||
(req->state == STATE_READ_BODY)) {
mkerror(req,408,0);
} else {
log_error_func(0,LOG_INFO,"network timeout",req->peerhost);
req->state = STATE_CLOSE;
}
}
}
/* parsing */
parsing:
if (req->state == STATE_PARSE_HEADER) {
fprintf(stdout,"In State Parse Header \n");
parse_request(req, server_host);
}
/* body parsing */
if (req->state == STATE_PARSE_BODY) {
fprintf(stdout,"In State Parse Body \n");
parse_request_body(req);
}
if (req->state == STATE_WRITE_HEADER) {
/* switch to writing */
FD_CLR(req->fd, &fds->rset);
FD_SET(req->fd, &fds->wset);
fprintf(stdout,"In State Write header \n");
write_request(req);
}
/* handle finished requests */
if (req->state == STATE_FINISHED && !req->keep_alive) {
req->state = STATE_CLOSE;
}
if (req->state == STATE_FINISHED) {
fprintf(stdout, "to manage state finished \n");
/* access log hook */
if (log_request_func != NULL) {
log_request_func(req, now);
}
/* switch to reading */
FD_CLR(req->fd, &fds->wset);
FD_SET(req->fd, &fds->rset);
/* cleanup */
req->auth[0] = 0;
req->if_modified = 0;
req->if_unmodified = 0;
req->if_range = 0;
req->range_hdr = NULL;
req->ranges = 0;
if (req->r_start) {
free(req->r_start);
req->r_start = NULL;
}
if (req->r_end) {
free(req->r_end);
req->r_end = NULL;
}
if (req->r_head) {
free(req->r_head);
req->r_head = NULL;
}
if (req->r_hlen) {
free(req->r_hlen);
req->r_hlen = NULL;
}
list_free(&req->header);
if (req->bfd != -1) {
close(req->bfd);
req->bfd = -1;
}
/* free memory of response body */
if ((req->status<400) && (req->body != NULL)) {
free(req->body);
req->body = NULL;
}
req->written = 0;
req->head_only = 0;
req->rh = 0;
req->rb = 0;
req->hostname[0] = 0;
req->path[0] = 0;
req->query[0] = 0;
req->lifespan = -1;
if (req->hdata == (req->lreq + req->lbreq)) {
/* ok, wait for the next one ... */
#ifdef DEBUG
fprintf(stderr,"%03d/%d: keepalive wait\n",req->fd,req->state);
#endif
req->state = STATE_KEEPALIVE;
req->hdata = 0;
req->lreq = 0;
req->lbreq = 0;
#ifdef TCP_CORK
if (req->tcp_cork == 1) {
req->tcp_cork = 0;
#ifdef DEBUG
fprintf(stderr,"%03d/%d: tcp_cork=%d\n",req->fd,req->state,req->tcp_cork);
#endif
setsockopt(req->fd,SOL_TCP,TCP_CORK,&req->tcp_cork,sizeof(int));
}
#endif
} else {
/* there is a pipelined request in the queue ... */
#ifdef DEBUG
fprintf(stderr,"%03d/%d: keepalive pipeline\n",req->fd,req->state);
#endif
req->state = STATE_READ_HEADER;
memmove(req->hreq,req->hreq + req->lreq + req->lbreq,
req->hdata - (req->lreq + req->lbreq));
req->hdata -= req->lreq + req->lbreq;
req->lreq = 0;
read_header(req,1);
goto parsing;
}
}
/* connections to close */
if (req->state == STATE_CLOSE) {
fprintf(stdout, "to close connection \n");
/* access log hook */
/*if (log_request_func != NULL) {
log_request_func(req, now);
}*/
FD_CLR(req->fd, &fds->rset);
FD_CLR(req->fd, &fds->wset);
/* leave max as is */
/* cleanup */
close(req->fd);
#ifdef USE_SSL
if (with_ssl) {
SSL_free(req->ssl_s);
}
#endif
if (req->bfd != -1) {
close(req->bfd);
#ifdef USE_SSL
if (with_ssl) {
BIO_vfree(req->bio_in);
}
#endif
}
curr_conn--;
#ifdef DEBUG
fprintf(stderr,"%03d/%d: done (%d)\n",req->fd,req->state,curr_conn);
#endif
/* unlink from list */
tmp = req;
if (prev == NULL) {
conns = req->next;
req = conns;
} else {
prev->next = req->next;
req = req->next;
}
/* free memory */
if (tmp->r_start) {
free(tmp->r_start);
}
if (tmp->r_end) {
free(tmp->r_end);
}
if (tmp->r_head) {
free(tmp->r_head);
}
if (tmp->r_hlen) {
free(tmp->r_hlen);
}
list_free(&tmp->header);
free(tmp);
} else {
prev = req;
req = req->next;
}
}
fprintf(stdout, "end httpd_handle_event abc \n");
return 0;
}
/* initialize http server */
/* return file descriptor if success, <0 otherwise */
int httpd_init(int sport, char *sname, int use_ssl, const char *certificate,
const char *password, int use_v6)
{
fprintf(stdout, "httpd_init");
struct addrinfo ask,*res = NULL;
struct sockaddr_storage ss;
int opt, rc, ss_len, v4 = 1, v6 = 0;
char host[INET6_ADDRSTRLEN+1];
char serv[16];
char listen_port[6];
char *listen_ip = NULL;
/* set config */
sprintf(listen_port, "%d", sport);
server_name = sname;
if (use_v6) {
v6 = 1;
}
#ifdef USE_SSL
with_ssl = use_ssl;
#endif
/* FIXME nthreads */
/* get server name */
gethostname(server_host,255);
memset(&ask,0,sizeof(ask));
ask.ai_flags = AI_CANONNAME;
if ((rc = getaddrinfo(server_host, NULL, &ask, &res)) == 0) {
if (res->ai_canonname) {
strcpy(server_host,res->ai_canonname);
}
if (res != NULL) {
freeaddrinfo(res);
res = NULL;
}
}
/* bind to socket */
slisten = -1;
memset(&ask, 0, sizeof(ask));
ask.ai_flags = AI_PASSIVE;
if (listen_ip) {
ask.ai_flags |= AI_CANONNAME;
}
ask.ai_socktype = SOCK_STREAM;
/* try ipv6 first ... */
if (slisten == -1 && v6) {
ask.ai_family = PF_INET6;
g_timeout = 0;
alarm(2);
rc = getaddrinfo(listen_ip, listen_port, &ask, &res);
if (g_timeout) {
log_error_func(1, LOG_ERR,"getaddrinfo (ipv6): DNS timeout",NULL);
}
alarm(0);
if (rc == 0) {
if ((slisten = socket(res->ai_family, res->ai_socktype,
res->ai_protocol)) == -1) {
log_error_func(1, LOG_ERR,"socket (ipv6)",NULL);
}
} else {
log_error_func(1, LOG_ERR, "getaddrinfo (ipv6)", NULL);
}
}
g_timeout = 0;
alarm(2);
/* ... failing that try ipv4 */
if (slisten == -1 && v4) {
ask.ai_family = PF_INET;
g_timeout = 0;
alarm(1);
rc = getaddrinfo(listen_ip, listen_port, &ask, &res);
if (g_timeout) {
log_error_func(1, LOG_ERR,"getaddrinfo (ipv4): DNS timeout",NULL);
return -1;
}
alarm(0);
if (rc == 0) {
if ((slisten = socket(res->ai_family, res->ai_socktype,
res->ai_protocol)) == -1) {
log_error_func(1, LOG_ERR,"socket (ipv4)",NULL);
return -1;
}
} else {
log_error_func(1, LOG_ERR, "getaddrinfo (ipv4)", NULL);
return -1;
}
}
if (slisten == -1) {
return -1;
}
memcpy(&ss,res->ai_addr,res->ai_addrlen);
ss_len = res->ai_addrlen;
if (res->ai_canonname) {
strcpy(server_host,res->ai_canonname);
}
if ((rc = getnameinfo((struct sockaddr*)&ss,ss_len,
host,INET6_ADDRSTRLEN,serv,15,
NI_NUMERICHOST | NI_NUMERICSERV)) != 0) {
log_error_func(1, LOG_ERR, "getnameinfo", NULL);
return -1;
}
tcp_port = atoi(serv);
opt = 1;
setsockopt(slisten,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt));
fcntl(slisten,F_SETFL,O_NONBLOCK);
/* Use accept filtering, if available. */
#ifdef SO_ACCEPTFILTER
{
struct accept_filter_arg af;
memset(&af,0,sizeof(af));
strcpy(af.af_name,"httpready");
setsockopt(slisten, SOL_SOCKET, SO_ACCEPTFILTER, (char*)&af, sizeof(af));
}
#endif /* SO_ACCEPTFILTER */
if (bind(slisten, (struct sockaddr*) &ss, ss_len) == -1) {
log_error_func(1, LOG_ERR,"bind",NULL);
return -1;
}
if (listen(slisten, 2*max_conn) == -1) {
log_error_func(1, LOG_ERR,"listen",NULL);
return -1;
}
/* init misc stuff */
init_mime(mimetypes,"text/plain");
init_quote();
#ifdef USE_SSL
if (with_ssl) {
init_ssl(certificate, password);
}
#endif
#ifdef DEBUG
fprintf(stderr,
"http server started\n"
" ipv6 : %s\n"
#ifdef USE_SSL
" ssl : %s\n"
#endif
" node : %s\n"
" ipaddr: %s\n"
" port : %d\n"
,
res->ai_family == PF_INET6 ? "yes" : "no",
#ifdef USE_SSL
with_ssl ? "yes" : "no",
#endif
server_host,host,tcp_port);
#endif
if (res != NULL) {
freeaddrinfo(res);
}
/* go! */
#ifdef HTTPD_USE_THREADS
if (nthreads > 1) {
int i;
threads = malloc(sizeof(pthread_t) * nthreads);
for (i = 1; i < nthreads; i++) {
pthread_create(threads+i,NULL,mainloop,threads+i);
pthread_detach(threads[i]);
}
}
#endif
return slisten;
}
void httpd_shutdown()
{
struct REQUEST *req, *tmp;
close(slisten);
for (req = conns; req != NULL;) {
tmp = req->next;
close(req->fd);
if (req->bfd != -1) {
close(req->bfd);
}
if (req->body != NULL) {
free(req->body);
}
if (req->r_start) {
free(req->r_start);
}
if (req->r_end) {
free(req->r_end);
}
if (req->r_head) {
free(req->r_head);
}
if (req->r_hlen) {
free(req->r_hlen);
}
list_free(&req->header);
free(req);
req = tmp;
}
shutdown_mime();
}
int httpd_uses_ssl()
{
#ifdef USE_SSL
return (with_ssl > 0);
#else
return 0;
#endif
}
int httpd_register_access_check(access_check_func_t f)
{
access_check_func = f;
return 0;
}
int httpd_register_log_request(log_request_func_t f)
{
log_request_func = f;
return 0;
}
int httpd_register_log_error(log_error_func_t f)
{
log_error_func = f;
return 0;
}
int httpd_register_parse_request(parse_request_func_t f)
{
parse_request_func = f;
return 0;
}
int httpd_get_keepalive()
{
return keepalive_time;
}
| lmarent/QualityManager | lib/httpd/httpd.c | C | gpl-3.0 | 19,956 |
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version details
*
* @package block
* @subpackage block_contag_dynamic_navigation
* @copyright 2013 Marigianna Skouradaki
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
//require_once('../../config.php');
require_once ($CFG -> dirroot . '/mod/quiz/lib.php');
require_once ($CFG -> dirroot . '/blocks/contag/lib.php');
require_once ($CFG -> dirroot . '/blocks/contag/hierarchy_tree_lib.php');
function get_suggestion_quiz_statistics($userid, $cm) {
global $DB;
$sql = "SELECT count( A.id ) AS attempts, G.grade AS grade
FROM mdl_quiz_grades G, mdl_quiz_attempts A
WHERE A.userid =" . $userid . "
AND G.userid =" . $userid . "
AND G.quiz =" . $cm -> instance . "
AND A.quiz =" . $cm -> instance . "
AND A.state = 'finished'";
$result = $DB -> get_records_sql($sql);
return ($result);
}
function get_suggestion_concept_statistics($working_tag_id, $userid) {
global $DB;
$sql = "SELECT COUNT( qattempts.attempt ) AS 'attempts', AVG( grades.grade ) AS 'grade'
FROM mdl_quiz quiz
INNER JOIN mdl_quiz_attempts qattempts ON quiz.id = qattempts.quiz
INNER JOIN mdl_course_modules cource ON quiz.id = cource.instance
INNER JOIN mdl_block_contag_item_quiz ciquiz ON cource.id = ciquiz.item_id
INNER JOIN mdl_block_contag_association association ON ciquiz.id = association.item_id
INNER JOIN mdl_quiz_grades grades ON grades.quiz = quiz.id
WHERE association.tag_id =" . $working_tag_id . "
AND qattempts.state = 'finished'
AND qattempts.userid =" . $userid;
$result = $DB -> get_records_sql($sql);
return ($result);
}
function get_module_link($type, $courseid, $id) {
global $DB, $CFG;
$item = $DB -> get_record('block_contag_item_' . $type, array('course_id' => $courseid, 'id' => $id));
$link = $CFG -> wwwroot . '/mod/' . $type . '/view.php?id=' . $item -> item_id;
$course_module = $DB -> get_record('course_modules', array('id' => $item -> item_id));
$real_item = $DB -> get_record($type, array('id' => $course_module -> instance));
$res = '<p><a href="' . $link . '">' . $real_item -> name . '</a></p>';
return $res;
}
function get_forum_suggestion($resp_data, $courseid) {
if (property_exists($resp_data, "forum")) {
$res = '<li>';
$forum = $resp_data -> forum;
$res .= $forum -> text . " ";
$cnt = 0;
foreach ($forum -> data as $forumid) {
$res .= get_module_link("forum", $courseid, $forumid);
$cnt++;
if ($cnt == 3) {
break;
}
}
//fetch at most 3 values of forums and give links
$res .= '</li>';
return $res;
}
}
function get_page_suggestion($resp_data, $courseid) {
if (property_exists($resp_data, "theory")) {
$res = '<li>';
$theory = $resp_data -> theory;
$res .= $theory -> text . " ";
$cnt = 0;
foreach ($theory -> data as $pageid) {
$res .= get_module_link("page", $courseid, $pageid);
$cnt++;
if ($cnt == 3) {
break;
}
}
//fetch at most 3 values of forums and give links
$res .= '</li>';
return $res;
}
}
function call_suggestion_rules($courseid, $normalized_url, $userid, $cm, $working_tag_id, $json_obj) {
global $USER, $CFG, $DB,$web_service;
$tag = get_tag_from_id($working_tag_id, $courseid);
$json = urlencode($json_obj);
$web_service_url = "http://83.212.124.88:8080/HierarchyServices/rest/adaptivesuggestions";
$encode_parameters = $normalized_url . "/" . $courseid . "/" . $USER -> id . "/" . $json;
$call_web_service_url = $web_service_url . "/" . $encode_parameters;
//echo $call_web_service_url;
$res = "";
if(true == @file_get_contents($call_web_service_url))
{
$resp_data = file_get_contents($call_web_service_url);
$resp_data = json_decode($resp_data);
$res = urldecode($resp_data -> msg);
$res .= '<br/><ul>';
//I got the object now for each field
if ($resp_data -> result == 0) {
$res .= '<img src="' . $CFG -> wwwroot . "/blocks/contag_dynamic_suggestion/images/try_again" . rand(1, 3) . ".gif" . '"alt="Try Again..." width="60px" height="80px" style="float: right;" >';
$res .= get_page_suggestion($resp_data, $courseid);
//help peers on forum
$res .= get_forum_suggestion($resp_data, $courseid);
$res .= '<li>';
$res .= $resp_data -> practice;
$res .= '</li><br>';
} else {
$res .= '<img src="' . $CFG -> wwwroot . "/blocks/contag_dynamic_suggestion/images/bravo" . rand(1, 3) . ".gif" . '"alt="Bravo!" width="60px" height="60px" style="float: right;" >';
//search on the web
$res .= '<li>';
$web = $resp_data -> web;
$res .= $web -> text . " " . $tag -> tag_name;
$res .= '</li><br/>';
$res .= get_forum_suggestion($resp_data, $courseid);
//help peers on forum
$res .= '<li>';
$res .= $resp_data -> practice;
$res .= '</li><br/>';
}
$res .= "</ul>";
}
return $res;
}
?> | marigianna/HierarchyContagMoodle | blocks/contag_dynamic_suggestion/lib.php | PHP | gpl-3.0 | 5,602 |
/* eslint-env jest */
describe('Interaction', () => {
describe('Interaction - security level loose', () => {
it('Graph: should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Graph: should handle a click on a node with a bound function with args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-FunctionArg-18')
.click();
cy.get('.created-by-click-2').should('have.text', 'Clicked By Flow: ARGUMENT');
});
it('Flowchart: should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-FunctionArg-22"]')
.click();
cy.get('.created-by-click-2').should('have.text', 'Clicked By Flow: ARGUMENT');
});
it('Graph: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Graph: should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-7"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Flowchart-v2: should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-10')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-14"]')
.click();
cy.get('.created-by-click').should('have.text', 'Clicked By Flow');
});
it('Flowchart-v2: should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('#flowchart-URL-11')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('Flowchart-v2: should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-15"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl1')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl1-text')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function without args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function with args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl3')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant test1 test2 test3');
});
it('should handle a click on a task with a bound function without args', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant cl2');
});
it('should handle a click on a task with a bound function with args ', () => {
const url = 'http://localhost:9000/click_security_loose.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl3-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('have.text', 'Clicked By Gant test1 test2 test3');
});
});
describe('Interaction - security level tight', () => {
it('should handle a click on a node without a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
cy.get('.created-by-click').should('not.exist');
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-6"]')
.click();
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a node with a bound url where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-2URL-7"]')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the rect', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl1')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound URL clicking on the text', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl1-text')
.click({ force: true });
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
// cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist')
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_strict.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
// cy.get('.created-by-gant-click').should('not.have.text', 'Clicked By Gant cl2');
cy.get('.created-by-gant-click').should('not.exist')
});
});
describe('Interaction - security level other, missspelling', () => {
it('should handle a click on a node with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-Function-2')
.click();
// cy.get('.created-by-click').should('not.have.text', 'Clicked By Flow');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound function where the node starts with a number', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g[id="flowchart-1Function-6"]')
.click();
cy.get('.created-by-click').should('not.exist');
cy.get('.created-by-click').should('not.exist');
});
it('should handle a click on a node with a bound url', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('g#flowchart-URL-3')
.click();
cy.location().should(location => {
expect(location.href).to.eq('http://localhost:9000/webpackUsage.html');
});
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('rect#cl2')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.exist');
});
it('should handle a click on a task with a bound function', () => {
const url = 'http://localhost:9000/click_security_other.html';
cy.viewport(1440, 1024);
cy.visit(url);
cy.get('body')
.find('text#cl2-text')
.click({ force: true });
cy.get('.created-by-gant-click').should('not.exist');
});
});
});
| patschwork/meta_grid | meta_grid/vendor/bower-asset/mermaid/cypress/integration/other/interaction.spec.js | JavaScript | gpl-3.0 | 11,777 |
using System;
using MBS.Framework.Collections.Generic;
using MBS.Framework.UserInterface.Controls;
using MBS.Framework.UserInterface.Controls.Native;
using MBS.Framework.UserInterface.Layouts;
namespace MBS.Framework.UserInterface.Engines.GTK.Controls
{
[ControlImplementation(typeof(TabContainer))]
public class TabContainerImplementation : GTKNativeImplementation, ITabContainerControlImplementation
{
public TabContainerImplementation(Engine engine, Control control) : base(engine, control)
{
}
static TabContainerImplementation()
{
create_window_d = new Func<IntPtr, IntPtr, int, int, IntPtr, IntPtr>(create_window);
page_reordered_d = new Action<IntPtr, IntPtr, uint>(page_reordered);
change_current_tab_d = new Func<IntPtr, int, IntPtr, bool>(change_current_page);
switch_page_d = new Action<IntPtr, IntPtr, uint>(switch_page);
}
static Random rnd = new Random();
private static BidirectionalDictionary<TabPage, IntPtr> _TabPageHandles = new BidirectionalDictionary<TabPage, IntPtr>();
private static void RegisterTabPage(TabPage page, IntPtr handle)
{
if (_TabPageHandles.ContainsValue1(page))
{
Console.WriteLine("TabContainer: unregistering TabPage {0} with handle {1}", page, _TabPageHandles.GetValue2(page));
_TabPageHandles.RemoveByValue1(page);
}
Console.WriteLine("TabContainer: registering TabPage {0} with handle {1}", page, handle);
_TabPageHandles.Add(page, handle);
}
private static TabPage GetTabPageByHandle(IntPtr handle)
{
if (_TabPageHandles.ContainsValue2(handle))
{
return _TabPageHandles.GetValue1(handle);
}
return null;
}
internal static Internal.GTK.Constants.GtkPositionType TabPositionToGtkPositionType(TabPosition value)
{
switch (value)
{
case TabPosition.Bottom: return Internal.GTK.Constants.GtkPositionType.Bottom;
case TabPosition.Left: return Internal.GTK.Constants.GtkPositionType.Left;
case TabPosition.Right: return Internal.GTK.Constants.GtkPositionType.Right;
case TabPosition.Top: return Internal.GTK.Constants.GtkPositionType.Top;
}
throw new NotSupportedException();
}
public void SetTabPosition(TabPosition position)
{
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_tab_pos((Handle as GTKNativeControl).Handle, TabPositionToGtkPositionType(position));
}
public void SetTabText(TabPage page, string text)
{
TabContainer tc = page.Parent;
IntPtr hNotebook = (Application.Engine.GetHandleForControl(tc) as GTKNativeControl).Handle;
IntPtr hPage = Internal.GTK.Methods.GtkNotebook.gtk_notebook_get_nth_page(hNotebook, tc.TabPages.IndexOf(page));
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_tab_label_text(hNotebook, hPage, text);
}
public void NotebookAppendPage(TabContainer ctl, IntPtr handle, TabPage page, int indexAfter = -1)
{
Container tabControlContainer = new Container();
tabControlContainer.Layout = new BoxLayout(Orientation.Horizontal, 0);
tabControlContainer.BeforeContextMenu += lblTabText_BeforeContextMenu;
Label lblTabText = new Label(page.Text);
// lblTabText.BeforeContextMenu += lblTabText_BeforeContextMenu;
lblTabText.WordWrap = WordWrapMode.Never;
tabControlContainer.Controls.Add(lblTabText, new BoxLayout.Constraints(true, true, 0));
System.Reflection.FieldInfo fiParent = tabControlContainer.GetType().BaseType.GetField("mvarParent", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
fiParent.SetValue(tabControlContainer, page);
foreach (Control ctlTabButton in ctl.TabTitleControls)
{
tabControlContainer.Controls.Add(ctlTabButton, new BoxLayout.Constraints(false, false));
}
Engine.CreateControl(tabControlContainer);
IntPtr hTabLabel = (Engine.GetHandleForControl(tabControlContainer) as GTKNativeControl).Handle;
ContainerImplementation cimpl = new ContainerImplementation(Engine, page);
cimpl.CreateControl(page);
IntPtr container = (cimpl.Handle as GTKNativeControl).Handle;
string rndgroupname = ctl.GroupName;
if (rndgroupname == null)
{
rndgroupname = Application.ID.ToString() + "_TabContainer_" + (rnd.Next().ToString());
}
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_group_name(handle, rndgroupname);
int index = -1;
if (indexAfter == -1)
{
index = Internal.GTK.Methods.GtkNotebook.gtk_notebook_append_page(handle, container, hTabLabel);
}
else
{
index = Internal.GTK.Methods.GtkNotebook.gtk_notebook_insert_page(handle, container, hTabLabel, indexAfter);
}
IntPtr hTabPage = Internal.GTK.Methods.GtkNotebook.gtk_notebook_get_nth_page(handle, index);
RegisterTabPage(page, hTabPage);
(Engine as GTKEngine).RegisterControlHandle(page, new GTKNativeControl(hTabPage));
(ctl.ControlImplementation as TabContainerImplementation).SetTabPageDetachable(handle, hTabPage, page.Detachable);
(ctl.ControlImplementation as TabContainerImplementation).SetTabPageReorderable(handle, hTabPage, page.Reorderable);
Internal.GTK.Methods.GtkWidget.gtk_widget_show_all(hTabLabel);
Internal.GTK.Methods.GtkWidget.gtk_widget_show_all(handle);
}
void lblTabText_BeforeContextMenu(object sender, EventArgs e)
{
Control lbl = (sender as Control);
TabPage page = (lbl.Parent as TabPage);
TabContainer tbs = page.Parent;
BeforeTabContextMenuEventArgs ee = new BeforeTabContextMenuEventArgs(tbs, page);
ee.ContextMenu = lbl.ContextMenu;
ee.ContextMenuCommandID = lbl.ContextMenuCommandID;
(tbs.ControlImplementation as TabContainerImplementation)?.OnBeforeTabContextMenu(ee);
if (ee.Cancel) return;
if (ee.ContextMenu != null)
{
lbl.ContextMenu = ee.ContextMenu;
}
else if (ee.ContextMenuCommandID != null)
{
lbl.ContextMenuCommandID = ee.ContextMenuCommandID;
}
}
protected virtual void OnBeforeTabContextMenu(BeforeTabContextMenuEventArgs e)
{
InvokeMethod((Control as TabContainer), "OnBeforeTabContextMenu", new object[] { e });
}
public void ClearTabPages()
{
if (!Control.IsCreated)
return;
IntPtr handle = (Engine.GetHandleForControl(Control) as GTKNativeControl).Handle;
int pageCount = Internal.GTK.Methods.GtkNotebook.gtk_notebook_get_n_pages(handle);
for (int i = 0; i < pageCount; i++)
{
Internal.GTK.Methods.GtkNotebook.gtk_notebook_remove_page(handle, i);
}
}
public void SetTabPageReorderable(TabPage page, bool value)
{
IntPtr? hptrParent = (page.Parent?.ControlImplementation.Handle as GTKNativeControl)?.Handle;
IntPtr? hptr = (page.ControlImplementation.Handle as GTKNativeControl)?.Handle;
SetTabPageReorderable(hptrParent, hptr, value);
}
public void SetTabPageDetachable(TabPage page, bool value)
{
IntPtr? hptrParent = (page.Parent?.ControlImplementation.Handle as GTKNativeControl)?.Handle;
IntPtr? hptr = (page.ControlImplementation.Handle as GTKNativeControl)?.Handle;
SetTabPageDetachable(hptrParent, hptr, value);
}
public void SetTabPageReorderable(IntPtr? hptrParent, IntPtr? hptr, bool value)
{
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_tab_reorderable(hptrParent.GetValueOrDefault(), hptr.GetValueOrDefault(), value);
}
public void SetTabPageDetachable(IntPtr? hptrParent, IntPtr? hptr, bool value)
{
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_tab_detachable(hptrParent.GetValueOrDefault(), hptr.GetValueOrDefault(), value);
}
public void InsertTabPage(int index, TabPage item)
{
if (!Control.IsCreated)
return;
IntPtr handle = (Engine.GetHandleForControl(Control) as GTKNativeControl).Handle;
NotebookAppendPage((Control as TabContainer), handle, item, index);
}
public void RemoveTabPage(TabPage tabPage)
{
IntPtr handle = (Engine.GetHandleForControl(Control) as GTKNativeControl).Handle;
Internal.GTK.Methods.GtkNotebook.gtk_notebook_remove_page(handle, (Control as TabContainer).TabPages.IndexOf(tabPage));
}
private static Action<IntPtr /*GtkNotebook*/, IntPtr /*GtkWidget*/, uint> page_reordered_d = null;
private static void page_reordered(IntPtr /*GtkNotebook*/ notebook, IntPtr /*GtkWidget*/ child, uint page_num)
{
TabContainer tbsParent = ((Application.Engine as GTKEngine).GetControlByHandle(notebook) as TabContainer);
TabPage tabPage = GetTabPageByHandle(child);
if (tbsParent == null) return;
int oldIndex = tbsParent.TabPages.IndexOf(tabPage);
int newIndex = (int)page_num;
Application.DoEvents();
tbsParent.TabPages.Reorder(oldIndex, newIndex);
}
private static Func<IntPtr, IntPtr, int, int, IntPtr, IntPtr> create_window_d = null;
private static IntPtr /*GtkNotebook*/ create_window(IntPtr /*GtkNotebook*/ notebook, IntPtr /*GtkWidget*/ page, int x, int y, IntPtr user_data)
{
TabContainer tbsParent = ((Application.Engine as GTKEngine).GetControlByHandle(notebook) as TabContainer);
TabPage tabPage = GetTabPageByHandle(page);
if (tbsParent == null) return IntPtr.Zero;
TabPageDetachedEventArgs ee = new TabPageDetachedEventArgs(tbsParent, tabPage);
InvokeMethod(tbsParent, "OnTabPageDetached", new object[] { ee });
if (ee.Handled)
{
return IntPtr.Zero; // replace with GetControlHandle...
}
string groupName = Internal.GTK.Methods.GtkNotebook.gtk_notebook_get_group_name(notebook);
Window window = new Window();
window.Layout = new BoxLayout(Orientation.Vertical);
window.Text = Internal.GTK.Methods.GtkNotebook.gtk_notebook_get_tab_label_text(notebook, page);
window.Location = new Framework.Drawing.Vector2D(x, y);
window.StartPosition = WindowStartPosition.Manual;
TabContainer tbs = new TabContainer();
tbs.TabPageDetached += tbsOurWindow_TabPageDetached;
window.Controls.Add(tbs, new BoxLayout.Constraints(true, true));
Application.Engine.CreateControl(tbs);
Application.Engine.CreateControl(window);
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_group_name((Application.Engine.GetHandleForControl(tbs) as GTKNativeControl).Handle, groupName);
return (Application.Engine.GetHandleForControl(tbs) as GTKNativeControl).Handle;
}
static void tbsOurWindow_TabPageDetached(object sender, TabPageDetachedEventArgs e)
{
TabContainer parent = (sender as TabContainer);
if (parent.TabPages.Count == 0)
{
parent.ParentWindow.Close();
}
}
public void SetSelectedTab(TabPage page)
{
TabContainer tc = (Control as TabContainer);
IntPtr hTabContainer = (Handle as GTKNativeControl).Handle;
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_current_page(hTabContainer, tc.TabPages.IndexOf(page));
}
private static Action<IntPtr, IntPtr, uint> switch_page_d = null;
private static Func<IntPtr, int, IntPtr, bool> change_current_tab_d = null;
private static void switch_page(IntPtr /*GtkNotebook*/ notebook, IntPtr /*GtkWidget*/ page, uint page_num)
{
// FIXME: this gets called during a tab detach, apparently, and we haven't yet updated the new TabContainer's TabPages collection yet
TabContainer tc = ((Application.Engine as GTKEngine).GetControlByHandle(notebook) as TabContainer);
TabPage oldTab = tc.SelectedTab;
TabPage newTab = tc.TabPages[(int)page_num];
System.Reflection.FieldInfo fiSelectedTab = Framework.Reflection.GetField(tc.GetType(), "_SelectedTab", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.FlattenHierarchy);
fiSelectedTab.SetValue(tc, newTab);
TabContainerSelectedTabChangedEventArgs ee = new TabContainerSelectedTabChangedEventArgs(oldTab, newTab);
InvokeMethod(tc, "OnSelectedTabChanged", new object[] { ee });
}
private static bool change_current_page(IntPtr /*GtkNotebook*/ notebook, int index, IntPtr user_data)
{
GTKNativeControl nc = new GTKNativeControl(notebook);
TabContainer tc = (Application.Engine.GetControlByHandle(nc) as TabContainer);
TabPage oldTab = tc.SelectedTab;
TabPage newTab = tc.TabPages[index];
TabContainerSelectedTabChangingEventArgs ee = new TabContainerSelectedTabChangingEventArgs(oldTab, newTab);
InvokeMethod(tc, "OnSelectedTabChanging", new object[] { ee });
if (ee.Cancel) return false;
return true;
}
protected override NativeControl CreateControlInternal(Control control)
{
TabContainer ctl = (control as TabContainer);
IntPtr handle = Internal.GTK.Methods.GtkNotebook.gtk_notebook_new();
foreach (TabPage tabPage in ctl.TabPages)
{
NotebookAppendPage(ctl, handle, tabPage);
}
Internal.GTK.Methods.GtkNotebook.gtk_notebook_set_tab_pos(handle, TabPositionToGtkPositionType(ctl.TabPosition));
Internal.GObject.Methods.g_signal_connect(handle, "create_window", create_window_d, IntPtr.Zero);
Internal.GObject.Methods.g_signal_connect(handle, "page_reordered", page_reordered_d, IntPtr.Zero);
Internal.GObject.Methods.g_signal_connect(handle, "change_current_page", change_current_tab_d, IntPtr.Zero);
Internal.GObject.Methods.g_signal_connect(handle, "switch_page", switch_page_d, IntPtr.Zero);
return new GTKNativeControl(handle);
}
}
}
| alcexhim/UniversalWidgetToolkit | Engines/GTK/MBS.Framework.UserInterface.Engines.GTK/Controls/TabContainerImplementation.cs | C# | gpl-3.0 | 13,099 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package com.anathema_roguelike
package entities.characters.player.perks.abilities.potions
import com.anathema_roguelike.entities.characters.perks.actions.ActionPerk
abstract class Brew(name: String) extends ActionPerk[BrewAction](name) {
} | carlminden/anathema-roguelike | src/com/anathema_roguelike/entities/characters/player/perks/abilities/potions/Brew.scala | Scala | gpl-3.0 | 1,088 |
/**
* Copyright (c) 2010 France Telecom / Orange Labs
*
* This file is part of JLInX, Java Lib for Indivo X.
*
* JLInX is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 (LGPLv3).
*
* JLInX is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with JLInX. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.orange.jlinx.document.ext;
/**
* This class handles a postal address as used in the Contact document.
*
* @author dev-indivo@brialon.com
*/
public class Address {
private String streetAddress;
private String postalCode;
private String locality;
private String region;
private String country;
private String timeZone;
private String type;
/**
* @return the streetAddress
*/
public String getStreetAddress() {
return streetAddress;
}
/**
* @param streetAddress the streetAddress to set
*/
public void setStreetAddress(String streetAddress) {
this.streetAddress = streetAddress;
}
/**
* @return the postalCode
*/
public String getPostalCode() {
return postalCode;
}
/**
* @param postalCode the postalCode to set
*/
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
/**
* @return the locality
*/
public String getLocality() {
return locality;
}
/**
* @param locality the locality to set
*/
public void setLocality(String locality) {
this.locality = locality;
}
/**
* @return the region
*/
public String getRegion() {
return region;
}
/**
* @param region the region to set
*/
public void setRegion(String region) {
this.region = region;
}
/**
* @return the country
*/
public String getCountry() {
return country;
}
/**
* @param country the country to set
*/
public void setCountry(String country) {
this.country = country;
}
/**
* @return the timeZone
*/
public String getTimeZone() {
return timeZone;
}
/**
* @param timeZone the timeZone to set
*/
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Address [");
if (country != null) {
builder.append("country=");
builder.append(country);
builder.append(", ");
}
if (locality != null) {
builder.append("locality=");
builder.append(locality);
builder.append(", ");
}
if (postalCode != null) {
builder.append("postalCode=");
builder.append(postalCode);
builder.append(", ");
}
if (region != null) {
builder.append("region=");
builder.append(region);
builder.append(", ");
}
if (streetAddress != null) {
builder.append("streetAddress=");
builder.append(streetAddress);
builder.append(", ");
}
if (timeZone != null) {
builder.append("timeZone=");
builder.append(timeZone);
builder.append(", ");
}
if (type != null) {
builder.append("type=");
builder.append(type);
}
builder.append("]");
return builder.toString();
}
}
| fredorange/JLInX | src/jlinx-api-6.0.8-sources/com/orange/jlinx/document/ext/Address.java | Java | gpl-3.0 | 3,655 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>SLF4J 1.7.24 Reference Package org.slf4j.migrator.internal</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
</head>
<body>
<div class="overview">
<ul>
<li>
<a href="../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<h2>Package org.slf4j.migrator.internal</h2>
<table class="summary">
<thead>
<tr>
<th>Class Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="NopProgressListener.html" target="classFrame">NopProgressListener</a>
</td>
</tr>
</tbody>
</table>
<div class="overview">
<ul>
<li>
<a href="../../../../overview-summary.html">Overview</a>
</li>
<li class="selected">Package</li>
</ul>
</div>
<div class="framenoframe">
<ul>
<li>
<a href="../../../../index.html" target="_top">FRAMES</a>
</li>
<li>
<a href="package-summary.html" target="_top">NO FRAMES</a>
</li>
</ul>
</div>
<hr />
Copyright © 2005-2017 QOS.ch. All Rights Reserved.
</body>
</html> | marcosruiz/esignature | lib/slf4j-1.7.24/site/xref-test/org/slf4j/migrator/internal/package-summary.html | HTML | gpl-3.0 | 1,950 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Selects - jQuery Mobile Demos</title>
<link rel="stylesheet" href="../css/themes/default/jquery.mobile-1.4.1.min.css">
<link rel="stylesheet" href="../_assets/css/jqm-demos.css">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
<script src="js/jquery.js"></script>
<script src="../_assets/js/index.js"></script>
<script src="../js/jquery.mobile-1.4.1.min.js"></script>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">
<div data-role="header" class="jqm-header">
<h2><a href="../" title="jQuery Mobile Demos home"><img src="../_assets/img/jquery-logo.png" alt="jQuery Mobile"></a></h2>
<p><span class="jqm-version"></span> Demos</p>
<a href="#" class="jqm-navmenu-link ui-btn ui-btn-icon-notext ui-corner-all ui-icon-bars ui-nodisc-icon ui-alt-icon ui-btn-left">Menu</a>
<a href="#" class="jqm-search-link ui-btn ui-btn-icon-notext ui-corner-all ui-icon-search ui-nodisc-icon ui-alt-icon ui-btn-right">Search</a>
</div><!-- /header -->
<div role="main" class="ui-content jqm-content">
<h1>Select menu</h1>
<p>The select menu is based on a native select element, which is hidden from view and replaced with a custom-styled select button. Tapping it opens the native menu. There is also a <a href="../selectmenu-custom/">custom select menu</a> widget, which also replaces the native dropdown.
</p>
<h2>Basic select</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-1">Basic:</label>
<select name="select-native-1" id="select-native-1">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Mini</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-2">Mini sized:</label>
<select name="select-native-2" id="select-native-2" data-mini="true">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Icon position</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-3">Icon left:</label>
<select name="select-native-3" id="select-native-3" data-iconpos="left">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Selected option</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-17">1 option selected:</label>
<select name="select-native-17" id="select-native-17">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3" selected="selected">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Disabled option</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-18">1 option disabled:</label>
<select name="select-native-18" id="select-native-18">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3" disabled="disabled">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Optgroup</h2>
<div data-demo-html="true">
<form>
<div class="ui-field-contain">
<label for="select-native-4">Optgroup (if supported):</label>
<select name="select-native-4" id="select-native-4">
<option>Choose...</option>
<optgroup label="Group 1">
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</optgroup>
<optgroup label="Group 2">
<option value="5">The 5th Option</option>
<option value="6">The 6th Option</option>
<option value="7">The 7th Option</option>
</optgroup>
</select>
</div>
</form>
</div><!--/demo-html -->
<h2>Vertical group</h2>
<div data-demo-html="true">
<form>
<fieldset data-role="controlgroup">
<legend>Vertical controlgroup:</legend>
<label for="select-native-5">Select A</label>
<select name="select-native-5" id="select-native-5">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-6">Select B</label>
<select name="select-native-6" id="select-native-6">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-7">Select C</label>
<select name="select-native-7" id="select-native-7">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
</fieldset>
</form>
</div><!--/demo-html -->
<h2>Vertical group, mini</h2>
<div data-demo-html="true">
<form>
<fieldset data-role="controlgroup" data-mini="true">
<legend>Vertical controlgroup, icon left, mini sized:</legend>
<label for="select-native-8">Select A</label>
<select name="select-native-8" id="select-native-8" data-iconpos="left">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-9">Select B</label>
<select name="select-native-9" id="select-native-9" data-iconpos="left">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-10">Select C</label>
<select name="select-native-10" id="select-native-10" data-iconpos="left">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
</fieldset>
</form>
</div><!--/demo-html -->
<h2>Horizontal group</h2>
<div data-demo-html="true">
<form>
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Horizontal controlgroup:</legend>
<label for="select-native-11">Select A</label>
<select name="select-native-11" id="select-native-11">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-12">Select B</label>
<select name="select-native-12" id="select-native-12">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-13">Select C</label>
<select name="select-native-13" id="select-native-13">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
</fieldset>
</form>
</div><!--/demo-html -->
<h2>Horizontal group, mini</h2>
<div data-demo-html="true">
<form>
<fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
<legend>Horizontal controlgroup, mini sized:</legend>
<label for="select-native-14">Select A</label>
<select name="select-native-14" id="select-native-14">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-15">Select B</label>
<select name="select-native-15" id="select-native-15">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
<label for="select-native-16">Select C</label>
<select name="select-native-16" id="select-native-16">
<option value="#">One</option>
<option value="#">Two</option>
<option value="#">Three</option>
</select>
</fieldset>
</form>
</div><!--/demo-html -->
</div><!-- /content -->
<div data-role="panel" class="jqm-navmenu-panel" data-position="left" data-display="overlay" data-theme="a">
<ul class="jqm-list ui-alt-icon ui-nodisc-icon">
<li data-filtertext="demos homepage" data-icon="home"><a href=".././">Home</a></li>
<li data-filtertext="introduction overview getting started"><a href="../intro/" data-ajax="false">Introduction</a></li>
<li data-filtertext="buttons button markup buttonmarkup method anchor link button element"><a href="../button-markup/" data-ajax="false">Buttons</a></li>
<li data-filtertext="form button widget input button submit reset"><a href="../button/" data-ajax="false">Button widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Checkboxradio widget</h3>
<ul>
<li data-filtertext="form checkboxradio widget checkbox input checkboxes controlgroups"><a href="../checkboxradio-checkbox/" data-ajax="false">Checkboxes</a></li>
<li data-filtertext="form checkboxradio widget radio input radio buttons controlgroups"><a href="../checkboxradio-radio/" data-ajax="false">Radio buttons</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Collapsible (set) widget</h3>
<ul>
<li data-filtertext="collapsibles content formatting"><a href="../collapsible/" data-ajax="false">Collapsible</a></li>
<li data-filtertext="dynamic collapsible set accordion append expand"><a href="../collapsible-dynamic/" data-ajax="false">Dynamic collapsibles</a></li>
<li data-filtertext="accordions collapsible set widget content formatting grouped collapsibles"><a href="../collapsibleset/" data-ajax="false">Collapsible set</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Controlgroup widget</h3>
<ul>
<li data-filtertext="controlgroups selectmenu checkboxradio input grouped buttons horizontal vertical"><a href="../controlgroup/" data-ajax="false">Controlgroup</a></li>
<li data-filtertext="dynamic controlgroup dynamically add buttons"><a href="../controlgroup-dynamic/" data-ajax="false">Dynamic controlgroups</a></li>
</ul>
</li>
<li data-filtertext="form datepicker widget date input"><a href="../datepicker/" data-ajax="false">Datepicker</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Events</h3>
<ul>
<li data-filtertext="swipe to delete list items listviews swipe events"><a href="../swipe-list/" data-ajax="false">Swipe list items</a></li>
<li data-filtertext="swipe to navigate swipe page navigation swipe events"><a href="../swipe-page/" data-ajax="false">Swipe page navigation</a></li>
</ul>
</li>
<li data-filtertext="filterable filter elements sorting searching listview table"><a href="../filterable/" data-ajax="false">Filterable widget</a></li>
<li data-filtertext="form flipswitch widget flip toggle switch binary select checkbox input"><a href="../flipswitch/" data-ajax="false">Flipswitch widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Forms</h3>
<ul>
<li data-filtertext="forms text checkbox radio range button submit reset inputs selects textarea slider flipswitch label form elements"><a href="../forms/" data-ajax="false">Forms</a></li>
<li data-filtertext="form hide labels hidden accessible ui-hidden-accessible forms"><a href="../forms-label-hidden-accessible/" data-ajax="false">Hide labels</a></li>
<li data-filtertext="form field containers fieldcontain ui-field-contain forms"><a href="../forms-field-contain/" data-ajax="false">Field containers</a></li>
<li data-filtertext="forms disabled form elements"><a href="../forms-disabled/" data-ajax="false">Forms disabled</a></li>
<li data-filtertext="forms gallery examples overview forms text checkbox radio range button submit reset inputs selects textarea slider flipswitch label form elements"><a href="../forms-gallery/" data-ajax="false">Forms gallery</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Grids</h3>
<ul>
<li data-filtertext="grids columns blocks content formatting rwd responsive css framework"><a href="../grids/" data-ajax="false">Grids</a></li>
<li data-filtertext="buttons in grids css framework"><a href="../grids-buttons/" data-ajax="false">Buttons in grids</a></li>
<li data-filtertext="custom responsive grids rwd css framework"><a href="../grids-custom-responsive/" data-ajax="false">Custom responsive grids</a></li>
</ul>
</li>
<li data-filtertext="blocks content formatting sections heading"><a href="../body-bar-classes/" data-ajax="false">Grouping and dividing content</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Icons</h3>
<ul>
<li data-filtertext="button icons svg disc alt custom icon position"><a href="../icons/" data-ajax="false">Icons</a></li>
<li data-filtertext=""><a href="../icons-grunticon/" data-ajax="false">Grunticon loader</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Listview widget</h3>
<ul>
<li data-filtertext="listview widget thumbnails icons nested split button collapsible ul ol"><a href="../listview/" data-ajax="false">Listview</a></li>
<li data-filtertext="autocomplete filterable reveal listview filtertextbeforefilter placeholder"><a href="../listview-autocomplete/" data-ajax="false">Listview autocomplete</a></li>
<li data-filtertext="autocomplete filterable reveal listview remote data filtertextbeforefilter placeholder"><a href="../listview-autocomplete-remote/" data-ajax="false">Listview autocomplete remote data</a></li>
<li data-filtertext="autodividers anchor jump scroll linkbars listview lists ul ol"><a href="../listview-autodividers-linkbar/" data-ajax="false">Listview autodividers linkbar</a></li>
<li data-filtertext="listview autodividers selector autodividersselector lists ul ol"><a href="../listview-autodividers-selector/" data-ajax="false">Listview autodividers selector</a></li>
<li data-filtertext="listview nested list items"><a href="../listview-nested-lists/" data-ajax="false">Listview Nested Listviews</a></li>
<li data-filtertext="listview collapsible list items flat"><a href="../listview-collapsible-item-flat/" data-ajax="false">Listview collapsible list items (flat)</a></li>
<li data-filtertext="listview collapsible list indented"><a href="../listview-collapsible-item-indented/" data-ajax="false">Listview collapsible list items (indented)</a></li>
<li data-filtertext="grid listview responsive grids responsive listviews lists ul"><a href="../listview-grid/" data-ajax="false">Listview responsive grid</a></li>
</ul>
</li>
<li data-filtertext="loader widget page loading navigation overlay spinner"><a href="../loader/" data-ajax="false">Loader widget</a></li>
<li data-filtertext="navbar widget navmenu toolbars header footer"><a href="../navbar/" data-ajax="false">Navbar widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Navigation</h3>
<ul>
<li data-filtertext="ajax navigation navigate widget history event method"><a href="../navigation/" data-ajax="false">Navigation</a></li>
<li data-filtertext="linking pages page links navigation ajax prefetch cache"><a href="../navigation-linking-pages/" data-ajax="false">Linking pages</a></li>
<li data-filtertext="php redirect server redirection server-side navigation"><a href="../navigation-php-redirect/" data-ajax="false">PHP redirect demo</a></li>
<li data-filtertext="navigation redirection hash query"><a href="../navigation-hash-processing/" data-ajax="false">Hash processing demo</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Pages</h3>
<ul>
<li data-filtertext="pages page widget ajax navigation"><a href="../pages/" data-ajax="false">Pages</a></li>
<li data-filtertext="single page"><a href="../pages-single-page/" data-ajax="false">Single page</a></li>
<li data-filtertext="multipage multi-page page"><a href="../pages-multi-page/" data-ajax="false">Multi-page template</a></li>
<li data-filtertext="dialog page widget modal popup"><a href="../pages-dialog/" data-ajax="false">Dialog page</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Panel widget</h3>
<ul>
<li data-filtertext="panel widget sliding panels reveal push overlay responsive"><a href="../panel/" data-ajax="false">Panel</a></li>
<li data-filtertext=""><a href="../panel-external/" data-ajax="false">External panels</a></li>
<li data-filtertext="panel "><a href="../panel-fixed/" data-ajax="false">Fixed panels</a></li>
<li data-filtertext="panel slide panels sliding panels shadow rwd responsive breakpoint"><a href="../panel-responsive/" data-ajax="false">Panels responsive</a></li>
<li data-filtertext="panel custom style custom panel width reveal shadow listview panel styling page background wrapper"><a href="../panel-styling/" data-ajax="false">Custom panel style</a></li>
<li data-filtertext="panel open on swipe"><a href="../panel-swipe-open/" data-ajax="false">Panel open on swipe</a></li>
<li data-filtertext="panels outside page internal external toolbars"><a href="../panel-external-internal/" data-ajax="false">Panel external and internal</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Popup widget</h3>
<ul>
<li data-filtertext="popup widget popups dialog modal transition tooltip lightbox form overlay screen flip pop fade transition"><a href="../popup/" data-ajax="false">Popup</a></li>
<li data-filtertext="popup alignment position"><a href="../popup-alignment/" data-ajax="false">Popup alignment</a></li>
<li data-filtertext="popup arrow size popups popover"><a href="../popup-arrow-size/" data-ajax="false">Popup arrow size</a></li>
<li data-filtertext="dynamic popups popup images lightbox"><a href="../popup-dynamic/" data-ajax="false">Dynamic popups</a></li>
<li data-filtertext="popups with iframes scaling"><a href="../popup-iframe/" data-ajax="false">Popups with iframes</a></li>
<li data-filtertext="popup image scaling"><a href="../popup-image-scaling/" data-ajax="false">Popup image scaling</a></li>
<li data-filtertext="external popup outside multi-page"><a href="../popup-outside-multipage" data-ajax="false">Popup outside multi-page</a></li>
</ul>
</li>
<li data-filtertext="form rangeslider widget dual sliders dual handle sliders range input"><a href="../rangeslider/" data-ajax="false">Rangeslider widget</a></li>
<li data-filtertext="responsive web design rwd adaptive progressive enhancement PE accessible mobile breakpoints media query media queries"><a href="../rwd/" data-ajax="false">Responsive Web Design</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Selectmenu widget</h3>
<ul>
<li data-filtertext="form selectmenu widget select input custom select menu selects"><a href="../selectmenu/" data-ajax="false">Selectmenu</a></li>
<li data-filtertext="form custom select menu selectmenu widget custom menu option optgroup multiple selects"><a href="../selectmenu-custom/" data-ajax="false">Custom select menu</a></li>
<li data-filtertext="filterable select filter popup dialog"><a href="../selectmenu-custom-filter/" data-ajax="false">Custom select menu with filter</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Slider widget</h3>
<ul>
<li data-filtertext="form slider widget range input single sliders"><a href="../slider/" data-ajax="false">Slider</a></li>
<li data-filtertext="form slider widget flipswitch slider binary select flip toggle switch"><a href="../slider-flipswitch/" data-ajax="false">Slider flip toggle switch</a></li>
<li data-filtertext="form slider tooltip handle value input range sliders"><a href="../slider-tooltip/" data-ajax="false">Slider tooltip</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Table widget</h3>
<ul>
<li data-filtertext="table widget reflow column toggle th td responsive tables rwd hide show tabular"><a href="../table-column-toggle/" data-ajax="false">Table Column Toggle</a></li>
<li data-filtertext="table column toggle phone comparison demo"><a href="../table-column-toggle-example/" data-ajax="false">Table Column Toggle demo</a></li>
<li data-filtertext="responsive tables table column toggle heading groups rwd breakpoint"><a href="../table-column-toggle-heading-groups/" data-ajax="false">Table Column Toggle heading groups</a></li>
<li data-filtertext="responsive tables table column toggle hide rwd breakpoint customization options"><a href="../table-column-toggle-options/" data-ajax="false">Table Column Toggle options</a></li>
<li data-filtertext="table reflow th td responsive rwd columns tabular"><a href="../table-reflow/" data-ajax="false">Table Reflow</a></li>
<li data-filtertext="responsive tables table reflow heading groups rwd breakpoint"><a href="../table-reflow-heading-groups/" data-ajax="false">Table Reflow heading groups</a></li>
<li data-filtertext="responsive tables table reflow stripes strokes table style"><a href="../table-reflow-stripes-strokes/" data-ajax="false">Table Reflow stripes and strokes</a></li>
<li data-filtertext="responsive tables table reflow stack custom styles"><a href="../table-reflow-styling/" data-ajax="false">Table Reflow custom styles</a></li>
</ul>
</li>
<li data-filtertext="ui tabs widget"><a href="../tabs/" data-ajax="false">Tabs widget</a></li>
<li data-filtertext="form textinput widget text input textarea number date time tel email file color password"><a href="../textinput/" data-ajax="false">Textinput widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Theming</h3>
<ul>
<li data-filtertext="default theme swatches theming style css"><a href="../theme-default/" data-ajax="false">Default theme</a></li>
<li data-filtertext="classic theme old theme swatches theming style css"><a href="../theme-classic/" data-ajax="false">Classic theme</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Toolbar widget</h3>
<ul>
<li data-filtertext="toolbar widget header footer toolbars fixed fullscreen external sections"><a href="../toolbar/" data-ajax="false">Toolbar</a></li>
<li data-filtertext="dynamic toolbars dynamically add toolbar header footer"><a href="../toolbar-dynamic/" data-ajax="false">Dynamic toolbars</a></li>
<li data-filtertext="external toolbars header footer"><a href="../toolbar-external/" data-ajax="false">External toolbars</a></li>
<li data-filtertext="fixed toolbars header footer"><a href="../toolbar-fixed/" data-ajax="false">Fixed toolbars</a></li>
<li data-filtertext="fixed fullscreen toolbars header footer"><a href="../toolbar-fixed-fullscreen/" data-ajax="false">Fullscreen toolbars</a></li>
<li data-filtertext="external fixed toolbars header footer"><a href="../toolbar-fixed-external/" data-ajax="false">Fixed external toolbars</a></li>
<li data-filtertext="external persistent toolbars header footer navbar navmenu"><a href="../toolbar-fixed-persistent/" data-ajax="false">Persistent toolbars</a></li>
<li data-filtertext="external ajax optimized toolbars persistent toolbars header footer navbar"><a href="../toolbar-fixed-persistent-optimized/" data-ajax="false">Ajax optimized toolbars</a></li>
<li data-filtertext="form in toolbars header footer"><a href="../toolbar-fixed-forms/" data-ajax="false">Form in toolbar</a></li>
</ul>
</li>
<li data-filtertext="page transitions animated pages popup navigation flip slide fade pop"><a href="../transitions/" data-ajax="false">Transitions</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>3rd party API demos</h3>
<ul>
<li data-filtertext="backbone requirejs navigation router"><a href="../backbone-requirejs/" data-ajax="false">Backbone RequireJS</a></li>
<li data-filtertext="google maps geolocation demo"><a href="../map-geolocation/" data-ajax="false">Google Maps geolocation</a></li>
<li data-filtertext="google maps hybrid"><a href="../map-list-toggle/" data-ajax="false">Google Maps list toggle</a></li>
</ul>
</li>
</ul>
</div><!-- /panel -->
<div data-role="footer" data-position="fixed" data-tap-toggle="false" class="jqm-footer">
<p>jQuery Mobile Demos version <span class="jqm-version"></span></p>
<p>Copyright 2014 The jQuery Foundation</p>
</div><!-- /footer -->
<!-- TODO: This should become an external panel so we can add input to markup (unique ID) -->
<div data-role="panel" class="jqm-search-panel" data-position="right" data-display="overlay" data-theme="a">
<div class="jqm-search">
<ul class="jqm-list" data-filter-placeholder="Search demos..." data-filter-reveal="true">
<li data-filtertext="demos homepage" data-icon="home"><a href=".././">Home</a></li>
<li data-filtertext="introduction overview getting started"><a href="../intro/" data-ajax="false">Introduction</a></li>
<li data-filtertext="buttons button markup buttonmarkup method anchor link button element"><a href="../button-markup/" data-ajax="false">Buttons</a></li>
<li data-filtertext="form button widget input button submit reset"><a href="../button/" data-ajax="false">Button widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Checkboxradio widget</h3>
<ul>
<li data-filtertext="form checkboxradio widget checkbox input checkboxes controlgroups"><a href="../checkboxradio-checkbox/" data-ajax="false">Checkboxes</a></li>
<li data-filtertext="form checkboxradio widget radio input radio buttons controlgroups"><a href="../checkboxradio-radio/" data-ajax="false">Radio buttons</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Collapsible (set) widget</h3>
<ul>
<li data-filtertext="collapsibles content formatting"><a href="../collapsible/" data-ajax="false">Collapsible</a></li>
<li data-filtertext="dynamic collapsible set accordion append expand"><a href="../collapsible-dynamic/" data-ajax="false">Dynamic collapsibles</a></li>
<li data-filtertext="accordions collapsible set widget content formatting grouped collapsibles"><a href="../collapsibleset/" data-ajax="false">Collapsible set</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Controlgroup widget</h3>
<ul>
<li data-filtertext="controlgroups selectmenu checkboxradio input grouped buttons horizontal vertical"><a href="../controlgroup/" data-ajax="false">Controlgroup</a></li>
<li data-filtertext="dynamic controlgroup dynamically add buttons"><a href="../controlgroup-dynamic/" data-ajax="false">Dynamic controlgroups</a></li>
</ul>
</li>
<li data-filtertext="form datepicker widget date input"><a href="../datepicker/" data-ajax="false">Datepicker</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Events</h3>
<ul>
<li data-filtertext="swipe to delete list items listviews swipe events"><a href="../swipe-list/" data-ajax="false">Swipe list items</a></li>
<li data-filtertext="swipe to navigate swipe page navigation swipe events"><a href="../swipe-page/" data-ajax="false">Swipe page navigation</a></li>
</ul>
</li>
<li data-filtertext="filterable filter elements sorting searching listview table"><a href="../filterable/" data-ajax="false">Filterable widget</a></li>
<li data-filtertext="form flipswitch widget flip toggle switch binary select checkbox input"><a href="../flipswitch/" data-ajax="false">Flipswitch widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Forms</h3>
<ul>
<li data-filtertext="forms text checkbox radio range button submit reset inputs selects textarea slider flipswitch label form elements"><a href="../forms/" data-ajax="false">Forms</a></li>
<li data-filtertext="form hide labels hidden accessible ui-hidden-accessible forms"><a href="../forms-label-hidden-accessible/" data-ajax="false">Hide labels</a></li>
<li data-filtertext="form field containers fieldcontain ui-field-contain forms"><a href="../forms-field-contain/" data-ajax="false">Field containers</a></li>
<li data-filtertext="forms disabled form elements"><a href="../forms-disabled/" data-ajax="false">Forms disabled</a></li>
<li data-filtertext="forms gallery examples overview forms text checkbox radio range button submit reset inputs selects textarea slider flipswitch label form elements"><a href="../forms-gallery/" data-ajax="false">Forms gallery</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Grids</h3>
<ul>
<li data-filtertext="grids columns blocks content formatting rwd responsive css framework"><a href="../grids/" data-ajax="false">Grids</a></li>
<li data-filtertext="buttons in grids css framework"><a href="../grids-buttons/" data-ajax="false">Buttons in grids</a></li>
<li data-filtertext="custom responsive grids rwd css framework"><a href="../grids-custom-responsive/" data-ajax="false">Custom responsive grids</a></li>
</ul>
</li>
<li data-filtertext="blocks content formatting sections heading"><a href="../body-bar-classes/" data-ajax="false">Grouping and dividing content</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Icons</h3>
<ul>
<li data-filtertext="button icons svg disc alt custom icon position"><a href="../icons/" data-ajax="false">Icons</a></li>
<li data-filtertext=""><a href="../icons-grunticon/" data-ajax="false">Grunticon loader</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Listview widget</h3>
<ul>
<li data-filtertext="listview widget thumbnails icons nested split button collapsible ul ol"><a href="../listview/" data-ajax="false">Listview</a></li>
<li data-filtertext="autocomplete filterable reveal listview filtertextbeforefilter placeholder"><a href="../listview-autocomplete/" data-ajax="false">Listview autocomplete</a></li>
<li data-filtertext="autocomplete filterable reveal listview remote data filtertextbeforefilter placeholder"><a href="../listview-autocomplete-remote/" data-ajax="false">Listview autocomplete remote data</a></li>
<li data-filtertext="autodividers anchor jump scroll linkbars listview lists ul ol"><a href="../listview-autodividers-linkbar/" data-ajax="false">Listview autodividers linkbar</a></li>
<li data-filtertext="listview autodividers selector autodividersselector lists ul ol"><a href="../listview-autodividers-selector/" data-ajax="false">Listview autodividers selector</a></li>
<li data-filtertext="listview nested list items"><a href="../listview-nested-lists/" data-ajax="false">Listview Nested Listviews</a></li>
<li data-filtertext="listview collapsible list items flat"><a href="../listview-collapsible-item-flat/" data-ajax="false">Listview collapsible list items (flat)</a></li>
<li data-filtertext="listview collapsible list indented"><a href="../listview-collapsible-item-indented/" data-ajax="false">Listview collapsible list items (indented)</a></li>
<li data-filtertext="grid listview responsive grids responsive listviews lists ul"><a href="../listview-grid/" data-ajax="false">Listview responsive grid</a></li>
</ul>
</li>
<li data-filtertext="loader widget page loading navigation overlay spinner"><a href="../loader/" data-ajax="false">Loader widget</a></li>
<li data-filtertext="navbar widget navmenu toolbars header footer"><a href="../navbar/" data-ajax="false">Navbar widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Navigation</h3>
<ul>
<li data-filtertext="ajax navigation navigate widget history event method"><a href="../navigation/" data-ajax="false">Navigation</a></li>
<li data-filtertext="linking pages page links navigation ajax prefetch cache"><a href="../navigation-linking-pages/" data-ajax="false">Linking pages</a></li>
<li data-filtertext="php redirect server redirection server-side navigation"><a href="../navigation-php-redirect/" data-ajax="false">PHP redirect demo</a></li>
<li data-filtertext="navigation redirection hash query"><a href="../navigation-hash-processing/" data-ajax="false">Hash processing demo</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Pages</h3>
<ul>
<li data-filtertext="pages page widget ajax navigation"><a href="../pages/" data-ajax="false">Pages</a></li>
<li data-filtertext="single page"><a href="../pages-single-page/" data-ajax="false">Single page</a></li>
<li data-filtertext="multipage multi-page page"><a href="../pages-multi-page/" data-ajax="false">Multi-page template</a></li>
<li data-filtertext="dialog page widget modal popup"><a href="../pages-dialog/" data-ajax="false">Dialog page</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Panel widget</h3>
<ul>
<li data-filtertext="panel widget sliding panels reveal push overlay responsive"><a href="../panel/" data-ajax="false">Panel</a></li>
<li data-filtertext=""><a href="../panel-external/" data-ajax="false">External panels</a></li>
<li data-filtertext="panel "><a href="../panel-fixed/" data-ajax="false">Fixed panels</a></li>
<li data-filtertext="panel slide panels sliding panels shadow rwd responsive breakpoint"><a href="../panel-responsive/" data-ajax="false">Panels responsive</a></li>
<li data-filtertext="panel custom style custom panel width reveal shadow listview panel styling page background wrapper"><a href="../panel-styling/" data-ajax="false">Custom panel style</a></li>
<li data-filtertext="panel open on swipe"><a href="../panel-swipe-open/" data-ajax="false">Panel open on swipe</a></li>
<li data-filtertext="panels outside page internal external toolbars"><a href="../panel-external-internal/" data-ajax="false">Panel external and internal</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Popup widget</h3>
<ul>
<li data-filtertext="popup widget popups dialog modal transition tooltip lightbox form overlay screen flip pop fade transition"><a href="../popup/" data-ajax="false">Popup</a></li>
<li data-filtertext="popup alignment position"><a href="../popup-alignment/" data-ajax="false">Popup alignment</a></li>
<li data-filtertext="popup arrow size popups popover"><a href="../popup-arrow-size/" data-ajax="false">Popup arrow size</a></li>
<li data-filtertext="dynamic popups popup images lightbox"><a href="../popup-dynamic/" data-ajax="false">Dynamic popups</a></li>
<li data-filtertext="popups with iframes scaling"><a href="../popup-iframe/" data-ajax="false">Popups with iframes</a></li>
<li data-filtertext="popup image scaling"><a href="../popup-image-scaling/" data-ajax="false">Popup image scaling</a></li>
<li data-filtertext="external popup outside multi-page"><a href="../popup-outside-multipage" data-ajax="false">Popup outside multi-page</a></li>
</ul>
</li>
<li data-filtertext="form rangeslider widget dual sliders dual handle sliders range input"><a href="../rangeslider/" data-ajax="false">Rangeslider widget</a></li>
<li data-filtertext="responsive web design rwd adaptive progressive enhancement PE accessible mobile breakpoints media query media queries"><a href="../rwd/" data-ajax="false">Responsive Web Design</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Selectmenu widget</h3>
<ul>
<li data-filtertext="form selectmenu widget select input custom select menu selects"><a href="../selectmenu/" data-ajax="false">Selectmenu</a></li>
<li data-filtertext="form custom select menu selectmenu widget custom menu option optgroup multiple selects"><a href="../selectmenu-custom/" data-ajax="false">Custom select menu</a></li>
<li data-filtertext="filterable select filter popup dialog"><a href="../selectmenu-custom-filter/" data-ajax="false">Custom select menu with filter</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Slider widget</h3>
<ul>
<li data-filtertext="form slider widget range input single sliders"><a href="../slider/" data-ajax="false">Slider</a></li>
<li data-filtertext="form slider widget flipswitch slider binary select flip toggle switch"><a href="../slider-flipswitch/" data-ajax="false">Slider flip toggle switch</a></li>
<li data-filtertext="form slider tooltip handle value input range sliders"><a href="../slider-tooltip/" data-ajax="false">Slider tooltip</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Table widget</h3>
<ul>
<li data-filtertext="table widget reflow column toggle th td responsive tables rwd hide show tabular"><a href="../table-column-toggle/" data-ajax="false">Table Column Toggle</a></li>
<li data-filtertext="table column toggle phone comparison demo"><a href="../table-column-toggle-example/" data-ajax="false">Table Column Toggle demo</a></li>
<li data-filtertext="responsive tables table column toggle heading groups rwd breakpoint"><a href="../table-column-toggle-heading-groups/" data-ajax="false">Table Column Toggle heading groups</a></li>
<li data-filtertext="responsive tables table column toggle hide rwd breakpoint customization options"><a href="../table-column-toggle-options/" data-ajax="false">Table Column Toggle options</a></li>
<li data-filtertext="table reflow th td responsive rwd columns tabular"><a href="../table-reflow/" data-ajax="false">Table Reflow</a></li>
<li data-filtertext="responsive tables table reflow heading groups rwd breakpoint"><a href="../table-reflow-heading-groups/" data-ajax="false">Table Reflow heading groups</a></li>
<li data-filtertext="responsive tables table reflow stripes strokes table style"><a href="../table-reflow-stripes-strokes/" data-ajax="false">Table Reflow stripes and strokes</a></li>
<li data-filtertext="responsive tables table reflow stack custom styles"><a href="../table-reflow-styling/" data-ajax="false">Table Reflow custom styles</a></li>
</ul>
</li>
<li data-filtertext="ui tabs widget"><a href="../tabs/" data-ajax="false">Tabs widget</a></li>
<li data-filtertext="form textinput widget text input textarea number date time tel email file color password"><a href="../textinput/" data-ajax="false">Textinput widget</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Theming</h3>
<ul>
<li data-filtertext="default theme swatches theming style css"><a href="../theme-default/" data-ajax="false">Default theme</a></li>
<li data-filtertext="classic theme old theme swatches theming style css"><a href="../theme-classic/" data-ajax="false">Classic theme</a></li>
</ul>
</li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>Toolbar widget</h3>
<ul>
<li data-filtertext="toolbar widget header footer toolbars fixed fullscreen external sections"><a href="../toolbar/" data-ajax="false">Toolbar</a></li>
<li data-filtertext="dynamic toolbars dynamically add toolbar header footer"><a href="../toolbar-dynamic/" data-ajax="false">Dynamic toolbars</a></li>
<li data-filtertext="external toolbars header footer"><a href="../toolbar-external/" data-ajax="false">External toolbars</a></li>
<li data-filtertext="fixed toolbars header footer"><a href="../toolbar-fixed/" data-ajax="false">Fixed toolbars</a></li>
<li data-filtertext="fixed fullscreen toolbars header footer"><a href="../toolbar-fixed-fullscreen/" data-ajax="false">Fullscreen toolbars</a></li>
<li data-filtertext="external fixed toolbars header footer"><a href="../toolbar-fixed-external/" data-ajax="false">Fixed external toolbars</a></li>
<li data-filtertext="external persistent toolbars header footer navbar navmenu"><a href="../toolbar-fixed-persistent/" data-ajax="false">Persistent toolbars</a></li>
<li data-filtertext="external ajax optimized toolbars persistent toolbars header footer navbar"><a href="../toolbar-fixed-persistent-optimized/" data-ajax="false">Ajax optimized toolbars</a></li>
<li data-filtertext="form in toolbars header footer"><a href="../toolbar-fixed-forms/" data-ajax="false">Form in toolbar</a></li>
</ul>
</li>
<li data-filtertext="page transitions animated pages popup navigation flip slide fade pop"><a href="../transitions/" data-ajax="false">Transitions</a></li>
<li data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u" data-iconpos="right" data-inset="false">
<h3>3rd party API demos</h3>
<ul>
<li data-filtertext="backbone requirejs navigation router"><a href="../backbone-requirejs/" data-ajax="false">Backbone RequireJS</a></li>
<li data-filtertext="google maps geolocation demo"><a href="../map-geolocation/" data-ajax="false">Google Maps geolocation</a></li>
<li data-filtertext="google maps hybrid"><a href="../map-list-toggle/" data-ajax="false">Google Maps list toggle</a></li>
</ul>
</li>
</ul>
</div>
</div><!-- /panel -->
</div><!-- /page -->
</body>
</html>
| armon14/ckpt | demos/selectmenu/index.html | HTML | gpl-3.0 | 46,031 |
<!DOCTYPE html>
<!--
/*
Author : Islam Akef Ebeid / Mihir Jaiswal
Affiliations : University of Arkansas at Little Rock - Emerging Analytics Center
*/
-->
<html>
<head>
<title>VisInt-X</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/Three49custom.js"></script>
<script src="js/GLmol.js"></script>
<script src="js/3Dmol.js"></script>
<script src="js/d3.v3.min.js"></script>
<script src="js/taffy.js"></script>
<script src="js/xlpm.js"></script>
<script src="js/inputs.js"></script>
<script src="js/snap.svg.js"></script>
<script src="js/script.js"></script>
<script src="js/layout.js"></script>
<script src="js/color-legend.js"></script>
<style>@import url(css/apple.css);</style>
<style>@import url(css/styles.css);</style>
</head>
<body>
<header>
<div class="module" id="cssmenu">
<ul>
<li class='active'><a href='#'>Home</a></li>
<li><a href='#'>Main</a></li>
<li><a href='#'>Downloads</a></li>
<li><a href='#'>About</a></li>
</ul>
</div>
</header>
<header>
<div class="module">VisInt-X</div>
</header>
<nav>
<div class="module" id="mainNav">
<div id="fasta">
Please choose a SEQUENCE file to parse (FASTA format only)<br/>
<input type="file" id="fastafile"/>
</div>
<div id="data">
Please choose a XLPM DATA file to parse (TXT format only)<br/>
<input type="file" id="datafile"/>
</div>
<div id="choose">
<form>
<input type="radio" name="pref" id="local" value="local">Upload PDB files
<input type="radio" name="pref" id="server" value="server">Enter PDB Id
<input type="radio" name="pref" id="nod" value="nod">No 3D Model
</form>
</div>
<div id="serverDiv">
Please enter first PDB ID <input type="text" id="firstseq"/><br/>
Please enter second PDB ID <input type="text" id="secondseq"/>
</div>
<div id="localDiv">
Upload the first PDB File <input type="file" id="viewMol1"/><br/>
Upload the second PDB File <input type="file" id="viewMol2"/>
</div>
<br/>
<br/>
<div id="viewViz">
<button id="mainButton" type="button" onclick="main(fastaText, dataText)">Visualize</button>
<button id="clearButton" type="button" onclick="clearSVG()">Clear</button>
<button id="secLevelButton" type="button" onclick="clearSecondLevelData()">Clear Second Level Data</button>
</div>
</div>
<div id="glmol01">
</div>
</nav>
<section>
<div id="vis" class="module">
</div>
</section>
<footer>
<div class="module">
Copyright © 2016 Mihir Jaiswal & Islam Akef Ebeid
</div>
</footer>
</body>
</html>
| iebeid/VisInt-X | main.html | HTML | gpl-3.0 | 3,667 |
//======================================================================
//
// Copyright (C) 2016 哈分享网
// All rights reserved
// Filename :NullLocalizationManager
// Description :
// Created by Wsy at 2016/8/4 16:06:06
// http://www.hafenxiang.com
//
//======================================================================
using System.Collections.Generic;
using System.Threading;
using Petite.Core.Domain.Entities.Localization;
using Petite.Core.Localization.Sources;
namespace Petite.Core.Localization
{
public class NullLocalizationManager : ILocalizationManager
{
/// <summary>
/// 单例模式
/// </summary>
public static NullLocalizationManager Instance { get { return SingletonInstance; } }
private static readonly NullLocalizationManager SingletonInstance = new NullLocalizationManager();
public LanguageInfo CurrentLanguage { get { return new LanguageInfo(Thread.CurrentThread.CurrentUICulture.Name, Thread.CurrentThread.CurrentUICulture.DisplayName); } }
private readonly IReadOnlyList<LanguageInfo> _emptyLanguageArray = new LanguageInfo[0];
private readonly IReadOnlyList<ILocalizationSource> _emptyLocalizationSourceArray = new ILocalizationSource[0];
private NullLocalizationManager()
{
}
public IReadOnlyList<LanguageInfo> GetAllLanguages()
{
return _emptyLanguageArray;
}
public ILocalizationSource GetSource(string name)
{
return NullLocalizationSource.Instance;
}
public IReadOnlyList<ILocalizationSource> GetAllSources()
{
return _emptyLocalizationSourceArray;
}
}
}
| puddingfish/Petite | Libraries/Petite.Core/Localization/NullLocalizationManager.cs | C# | gpl-3.0 | 1,783 |
/*
* Decompiled with CFR 0_115.
*
* Could not load the following classes:
* android.os.AsyncTask
*/
package android.support.v4.os;
import android.os.AsyncTask;
import java.util.concurrent.Executor;
class AsyncTaskCompatHoneycomb {
AsyncTaskCompatHoneycomb() {
}
static /* varargs */ <Params, Progress, Result> void executeParallel(AsyncTask<Params, Progress, Result> asyncTask, Params ... arrParams) {
asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Object[])arrParams);
}
}
| SPACEDAC7/TrabajoFinalGrado | uploads/34f7f021ecaf167f6e9669e45c4483ec/java_source/android/support/v4/os/AsyncTaskCompatHoneycomb.java | Java | gpl-3.0 | 523 |
// timebase_widget.cpp ---
//
// Filename: timebase_widget.cpp
// Description:
// Author: stax
// Maintainer:
// Created: ven nov 27 17:02:50 2009 (+0100)
// Version:
// Last-Updated: ven nov 27 19:04:39 2009 (+0100)
// By: stax
// Update #: 10
// URL:
// Keywords:
// Compatibility:
//
//
// Commentary:
//
//
//
//
// Change log:
//
//
//
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 3, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; see the file COPYING. If not, write to
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth
// Floor, Boston, MA 02110-1301, USA.
//
//
#include "timebase_widget.h"
TimeBaseWidget::TimeBaseWidget()
{
_samplerate=0;
_tempo.setRange(50, 350);
_tempo.setValue(120);
_beatsPerBar.setRange(1, 16);
_beatsPerBar.setValue(4);
for (int i=1; i < 17; i*=2)
_beatLength.addItem(QString("%1").arg(i), i);
_beatLength.setCurrentIndex(2);
QHBoxLayout *tb=new QHBoxLayout;
tb->addWidget(new QLabel("tempo:"));
tb->addWidget(&_tempo);
tb->addStretch(1);
tb->addWidget(new QLabel("signature:"));
tb->addWidget(&_beatsPerBar);
tb->addWidget(new QLabel("/"));
tb->addWidget(&_beatLength);
setLayout(tb);
connect(&_tempo, SIGNAL(valueChanged(int)),
this, SLOT(computeTimeBase()));
connect(&_beatsPerBar, SIGNAL(valueChanged(int)),
this, SLOT(computeTimeBase()));
connect(&_beatLength, SIGNAL(currentIndexChanged(int)),
this, SLOT(computeTimeBase()));
}
void TimeBaseWidget::setSamplerate(int sr)
{
_samplerate=sr;
computeTimeBase();
}
int TimeBaseWidget::getBPM()
{
return _tempo.value();
}
int TimeBaseWidget::getBeatsPerBar()
{
return _beatsPerBar.value();
}
int TimeBaseWidget::getBeatLength()
{
return _beatLength.itemData(_beatLength.currentIndex()).toInt();
}
void TimeBaseWidget::computeTimeBase()
{
int bpm=_tempo.value();
int bpb=_beatsPerBar.value();
int beatLength=_beatLength.itemData(_beatLength.currentIndex()).toInt();
float beat=(float)(4 * bpb) / (float)beatLength;
float res=((beat * 60.0) / (float)bpm);
_timeBase=res * _samplerate;
if (_samplerate)
setTitle(tr("Time base - %1 secs (%2 frames @ %3Hz)").arg(res).arg(_timeBase).arg(_samplerate));
else
setTitle(tr("Time base - %1 secs").arg(res));
if (_samplerate)
emit timeBaseChanged(bpm, bpb, beatLength);
}
//
// timebase_widget.cpp ends here
| dastax/libQjack | timebase_widget.cpp | C++ | gpl-3.0 | 2,878 |
/*
* Accio is a platform to launch computer science experiments.
* Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk>
*
* Accio is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Accio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Accio. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.cnrs.liris.infra.cli.app
/**
* A command line exit code.
*
* @param code Numerical code.
* @param name Machine name.
*/
case class ExitCode(code: Int, name: String)
object ExitCode {
val Success = ExitCode(0, "SUCCESS")
val CommandLineError = ExitCode(1, "COMMAND_LINE_ERROR")
val DefinitionError = ExitCode(2, "DEFINITION_ERROR")
val InternalError = ExitCode(3, "INTERNAL_ERROR")
def select(codes: Seq[ExitCode]): ExitCode = {
if (codes.contains(CommandLineError)) {
CommandLineError
} else if (codes.contains(DefinitionError)) {
DefinitionError
} else if (codes.contains(InternalError)) {
InternalError
} else {
Success
}
}
} | privamov/accio | accio/java/fr/cnrs/liris/infra/cli/app/ExitCode.scala | Scala | gpl-3.0 | 1,468 |
<#
Applies V-41037 from the SQL 2012 Instance STIG
Title: SQL Server default account sa must have its name changed
#>
function Rename-SaAccount ($serverName, $newName) {
$SQLServer = New-Object "Microsoft.SQLServer.Management.Smo.Server" $serverName
# SA Account has a SID and ID of 1 even when it has been renamed #
$saAccount = $SQLServer.Logins | Where-Object {$_.Id -eq 1 and $_.Name -eq "sa"}
if ($saAccount) {
Write-Output "Not STIG compliant - Default SA account has not been renamed"
$saAccount.Rename($saAccount)
}
else {
Write-Output "STIG Compliant - SA account was renamed to $saAccount.Name"
}
} | alulsh/SharePoint-2010-STIGs | SQL/Instance/V-41037.ps1 | PowerShell | gpl-3.0 | 699 |
#region Copyright & License Information
/*
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Mods.Common.Effects;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
class SmokeTrailWhenDamagedInfo : ITraitInfo, Requires<BodyOrientationInfo>
{
[Desc("Position relative to body")]
public readonly WVec Offset = WVec.Zero;
public readonly int Interval = 3;
public readonly string Sprite = "smokey";
[SequenceReference("Sprite")]
public readonly string Sequence = "idle";
public readonly string Palette = "effect";
public readonly DamageState MinDamage = DamageState.Heavy;
public object Create(ActorInitializer init) { return new SmokeTrailWhenDamaged(init.Self, this); }
}
class SmokeTrailWhenDamaged : ITick
{
readonly SmokeTrailWhenDamagedInfo info;
readonly BodyOrientation body;
readonly int getFacing;
int ticks;
public SmokeTrailWhenDamaged(Actor self, SmokeTrailWhenDamagedInfo info)
{
this.info = info;
body = self.Trait<BodyOrientation>();
var facing = self.TraitOrDefault<IFacing>();
if (facing != null)
getFacing = facing.Facing;
else
getFacing = 0;
}
void ITick.Tick(Actor self)
{
if (--ticks <= 0)
{
var position = self.CenterPosition;
if (position.Z > 0 && self.GetDamageState() >= info.MinDamage && !self.World.FogObscures(self))
{
var offset = info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation));
var pos = position + body.LocalToWorld(offset);
self.World.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, w, info.Sprite, info.Sequence, info.Palette, facing: getFacing)));
}
ticks = info.Interval;
}
}
}
}
| tysonliddell/OpenRA | OpenRA.Mods.Common/Traits/SmokeTrailWhenDamaged.cs | C# | gpl-3.0 | 2,004 |
/**************************************************************************
* Otter Browser: Web browser controlled by the user, not vice-versa.
* Copyright (C) 2013 - 2022 Michal Dutkiewicz aka Emdek <michal@emdek.pl>
* Copyright (C) 2014 - 2017 Jan Bajer aka bajasoft <jbajer@gmail.com>
* Copyright (C) 2016 - 2017 Piotr Wójcik <chocimier@tlen.pl>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
**************************************************************************/
#ifndef OTTER_INPUTPREFERENCESPAGE_H
#define OTTER_INPUTPREFERENCESPAGE_H
#include "PreferencesPage.h"
#include "../../../core/ActionsManager.h"
#include "../../../ui/ItemDelegate.h"
#include <QtGui/QStandardItemModel>
#include <QtWidgets/QKeySequenceEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QToolButton>
namespace Otter
{
namespace Ui
{
class InputPreferencesPage;
}
class ShortcutWidget final : public QKeySequenceEdit
{
Q_OBJECT
public:
explicit ShortcutWidget(const QKeySequence &shortcut, QWidget *parent = nullptr);
protected:
void changeEvent(QEvent *event) override;
private:
QToolButton *m_clearButton;
signals:
void commitData(QWidget *editor);
};
class ActionDelegate final : public ItemDelegate
{
public:
explicit ActionDelegate(QObject *parent);
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
};
class ParametersDelegate final : public ItemDelegate
{
public:
explicit ParametersDelegate(QObject *parent);
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
};
class ShortcutDelegate final : public ItemDelegate
{
public:
explicit ShortcutDelegate(QObject *parent);
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
protected:
void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
};
class InputPreferencesPage final : public PreferencesPage
{
Q_OBJECT
public:
enum DataRole
{
IdentifierRole = Qt::UserRole,
IsDisabledRole,
NameRole,
ParametersRole,
StatusRole
};
enum EntryStatus
{
ErrorStatus = 0,
WarningStatus,
NormalStatus
};
struct ValidationResult final
{
QString text;
QIcon icon;
bool isError = false;
};
explicit InputPreferencesPage(QWidget *parent);
~InputPreferencesPage();
static QString createParamatersPreview(const QVariantMap &rawParameters, const QString &separator);
static ValidationResult validateShortcut(const QKeySequence &shortcut, const QModelIndex &index);
public slots:
void save() override;
protected:
struct ShortcutsDefinition
{
QVariantMap parameters;
QVector<QKeySequence> shortcuts;
QVector<QKeySequence> disabledShortcuts;
};
void changeEvent(QEvent *event) override;
void loadKeyboardDefinitions(const QString &identifier);
void addKeyboardShortcuts(QStandardItemModel *model, int identifier, const QString &name, const QString &text, const QIcon &icon, const QVariantMap &rawParameters, const QVector<QKeySequence> &shortcuts, bool areShortcutsDisabled);
void addKeyboardShortcut(bool isDisabled);
QString createProfileIdentifier(QStandardItemModel *model, const QString &base = {}) const;
QHash<int, QVector<KeyboardProfile::Action> > getKeyboardDefinitions() const;
protected slots:
void addKeyboardProfile();
void editKeyboardProfile();
void cloneKeyboardProfile();
void removeKeyboardProfile();
void updateKeyboardProfileActions();
void editShortcutParameters();
void updateKeyboardShortcutActions();
private:
QStandardItemModel *m_keyboardShortcutsModel;
QPushButton *m_advancedButton;
QString m_activeKeyboardProfile;
QStringList m_filesToRemove;
QHash<QString, KeyboardProfile> m_keyboardProfiles;
Ui::InputPreferencesPage *m_ui;
static bool m_areSingleKeyShortcutsAllowed;
};
}
#endif
| OtterBrowser/otter-browser | src/modules/windows/preferences/InputPreferencesPage.h | C | gpl-3.0 | 4,660 |
##===- projects/sample/tools/sample/Makefile ---------------*- Makefile -*-===##
#
# Indicate where we are relative to the top of the source tree.
#
LEVEL=../..
#
# Give the name of the tool.
#
TOOLNAME=nkb-knowcess
#
# Includes needed
#
xerces_builddir=/home/jmc/xerces-c-3.1.1
CPPFLAGS += -fexceptions -I. -I$(xerces_builddir) -I$(xerces_builddir)/src/
#
# List libraries that we'll need
# We use LIBS because sample is a dynamic library.
#
# USEDLIBS = nkb-compile.a
ExtraLibs = -L/usr/local/lib -lxerces-c-3.1 -lnsl -lpthread -lcurl -Wl,-Bsymbolic-functions -lgssapi_krb5 -lm -L/usr/lib -licui18n -licuuc -licudata -lm
LINK_COMPONENTS += core jit native interpreter codegen asmparser
#
# Include Makefile.common so we know what to do.
#
include $(LEVEL)/Makefile.common
| CRTandKDU/NCloseCompiler | tools/runner/Makefile | Makefile | gpl-3.0 | 787 |
#include "editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.h"
#include "ui/UICheckBox.h"
#include "platform/CCFileUtils.h"
#include "2d/CCSpriteFrameCache.h"
#include "editor-support/cocostudio/CocoLoader.h"
#include "editor-support/cocostudio/CSParseBinary_generated.h"
#include "editor-support/cocostudio/FlatBuffersSerialize.h"
#include "tinyxml2.h"
#include "flatbuffers/flatbuffers.h"
USING_NS_CC;
using namespace ui;
using namespace flatbuffers;
namespace cocostudio
{
static const char* P_BackGroundBoxData = "backGroundBoxData";
static const char* P_BackGroundBoxSelectedData = "backGroundBoxSelectedData";
static const char* P_FrontCrossData = "frontCrossData";
static const char* P_BackGroundBoxDisabledData = "backGroundBoxDisabledData";
static const char* P_FrontCrossDisabledData = "frontCrossDisabledData";
static CheckBoxReader* instanceCheckBoxReader = nullptr;
IMPLEMENT_CLASS_NODE_READER_INFO(CheckBoxReader)
CheckBoxReader::CheckBoxReader()
{
}
CheckBoxReader::~CheckBoxReader()
{
}
CheckBoxReader* CheckBoxReader::getInstance()
{
if (!instanceCheckBoxReader)
{
instanceCheckBoxReader = new (std::nothrow) CheckBoxReader();
}
return instanceCheckBoxReader;
}
void CheckBoxReader::destroyInstance()
{
CC_SAFE_DELETE(instanceCheckBoxReader);
}
void CheckBoxReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *cocoNode)
{
CheckBox *checkBox = static_cast<CheckBox*>(widget);
this->beginSetBasicProperties(widget);
stExpCocoNode *stChildArray = cocoNode->GetChildArray(cocoLoader);
for (int i = 0; i < cocoNode->GetChildNum(); ++i) {
std::string key = stChildArray[i].GetName(cocoLoader);
std::string value = stChildArray[i].GetValue(cocoLoader);
//read all basic properties of widget
CC_BASIC_PROPERTY_BINARY_READER
//read all color related properties of widget
CC_COLOR_PROPERTY_BINARY_READER
else if (key == P_BackGroundBoxData){
stExpCocoNode *backGroundChildren = stChildArray[i].GetChildArray(cocoLoader);
std::string resType = backGroundChildren[2].GetValue(cocoLoader);;
Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType);
std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType);
checkBox->loadTextureBackGround(backgroundValue, imageFileNameType);
}else if(key == P_BackGroundBoxSelectedData){
stExpCocoNode *backGroundChildren = stChildArray[i].GetChildArray(cocoLoader);
std::string resType = backGroundChildren[2].GetValue(cocoLoader);;
Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType);
std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType);
checkBox->loadTextureBackGroundSelected(backgroundValue, imageFileNameType);
}else if(key == P_FrontCrossData){
stExpCocoNode *backGroundChildren = stChildArray[i].GetChildArray(cocoLoader);
std::string resType = backGroundChildren[2].GetValue(cocoLoader);;
Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType);
std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType);
checkBox->loadTextureFrontCross(backgroundValue, imageFileNameType);
}else if(key == P_BackGroundBoxDisabledData){
stExpCocoNode *backGroundChildren = stChildArray[i].GetChildArray(cocoLoader);
std::string resType = backGroundChildren[2].GetValue(cocoLoader);;
Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType);
std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType);
checkBox->loadTextureBackGroundDisabled(backgroundValue, imageFileNameType);
}else if (key == P_FrontCrossDisabledData){
stExpCocoNode *backGroundChildren = stChildArray[i].GetChildArray(cocoLoader);
std::string resType = backGroundChildren[2].GetValue(cocoLoader);;
Widget::TextureResType imageFileNameType = (Widget::TextureResType)valueToInt(resType);
std::string backgroundValue = this->getResourcePath(cocoLoader, &stChildArray[i], imageFileNameType);
checkBox->loadTextureFrontCrossDisabled(backgroundValue, imageFileNameType);
}
// else if (key == "selectedState"){
// checkBox->setSelectedState(valueToBool(value));
// }
}
this->endSetBasicProperties(widget);
}
void CheckBoxReader::setPropsFromJsonDictionary(Widget *widget, const rapidjson::Value &options)
{
WidgetReader::setPropsFromJsonDictionary(widget, options);
CheckBox* checkBox = static_cast<CheckBox*>(widget);
//load background image
const rapidjson::Value& backGroundDic = DICTOOL->getSubDictionary_json(options, P_BackGroundBoxData);
int backGroundType = DICTOOL->getIntValue_json(backGroundDic,P_ResourceType);
std::string backGroundTexturePath = this->getResourcePath(backGroundDic, P_Path, (Widget::TextureResType)backGroundType);
checkBox->loadTextureBackGround(backGroundTexturePath, (Widget::TextureResType)backGroundType);
//load background selected image
const rapidjson::Value& backGroundSelectedDic = DICTOOL->getSubDictionary_json(options, P_BackGroundBoxSelectedData);
int backGroundSelectedType = DICTOOL->getIntValue_json(backGroundSelectedDic, P_ResourceType);
std::string backGroundSelectedTexturePath = this->getResourcePath(backGroundSelectedDic, P_Path, (Widget::TextureResType)backGroundSelectedType);
checkBox->loadTextureBackGroundSelected(backGroundSelectedTexturePath, (Widget::TextureResType)backGroundSelectedType);
//load frontCross image
const rapidjson::Value& frontCrossDic = DICTOOL->getSubDictionary_json(options, P_FrontCrossData);
int frontCrossType = DICTOOL->getIntValue_json(frontCrossDic, P_ResourceType);
std::string frontCrossFileName = this->getResourcePath(frontCrossDic, P_Path, (Widget::TextureResType)frontCrossType);
checkBox->loadTextureFrontCross(frontCrossFileName, (Widget::TextureResType)frontCrossType);
//load backGroundBoxDisabledData
const rapidjson::Value& backGroundDisabledDic = DICTOOL->getSubDictionary_json(options, P_BackGroundBoxDisabledData);
int backGroundDisabledType = DICTOOL->getIntValue_json(backGroundDisabledDic, P_ResourceType);
std::string backGroundDisabledFileName = this->getResourcePath(backGroundDisabledDic, P_Path, (Widget::TextureResType)backGroundDisabledType);
checkBox->loadTextureBackGroundDisabled(backGroundDisabledFileName, (Widget::TextureResType)backGroundDisabledType);
///load frontCrossDisabledData
const rapidjson::Value& frontCrossDisabledDic = DICTOOL->getSubDictionary_json(options, P_FrontCrossDisabledData);
int frontCrossDisabledType = DICTOOL->getIntValue_json(frontCrossDisabledDic, P_ResourceType);
std::string frontCrossDisabledFileName = this->getResourcePath(frontCrossDisabledDic, P_Path, (Widget::TextureResType)frontCrossDisabledType);
checkBox->loadTextureFrontCrossDisabled(frontCrossDisabledFileName, (Widget::TextureResType)frontCrossDisabledType);
WidgetReader::setColorPropsFromJsonDictionary(widget, options);
}
Offset<Table> CheckBoxReader::createOptionsWithFlatBuffers(const tinyxml2::XMLElement *objectData,
flatbuffers::FlatBufferBuilder *builder)
{
auto temp = WidgetReader::getInstance()->createOptionsWithFlatBuffers(objectData, builder);
auto widgetOptions = *(Offset<WidgetOptions>*)(&temp);
bool selectedState = false;
bool displaystate = true;
int backgroundboxResourceType = 0;
std::string backgroundboxPath = "";
std::string backgroundboxPlistFile = "";
int backGroundBoxSelectedResourceType = 0;
std::string backGroundBoxSelectedPath = "";
std::string backGroundBoxSelectedPlistFile = "";
int frontCrossResourceType = 0;
std::string frontCrossPath = "";
std::string frontCrossPlistFile = "";
int backGroundBoxDisabledResourceType = 0;
std::string backGroundBoxDisabledPath = "";
std::string backGroundBoxDisabledPlistFile = "";
int frontCrossDisabledResourceType = 0;
std::string frontCrossDisabledPath = "";
std::string frontCrossDisabledPlistFile = "";
// attributes
const tinyxml2::XMLAttribute* attribute = objectData->FirstAttribute();
while (attribute)
{
std::string name = attribute->Name();
std::string value = attribute->Value();
if (name == "CheckedState")
{
selectedState = (value == "True") ? true : false;
}
else if (name == "DisplayState")
{
displaystate = (value == "True") ? true : false;
}
attribute = attribute->Next();
}
// child elements
const tinyxml2::XMLElement* child = objectData->FirstChildElement();
while (child)
{
std::string name = child->Name();
if (name == "NormalBackFileData")
{
std::string texture = "";
std::string texturePng = "";
attribute = child->FirstAttribute();
while (attribute)
{
name = attribute->Name();
std::string value = attribute->Value();
if (name == "Path")
{
backgroundboxPath = value;
}
else if (name == "Type")
{
backgroundboxResourceType = getResourceType(value);
}
else if (name == "Plist")
{
backgroundboxPlistFile = value;
texture = value;
}
attribute = attribute->Next();
}
if (backgroundboxResourceType == 1)
{
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
fbs->_textures.push_back(builder->CreateString(texture));
}
}
else if (name == "PressedBackFileData")
{
std::string texture = "";
std::string texturePng = "";
attribute = child->FirstAttribute();
while (attribute)
{
name = attribute->Name();
std::string value = attribute->Value();
if (name == "Path")
{
backGroundBoxSelectedPath = value;
}
else if (name == "Type")
{
backGroundBoxSelectedResourceType = getResourceType(value);
}
else if (name == "Plist")
{
backGroundBoxSelectedPlistFile = value;
texture = value;
}
attribute = attribute->Next();
}
if (backGroundBoxSelectedResourceType == 1)
{
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
fbs->_textures.push_back(builder->CreateString(texture));
}
}
else if (name == "NodeNormalFileData")
{
std::string texture = "";
std::string texturePng = "";
attribute = child->FirstAttribute();
while (attribute)
{
name = attribute->Name();
std::string value = attribute->Value();
if (name == "Path")
{
frontCrossPath = value;
}
else if (name == "Type")
{
frontCrossResourceType = getResourceType(value);
}
else if (name == "Plist")
{
frontCrossPlistFile = value;
texture = value;
}
attribute = attribute->Next();
}
if (frontCrossResourceType == 1)
{
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
fbs->_textures.push_back(builder->CreateString(texture));
}
}
else if (name == "DisableBackFileData")
{
std::string texture = "";
std::string texturePng = "";
attribute = child->FirstAttribute();
while (attribute)
{
name = attribute->Name();
std::string value = attribute->Value();
if (name == "Path")
{
backGroundBoxDisabledPath = value;
}
else if (name == "Type")
{
backGroundBoxDisabledResourceType = getResourceType(value);
}
else if (name == "Plist")
{
backGroundBoxDisabledPlistFile = value;
texture = value;
}
attribute = attribute->Next();
}
if (backGroundBoxDisabledResourceType == 1)
{
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
fbs->_textures.push_back(builder->CreateString(texture));
}
}
else if (name == "NodeDisableFileData")
{
std::string texture = "";
std::string texturePng = "";
attribute = child->FirstAttribute();
while (attribute)
{
name = attribute->Name();
std::string value = attribute->Value();
if (name == "Path")
{
frontCrossDisabledPath = value;
}
else if (name == "Type")
{
frontCrossDisabledResourceType = getResourceType(value);
}
else if (name == "Plist")
{
frontCrossDisabledPlistFile = value;
texture = value;
}
attribute = attribute->Next();
}
if (frontCrossDisabledResourceType == 1)
{
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
fbs->_textures.push_back(builder->CreateString(texture));
}
}
child = child->NextSiblingElement();
}
auto options = CreateCheckBoxOptions(*builder,
widgetOptions,
CreateResourceData(*builder,
builder->CreateString(backgroundboxPath),
builder->CreateString(backgroundboxPlistFile),
backgroundboxResourceType),
CreateResourceData(*builder,
builder->CreateString(backGroundBoxSelectedPath),
builder->CreateString(backGroundBoxSelectedPlistFile),
backGroundBoxSelectedResourceType),
CreateResourceData(*builder,
builder->CreateString(frontCrossPath),
builder->CreateString(frontCrossPlistFile),
frontCrossResourceType),
CreateResourceData(*builder,
builder->CreateString(backGroundBoxDisabledPath),
builder->CreateString(backGroundBoxDisabledPlistFile),
backGroundBoxDisabledResourceType),
CreateResourceData(*builder,
builder->CreateString(frontCrossDisabledPath),
builder->CreateString(frontCrossDisabledPlistFile),
frontCrossDisabledResourceType),
selectedState,
displaystate
);
return *(Offset<Table>*)&options;
}
void CheckBoxReader::setPropsWithFlatBuffers(cocos2d::Node *node, const flatbuffers::Table *checkBoxOptions)
{
auto options = (CheckBoxOptions*)checkBoxOptions;
CheckBox* checkBox = static_cast<CheckBox*>(node);
//load background image
bool backGroundFileExist = false;
std::string backGroundErrorFilePath = "";
auto backGroundDic = options->backGroundBoxData();
int backGroundType = backGroundDic->resourceType();
std::string backGroundTexturePath = backGroundDic->path()->c_str();
switch (backGroundType)
{
case 0:
{
if (FileUtils::getInstance()->isFileExist(backGroundTexturePath))
{
backGroundFileExist = true;
}
else
{
backGroundErrorFilePath = backGroundTexturePath;
backGroundFileExist = false;
}
break;
}
case 1:
{
std::string plist = backGroundDic->plistFile()->c_str();
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(backGroundTexturePath);
if (spriteFrame)
{
backGroundFileExist = true;
}
else
{
if (FileUtils::getInstance()->isFileExist(plist))
{
ValueMap value = FileUtils::getInstance()->getValueMapFromFile(plist);
ValueMap metadata = value["metadata"].asValueMap();
std::string textureFileName = metadata["textureFileName"].asString();
if (!FileUtils::getInstance()->isFileExist(textureFileName))
{
backGroundErrorFilePath = textureFileName;
}
}
else
{
backGroundErrorFilePath = plist;
}
backGroundFileExist = false;
}
break;
}
default:
break;
}
if (backGroundFileExist)
{
checkBox->loadTextureBackGround(backGroundTexturePath, (Widget::TextureResType)backGroundType);
}
//load background selected image
bool backGroundSelectedfileExist = false;
std::string backGroundSelectedErrorFilePath = "";
auto backGroundSelectedDic = options->backGroundBoxSelectedData();
int backGroundSelectedType = backGroundSelectedDic->resourceType();
std::string backGroundSelectedTexturePath = backGroundSelectedDic->path()->c_str();
switch (backGroundSelectedType)
{
case 0:
{
if (FileUtils::getInstance()->isFileExist(backGroundSelectedTexturePath))
{
backGroundSelectedfileExist = true;
}
else
{
backGroundSelectedErrorFilePath = backGroundSelectedTexturePath;
backGroundSelectedfileExist = false;
}
break;
}
case 1:
{
std::string plist = backGroundSelectedDic->plistFile()->c_str();
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(backGroundSelectedTexturePath);
if (spriteFrame)
{
backGroundSelectedfileExist = true;
}
else
{
if (FileUtils::getInstance()->isFileExist(plist))
{
ValueMap value = FileUtils::getInstance()->getValueMapFromFile(plist);
ValueMap metadata = value["metadata"].asValueMap();
std::string textureFileName = metadata["textureFileName"].asString();
if (!FileUtils::getInstance()->isFileExist(textureFileName))
{
backGroundSelectedErrorFilePath = textureFileName;
}
}
else
{
backGroundSelectedErrorFilePath = plist;
}
backGroundSelectedfileExist = false;
}
break;
}
default:
break;
}
if (backGroundSelectedfileExist)
{
checkBox->loadTextureBackGroundSelected(backGroundSelectedTexturePath, (Widget::TextureResType)backGroundSelectedType);
}
//load frontCross image
bool frontCrossFileExist = false;
std::string frontCrossErrorFilePath = "";
auto frontCrossDic = options->frontCrossData();
int frontCrossType = frontCrossDic->resourceType();
std::string frontCrossFileName = frontCrossDic->path()->c_str();
switch (frontCrossType)
{
case 0:
{
if (FileUtils::getInstance()->isFileExist(frontCrossFileName))
{
frontCrossFileExist = true;
}
else
{
frontCrossErrorFilePath = frontCrossFileName;
frontCrossFileExist = false;
}
break;
}
case 1:
{
std::string plist = frontCrossDic->plistFile()->c_str();
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(frontCrossFileName);
if (spriteFrame)
{
frontCrossFileExist = true;
}
else
{
if (FileUtils::getInstance()->isFileExist(plist))
{
ValueMap value = FileUtils::getInstance()->getValueMapFromFile(plist);
ValueMap metadata = value["metadata"].asValueMap();
std::string textureFileName = metadata["textureFileName"].asString();
if (!FileUtils::getInstance()->isFileExist(textureFileName))
{
frontCrossErrorFilePath = textureFileName;
}
}
else
{
frontCrossErrorFilePath = plist;
}
frontCrossFileExist = false;
}
break;
}
default:
break;
}
if (frontCrossFileExist)
{
checkBox->loadTextureFrontCross(frontCrossFileName, (Widget::TextureResType)frontCrossType);
}
//load backGroundBoxDisabledData
bool backGroundBoxDisabledFileExist = false;
std::string backGroundBoxDisabledErrorFilePath = "";
auto backGroundDisabledDic = options->backGroundBoxDisabledData();
int backGroundDisabledType = backGroundDisabledDic->resourceType();
std::string backGroundDisabledFileName = backGroundDisabledDic->path()->c_str();
switch (backGroundDisabledType)
{
case 0:
{
if (FileUtils::getInstance()->isFileExist(backGroundDisabledFileName))
{
backGroundBoxDisabledFileExist = true;
}
else
{
backGroundBoxDisabledErrorFilePath = backGroundDisabledFileName;
backGroundBoxDisabledFileExist = false;
}
break;
}
case 1:
{
std::string plist = backGroundDisabledDic->plistFile()->c_str();
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(backGroundDisabledFileName);
if (spriteFrame)
{
backGroundBoxDisabledFileExist = true;
}
else
{
if (FileUtils::getInstance()->isFileExist(plist))
{
ValueMap value = FileUtils::getInstance()->getValueMapFromFile(plist);
ValueMap metadata = value["metadata"].asValueMap();
std::string textureFileName = metadata["textureFileName"].asString();
if (!FileUtils::getInstance()->isFileExist(textureFileName))
{
backGroundBoxDisabledErrorFilePath = textureFileName;
}
}
else
{
backGroundBoxDisabledErrorFilePath = plist;
}
backGroundBoxDisabledFileExist = false;
}
break;
}
default:
break;
}
if (backGroundBoxDisabledFileExist)
{
checkBox->loadTextureBackGroundDisabled(backGroundDisabledFileName, (Widget::TextureResType)backGroundDisabledType);
}
///load frontCrossDisabledData
bool frontCrossDisabledFileExist = false;
std::string frontCrossDisabledErrorFilePath = "";
auto frontCrossDisabledDic = options->frontCrossDisabledData();
int frontCrossDisabledType = frontCrossDisabledDic->resourceType();
std::string frontCrossDisabledFileName = frontCrossDisabledDic->path()->c_str();
switch (frontCrossDisabledType)
{
case 0:
{
if (FileUtils::getInstance()->isFileExist(frontCrossDisabledFileName))
{
frontCrossDisabledFileExist = true;
}
else
{
frontCrossDisabledErrorFilePath = frontCrossDisabledFileName;
frontCrossDisabledFileExist = false;
}
break;
}
case 1:
{
std::string plist = frontCrossDisabledDic->plistFile()->c_str();
SpriteFrame* spriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName(frontCrossDisabledFileName);
if (spriteFrame)
{
frontCrossDisabledFileExist = true;
}
else
{
if (FileUtils::getInstance()->isFileExist(plist))
{
ValueMap value = FileUtils::getInstance()->getValueMapFromFile(plist);
ValueMap metadata = value["metadata"].asValueMap();
std::string textureFileName = metadata["textureFileName"].asString();
if (!FileUtils::getInstance()->isFileExist(textureFileName))
{
frontCrossDisabledErrorFilePath = textureFileName;
}
}
else
{
frontCrossDisabledErrorFilePath = plist;
}
frontCrossDisabledFileExist = false;
}
break;
}
default:
break;
}
if (frontCrossDisabledFileExist)
{
checkBox->loadTextureFrontCrossDisabled(frontCrossDisabledFileName, (Widget::TextureResType)frontCrossDisabledType);
}
bool selectedstate = options->selectedState() != 0;
checkBox->setSelected(selectedstate);
bool displaystate = options->displaystate() != 0;
checkBox->setBright(displaystate);
checkBox->setEnabled(displaystate);
auto widgetReader = WidgetReader::getInstance();
widgetReader->setPropsWithFlatBuffers(node, (Table*)options->widgetOptions());
}
Node* CheckBoxReader::createNodeWithFlatBuffers(const flatbuffers::Table *checkBoxOptions)
{
CheckBox* checkBox = CheckBox::create();
setPropsWithFlatBuffers(checkBox, (Table*)checkBoxOptions);
return checkBox;
}
int CheckBoxReader::getResourceType(std::string key)
{
if(key == "Normal" || key == "Default")
{
return 0;
}
FlatBuffersSerialize* fbs = FlatBuffersSerialize::getInstance();
if(fbs->_isSimulator)
{
if(key == "MarkedSubImage")
{
return 0;
}
}
return 1;
}
}
| jun496276723/CocosMFCEditor | cocos2d/cocos/editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp | C++ | gpl-3.0 | 31,100 |
#include <3ds.h>
bool touchInBox(touchPosition touch, int x, int y, int w, int h){
int tx=touch.px;
int ty=touch.py;
u32 kDown = hidKeysDown();
if (kDown & KEY_TOUCH && tx > x && tx < x+w && ty > y && ty < y+h){
return true;
}else{
return false;
}
} | MrJPGames/Mastermind-3DS | source/touch.c | C | gpl-3.0 | 260 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.holdingscythe.pocketamcreader.catalog;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.DataSetObserver;
import android.os.Handler;
import android.widget.Filter;
import android.widget.FilterQueryProvider;
import android.widget.Filterable;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
/**
* Provide a {@link androidx.recyclerview.widget.RecyclerView.Adapter} implementation with cursor
* support.
* <p>
* Child classes only need to implement {@link #onCreateViewHolder(android.view.ViewGroup, int)} and
* {@link #onBindViewHolderCursor(androidx.recyclerview.widget.RecyclerView.ViewHolder, android.database.Cursor)}.
* <p>
* This class does not implement deprecated fields and methods from CursorAdapter! Incidentally,
* only {@link android.widget.CursorAdapter#FLAG_REGISTER_CONTENT_OBSERVER} is available, so the
* flag is implied, and only the Adapter behavior using this flag has been ported.
*
* @param <VH> {@inheritDoc}
* @see androidx.recyclerview.widget.RecyclerView.Adapter
* @see android.widget.CursorAdapter
* @see android.widget.Filterable
* @see fr.shywim.tools.adapter.CursorFilter.CursorFilterClient
*/
public abstract class CursorRecyclerAdapter<VH
extends androidx.recyclerview.widget.RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH>
implements Filterable, CursorFilter.CursorFilterClient {
private boolean mDataValid;
private int mRowIDColumn;
private Cursor mCursor;
private ChangeObserver mChangeObserver;
private DataSetObserver mDataSetObserver;
private CursorFilter mCursorFilter;
private FilterQueryProvider mFilterQueryProvider;
CursorRecyclerAdapter(Cursor cursor) {
init(cursor);
}
private void init(Cursor c) {
boolean cursorPresent = c != null;
mCursor = c;
mDataValid = cursorPresent;
mRowIDColumn = cursorPresent ? c.getColumnIndexOrThrow("_id") : -1;
mChangeObserver = new ChangeObserver();
mDataSetObserver = new MyDataSetObserver();
if (cursorPresent) {
if (mChangeObserver != null) c.registerContentObserver(mChangeObserver);
if (mDataSetObserver != null) c.registerDataSetObserver(mDataSetObserver);
}
}
/**
* This method will move the Cursor to the correct position and call
*
* @param holder {@inheritDoc}
* @param i {@inheritDoc}
*/
@Override
public void onBindViewHolder(@NonNull VH holder, int i) {
if (!mDataValid) {
throw new IllegalStateException("this should only be called when the cursor is valid");
}
if (!mCursor.moveToPosition(i)) {
throw new IllegalStateException("couldn't move cursor to position " + i);
}
onBindViewHolderCursor(holder, mCursor);
}
/**
* See {@link android.widget.CursorAdapter#bindView(android.view.View, android.content.Context,
* android.database.Cursor)},
*
* @param holder View holder.
* @param cursor The cursor from which to get the data. The cursor is already
* moved to the correct position.
*/
public abstract void onBindViewHolderCursor(VH holder, Cursor cursor);
@Override
public int getItemCount() {
if (mDataValid && mCursor != null) {
return mCursor.getCount();
} else {
return 0;
}
}
/**
* @see android.widget.ListAdapter#getItemId(int)
*/
@Override
public long getItemId(int position) {
if (mDataValid && mCursor != null) {
if (mCursor.moveToPosition(position)) {
return mCursor.getLong(mRowIDColumn);
} else {
return 0;
}
} else {
return 0;
}
}
public Cursor getCursor() {
return mCursor;
}
/**
* Change the underlying cursor to a new cursor. If there is an existing cursor it will be
* closed.
*
* @param cursor The new cursor to be used
*/
public void changeCursor(Cursor cursor) {
Cursor old = swapCursor(cursor);
if (old != null) {
old.close();
}
}
/**
* Swap in a new Cursor, returning the old Cursor. Unlike
* {@link #changeCursor(Cursor)}, the returned old Cursor is <em>not</em>
* closed.
*
* @param newCursor The new cursor to be used.
* @return Returns the previously set Cursor, or null if there was not one.
* If the given new Cursor is the same instance is the previously set
* Cursor, null is also returned.
*/
public Cursor swapCursor(Cursor newCursor) {
if (newCursor == mCursor) {
return null;
}
Cursor oldCursor = mCursor;
if (oldCursor != null) {
if (mChangeObserver != null) oldCursor.unregisterContentObserver(mChangeObserver);
if (mDataSetObserver != null) oldCursor.unregisterDataSetObserver(mDataSetObserver);
}
mCursor = newCursor;
if (newCursor != null) {
if (mChangeObserver != null) newCursor.registerContentObserver(mChangeObserver);
if (mDataSetObserver != null) newCursor.registerDataSetObserver(mDataSetObserver);
mRowIDColumn = newCursor.getColumnIndexOrThrow("_id");
mDataValid = true;
// notify the observers about the new cursor
notifyDataSetChanged();
} else {
mRowIDColumn = -1;
mDataValid = false;
// notify the observers about the lack of a data set
// notifyDataSetInvalidated();
notifyItemRangeRemoved(0, getItemCount());
}
return oldCursor;
}
/**
* <p>Converts the cursor into a CharSequence. Subclasses should override this
* method to convert their results. The default implementation returns an
* empty String for null values or the default String representation of
* the value.</p>
*
* @param cursor the cursor to convert to a CharSequence
* @return a CharSequence representing the value
*/
public CharSequence convertToString(Cursor cursor) {
return cursor == null ? "" : cursor.toString();
}
/**
* Runs a query with the specified constraint. This query is requested
* by the filter attached to this adapter.
* <p>
* The query is provided by a
* {@link android.widget.FilterQueryProvider}.
* If no provider is specified, the current cursor is not filtered and returned.
* <p>
* After this method returns the resulting cursor is passed to {@link #changeCursor(Cursor)}
* and the previous cursor is closed.
* <p>
* This method is always executed on a background thread, not on the
* application's main thread (or UI thread.)
* <p>
* Contract: when constraint is null or empty, the original results,
* prior to any filtering, must be returned.
*
* @param constraint the constraint with which the query must be filtered
* @return a Cursor representing the results of the new query
* @see #getFilter()
* @see #getFilterQueryProvider()
* @see #setFilterQueryProvider(android.widget.FilterQueryProvider)
*/
public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
if (mFilterQueryProvider != null) {
return mFilterQueryProvider.runQuery(constraint);
}
return mCursor;
}
public Filter getFilter() {
if (mCursorFilter == null) {
mCursorFilter = new CursorFilter(this);
}
return mCursorFilter;
}
/**
* Returns the query filter provider used for filtering. When the
* provider is null, no filtering occurs.
*
* @return the current filter query provider or null if it does not exist
* @see #setFilterQueryProvider(android.widget.FilterQueryProvider)
* @see #runQueryOnBackgroundThread(CharSequence)
*/
public FilterQueryProvider getFilterQueryProvider() {
return mFilterQueryProvider;
}
/**
* Sets the query filter provider used to filter the current Cursor.
* The provider's
* {@link android.widget.FilterQueryProvider#runQuery(CharSequence)}
* method is invoked when filtering is requested by a client of
* this adapter.
*
* @param filterQueryProvider the filter query provider or null to remove it
* @see #getFilterQueryProvider()
* @see #runQueryOnBackgroundThread(CharSequence)
*/
public void setFilterQueryProvider(FilterQueryProvider filterQueryProvider) {
mFilterQueryProvider = filterQueryProvider;
}
/**
* Called when the {@link ContentObserver} on the cursor receives a change notification.
* Can be implemented by sub-class.
*
* @see ContentObserver#onChange(boolean)
*/
protected void onContentChanged() {
}
private class ChangeObserver extends ContentObserver {
public ChangeObserver() {
super(new Handler());
}
@Override
public boolean deliverSelfNotifications() {
return true;
}
@Override
public void onChange(boolean selfChange) {
onContentChanged();
}
}
private class MyDataSetObserver extends DataSetObserver {
@Override
public void onChanged() {
mDataValid = true;
notifyDataSetChanged();
}
@Override
public void onInvalidated() {
mDataValid = false;
// notifyDataSetInvalidated();
notifyItemRangeRemoved(0, getItemCount());
}
}
}
| elman22/pocket-amc-reader | PocketAMCReader/src/main/java/com/holdingscythe/pocketamcreader/catalog/CursorRecyclerAdapter.java | Java | gpl-3.0 | 10,945 |
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package com.bitzing.bw.palette.mqtt.model.mqtt;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see com.bitzing.bw.palette.mqtt.model.mqtt.MqttPackage
* @generated
*/
public interface MqttFactory extends EFactory
{
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
MqttFactory eINSTANCE = com.bitzing.bw.palette.mqtt.model.mqtt.impl.MqttFactoryImpl.init();
/**
* Returns a new object of class '<em>MQTT Publish Activity</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>MQTT Publish Activity</em>'.
* @generated
*/
MQTTPublishActivity createMQTTPublishActivity();
/**
* Returns a new object of class '<em>MQTT Message Subscriber</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>MQTT Message Subscriber</em>'.
* @generated
*/
MQTTMessageSubscriber createMQTTMessageSubscriber();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
MqttPackage getMqttPackage();
} //MqttFactory
| yogeshpathade/tibcobw6-mqtt-connector | palette/model/plugins/com.bitzing.bw.palette.mqtt.model/src/com/bitzing/bw/palette/mqtt/model/mqtt/MqttFactory.java | Java | gpl-3.0 | 1,446 |
class ConfInvite < ActiveRecord::Base
belongs_to :conference
belongs_to :sender, :class_name => 'Person', :foreign_key => 'sender_id'
belongs_to :claimer, :class_name => 'Person', :foreign_key => 'claimer_id'
validates_presence_of :conference_id
validates_presence_of :sender_id
validates_presence_of :email
validates_presence_of :link
validates_associated :conference
validates_associated :sender
validates_associated :claimer
validates_uniqueness_of :link
validates_format_of :email, :with => RFC822::EmailAddress
# Shortcut to create an invite with the needed information,
# auto-filling the link with a random string. Note that this method
# will save the ConfInvite to the database before returning.
def self.for(conference, inviter, email, firstname='', famname='')
invite = self.new(:conference => conference,
:sender => inviter,
:email => email,
:firstname => firstname,
:famname => famname,
:link => Digest::MD5.hexdigest(String.random(16)))
invite.save!
invite
end
def accept(person)
transaction do
self.claimer = person
self.conference.people << person
self.save
end
end
# Has this invitation been claimed?
def claimed?
!claimer_id.nil?
end
end
| gwolf/comas | app/models/conf_invite.rb | Ruby | gpl-3.0 | 1,356 |
using System;
using System.Drawing;
using System.Windows.Forms;
using GitCommands;
using JetBrains.Annotations;
namespace GitUIPluginInterfaces
{
public interface IGitUICommands
{
event EventHandler<GitUIPostActionEventArgs> PostCommit;
event EventHandler<GitUIEventArgs> PostRepositoryChanged;
event EventHandler<GitUIPostActionEventArgs> PostSettings;
event EventHandler<GitUIPostActionEventArgs> PostUpdateSubmodules;
event EventHandler<GitUIEventArgs> PostBrowseInitialize;
event EventHandler<GitUIEventArgs> PostRegisterPlugin;
event EventHandler<GitUIEventArgs> PreCommit;
[NotNull]
IGitModule GitModule { get; }
IGitRemoteCommand CreateRemoteCommand();
/// <summary>
/// RepoChangedNotifier.Notify() should be called after each action that changes repo state
/// </summary>
ILockableNotifier RepoChangedNotifier { get; }
void StartCommandLineProcessDialog(IWin32Window owner, string command, ArgumentString arguments);
bool StartCommandLineProcessDialog(IWin32Window owner, IGitCommand command);
void StartBatchFileProcessDialog(string batchFile);
bool StartSettingsDialog(IGitPlugin gitPlugin);
void AddCommitTemplate(string key, Func<string> addingText, Image icon);
void RemoveCommitTemplate(string key);
}
}
| vbjay/gitextensions | Plugins/GitUIPluginInterfaces/IGitUICommands.cs | C# | gpl-3.0 | 1,400 |
/*********************************************************************************************
*
* 'IToolbarDecoratedView.java, in plugin ummisco.gama.ui.shared, is part of the source code of the GAMA modeling and
* simulation platform. (v. 1.8.1)
*
* (c) 2007-2020 UMI 209 UMMISCO IRD/UPMC & Partners
*
* Visit https://github.com/gama-platform/gama for license information and developers contact.
*
*
**********************************************************************************************/
package ummisco.gama.ui.views.toolbar;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbenchSite;
import msi.gama.outputs.IDisplayOutput;
import ummisco.gama.ui.resources.GamaColors.GamaUIColor;
/**
* Class IToolbarDecoratedView.
*
* @author drogoul
* @since 7 déc. 2014
*
*/
public interface IToolbarDecoratedView {
IWorkbenchSite getSite();
void createToolItems(GamaToolbar2 tb);
default void addStateListener(final StateListener listener) {};
public interface StateListener {
void updateToReflectState();
}
public interface Pausable extends IToolbarDecoratedView {
void pauseChanged();
IDisplayOutput getOutput();
void synchronizeChanged();
}
public interface Sizable extends IToolbarDecoratedView {
Control getSizableFontControl();
}
public interface Colorizable extends IToolbarDecoratedView {
String[] getColorLabels();
GamaUIColor getColor(int index);
void setColor(int index, GamaUIColor c);
}
public interface CSVExportable extends IToolbarDecoratedView {
void saveAsCSV();
}
public interface Zoomable extends IToolbarDecoratedView {
void zoomIn();
void zoomOut();
void zoomFit();
/**
* @return the controls that will react to gestures / mouse doucle-cliks
*/
Control[] getZoomableControls();
/**
* @return true if the scroll triggers the zooming
*/
boolean zoomWhenScrolling();
}
}
| gama-platform/gama | ummisco.gama.ui.shared/src/ummisco/gama/ui/views/toolbar/IToolbarDecoratedView.java | Java | gpl-3.0 | 1,913 |
<!DOCTYPE html>
<html lang="en">
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
<head>
<base href="//www.vivotek.com/website/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>IB836B-HT | VIVOTEK Bullet Network Camera | 2MP | 30M IR | Smart IR | IP66 | Cable Management | IP66 | IK10 | WDR Pro | SNV | P-iris | Remote Focus</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="VIVOTEK Bullet Network Camera IB836B-HT - 2MP | 30M IR | Smart IR | IP66 | Cable Management | IP66 | IK10 | WDR Pro | SNV | P-iris | Remote Focus - All-in-one outdoor cameras capable of capturing high quality and high resolution, especially in low light environment.">
<meta name="keyword" content="vivotek, bullet network camera, ib836b-ht, 2mp, 30m ir, smart ir, ip66, cable management, smart stream, low light">
<meta name="author" content="VIVOTEK">
<!-- SCHEMA.ORG MARKUP FOR FACEBOOK -->
<meta property="og:title" content="IB836B-HT | VIVOTEK Bullet Network Camera | 2MP | 30M IR | Smart IR | IP66 | Cable Management | IP66 | IK10 | WDR Pro | SNV | P-iris | Remote Focus" >
<meta property="og:url" content="https://www.vivotek.com/website/ib836b-ht/">
<meta property="og:image" content="https://www.vivotek.com/website/image/products/banner/ib836b-ht.jpg">
<meta property="og:description" content="VIVOTEK Bullet Network Camera IB836B-HT - 2MP | 30M IR | Smart IR | IP66 | Cable Management | IP66 | IK10 | WDR Pro | SNV | P-iris | Remote Focus - IB836B-HT is a stylish, bullet-style network cameras designed for diverse outdoor applications and offering a complete range of options." >
<meta property="og:site_name" content="VIVOTEK"/>
<!-- TWITTER CARD DATA -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@vivotek">
<meta name="twitter:creator" content="@vivotek">
<!-- OTHER OPEN GRAPH DATA -->
<meta property="og:type" content="product" />
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/fontello/fontello.min.css">
<link rel="stylesheet" href="css/fontello/animation.css">
<link rel="stylesheet" href="css/jplist/styles.min.css">
<link rel="stylesheet" href="css/jplist/jplist.min.css">
<link rel="stylesheet" href="css/rus/jquery.tosrus.all.css">
<link rel="stylesheet" href="css/mgmenu_universal/mgmenu.min.css">
<link rel="stylesheet" href="css/zozotabs/zozo.tabs.min.css">
<link rel="stylesheet" href="css/zozotabs/zozo.tabs.flat.min.css">
<link rel="stylesheet" href="css/vivotek.min.css">
<style type="text/css">
.jplist-grid-view .list-item .block .dl_btn { display: block; height: 3.8em;}
.jplist-grid-view .jplist_tbale_pro .list-item-img .img img { width: 90px; height: 128px; border: 0; border-radius: 0;}
.jplist-grid-view .list-item .block .dl_btn_qig, .jplist-grid-view .list-item .block .dls { display: block; height: 3.8em;}
</style>
<!--[if lt IE 9]>
<link rel="stylesheet" href="image/all/iconic/font/css/iconic-glyphs-legacy.css">
<![endif]-->
<script src="//www.google-analytics.com/ga.js"></script>
<script src="js/modernizr/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<!-- BROWSER FAVICON -->
<link rel="icon" href="image/all/VIVOTEK_icon.ico">
<!-- iPad RETINA -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="image/all/VIVOTEK_icon_ipad_r.png">
<!-- iPhone RETINA -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="image/all/VIVOTEK_icon_iphone_r.png">
<!-- iPad -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="image/all/VIVOTEK_icon_ipad.png">
<!-- iPhone -->
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="image/all/VIVOTEK_icon_iphone.png">
</head>
<body class="homebody">
<!--[if lt IE 7]>
<p class="chromeframe">
You are using an <strong>outdated</strong>
browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a>
or
<a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a>
to improve your experience.
</p>
<![endif]-->
<!-- NAV MEGA MENU START -->
<div class="navbar navbar-static-top vivotek_home_navbar" role="navigation">
<!-- <div class="navbar navbar-default navbar-static-top vivotek_home_navbar" role="navigation"> -->
<!-- !LOGO AND LANGUAGE START -->
<a name="top"></a>
<div class="container-fluid bg_white">
<div class="row">
<div class="col-xs-0 col-sm-0 col-md-0 col-lg-1"></div>
<div class="col-xs-10 col-sm-10 col-md-9 col-lg-8"><div class="div_clear_8"></div><a href="/" target="_self"><img src="image/all/VIVOTEK_logo.svg" class="vivotek_logoimg" /></a><div class="div_clear_8"></div></div>
<!-- <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
<div class="div_clear_1_68"></div>
<div class="btn-group pull-right vivotek_lang">
<h1 class="sr-only">Language Navigation</h1>
<nav>
<button type="button" class="btn btn-default dropdown-toggle vivotek_nav_dropdown-toggle" data-toggle="dropdown">
<i class="icon-fontello-globe-3 blue font_size_138"></i>
<span class="caret"></span>
</button>
<ul class="dropdown-menu vivotek_lang_dropdown-menu">
<li>
<a target="_self" href="ip8362/" class="active">
<h1>English</h1>
</a>
</li>
<li>
<a target="_self" href="de/ip8362/">
<h1>Deutsch</h1>
</a>
</li>
<li>
<a target="_self" href="es/ip8362/">
<h1>Español</h1>
</a>
</li>
<li>
<a target="_self" href="fr/ip8362/">
<h1>Français</h1>
</a>
</li>
<li>
<a target="_self" href="jp/ip8362/">
<h1>日本語</h1>
</a>
</li>
<li>
<a target="_self" href="pt/ip8362/">
<h1>Português</h1>
</a>
</li>
<li>
<a target="_self" href="ru/ip8362/">
<h1>Русский</h1>
</a>
</li>
<li>
<a target="_self" href="tw/ip8362/">
<h1>繁體中文</h1>
</a>
</li>
<li>
<a target="_self" href="cn/ip8362/">
<h1>简体中文</h1>
</a>
</li>
</ul>
</nav>
</div>
</div> -->
<div class="col-xs-0 col-sm-0 col-md-1 col-lg-1"></div>
</div>
</div>
<!-- !LOGO AND LANGUAGE END -->
</div>
</div>
<!-- NAV MEGA MENU CONTAINER END -->
</div>
<!-- NAV MEGA MENU END -->
<!-- !CONTENT MAIN START -->
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="pro_head">VIVOTEK - 2MP | 30M IR | Smart IR | IP66 | Cable Management | IP66 | IK10 | WDR Pro | SNV | P-iris | Remote Focus | Bullet Network Camera IB836B-HT</h1>
<img src="image/products/banner/ib836b-ht.jpg" alt="IB836B-HT" class="width_100">
</div>
<!-- ZOZO TABS START -->
<div id="tabbed-nav" class="pro">
<ul>
<li data-link="overview"><a>Overview</a></li>
<li data-link="specifications"><a>Specifications</a></li>
<li data-link="video"><a>Video</a></li>
<li data-link="downloads"><a>Downloads</a></li>
<li data-link="accessorie"><a>Accessories</a></li>
<li data-link="others"><a>Others</a></li>
<!-- <li data-link="success"><a>Success Stories</a></li> -->
</ul>
<!-- OVERVIEW TAB START -->
<div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<h4 class="red_5"><strong>This model is discontinued. The recommended replacement is <a href="ib836ba-ht/" target="_blank" class="red_5"><u>IB836BA-HT</u></a>.</strong></h4>
<h3>Overview</h3>
<p class="t84">VIVOTEK's IB836B-HT is a stylish, bullet-style network cameras designed for diverse outdoor applications and offering a complete range of options. Equipped with a 2MP Full HD sensor enabling viewing resolution of 1920x1080 at a smooth 30 fps, the IB836B-HT is an all-in-one outdoor camera capable of capturing high quality and high resolution video up to 2 Megapixel with WDR and SNV technology, no matter whether in high contrast or in low light environments.</p>
<p class="t84">IB836B-HT provides remote focus with built-in stepping motors and P-iris to provide precise adjustment remotely. To meet the demands of outdoor and harsh applications, VIVOTEK's IB836B-HT is also armed with IP66-rated housing to help the camera body withstand rain, dust and high pressure water jets from any direction, while its IK10-rated housing provides robust protection against acts of vandalism or other impacts.</p>
<p class="t84">When choosing VIVOTEK IB836B-H series, customers will be offered four options: the IB836B-HF3, IB836B-EHF3, IB836B-HT, and IB836B-EHT. Different options can be chosen based on the requirements of your application, such as focusing method or operating environment temperature.</p>
<h3>Key Features</h3>
<ul class="pro_ul_t84">
<li>2-Megapixel CMOS Sensor</li>
<li>30 fps @ 1920x1080</li>
<li>2.8 ~ 12 mm, Remote Focus, P-iris Lens</li>
<li>Removable IR-cut Filter for Day & Night Function</li>
<li>Built-in IR Illuminators, Effective up to 30 Meters</li>
<li>Smart IR Technology to Avoid Overexposure</li>
<li>WDR for Unparalleled Visibility in Extremely Bright and Dark Environments</li>
<li>SNV (Supreme Night Visibility) for Low Light Conditions</li>
<li>3D Noise Reduction</li>
<li>Video Rotation for Corridor View</li>
<li>Weather-proof IP66-rated and Vandal-proof IK10-rated Housing</li>
<li>VIVOTEK VCA (Video Content Analysis) Support</li>
</ul>
<div class="div_clear_18"></div>
<h3>Cloud-based Solution</h3>
<div class="div_clear_8"></div>
<a href="https://www.vivotek.com/website/cloud-based_solution/" target="_blank">
<img src="image/pressroom/feature_article/stratocast/stratocast_logo.jpg" alt="Stratocast™">
</a>
<div class="div_clear_38"></div>
<h3>Documents</h3>
<!-- JPLIST TABLE START -->
<div id="demoover" class="box jplist">
<!-- FILTER PANEL START -->
<div class="jplist-panel box panel-top">
<div
class="jplist-views"
data-control-type="views"
data-control-name="views"
data-control-action="views"
data-default="jplist-grid-view"
style="display:none;">
<button type="button" class="jplist-view jplist-list-view" data-type="jplist-list-view"></button>
<button type="button" class="jplist-view jplist-grid-view" data-type="jplist-grid-view"></button>
<button type="button" class="jplist-view jplist-thumbs-view" data-type="jplist-thumbs-view"></button>
</div>
</div>
<!-- FILTER PANEL END -->
<!-- DATA START -->
<div class="list box text-shadow jplist_tbale_area jplist_tbale_pro">
<!-- ALIGNMENT STICKER -->
<!-- <div class="list-item box">
<div class="img"><img data-file-extension="Sti" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Alignment Sticker</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/alignmentsticker/cc8130alignmentsticker.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- DATASHEETS -->
<div class="list-item box">
<div class="img"><img data-file-extension="DS" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Datasheets</h1>
<div class="div_clear_1_08"></div>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_en.pdf" target="_blank" class="btn btn-default btn-sm">English</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_de.pdf" target="_blank" class="btn btn-default btn-sm">Deutsch</a> -->
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_es.pdf" target="_blank" class="btn btn-default btn-sm">Español</a>
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_fr.pdf" target="_blank" class="btn btn-default btn-sm">Français</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_it.pdf" target="_blank" class="btn btn-default btn-sm">Italiano</a> -->
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_pt.pdf" target="_blank" class="btn btn-default btn-sm">Português</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_ru.pdf" target="_blank" class="btn btn-default btn-sm">Русский</a> -->
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_tw.pdf" target="_blank" class="btn btn-default btn-sm">繁體中文</a> -->
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_cn.pdf" target="_blank" class="btn btn-default btn-sm">简体中文</a> -->
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- Webinar -->
<div class="list-item box">
<div class="img"><img data-file-extension="" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Webinar</h1>
<div class="div_clear_1_08"></div>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/videoclips/v-pro_2mp_webinar_1920_1080.zip" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- POE INDUSTIAL MEDIA CONVERTERS SUMMARY -->
<!-- <div class="list-item box">
<div class="img"><img src="image/all/icon_products/v-pro_2mp_summary.png" alt="V-Pro Line (2MP) Summary" style="border: solid 10px rgba(201,229,202,1); border: solid 10px rgba(255,255,255,1)"></div>
<div class="div_clear_1_08"></div>
<div class="block">
<h1 class="jplist_dl_title">V-Pro Line (2MP) Summary</h1>
<div class="div_clear_1_08"></div>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/summary/v-pro_2mp_summary_en.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- V-Pro Line Brochure -->
<!-- <div class="list-item list-item-img box">
<div class="img"><img data-file-extension="Brochure" src="image/all/icon_products/v-pro_line_brochure.png" alt="V-Pro Line Brochure"></div>
<div class="div_clear_8"></div>
<div class="block">
<h1 class="jplist_dl_title">V-Pro Line Brochure</h1>
<div class="div_clear_8"></div>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/brochure/v-pro_line_brochure_en.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
</div>
</div> -->
<!-- VIDEO -->
<!-- <div class="list-item box">
<div class="img"><img data-file-extension="" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Footage</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/videoclips/ib836b-ht_footage_1920_1080.zip" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
</div>
<!-- DATA END -->
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
<!-- OVERVIEW TAB END -->
<!-- SPEC. TAB START -->
<div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<h3>Specifications</h3>
<table class="pro_table_t84">
<tbody>
<tr>
<td>
Model
</td>
<td>
IB836B-HT: Vari-focal, P-iris, Remote Focus
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
System Information
</td>
</tr>
<tr>
<td>
CPU
</td>
<td>
Multimedia SoC (System-on-Chip)
</td>
</tr>
<tr>
<td>
Flash
</td>
<td>
1Gb
</td>
</tr>
<tr>
<td>
RAM
</td>
<td>
2Gb
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Camera Features
</td>
</tr>
<tr>
<td>
Image Sensor
</td>
<td>
1/2.8" Progressive CMOS
</td>
</tr>
<tr>
<td>
Maximum Resolution
</td>
<td>
1920x1080 (2MP)
</td>
</tr>
<tr>
<td>
Lens Type
</td>
<td>
Vari-focal, Remote Focus
</td>
</tr>
<tr>
<td>
Focal Length
</td>
<td>
f = 2.8 ~ 12 mm
</td>
</tr>
<tr>
<td>
Aperture
</td>
<td>
F1.8 ~ F2.85
</td>
</tr>
<tr>
<td>
Auto-iris
</td>
<td>
P-iris
</td>
</tr>
<tr>
<td>
Field of View
</td>
<td>
32° ~ 101° (Horizontal) <br>
17° ~ 55° (Vertical) <br>
37° ~ 121° (Diagonal)
</td>
</tr>
<tr>
<td>
Shutter Time
</td>
<td>
1/5 sec. to 1/32,000 sec.
</td>
</tr>
<tr>
<td>
WDR Technology
</td>
<td>
WDR
</td>
</tr>
<tr>
<td>
Day/Night
</td>
<td>
Removable IR-cut filter for day & night function
</td>
</tr>
<tr>
<td>
Minimum Illumination
</td>
<td>
0.03 Lux @ F1.8 (Color)<br>
0.001 Lux @ F1.8 (B/W)
</td>
</tr>
<tr>
<td>
Pan/tilt/zoom Functionalities
</td>
<td>
ePTZ:
<br>48x digital zoom (4x on IE plug-in, 12x built in)
</td>
</tr>
<tr>
<td>
IR Illuminators
</td>
<td>
Built-in IR illuminators, effective up to 30 meters
<br>with Smart IR
<br>IR LED*8
</td>
</tr>
<tr>
<td>
On-board Storage
</td>
<td>
Slot type: SD/SDHC/SDXC card slot<br>
Seamless Recording
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Video
</td>
</tr>
<tr>
<td>
Compression
</td>
<td>
H.264 & MJPEG
</td>
</tr>
<tr>
<td>
Maximum Frame Rate
</td>
<td>
30 fps @ 1920x1080
<br>In both compression modes
</td>
</tr>
<tr>
<td>
Maximum Streams
</td>
<td>
4 simultaneous streams
</td>
</tr>
<tr>
<td>
S/N Ratio
</td>
<td>
Above 58 dB
</td>
</tr>
<tr>
<td>
Dynamic Range
</td>
<td>
100 dB
</td>
</tr>
<tr>
<td>
Video Streaming
</td>
<td>
Adjustable resolution, quality and bitrate, Smart Stream
</td>
</tr>
<tr>
<td>
Image Settings
</td>
<td>
Adjustable image size, quality and bit rate, Time stamp, text overlay, flip & mirror, Configurable brightness, contrast, saturation, sharpness, white balance, exposure control, gain, backlight compensation, privacy masks, Scheduled profile settings, 3D Noise Reduction, Video Rotation, Defog
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Audio
</td>
</tr>
<tr>
<td>
Audio Capability
</td>
<td>
Two-way audio (full duplex)
</td>
</tr>
<tr>
<td>
Compression
</td>
<td>
G.711, G.726
</td>
</tr>
<tr>
<td>
Interface
</td>
<td>
External microphone input
<br>Audio output
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Network
</td>
</tr>
<tr>
<td>
Users
</td>
<td>
Live viewing for up to 10 clients
</td>
</tr>
<tr>
<td>
Protocols
</td>
<td>
IPv4, IPv6, TCP/IP, HTTP, HTTPS, UPnP, RTSP/RTP/RTCP, IGMP, SMTP, FTP, DHCP, NTP, DNS, DDNS, PPPoE, CoS, QoS, SNMP, 802.1X, UDP, ICMP, ARP, SSL, TLS
</td>
</tr>
<tr>
<td>
Interface
</td>
<td>
10 Base-T/100 BaseTX Ethernet (RJ-45)<br>
*It is highly recommended to use standard Cat. 5e & Cat. 6 cables which are compliant with the 3P/ETL standard.
</td>
</tr>
<tr>
<td>
ONVIF
</td>
<td>
Supported, specification available at www.onvif.org
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Intelligent Video
</td>
</tr>
<tr>
<td>
Video Motion Detection
</td>
<td>
Five-window video motion detection
</td>
</tr>
<tr>
<td>
VCA*
</td>
<td>
Line crossing detection, field detection, loitering detection
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Alarm and Event
</td>
</tr>
<tr>
<td>
Alarm Triggers
</td>
<td>
Motion detection, manual trigger, digital input, periodical trigger, system boot, recording notification, camera tampering detection, audio detection
</td>
</tr>
<tr>
<td>
Alarm Events
</td>
<td>
Event notification using digital output, HTTP, SMTP, FTP, NAS server and SD Card<br>
File upload via HTTP, SMTP, FTP, NAS server and SD card
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
General
</td>
</tr>
<tr>
<td>
Smart Focus System
</td>
<td>
Remote Focus
</td>
</tr>
<tr>
<td>
Connectors
</td>
<td>
RJ-45 cable connector for Network/PoE connection
<br>Audio input
<br>Audio output
<br>DC 12V power input
<br>Digital input*1
<br>Digital output*1
</td>
</tr>
<tr>
<td>
LED Indicator
</td>
<td>
System power and status indicator
</td>
</tr>
<tr>
<td>
Power Input
</td>
<td>
DC 12V
<br>IEEE 802.3af/at PoE Class 0
</td>
</tr>
<tr>
<td>
Power Consumption
</td>
<td>
Max. 13 W
</td>
</tr>
<tr>
<td>
Dimensions
</td>
<td>
Ø 88 x 293 mm
</td>
</tr>
<tr>
<td>
Weight
</td>
<td>
Net: 1264 g
</td>
</tr>
<tr>
<td>
Casing
</td>
<td>
Weather-proof IP66-rated housing<br/>
Vandal-proof IK10-rated metal housing (Casing Only)
</td>
</tr>
<tr>
<td>
Safety Certifications
</td>
<td>
CE, LVD, FCC Class A, VCCI, C-Tick, UL
</td>
</tr>
<tr>
<td>
Operating Temperature
</td>
<td>
Starting Temperature: -10°C ~ 50°C (14°F~ 122°F)
<br>Working Temperature: -20°C ~ 50°C (-4°F~ 122°F)
</td>
</tr>
<tr>
<td>
Warranty
</td>
<td>
36 months
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
System Requirements
</td>
</tr>
<tr>
<td>
Operating System
</td>
<td>
Microsoft Windows 7/8/Vista/XP/2000
</td>
</tr>
<tr>
<td>
Web Browser
</td>
<td>
Mozilla Firefox 7~43 (Streaming only)
<br>Internet Explorer 7/8/9/10/11
</td>
</tr>
<tr>
<td>
Other Players
</td>
<td>
VLC: 1.1.11 or above
<br>Quicktime: 7 or above
</td>
</tr>
<tr class="spec_cal">
<td colspan="2">
Included Accessories
</td>
</tr>
<tr>
<td>
CD
</td>
<td>
User's manual, quick installation guide, Installation Wizard 2, ST7501 32-channel recording software
</td>
</tr>
<tr>
<td>
Others
</td>
<td>
Quick installation guide, warranty card, sun shield, wall mount bracket, alignment sticker/desiccant bag, waterproof connector, screw pack
</td>
</tr>
</tbody>
</table>
<div class="div_clear_8"></div>
<i>* Available per project request</i>
<div class="div_clear_88"></div>
</div>
<div class="col-md-1"></div>
</div>
</div>
<!-- SPEC. TAB END -->
<!-- VIDEO TAB START -->
<div>
<div class="row">
<div class="col-xs-1 hidden-md hidden-lg"></div>
<div class="col-xs-10 col-md-6">
<h3>VIVOTEK V-Pro Line (2MP) Webinar</h3>
<div class="pro_tab_video embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/DQ6kp-LykBo?showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="video_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/videoclips/v-pro_2mp_webinar_1920_1080.zip" target="_blank" class="btn btn-default btn-sm">Download Video</a>
</div>
</div>
<div class="col-xs-1 hidden-md hidden-lg"></div>
</div>
</div>
<!-- VIDEO TAB END -->
<!-- DOWNLOAD TAB START -->
<div>
<div class="row">
<div class="col-md-12">
<h3>Downloads</h3>
<!-- JPLIST TABLE START -->
<div id="demodl" class="box jplist">
<!-- FILTER PANEL START -->
<div class="jplist-panel box panel-top">
<div
class="jplist-views"
data-control-type="views"
data-control-name="views"
data-control-action="views"
data-default="jplist-grid-view"
style="display:none;">
<button type="button" class="jplist-view jplist-list-view" data-type="jplist-list-view"></button>
<button type="button" class="jplist-view jplist-grid-view" data-type="jplist-grid-view"></button>
<button type="button" class="jplist-view jplist-thumbs-view" data-type="jplist-thumbs-view"></button>
</div>
</div>
<!-- FILTER PANEL END -->
<!-- DATA START -->
<div class="list box text-shadow jplist_tbale_area jplist_tbale_pro">
<!-- ALIGNMENT STICKER -->
<!-- <div class="list-item box">
<div class="img"><img data-file-extension="Sti" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Alignment Sticker</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/alignmentsticker/ib836b-htalignmentsticker.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- DATASHEETS -->
<div class="list-item box">
<div class="img"><img data-file-extension="DS" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Datasheets</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_en.pdf" target="_blank" class="btn btn-default btn-sm">English</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_de.pdf" target="_blank" class="btn btn-default btn-sm">Deutsch</a> -->
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_es.pdf" target="_blank" class="btn btn-default btn-sm">Español</a>
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_fr.pdf" target="_blank" class="btn btn-default btn-sm">Français</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_it.pdf" target="_blank" class="btn btn-default btn-sm">Italiano</a> -->
<a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_pt.pdf" target="_blank" class="btn btn-default btn-sm">Português</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_ru.pdf" target="_blank" class="btn btn-default btn-sm">Русский</a> -->
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_tw.pdf" target="_blank" class="btn btn-default btn-sm">繁體中文</a> -->
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/datasheets/ib836bdatasheet_cn.pdf" target="_blank" class="btn btn-default btn-sm">简体中文</a> -->
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- FIRMWARE -->
<div class="list-item box">
<div class="img"><img data-file-extension="FW" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Firmware</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/firmware/ib836b-htfirmware.zip" target="_blank" class="btn btn-default btn-sm">Ver. 0106b</a>
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- PLUGIN -->
<!-- <div class="list-item box">
<div class="img"><img data-file-extension="PI" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Plug-in</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/plugin/vivotek_milestone_fisheye_plugin_x64.zip" target="_blank" class="btn btn-default btn-sm">Milestone Enhancer x64</a>
<a href="http://download.vivotek.com/downloadfile/downloads/plugin/vivotek_milestone_fisheye_plugin_x86.zip" target="_blank" class="btn btn-default btn-sm">Milestone Enhancer x86</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- PHOTOS -->
<div class="list-item box">
<div class="img"><img data-file-extension="PIC" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">PHOTOS</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/productimages/ib836b-ht.png" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- QIG -->
<div class="list-item box">
<div class="img"><img data-file-extension="QIG" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Quick Guides</h1>
<div class="dl_btn_qig">
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_en.pdf" target="_blank" class="btn btn-default btn-sm">English</a>
<!-- <a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_ar.pdf" target="_blank" class="btn btn-default btn-sm">العربية</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_cs.pdf" target="_blank" class="btn btn-default btn-sm">Čeština</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_de.pdf" target="_blank" class="btn btn-default btn-sm">Deutsch</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_es.pdf" target="_blank" class="btn btn-default btn-sm">Español</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_it.pdf" target="_blank" class="btn btn-default btn-sm">Italiano</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_fr.pdf" target="_blank" class="btn btn-default btn-sm">Français</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_jp.pdf" target="_blank" class="btn btn-default btn-sm">日本语</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_pl.pdf" target="_blank" class="btn btn-default btn-sm">Polski</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_pt.pdf" target="_blank" class="btn btn-default btn-sm">Português</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_ru.pdf" target="_blank" class="btn btn-default btn-sm">Русский</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_sv.pdf" target="_blank" class="btn btn-default btn-sm">Svenska</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_tu.pdf" target="_blank" class="btn btn-default btn-sm">Türk</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_tw.pdf" target="_blank" class="btn btn-default btn-sm">繁體中文</a>
<a href="http://download.vivotek.com/downloadfile/downloads/quickguides/ib836bguide_cn.pdf" target="_blank" class="btn btn-default btn-sm">简体中文</a> -->
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- SOFTWARE -->
<!-- <div class="list-item box">
<div class="img"><img data-file-extension="VAST" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">VAST</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/software/vast_aio.zip" target="_blank" class="btn btn-default btn-sm">AIO 1.9.0.8</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- MANUAL -->
<div class="list-item box">
<div class="img"><img data-file-extension="Man" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">User's Manual</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/usersmanuals/ib836bmanual_en.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- Webinar -->
<div class="list-item box">
<div class="img"><img data-file-extension="" data-src="image/all/iconic/svg/smart/file.svg" class="iconic iconic-md iconic-size-lg" alt="file"></div>
<div class="block">
<h1 class="jplist_dl_title">Webinar</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/videoclips/v-pro_2mp_webinar_1920_1080.zip" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div>
<!-- POE INDUSTIAL MEDIA CONVERTERS SUMMARY -->
<!-- <div class="list-item box">
<div class="img"><img src="image/all/icon_products/v-pro_2mp_summary.png" alt="V-Pro Line (2MP) Summary" style="height:138px;border: solid 10px rgba(201,229,202,1); border: solid 10px rgba(255,255,255,1)"></div>
<div class="block">
<h1 class="jplist_dl_title">V-Pro Line (2MP) Summary</h1>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/summary/v-pro_2mp_summary_en.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
<div class="div_clear_18"></div>
</div>
</div> -->
<!-- V-Pro Line Brochure -->
<!-- <div class="list-item list-item-img box">
<div class="img"><img data-file-extension="Brochure" src="image/all/icon_products/v-pro_line_brochure.png" alt="V-Pro Line Brochure"></div>
<div class="div_clear_8"></div>
<div class="block">
<h1 class="jplist_dl_title">V-Pro Line Brochure</h1>
<div class="div_clear_8"></div>
<div class="dl_btn">
<a href="http://download.vivotek.com/downloadfile/downloads/brochure/v-pro_line_brochure_en.pdf" target="_blank" class="btn btn-default btn-sm">Download</a>
</div>
</div>
</div> -->
</div>
<!-- DATA END -->
</div>
<!-- JPLIST TABLE END -->
</div>
</div>
</div>
<!-- DOWNLOAD TAB END -->
<!-- ACCESSORIES TAB START -->
<div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="row">
<div class="col-md-5">
<h3>Accessories</h3>
<a href="http://download.vivotek.com/downloadfile/products/accessories/ib836b_accessories.pdf" target="_blank">
<img src="image/products/others/ib836b_acc.jpg" alt="" class="width_100 text_center">
</a>
<div class="div_clear_8"></div>
<div class="dl_btn text_center">
<a href="http://download.vivotek.com/downloadfile/products/accessories/ib836b_accessories.pdf" target="_blank" class="btn btn-default btn-sm">More Info. >></a>
</div>
</div>
<div class="col-md-2"></div>
<div class="col-md-5">
<h3>PoE Solution</h3>
<a href="https://www.vivotek.com/website/poe.html#series-filter:path=default|type-filter:path=default|views:view=jplist-grid-view" target="_blank">
<img src="image/products/poe/products_45_poe_application_model.jpg" alt="" class="width_100">
</a>
<div class="dl_btn text_center">
<a href="https://www.vivotek.com/website/poe.html#series-filter:path=default|type-filter:path=default|views:view=jplist-grid-view" target="_blank" class="btn btn-default btn-sm">More Info. >></a>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
</div>
<!-- ACCESSORIES TAB END -->
<!-- OTHERS TAB START -->
<div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="pro_others">
<!-- <h3>Product Front View</h3>
<img src="image/products/view/ib836b-htfview.png" alt="IB836B-HT - Front View">
<h3>Product Rear View</h3>
<img src="image/products/view/ib836b-htrview.png" alt="IB836B-HT - Rear View"> -->
<!-- <h3>Product Internal View</h3>
<img src="image/products/view/ib836b-ehf3iview.png" alt="IB836B-HT - Internal View"> -->
<!-- <h3>Product Outer View</h3>
<img src="image/products/view/ib836b-htoview.png" alt="IB836B-HT - Outer View"> -->
<h3>What's included</h3>
<img src="image/products/include/ib836b-ehf3.png" alt="IB836B-HT - What's included">
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
<!-- OTHERS TAB END -->
<!-- SUCCESS STORIES TAB START -->
<!-- <div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<h3>Success Stories</h3> -->
<!-- JPLIST TABLE START -->
<!-- <div id="demosuccess" class="box jplist"> -->
<!-- FILTER PANEL START -->
<!-- <div class="jplist-panel box panel-top">
<div
class="jplist-views"
data-control-type="views"
data-control-name="views"
data-control-action="views"
data-default="jplist-grid-view"
style="display:none;">
<button type="button" class="jplist-view jplist-list-view" data-type="jplist-list-view"></button>
<button type="button" class="jplist-view jplist-grid-view" data-type="jplist-grid-view"></button>
<button type="button" class="jplist-view jplist-thumbs-view" data-type="jplist-thumbs-view"></button>
</div>
</div> -->
<!-- FILTER PANEL END -->
<!-- DATA START -->
<!-- <div class="list box text-shadow jplist_tbale_area jplist_tbale_pro">
<div class="list-item box"> --><!-- 140 -->
<!-- <div class="img"><a href="an-ip-surveillance-system-enabled-students-at-national-chi-nan-university-to-use-the-library-safely-and-effectively/" target="_blank"><img src="image/pressroom/successstories/success_140_list.jpg" alt="An IP Surveillance System Enabled Students at National Chi Nan University to Use the Library Safely and Effectively"/></a></div>
<div class="block">
<p class="t84 title"><a href="an-ip-surveillance-system-enabled-students-at-national-chi-nan-university-to-use-the-library-safely-and-effectively/" target="_blank">An IP Surveillance System Enabled Students at National Chi Nan University to Use the Library Safely and Effectively</a></p>
<p class="t84 theme">
<span class="education"><span class="iconic iconic-globe" title="Category" aria-hidden="true"></span> Education</span>
<span class="iran"><span class="iconic iconic-globe" title="Country" aria-hidden="true"></span> Iran</span>
<span class="cc8130 fd8135h ib836b-ht"><span class="iconic iconic-video" title="Support Model" aria-hidden="true"></span> CC8130 FD8135H IB836B-HT</span>
</p>
</div>
</div>
</div> -->
<!-- DATA END -->
<!-- </div> -->
<!-- JPLIST TABLE END -->
<!-- <div class="col-md-1"></div>
</div>
</div>
</div> -->
<!-- SUCCESS STORIES TAB END -->
</div>
<!-- ZOZO TABS END -->
<div class="container-fluid sia_pro_apply">
<div class="row align_center">
<div class="col-sm-12">
<div class="border_top_dot_w1_gray"></div>
<div class="div_clear_68"></div>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style pro">
<a class="addthis_button_facebook pro"><i class="icon-fontello-facebook"></i></a>
<a class="addthis_button_twitter pro"><i class="icon-fontello-twitter"></i></a>
<a class="addthis_button_pinterest_share pro"><i class="icon-fontello-pinterest"></i></a>
<a class="addthis_button_linkedin pro"><i class="icon-fontello-linkedin"></i></a>
<a class="addthis_button_email pro"><i class="icon-fontello-at"></i></a>
<a class="addthis_button_qrfin pro"><i class="icon-fontello-qrcode"></i></a>
<a class="addthis_button_compact pro"><i class="icon-fontello-share"></i></a>
</div>
<div class="div_clear_38"></div>
<a href="#top" class="gototop pro"><i class="icon-fontello-angle-up"></i></a>
<div class="div_clear_38"></div>
</div>
</div>
</div>
</div>
</div>
<!-- !CONTENT MAIN END -->
<footer id="footer"></footer>
<!-- !JAVASCRIPT START -->
<script>
$("#nav").load("//www.vivotek.com/website/nav.html");
$("#footer").load("//www.vivotek.com/website/footer.html");
</script>
<!-- !MEGA MENU UNIVERSAL JAVASCRIPT START -->
<script src="js/mgmenu_universal/mgmenu_plugins.min.js"></script>
<script src="js/mgmenu_universal/mgmenu.min.js"></script>
<script>
$(document).ready(function($) {
$('#mgmenu1').universalMegaMenu({
menu_effect: 'hover_fade',
menu_speed_show: 300,
menu_speed_hide: 200,
menu_speed_delay: 200,
menu_click_outside: true,
menubar_trigger: false,
menubar_hide: false,
menu_responsive: true
});
megaMenuContactForm();
});
</script>
<!-- !MEGA MENU UNIVERSAL JAVASCRIPT END -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery/jquery-1.10.1.min.js"><\/script>')</script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/bootstrap/application.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js"></script>
<script src="js/bootstrap/highlight.min.js"></script>
<script src="js/bootstrap/holder.min.js"></script>
<script src="js/bootstrap/jquery.min.js"></script>
<!-- !ICONIC 字型 START -->
<script src="js/iconic/iconic.min.js"></script>
<!-- !ICONIC 字型 END -->
<!-- !ZOZOTABS JAVASCRIPT START -->
<script src="js/zozotabs/zozo.tabs.min.js"></script>
<script>
jQuery(document).ready(function ($) {
$("#tabbed-nav").zozoTabs({
bordered:false,
deeplinking: true,
defaultTab: "overview",
position: "top-compact",
rounded: false,
spaced: true,
style: "clean",
theme: "flat-alizarin",
animation: {
easing: "easeInOutExpo",
duration: 600,
effects: "slideH"
},
size:"large"
});
});
</script>
<!-- !ZOZOTABS JAVASCRIPT END -->
<!-- !JPLIST 表格篩選 START -->
<script src="js/jplist/jplist.min.js"></script>
<script>
$('document').ready(function(){
$('#demoover').jplist({
itemsBox: '.list'
,itemPath: '.list-item'
,panelPath: '.jplist-panel'
,deepLinking: true
,'views':{
className: 'Views'
,options: {}
}
});
$('#demodl').jplist({
itemsBox: '.list'
,itemPath: '.list-item'
,panelPath: '.jplist-panel'
,deepLinking: true
,'views':{
className: 'Views'
,options: {}
}
});
$('#demoacc').jplist({
itemsBox: '.list'
,itemPath: '.list-item'
,panelPath: '.jplist-panel'
,deepLinking: true
,'views':{
className: 'Views'
,options: {}
}
});
$('#demopoe').jplist({
itemsBox: '.list'
,itemPath: '.list-item'
,panelPath: '.jplist-panel'
,deepLinking: true
,'views':{
className: 'Views'
,options: {}
}
});
$('#demosuccess').jplist({
itemsBox: '.list'
,itemPath: '.list-item'
,panelPath: '.jplist-panel'
,deepLinking: true
,'views':{
className: 'Views'
,options: {}
}
});
});
</script>
<!-- !JPLIST 表格篩選 END -->
<!-- !模糊背景圖 START -->
<script src="js/bg_blue_scroll/bg_blue_scroll_successstories_style_7.js"></script>
<!-- !模糊背景圖 END -->
<!-- SHART - ADD THIS TOOL START -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=vivotekweb" async></script>
<!-- SHART - ADD THIS TOOL END -->
<!-- !VU START -->
<script type="text/javascript">
adroll_adv_id = "Q5EVWUESQNFYTBVCGGOK6E";
adroll_pix_id = "QGLQD55G7ZGWLCEJ2KWV4X";
(function () {
var oldonload = window.onload;
window.onload = function(){
__adroll_loaded=true;
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
scr.setAttribute('async', 'true');
scr.type = "text/javascript";
scr.src = host + "/j/roundtrip.js";
((document.getElementsByTagName('head') || [null])[0] ||
document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
if(oldonload){oldonload()}};
}());
</script>
<!-- !VU END -->
<!-- !GOOGLE-ANALYTICS START -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1877002-1', 'auto');
ga('set', 'anonymizeIp', true);
ga('set', 'contentGroup1', 'Products');
ga('set', 'contentGroup2', 'Camera - Bullet');
ga('set', 'contentGroup3', '2MP');
ga('set', 'contentGroup4', 'Outdoor');
ga('send', 'pageview');
</script>
<!-- !GOOGLE-ANALYTICS END -->
<!-- !JAVASCRIPT END -->
</body>
</html> | vivotekweb/vivotekweb | ib836b-ht/index.html | HTML | gpl-3.0 | 61,189 |
Essays
======
### What is the difference between a memo, a photo essay, and a PECE essay?
A memo is a first draft of a piece of writing that may be published on
the site. Upon publishing a memo, that memo is opened for comments from
the platform’s community.
A photo essay is a collection of image artifacts, ordered into a
slideshow, with text added for context. For an example of a photo essay,
see [here](http://theasthmafiles.org/content/6-united-states-environmental-health-governance-timeline)
A PECE essay is a collection of artifacts, memos, and essays, organized
into a collage, with text added for context. For an example of a PECE
essay, see [here](https://disaster-sts-network.org/content/lead-poisoning-and-information-distribution-southern-california/essay)
### How do I create a memo?
Navigate to your ‘Dashboard’. This link will be listed in the main menu.
Under the ‘Add Content’ heading, select ‘Memo’. You will be directed to
a web form to create the content. Enter the relevant fields (explained
in other parts of this document). Save the content.
### How do I create a photo essay?
For an overview of how to create photo essays, see [*this YouTube video*](https://www.youtube.com/watch?v=Z2K9nrp4j74).
Step-by-step
1. Begin by logging into the PECE platform and navigating to your Dashboard.

2. Click “Photo Essay”

3. You should now have access to all of the fields you need to fill out in order to create a new Photo Essay.
* First, type the title in the “Title” pane.</li>
* Next, write out your project description in the “Description” section. </li>

4. Next Choose a “thumbnail” image to represent your essay.
* You can edit this image later </li>
* Click “Next” to upload the image. Type in Alt Text and/or Title Text as desired (you can simply leave these blank), and click save. <br/> You are now ready to upload your image artifacts into your Photo Essay. </li>
5. Begin by typing the title of the image artifact into the “Image Artifact” pane. Your Image Artifact should pop up as an option to select.
* Click on the title of your Image Artifact to select it. </li>
* Next, type in the “Substantive Caption” into the “Text” pane. </li>
* Click “Create Item”. </li>

6. Once this artifact is added, click “Add New Item.” Repeat Step 5 for your remaining Image Artifacts.

7. If you would like this essay to appear in a group, be sure to select the Group Audience.
* Select “Public” to make it accessible to all viewers</li>
* Select “Private” to limit visibility to Group Members</li>
8. Select a license for the content. (See [licensing](./licensing.md) for more information)

9. Next, add yourself as a contributor by typing the first few letters of your name into the “contributor” field. Your screen name should pop up. Select your name.
* Repeat this process with the names of any other group members who you would like to grant access to editing the image or caption. </li>

10. Tag the Essay with any tags that you find appropriate.
<br> If the essay is not ready to be made public, you can alter the permissions of the image. </br>
* Select “Private” to limit visibility to yourself and other contributors.</li>
* Select “Restricted” to limit visibility to PECE users.</li>
* Select “Open” to make the essay visible to all internet users.</li>
11. Finally, scroll back up to the top of the page and click “Save” to save your work.

Congratulations! You’ve created your Photo Essay!
### How do I reorder photos in a photo essay?
Once you’ve created photo essay items, you can reorder photos by
clicking and holding on the ‘+’ symbol next to the item and dragging the
item to a new order.

### How do I create a PECE essay?
Navigate to your ‘Dashboard’. This link will be listed in the main menu.
Under the ‘Add Content’ heading, select ‘PECE Essay’. You will be
directed to a web form to create the content. Enter the relevant fields.
Save the content. This first step will only capture the metadata for the
essay.
To design the essay, navigate to the essay page you just created and
click ‘View Essay’. At the bottom of the screen there will be a black
bar that says ‘Customize this page’. Click this button to begin to the
customize the page.
To add content to the page, click the ‘+’ button in the blue ‘Content’
box. From this screen, you can add image files (not artifacts; just the
images), maps, free text, content (artifact, annotations, memos, and
essays) stored elsewhere on the platform, and headers for specific
portions of the essay. To add content stored elsewhere on the platform,
click the ‘Add Content’ button, begin typing the title of the content,
and select the appropriate content from the drop-down list. Select a
view mode from the drop-down menu below. A preview of how the content
will be rendered will appear on the right of the screen. Click Save.
To reorder content on the page, after you’ve clicked the ‘Customize this
page’ button, you can click and hold on content boxes and drag them to
new locations.
Once you’re done creating your essay, click the ‘Save’ button in the
black box at the bottom of the page.
For an overview of how to create PECE essays, see this YouTube video.
### How do I comment on publications?
Navigate to the memo, photo essay, or PECE Essay that you would like to
comment on. As long as you are logged in, you will see a heading to ‘Add
New Comment’ on the bottom of the page. Enter a subject, a comment, and
click ‘Save’.

| PECE-project/drupal-pece | src/docs/source/docs/essays.md | Markdown | gpl-3.0 | 5,972 |
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>NPC generator</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="styles/normalize.css">
<link rel="stylesheet" href="styles/brick-0.9.1.css">
<link rel="stylesheet" href="styles/main.css">
</head>
<body>
<div id='content'>
<x-deck id="main-deck" selected-index="1">
<x-card>
<x-layout>
<x-appbar>
<header>Menu</header>
<div class="next">></div>
</x-appbar>
<section>Aucune entrée de menu pour le moment.
</section>
</x-layout>
</x-card>
<x-card>
<x-layout>
<x-appbar>
<div class="prev">=</div>
<header>PNJs</header>
<div class="next">?</div>
</x-appbar>
<section>
<ul id="npclist">
</ul>
</section>
<footer>
<button id="generate">Générer</button>
</footer>
</x-layout>
</x-card>
<x-card>
<x-layout>
<x-appbar>
<div class="prev"><</div>
<header>Aide</header>
</x-appbar>
<section>
<p>Texte de l'aide</p>
</section>
</x-layout>
</x-card>
</x-deck>
</div>
<script src="scripts/brick-0.9.1.js"></script>
<script src="scripts/zepto.min.js"></script>
<!--script src="scripts/main.js"></script-->
<script src="scripts/app.js"></script>
<script src="scripts/data.fr.js"></script>
</body>
</html>
| jrmi/npcgen | www/index.html | HTML | gpl-3.0 | 1,657 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Your description goes here">
<meta name="keywords" content="one, two, three">
<title>Blank Template</title>
<!-- external CSS link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="container">
<header>
<h1>Blank Template</h1>
<h2>Just another blank template</h2>
</header>
<footer>
© Footer Goes Here
</footer>
</div>
</body>
</html> | emmacunningham/ga_sample_lesson | fewd_slides/Week_03_Layout/Assignment/starter_code/index.html | HTML | gpl-3.0 | 620 |
from typing import Optional
from django.contrib.auth.models import User
from jba_core import exceptions
def get_user_by_credentials(username: str, password: str) -> Optional[User]:
try:
user = User.objects.get(username=username)
if not user.check_password(password):
raise exceptions.IncorrectCredentials
return user
except User.DoesNotExist:
raise exceptions.UserNotFound
except:
raise exceptions.SomethingWrong
| JointBox/jbaccess-server | jbaccess/jba_core/service/UserService.py | Python | gpl-3.0 | 481 |
package com.williamjoy.wall.english;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
public class MaterialEditorActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_material_editor);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.material_editor, menu);
return true;
}
public void onButtonCommitContentClicked(View v) {
String inputText = ((EditText) this
.findViewById(R.id.editTextInputContent)).getText().toString();
Intent intent = new Intent(getApplicationContext(),
LearnSentenceActivity.class);
intent.putExtra("LEARN_CONTENT", inputText);
boolean enableAutoComplete = ((CheckBox) this
.findViewById(R.id.checkBoxEnableAutoComplete)).isChecked();
intent.putExtra("ENABLE_AUTO_COMPLETE", enableAutoComplete);
startActivityForResult(intent, 0);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case (R.id.menu_settings):
startActivity(new Intent(this.getApplicationContext(),
SettingsActivity.class));
break;
case (R.id.menu_about):
startActivity(new Intent(this.getApplicationContext(),
AboutActivity.class));
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
}
| williamjoy/Wall-E | src/com/williamjoy/wall/english/MaterialEditorActivity.java | Java | gpl-3.0 | 1,883 |
import { useEffect, useRef } from "react";
import { PropTypes } from "prop-types";
import { useCodeMirror } from "./hook/useCodeMirror";
export function Code({ whenReady, ...props }) {
const editorRef = useRef(null);
const editor = useCodeMirror({ target: editorRef, ...props });
useEffect(() => {
if (editor) {
if (whenReady) {
whenReady(editor);
}
}
}, [editor]);
return (
<div
ref={editorRef}
style={{
height: "100%",
minHeight: props.autoHeight && props.minHeight,
}}
></div>
);
}
Code.propTypes = {
lang: PropTypes.string,
value: PropTypes.string,
readOnly: PropTypes.bool,
fold: PropTypes.bool,
autoHeight: PropTypes.bool,
minHeight: PropTypes.string,
maxHeight: PropTypes.string,
lineNumbers: PropTypes.bool,
whenReady: PropTypes.func,
};
| nextgis/nextgisweb | nextgisweb/gui/nodepkg/component/code/Code.js | JavaScript | gpl-3.0 | 950 |
<?php
class ControllerModuleSlideshow extends Controller {
public function index($setting) {
static $module = 0;
$this->load->model('design/banner');
$this->load->model('tool/image');
$this->document->addStyle('catalog/view/javascript/jquery/flexslider/flexslider.css');
$this->document->addScript('catalog/view/javascript/jquery/flexslider/jquery.flexslider-min.js');
$data['width'] = $setting['width'];
$data['height'] = $setting['height'];
$data['direction'] =
$data['banners'] = array();
$results = $this->model_design_banner->getBanner($setting['banner_id']);
foreach ($results as $result) {
if (is_file(DIR_IMAGE . $result['image'])) {
$data['banners'][] = array(
'title' => $result['title'],
'link' => $result['link'],
'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
);
}
}
$data['module'] = $module++;
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/slideshow.tpl')) {
return $this->load->view($this->config->get('config_template') . '/template/module/slideshow.tpl', $data);
} else {
return $this->load->view('default/template/module/slideshow.tpl', $data);
}
}
} | latestthemes/opencart | upload/catalog/controller/module/slideshow.php | PHP | gpl-3.0 | 1,248 |
module SeriesUsersHelper
end
| emclaughlin1215/codename-ourchive | app/helpers/series_users_helper.rb | Ruby | gpl-3.0 | 29 |
from vsg.rules import token_indent
from vsg import token
lTokens = []
lTokens.append(token.generic_clause.generic_keyword)
class rule_002(token_indent):
'''
This rule checks the indent of the **generic** keyword.
**Violation**
.. code-block:: vhdl
entity fifo is
generic (
entity fifo is
generic (
**Fix**
.. code-block:: vhdl
entity fifo is
generic (
entity fifo is
generic (
'''
def __init__(self):
token_indent.__init__(self, 'generic', '002', lTokens)
| jeremiah-c-leary/vhdl-style-guide | vsg/rules/generic/rule_002.py | Python | gpl-3.0 | 575 |
<style>
#reportForm {
height: auto;
width: 300px;
position: fixed;
right: 0;
top: 20%;
padding: 15px;
background-color: #fff;
display: none;
-webkit-box-shadow: 0px 0px 23px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 23px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 23px 0px rgba(0, 0, 0, 0.2);
}
#reportForm span {
display: block;
background-color: #444;
font-size: 16px;
padding: 15px;
margin: -15px -15px 15px;
font-weight: bold;
color: #DDD;
}
#reportForm textarea {
width: 100%;
max-width: 100%;
margin-bottom: 15px;
padding: 5px;
min-height: 150px;
border: 1px solid #DDD;
}
#reportForm select {
width: 100%;
margin-bottom: 15px;
padding: 5px;
border: 1px solid #DDD;
}
#reportForm input[type="submit"] {
width: 100%;
max-width: 100%;
padding: 5px;
border: 1px solid #444;
background-color: #fff;
}
#reportForm #response .responsetext {
display: none;
padding: 5px 0 0;
margin: 0;
display: none;
}
#reportForm #response .responsetext.error {
color: red;
}
</style>
<fieldset id="reportForm">
<span>Report einreichen</span>
<form id="reportform">
<textarea id="description" name="description" placeholder="Beschreibung..."></textarea>
<select name="priority" id="priority">
<option value="tief">Priorität Tief</option>
<option value="mittel">Priorität Mittel</option>
<option value="hoch">Priorität Hoch</option>
</select>
<input type="submit" id="reportsubmit" value="Absenden">
</form>
<div id="response"></div>
</fieldset>
| LetsDoDiz/rennsimulation | template/html/reportingform.html | HTML | gpl-3.0 | 1,891 |
## Synopsis
WebRequest Class for sending GET/POST requests. POST requests can be sent with parameters and files attached within a single request.
## Code Example
```
Dim strSyncWordsUri As String = "https://api.syncwords.com/[Add resource path here]"
Dim strMethod As String = "POST"
' Instantiate the Frameweld web request class.
Dim request As New FWWebRequest()
request.SetMethod(strMethod)
request.SetUri(strSyncWordsUri)
Select Case strMethod
Case "POST"
' Add POST parameters below. Refer to FWWebRequest.vb for more information on adding POST parameters.
request.AddPostData("[name]", "[Value goes here]")
' Add FILEs below. Refer to FWWebRequest.vb for more information on adding FILEs.
request.AddFile("transcript", "C:\Users\omardellis\Desktop\mcgrawhill.txt")
End Select
request.Send()
MessageBox.Show(request.GetResponse())
```
## License
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
| frameweld/FWWebRequest | README.md | Markdown | gpl-3.0 | 1,376 |
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle 2.2dev installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['admindirname'] = 'Админ директор';
$string['availablelangs'] = 'Боломжит хэлний багцууд';
$string['chooselanguagehead'] = 'Хэлээ сонго';
$string['chooselanguagesub'] = 'Зөвхөн суулгах үед ашиглагдах хэлээ сонго. Та дараа нь сайтны болон хэрэглэгчийн хэлийг сонгож болно.';
$string['dataroot'] = 'Өгөгдлийн директор';
$string['dbprefix'] = 'Хүснэгтний угтвар';
$string['dirroot'] = 'Моодл хавтас';
$string['environmenthead'] = 'Таны орчиныг шалгаж байна ...';
$string['installation'] = 'Суулгах';
$string['langdownloaderror'] = 'Харамсалтай нь "{$a}" хэл суусангүй. Суулгах үйл ажиллагаа Англи хэл дээр үргэлжлэх болно.';
$string['memorylimithelp'] = '<p>Таны серверийн PHP санах ойн хязгаар нь {$a} гэж тохируулсан байна.</p>
<p>Энэ нь Моодл сүүлд санах ойн асуудлууд ялангуяа олон модуль ба/эсвэл олон хэрэглэгч идэвхжүүлсэн үед учирч болзошгүй. </p>
<p>Бид танд зөвлөхөд РНР-гээ боломжит дээд хязгаартайгаар жишээ нь 16М болгож тохируул. Үүний тулд хэд хэдэн арга байна: </p>
<ol>
<li>Хэрвээ та PHP-г <i>--enable-memory-limit</i>-тай дахин хөрвүүлэх боломжтой бол. Энэ нь Моодлийг санах ойн хязгаарыг өөрөө тогтоох боломжтой болгоно. </li>
<li>Хэрвээ та php.ini файлдаа хандаж чадвал, <b>memory_limit</b> гэсэн тохиргоог 16M гэх мэтээр өөрчилж болно. Хэрвээ хандалт байхгүй бол админаараа үүнийг хийлгэнэ үү.</li>
<li>Зарим PHP сервер дээр Моодл хавтсан дотроо дараах мөр агуулсан .htaccess файл үүсгэж болно: <p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Зарим сервер дээр энэ нь <b>бүх</b> PHP хуудсуудыг ажиллахгүй болгоно (та хуудаснууд руу орох юм бол алдааг нь харах болно). Тиймээс .htaccess файлыг устгах хэрэгтэй болно.</p></li>
</ol>';
$string['phpversion'] = 'РНР хувилбар';
$string['phpversionhelp'] = '<p>Mooдл нь РНР хувилбарын хамгийн багадаа 4.3.0 эсвэл 5.1.0 байхыг шаарддаг (5.0.x нь алдаануудтай).</p>
<p>Та одоо {$a} хувилбар ажиллуулж байна</p>
<p>Та PHP-гээ шинэчлэх эсвэл PHP-ийн шинэ хувилбар бүхий хост руу шилжүүл!<br/>
(5.0.x тохиолдолд доошоо 4.4.x хувилбар руу орж болно)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Та <strong>{$a->packname} {$a->packversion}</strong> багцыг компьютер дээрээ амжилттай суулгаж ажиллуулсан тул энэ хуудсыг харж байна. Баяр хүргэе!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> -ний энэ хувилбар нь <strong>Mooдл</strong> ажиллах орчныг үүсгэх програмууд агуулсан, тэдгээр нь:';
$string['welcomep40'] = 'Энэ багц нь мөн <strong>Mooдл {$a->moodlerelease} ({$a->moodleversion})</strong>-г агуулсан.';
$string['welcomep50'] = 'Энэ багц доторх бүх програмууд нь өөрсдийн лизенцтэй. Бүрэн <strong>{$a->installername}</strong> багц нь
<a href="http://www.opensource.org/docs/definition_plain.html">open source</a> бөгөөд <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> -ийн лизенцийн дор түгээгддэг.';
$string['welcomep60'] = 'Дараагийн хуудсууд нь компьютер дээрээ <strong>Mooдл</strong> тохируулах тааруулах энгийн алхмуудыг агуулсан байгаа. Та анхны утгын тохиргоонуудыг хүлээн авч болно, эсвэл өөрийн хэрэгцээнд нийцүүлэн өөрчилж болно.';
$string['welcomep70'] = '<strong>Mooдлээ</strong> тохируулахын тулд доорх “Үргэлжлүүлэх” товчин дээр дарж цааж явна уу.';
$string['wwwroot'] = 'Вэб хаяг';
| uhoreg/moodle | install/lang/mn/install.php | PHP | gpl-3.0 | 6,062 |
//
// Type.cs
//
// Author:
// Simon Mika <simon@mika.se>
//
// Copyright (c) 2014 Simon Mika
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using Kean.Extension;
namespace Cogneco.Transpiler.Apus.SyntaxTree
{
public abstract class Type : Node
{
protected Type()
{
}
#region Static Parse
internal static Type ParseType(Tokens.Lexer lexer)
{
Type result = null;
if (lexer.Current is Tokens.Identifier)
{
result = new TypeIdentifier((lexer.Current as Tokens.Identifier).Name) { Region = lexer.Current.Region };
lexer.Next();
}
else if (lexer.Current is Tokens.LeftParenthesis)
result = TypeTuple.ParseTypeTuple(lexer);
else
new Exception.SyntaxError("type expression", lexer).Throw();
return result;
}
#endregion
}
}
| cogneco/Cogneco.Transpiler | Cogneco.Transpiler.Apus/SyntaxTree/Type.cs | C# | gpl-3.0 | 1,412 |
#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H
#include <QMessageBox>
#include <QtGui>
#include <QSpacerItem>
#include <QGridLayout>
class MsgBox : public QMessageBox
{
Q_OBJECT
public:
explicit MsgBox( QWidget* parent = NULL );
~MsgBox();
void setWindowTitle(const QString &title);
void setStandardButtons(StandardButtons buttons);
QPushButton* addButton ( const QString & text, ButtonRole role );
QPushButton* addButton ( StandardButton button );
void addButton(QAbstractButton* button, ButtonRole role);
void setDefaultButton(StandardButton button);
void setDefaultButton(QPushButton* button);
void setIconPixmap(const QPixmap& pixmap);
void setStyleSheet(const QString& styleSheet);
void setIcon(Icon icon);
void setText(const QString &text);
int exec();
static StandardButton information(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton);
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton);
private:
QMessageBox* msgBox;
signals:
public slots:
};
#endif // MESSAGEBOX_H
| Gira-X/VMT-Editor | src/messagebox.h | C | gpl-3.0 | 1,206 |
<?php
namespace PavlePredic\CurrencyConverter\Tests\Service;
use PavlePredic\CurrencyConverter\Entity\ExchangeRate;
use PavlePredic\CurrencyConverter\Provider\ExchangeRatesProviderInterface;
use PavlePredic\CurrencyConverter\Service\CurrencyConverter;
use PavlePredic\CurrencyConverter\Tests\Provider\ExchangeRateTest;
/**
* @group unit
*/
class CurrencyConverterTest extends ExchangeRateTest
{
public function testConvert()
{
$sourceCurrency = 'EUR';
$destinationCurrency = 'USD';
$mockRate = 1.23;
$exchangeRate = ExchangeRate::create($sourceCurrency, $destinationCurrency, $mockRate);
$rateProvider = $this->getMock(ExchangeRatesProviderInterface::class);
$rateProvider->expects($this->once())
->method('getExchangeRate')
->will($this->returnValue($exchangeRate))
;
$converter = new CurrencyConverter($rateProvider);
$converted = $converter->convert(100, $sourceCurrency, $destinationCurrency);
$this->assertEquals(123, $converted);
}
} | pavlepredic/currency-converter | Tests/Service/CurrencyConverterTest.php | PHP | gpl-3.0 | 1,061 |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var StationsSchema = new Schema({
Station_No: {
type: String,
required: true
},
Longitude: {
type: String,
required: false
},
Latitude: {
type: String,
required: false
},
Catchment_Area: {
type: Number,
required: false
},
Place: {
type: String,
required: false
},
Data_Available: {
type: String,
required: false
}
});
var model = mongoose.model('Stations', StationsSchema);
module.exports = model; | khumbue/Hydrological-Analysis | Final/hydrological_analysis_dashboard/models/models.js | JavaScript | gpl-3.0 | 511 |
<!doctype html>
<title>WorldMap Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
<article>
<h1>We’ll be back soon!</h1>
<div>
<p>Sorry for the inconvenience but we’re performing some maintenance at the moment. We’ll be back online shortly!</p>
<p>— The WorldMap Team</p>
</div>
</article>
| cga-harvard/cga-worldmap | geonode/templates/maintenance.html | HTML | gpl-3.0 | 636 |
---
title: 如何訂製 Linux X 視窗環境
category: computer
old-category: 電腦技術
tags: [linux,debian,gdm,openbox]
permalink: /archives/19886616.html
---
<p>
以 Debian 6 與 Ubuntu 10.04 / 12.04 為基礎,說明如何訂製 X 視窗環境。
相關內容:
</p>
<ul>
<li>GDM
</li>
<li>startx
</li>
<li>Xsession
</li>
<li>openvt - no GDM
</li>
<li>OpenBox
</li>
</ul>
<!--more-->
<h4>
GDM</h4>
<h5>
自動登入</h5>
<p>尋找關鍵字 <em>AutomaticLoginEnable</em> 、 <em>AutomaticLogin</em>。
</p>
<p>
Debian 6 編輯 /etc/gdm3/daemon.conf 。
</p>
<pre class="language-text">
[daemon]
AutomaticLoginEnable = true # Enable auto login.
AutomaticLogin = rock # Which account will login.
</pre>
<p>
Ubuntu 10.04 編輯 /etc/gdm/gdm.schemas
</p>
<pre class="language-text">
<key>daemon/AutomaticLoginEnable</key>
<default>true</default>
<key>daemon/AutomaticLogin</key>
<default>rock</default>
</pre>
<p>
Ubuntu 12.04 預設使用 lightdm ,其組態文件為 /etc/lightdm/lightdm.conf 。
自動登入組態如下:
</p>
<pre class="language-text">
[SeatDefaults]
autologin-user=rock
autologin-user-timeout=0
</pre>
<h4>
如何決定 X 使用環境 (X session)</h4>
<p>GDM 在自動登入時,由 $HOME/.dmrc 決定登入後的 X 使用環境(X session)。
內容如下:
</p>
<pre class="language-text">
[Desktop]
Session=gnome
</pre>
<p>.dmrc 中的 <dfn>Session</dfn> 名稱,指的是 /usr/share/xsessions 下的 .desktop 文件。
例如 <code>Session=gnome</code> 表示根據 /usr/share/xsessions/gnome.desktop 文件的內容載入 X 使用環境 (文件名稱相配)。
</p>
<p>.desktop 文件的內容以 gnome.desktop 為例說明:
</p>
<pre class="language-text">
[Desktop Entry]
Name=GNOME
Exec=gnome-session
Type=Application
</pre>
<ul>
<li>
Name=GNOME<br/>
GDM 登入畫面中,顯示給使用者選擇的 X 使用環境名稱。
</li>
<li>
Exec=gnome-sesion<br/>
負責啟動 X 使用環境的執行檔。
</li>
<li>
Type=Application<br/>
規定項目。
</li>
</ul>
<p>注意,當 .dmrc 中指定的 <dfn>Session</dfn> 為 <em>default</em> 時,則 GDM 將會根據系統指定的 x-session-manager 或 $HOME/.xsession 載入 X 使用環境。
這一部份與 startx 的機制相同,詳細後述。
</p>
<h3>
startx</h3>
<p>你可以修改 /etc/default/grub 取消 GDM 登入行為。
</p>
<pre class="language-text">
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="text"
</pre>
<p>修改文件後,需執行 update-grub 更新狀態。
</p>
<p>取消 GDM 登入行為後,系統將不再顯示 GDM 的登入畫面。
取而代之則是顯示文字終端機的登入提示,使用者登入後,可以再執行 <kbd>startx</kbd> 啟動 X 視窗環境。
</p>
<p>startx 將會先找 $HOME/.xsession (或 $HOME/.Xsession) 再找 x-session-manager 以載入 X 視窗環境。
</p>
<p>使用者可以在自己的家目錄下,編寫一個專屬 .xsession 完全客製自己喜好的 X 視窗環境。
但大部份使用者不會這麼大費周章,通常只需要建立 .xsession 的符號連結指向自己偏好的 X 視窗環境執行檔。
例如:
</p>
<pre class="language-text">
$ ln -s /usr/bin/openbox-session $HOME/.xsession
</pre>
<p>你可以參考 /usr/share/xsessions 下的 .desktop 文件,了解系統中安裝了哪些可用的 X 視窗環境執行檔。
</p>
<p>若使用者的家目錄下不存在 .xsession ,startx 就會嘗試執行 /usr/bin/x-session-manager 載入系統預設的 X 視窗環境。
</p>
<p>而 x-session-manager 基本上是由 update-alternatives 維護的符號連結。
update-alternatives 會建立一個候選者資料庫,記錄哪些執行檔可以做為 x-session-manager 的候選者。
</p>
<p>update-alternatives 的操作指令示範如下:
</p>
<ul>
<li>
註冊新的候選者<br/>
update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/my-x-session 90
</li>
<li>
列出可用的候選者<br/>
udpate-alternatives --list x-session-manager
</li>
<li>
顯示目前選擇的候選者<br/>
udpate-alternatives --display x-session-manager
</li>
<li>
指定使用的候選者<br/>
udpate-alternatives --set x-session-manager /usr/bin/my-x-session
</li>
</ul>
<p>當然,使用者也可以無視 update-alternatives ,直接修改 /usr/bin/x-session-manager 指向自己偏好的 X 使用環境。
</p>
<h4>
openvt</h4>
<p>使用 openvt ,可以實現開機後直接進入 X 視窗環境,且不經過 GDM 的目的。
</p>
<p>openvt 是一個虛擬終端機程式,它可以將使用者指定的程式直接啟動在新的終端機上。
</p>
<p>虛擬終端機(virtual terminal)是一組模擬的鍵盤與螢幕組合,藉由虛擬終端機程式,可以在一台實體電腦主機上,模擬多組終端機,讓使用者可以在不同的終端機上以不同的使用身份執行不同的程式。
</p>
<p>傳統上, Linux 作業系統啟動後,都會一併啟動 6 個虛擬終端機執行 login 程式。 Linux 作業系統啟動後,使用者看到的 <kbd>Login:</kbd> 提示,就是由虛擬終端機程式叫起的。使用者可以利用鍵盤的 Ctrl+Alt+F1 到 Ctrl+Alt+F6 的組合鍵切換這6個虛擬終端機。
</p>
<p>叫起 login 程式的虛擬終端機程式是 getty 。而 openvt 則是另一種較少用的虛擬終端機程式。
但是在此,它可以幫助我們於開機後跳過 GDM 而直接進入 X 視窗環境。
</p>
<p>請先參考上一節的內容,關閉開機後啟動 GDM 的行為。再參考後述內容修改 init 組態文件。
</p>
<p>以 Debian6 與 Ununtu 10.04/12.04 為例,它們的 init 組態文件需加入一些關於 openvt 啟動 startx 的內容。
</p>
<h5>
Debian 6</h5>
<p>需要修改 /etc/inittab 。開啟該文件,找尋 getty 的設定段落。
在最後一個 getty 段落下,加入下列一行內容。
其實加在任何位置都可以,只是跟 getty 放在一起比較方便維護。
</p>
<pre class="language-text">
7:23:respawn:/bin/openvt -efwc 7 -- /bin/su - rock -c /usr/bin/startx
</pre>
<p>說明:
</p>
<ul>
<li>
7 是分派給該虛擬終端機的號碼。Linux作業系統傳統上分配了 1~6 號給 getty。
故我們新增的虛擬終端機通常會從第 7 號開始。
</li>
<li>rock 是指定的使用者登入身份。依使用者的實際使用情況調整。
</li>
<li>以使用者身份啟動 startx 程式。參考上節 startx 的內容。
</li>
</ul>
<h5>
Ubuntu 10.04/12.04</h5>
<p>需要在 /etc/init 目錄下,增加一筆新組態文件。配合終端機名稱,新的組態文件通常取名為 tty7.conf 。 /etc/init/tty7.conf 的內容如下:
</p>
<pre class="language-text">
# tty - openvt startx
start on runlevel [23]
stop on runlevel [!23]
respawn
exec /bin/openvt -efwc 7 -- /bin/su - rock -c /usr/bin/startx
</pre>
<h5>
X Wrapper</h5>
<p>有些系統透過 init 啟動 openvt 時會顯示權限不允、拒絕執行之類的訊息。
遇到這種情況時,需要修改 /etc/X11/Xwrapper.config 的 <dfn>allowed_users</dfn> 設定。
該項預設為 console ,請改為 anybody 。如下:
</p>
<pre class="language-text">
# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
# dpkg-reconfigure x11-common
allowed_users=anybody
</pre>
<h4>
OpenBox</h4>
<p><a href="http://zh.wikipedia.org/zh-tw/Openbox">OpenBox</a> 是一種常見的輕量化視窗管理程式(Window Manager)。
其組態內容請見 /etc/X11/openbox 目錄的文件內容。
</p>
<p>/etc/X11/openbox 內為 openbox 預設組態文件。而使用者專用組態則位於 $HOME/.config/openbox 。使用者專用組態的優先性高於 /etc/X11/openbox 的內容。
使用者通常會直接將 /etc/X11/openbox 內的文件複製到 $HOME/.config/openbox ,
然後修改成自己偏好的內容。
</p>
<ul>
<li>
autostart.sh<br/>
openbox 啟動後,要自動執行的 script 內容。
注意,在此 script 中,想要執行的視窗程式必須要放到背景執行 (最後加上 & 符號),否則會阻礙接下來的內容。
</li>
<li>menu.xml<br/>
OpenBox 滑鼠右鍵浮動選單的內容。
</li>
<li>rc.xml<br/>
OpenBox 行為特徵組態內容。包含視窗行為、滑鼠行為、鍵盤行為。
</li>
</ul>
<p>在 Debian/Ubuntu 中,可以安裝 obconf 與 obmenu ,使用 GUI 工具設定 rc.xml 與 menu.xml 。
</p>
<h4>
其他</h4>
<p>現代的 Linux 桌面環境,需要配合許多服務行程才能正常工作。
而 Linux 散佈版本的維護團隊,會將這些服務行程都寫入預裝的 X session 中。
所以一般使用者不必注意這些服務行程到底負責什麼工作,也能愉快地使用 Linux 桌面。
</p>
<p>但對於想自訂精簡化 X 視窗環境的使用者來說,這就有點麻煩了。
因為你必須了解當你需要什麼功能時,就要在你的 X session 中加入什麼程式。
而這方面沒有什麼良好的解決方法,通常需要仰賴不斷的錯誤嘗試找出答案。
</p>
<p>我個人的經驗,不要去碰 /etc/X11 底下的內容。複製任何一個現存的 X session 指令稿,例如以 /usr/bin/openbox-gnome-session 為基礎,增刪成你偏好的內容。自訂的 X session 指令稿可以存在 /usr/bin 或是 $HOME/.xsession 。附帶一提,大部份的 X session 是 shell script,但 gnome-session 則是用 C 語言撰寫後編譯過的執行檔,不適合參考。
</p>
<h5>
Polkit agent</h5>
<p>
若是你安裝或是自行編寫了一個精簡的 X 視窗環境,同時又希望能使用一些需要暫時性改變到 root 身份的圖形介面程式,你必須要注意下列 Polkit 程式是否啟動了。若未啟動,表示你必須將它們加入你的 X session 之中。
</p>
<ul>
<li>/usr/lib/policykit-1/polkitd</li>
<li>/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1<br/>
GNOME/GTK 相關程式相依此服務。</li>
<li>/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1<br/>
KDE 相關程式相依此服務。</li>
</ul>
<p>
例如你在自訂的精簡 X 環境中,執行 gnome-control-center 調整主機的網路 IP 。當你按下套用後,若上述的 polkit-gnome-authentication-agent-1 沒有啟動,則 gnome-control-center 將無法獲得 root 權限,也就不能儲存與更動你剛剛設定的網路 IP 。
</p>
<p>
碰到這個情形,你就要將上述的 Polkit 程式加到你的 xsession 中。
重新啟動 X 環境,再重複上段的設定行為。
此時 Polkit 程式就會彈出對話視窗,要求你輸入管理者的密碼。
透過 Polkit agent ,gnome-control-center 就能獲得 root 權限儲存你的設定內容。
</p>
<h6>相關文章</h6>
<ul>
<li><a href="{{ site.baseurl }}/archives/27973451.html">Raspberry Pi Kiosk Designing - based on HTML5 and OMXPlayer</a></li>
<li><a href="{{ site.baseurl }}/archives/2015/Ubuntu%20%E5%95%9F%E5%8B%95%E7%95%AB%E9%9D%A2%E8%88%87%E6%A1%8C%E9%9D%A2(startx)%E5%95%9F%E5%8B%95%E5%A4%B1%E6%95%97%E7%9A%84%E9%97%9C%E4%BF%82.html">Ubuntu 啟動畫面與桌面(startx)啟動失敗的關係</a></li>
</ul>
<div class="note">樂多舊網址: http://blog.roodo.com/rocksaying/archives/19886616.html</div>
<div class="roodo-comments"><hr/><h6>樂多舊回應</h6>
<blockquote class="roodo-comment">
<div class="roodo-comment-author">未留名 (#comment-22521624)</div>
<div class="roodo-comment-date">Mon, 23 Jul 2012 10:57:28 +0800</div>
<div class="roodo-comment-text">受益良多,感謝。<br/> </div>
</blockquote>
</div>
| rocksaying/rocksaying.github.io | _posts/2012-7-12-如何訂製 Linux X 視窗環境.html | HTML | gpl-3.0 | 12,186 |
#!/usr/bin/env python3
import os
import pathlib
import sysconfig
import compileall
import subprocess
prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local'))
datadir = prefix / 'share'
destdir = os.environ.get('DESTDIR', '')
if not destdir:
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', str(datadir / 'glib-2.0' / 'schemas')])
print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor')])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')])
print('Compiling python bytecode...')
moduledir = sysconfig.get_path('purelib', vars={'base': str(prefix)})
compileall.compile_dir(destdir + os.path.join(moduledir, 'eidisi'), optimize=2)
| sramkrishna/eidisi | scripts/meson_post_install.py | Python | gpl-3.0 | 838 |
package de.uni_kiel.progOOproject17.model.abs;
/**
* This interface serves as a listener that is used to call back when a {@link Destroyable} got {@link Destroyable#destroy()}ed.
*/
@FunctionalInterface
public interface DestroyListener {
/**
* Will be called when the {@link Destroyable} d got {@link Destroyable#destroy()}ed
*
* @param d the {@link Destroyable}
*/
public void onDestruction(Destroyable d);
}
| YouMe2/GameEngine | GameEngine/src/de/uni_kiel/progOOproject17/model/abs/DestroyListener.java | Java | gpl-3.0 | 442 |
using System;
using UnityEngine;
[Serializable]
public class PlantPanelModel {
public string name;
public string description;
public Sprite[] images;
}
| tecedufurb/atmos-game | Assets/PlantsPanel/Scripts/PlantPanelModel.cs | C# | gpl-3.0 | 172 |
package org.bukkit;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.*;
import java.util.List;
import net.minecraft.server.Block;
import net.minecraft.server.BlockFire;
import net.minecraft.server.Item;
import net.minecraft.server.ItemFood;
import net.minecraft.server.ItemRecord;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.inventory.ItemStack;
import org.bukkit.support.AbstractTestingBase;
import org.bukkit.support.Util;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
import com.google.common.collect.Lists;
@RunWith(Parameterized.class)
public class PerMaterialTest extends AbstractTestingBase {
private static int[] fireValues;
@BeforeClass
public static void getFireValues() {
fireValues = Util.getInternalState(BlockFire.class, Block.FIRE, "a");
}
@Parameters(name= "{index}: {0}")
public static List<Object[]> data() {
List<Object[]> list = Lists.newArrayList();
for (Material material : Material.values()) {
list.add(new Object[] {material});
}
return list;
}
@Parameter public Material material;
@Test
public void isSolid() {
if (material == Material.AIR) {
assertFalse(material.isSolid());
} else if (material.isBlock()) {
assertThat(material.isSolid(), is(Block.byId[material.getId()].material.isSolid()));
} else {
assertFalse(material.isSolid());
}
}
@Test
public void isEdible() {
assertThat(material.isEdible(), is(Item.byId[material.getId()] instanceof ItemFood));
}
@Test
public void isRecord() {
assertThat(material.isRecord(), is(Item.byId[material.getId()] instanceof ItemRecord));
}
@Test
public void maxDurability() {
if (material == Material.AIR) {
assertThat((int) material.getMaxDurability(), is(0));
} else {
assertThat((int) material.getMaxDurability(), is(Item.byId[material.getId()].getMaxDurability()));
}
}
@Test
public void maxStackSize() {
final ItemStack bukkit = new ItemStack(material);
final CraftItemStack craft = CraftItemStack.asCraftCopy(bukkit);
if (material == Material.AIR) {
final int MAX_AIR_STACK = 0 /* Why can't I hold all of these AIR? */;
assertThat(material.getMaxStackSize(), is(MAX_AIR_STACK));
assertThat(bukkit.getMaxStackSize(), is(MAX_AIR_STACK));
assertThat(craft.getMaxStackSize(), is(MAX_AIR_STACK));
} else {
assertThat(material.getMaxStackSize(), is(Item.byId[material.getId()].getMaxStackSize()));
assertThat(bukkit.getMaxStackSize(), is(material.getMaxStackSize()));
assertThat(craft.getMaxStackSize(), is(material.getMaxStackSize()));
}
}
@Test
public void isTransparent() {
if (material == Material.AIR) {
assertTrue(material.isTransparent());
} else if (material.isBlock()) {
assertThat(material.isTransparent(), is(not(Block.byId[material.getId()].material.blocksLight())));
} else {
assertFalse(material.isTransparent());
}
}
@Test
public void isFlammable() {
if (material != Material.AIR && material.isBlock()) {
assertThat(material.isFlammable(), is(Block.byId[material.getId()].material.isBurnable()));
} else {
assertFalse(material.isFlammable());
}
}
@Test
public void isBurnable() {
if (material.isBlock()) {
assertThat(material.isBurnable(), is(fireValues[material.getId()] > 0));
} else {
assertFalse(material.isBurnable());
}
}
@Test
public void isOccluding() {
if (material.isBlock()) {
assertThat(material.isOccluding(), is(Block.i(material.getId())));
} else {
assertFalse(material.isOccluding());
}
}
}
| squallblade/Spigot | src/test/java/org/bukkit/PerMaterialTest.java | Java | gpl-3.0 | 4,197 |
/*
* Copyright (C) 2017 zsel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.neology.data.model;
import com.neology.lastdays.TodoTicket;
import java.util.ArrayList;
/**
*
* @author obsidiam
*/
public class Frame {
private boolean success = false;
private ArrayList<TodoTicket> todo = new ArrayList<>();
public void setSuccess(boolean success){
this.success = success;
}
public boolean getSuccess(){
return success;
}
public void setTicket(ArrayList<TodoTicket> ticket){
this.todo = ticket;
}
public TodoTicket getTicket(int index){
return todo.get(index);
}
public ArrayList<TodoTicket> getTickets(){
return todo;
}
}
| Obsidiam/amelia | src/main/java/com/neology/data/model/Frame.java | Java | gpl-3.0 | 1,335 |
package com.wikidreams.shell;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class App {
public static void main(String[] args) {
String domainName = "google.com";
// Execute the command in windows
String command = "ping -n 3 " + domainName;
// Execute the command in Mac osX
//String command = "ping -c 3 " + domainName;
String output = executeCommand(command);
System.out.println(output);
}
public static String executeCommand(String command) {
StringBuffer output = new StringBuffer();
Process p;
try {
p = Runtime.getRuntime().exec(command);
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
while ((line = reader.readLine())!= null) {
output.append(line + "\n");
}
} catch (Exception e) {
e.printStackTrace();
}
return output.toString();
}
}
| WikiDreams/ShellCommand | src/com/wikidreams/shell/App.java | Java | gpl-3.0 | 907 |
<?php
// Heading
$_['heading_title'] = 'Settings';
// Text
$_['text_stores'] = 'Stores';
$_['text_success'] = 'Success: You have modified settings!';
$_['text_edit'] = 'Edit Setting';
$_['text_product'] = 'Products';
$_['text_review'] = 'Reviews';
$_['text_voucher'] = 'Vouchers';
$_['text_tax'] = 'Taxes';
$_['text_account'] = 'Account';
$_['text_checkout'] = 'Checkout';
$_['text_stock'] = 'Stock';
$_['text_affiliate'] = 'Affiliates';
$_['text_captcha'] = 'Captcha';
$_['text_register'] = 'Register';
$_['text_guest'] = 'Guest Checkout';
$_['text_return'] = 'Returns';
$_['text_contact'] = 'Contact';
$_['text_shipping'] = 'Shipping Address';
$_['text_payment'] = 'Payment Address';
$_['text_mail'] = 'Mail';
$_['text_smtp'] = 'SMTP';
$_['text_mail_alert'] = 'Mail Alerts';
$_['text_mail_account'] = 'Register';
$_['text_mail_affiliate'] = 'Affiliate';
$_['text_mail_order'] = 'Orders';
$_['text_mail_review'] = 'Reviews';
$_['text_general'] = 'General';
$_['text_security'] = 'Security';
$_['text_upload'] = 'Uploads';
$_['text_error'] = 'Error Handling';
// Entry
$_['entry_meta_title'] = 'Meta Title';
$_['entry_meta_description'] = 'Meta Tag Description';
$_['entry_meta_keyword'] = 'Meta Tag Keywords';
$_['entry_layout'] = 'Default Layout';
$_['entry_theme'] = 'Theme';
$_['entry_name'] = 'Store Name';
$_['entry_owner'] = 'Store Owner';
$_['entry_address'] = 'Address';
$_['entry_geocode'] = 'Geocode';
$_['entry_email'] = 'E-Mail';
$_['entry_telephone'] = 'Telephone';
$_['entry_fax'] = 'Fax';
$_['entry_image'] = 'Image';
$_['entry_open'] = 'Opening Times';
$_['entry_comment'] = 'Comment';
$_['entry_location'] = 'Store Location';
$_['entry_country'] = 'Country';
$_['entry_zone'] = 'Region / State';
$_['entry_language'] = 'Language';
$_['entry_admin_language'] = 'Administration Language';
$_['entry_currency'] = 'Currency';
$_['entry_currency_auto'] = 'Auto Update Currency';
$_['entry_length_class'] = 'Length Class';
$_['entry_weight_class'] = 'Weight Class';
$_['entry_limit_admin'] = 'Default Items Per Page (Admin)';
$_['entry_product_count'] = 'Category Product Count';
$_['entry_review'] = 'Allow Reviews';
$_['entry_review_guest'] = 'Allow Guest Reviews';
$_['entry_voucher_min'] = 'Voucher Min';
$_['entry_voucher_max'] = 'Voucher Max';
$_['entry_tax'] = 'Display Prices With Tax';
$_['entry_tax_default'] = 'Use Store Tax Address';
$_['entry_tax_customer'] = 'Use Customer Tax Address';
$_['entry_customer_online'] = 'Customers Online';
$_['entry_customer_activity'] = 'Customers Activity';
$_['entry_customer_search'] = 'Log Customer Searches';
$_['entry_customer_group'] = 'Customer Group';
$_['entry_customer_group_display'] = 'Customer Groups';
$_['entry_customer_price'] = 'Login Display Prices';
$_['entry_login_attempts'] = 'Max Login Attempts';
$_['entry_account'] = 'Account Terms';
$_['entry_cart_weight'] = 'Display Weight on Cart Page';
$_['entry_checkout_guest'] = 'Guest Checkout';
$_['entry_checkout'] = 'Checkout Terms';
$_['entry_invoice_prefix'] = 'Invoice Prefix';
$_['entry_order_status'] = 'Order Status';
$_['entry_processing_status'] = 'Processing Order Status';
$_['entry_complete_status'] = 'Complete Order Status';
$_['entry_fraud_status'] = 'Fraud Order Status';
$_['entry_api'] = 'API User';
$_['entry_stock_display'] = 'Display Stock';
$_['entry_stock_warning'] = 'Show Out Of Stock Warning';
$_['entry_stock_checkout'] = 'Stock Checkout';
$_['entry_affiliate_approval'] = 'Affiliate Requires Approval';
$_['entry_affiliate_auto'] = 'Automatic Commission';
$_['entry_affiliate_commission'] = 'Affiliate Commission (%)';
$_['entry_affiliate'] = 'Affiliate Terms';
$_['entry_return'] = 'Return Terms';
$_['entry_return_status'] = 'Return Status';
$_['entry_captcha'] = 'Captcha';
$_['entry_captcha_page'] = 'Captcha Page';
$_['entry_logo'] = 'Store Logo';
$_['entry_icon'] = 'Icon';
$_['entry_ftp_hostname'] = 'FTP Host';
$_['entry_ftp_port'] = 'FTP Port';
$_['entry_ftp_username'] = 'FTP Username';
$_['entry_ftp_password'] = 'FTP Password';
$_['entry_ftp_root'] = 'FTP Root';
$_['entry_ftp_status'] = 'Enable FTP';
$_['entry_mail_protocol'] = 'Mail Protocol';
$_['entry_mail_parameter'] = 'Mail Parameters';
$_['entry_mail_smtp_hostname'] = 'SMTP Hostname';
$_['entry_mail_smtp_username'] = 'SMTP Username';
$_['entry_mail_smtp_password'] = 'SMTP Password';
$_['entry_mail_smtp_port'] = 'SMTP Port';
$_['entry_mail_smtp_timeout'] = 'SMTP Timeout';
$_['entry_mail_alert'] = 'Alert Mail';
$_['entry_mail_alert_email'] = 'Additional Alert Mail';
$_['entry_secure'] = 'Use SSL';
$_['entry_shared'] = 'Use Shared Sessions';
$_['entry_robots'] = 'Robots';
$_['entry_seo_url'] = 'Use SEO URLs';
$_['entry_file_max_size'] = 'Max File Size';
$_['entry_file_ext_allowed'] = 'Allowed File Extensions';
$_['entry_file_mime_allowed'] = 'Allowed File Mime Types';
$_['entry_maintenance'] = 'Maintenance Mode';
$_['entry_password'] = 'Allow Forgotten Password';
$_['entry_encryption'] = 'Encryption Key';
$_['entry_compression'] = 'Output Compression Level';
$_['entry_error_display'] = 'Display Errors';
$_['entry_error_log'] = 'Log Errors';
$_['entry_error_filename'] = 'Error Log Filename';
$_['entry_status'] = 'Status';
// Help
$_['help_geocode'] = 'Please enter your store location geocode manually.';
$_['help_open'] = 'Fill in your store\'s opening times.';
$_['help_comment'] = 'This field is for any special notes you would like to tell the customer i.e. Store does not accept cheques.';
$_['help_location'] = 'The different store locations you have that you want displayed on the contact us form.';
$_['help_currency'] = 'Change the default currency. Clear your browser cache to see the change and reset your existing cookie.';
$_['help_currency_auto'] = 'Set your store to automatically update currencies daily.';
$_['help_limit_admin'] = 'Determines how many admin items are shown per page (orders, customers, etc).';
$_['help_product_count'] = 'Show the number of products inside the subcategories in the storefront header category menu. Be warned, this will cause an extreme performance hit for stores with a lot of subcategories!';
$_['help_review'] = 'Enable/Disable new review entry and display of existing reviews.';
$_['help_review_guest'] = 'Allow guests to post reviews.';
$_['help_voucher_min'] = 'Minimum amount a customer can purchase a voucher for.';
$_['help_voucher_max'] = 'Maximum amount a customer can purchase a voucher for.';
$_['help_tax_default'] = 'Use the store address to calculate taxes if customer is not logged in. You can choose to use the store address for the customer\'s shipping or payment address.';
$_['help_tax_customer'] = 'Use the customer\'s default address when they login to calculate taxes. You can choose to use the default address for the customer\'s shipping or payment address.';
$_['help_customer_online'] = 'Track customers online via the customer reports section.';
$_['help_customer_activity'] = 'Track customers activity via the customer reports section.';
$_['help_customer_group'] = 'Default customer group.';
$_['help_customer_group_display'] = 'Display customer groups that new customers can select to use such as wholesale and business when signing up.';
$_['help_customer_price'] = 'Only show prices when a customer is logged in.';
$_['help_login_attempts'] = 'Maximum login attempts allowed before the account is locked for 1 hour. Customer and affliate accounts can be unlocked on the customer or affliate admin pages.';
$_['help_account'] = 'Forces people to agree to terms before an account can be created.';
$_['help_invoice_prefix'] = 'Set the invoice prefix (e.g. INV-2011-00). Invoice IDs will start at 1 for each unique prefix.';
$_['help_cart_weight'] = 'Show the cart weight on the cart page.';
$_['help_checkout_guest'] = 'Allow customers to checkout without creating an account. This will not be available when a downloadable product is in the shopping cart.';
$_['help_checkout'] = 'Forces people to agree to terms before a customer can checkout.';
$_['help_order_status'] = 'Set the default order status when an order is processed.';
$_['help_processing_status'] = 'Set the order status the customer\'s order must reach before the order starts stock subtraction and coupon, voucher and rewards redemption.';
$_['help_complete_status'] = 'Set the order status the customer\'s order must reach before they are allowed to access their downloadable products and gift vouchers.';
$_['help_fraud_status'] = 'Set the order status when a customer is suspected of trying to alter the order payment details or use a coupon, gift voucher or reward points that have already been used.';
$_['help_api'] = 'Default API user the admin should use.';
$_['help_stock_display'] = 'Display stock quantity on the product page.';
$_['help_stock_warning'] = 'Display out of stock message on the shopping cart page if a product is out of stock but stock checkout is yes. (Warning always shows if stock checkout is no)';
$_['help_stock_checkout'] = 'Allow customers to still checkout if the products they are ordering are not in stock.';
$_['help_affiliate_approval'] = 'Automatically approve any new affiliates who sign up.';
$_['help_affiliate_auto'] = 'Automatically add commission when each order reaches the complete status.';
$_['help_affiliate_commission'] = 'The default affiliate commission percentage.';
$_['help_affiliate'] = 'Forces people to agree to terms before an affiliate account can be created.';
$_['help_return'] = 'Forces people to agree to terms before a return can be created.';
$_['help_return_status'] = 'Set the default return status when a return request is submitted.';
$_['help_captcha'] = 'Captcha to use for registration, login, contact and reviews.';
$_['help_icon'] = 'The icon should be a PNG that is 16px x 16px.';
$_['help_ftp_root'] = 'The directory your OpenCart installation is stored in. Normally \'public_html/\'.';
$_['help_mail_protocol'] = 'Only choose \'Mail\' unless your host has disabled the php mail function.';
$_['help_mail_parameter'] = 'When using \'Mail\', additional mail parameters can be added here (e.g. -f email@storeaddress.com).';
$_['help_mail_smtp_hostname'] = 'Add \'tls://\' or \'ssl://\' prefix if security connection is required. (e.g. tls://smtp.gmail.com, ssl://smtp.gmail.com).';
$_['help_mail_smtp_password'] = 'For gmail you might need to setup a application specific password here: https://security.google.com/settings/security/apppasswords.';
$_['help_mail_alert'] = 'Select which features you would like to receive an alert email on when a customer uses them.';
$_['help_mail_alert_email'] = 'Any additional emails you want to receive the alert email, in addition to the main store email. (comma separated).';
$_['help_secure'] = 'To use SSL check with your host if a SSL certificate is installed and add the SSL URL to the catalog and admin config files.';
$_['help_shared'] = 'Try to share the session cookie between stores so the cart can be passed between different domains.';
$_['help_robots'] = 'A list of web crawler user agents that shared sessions will not be used with. Use separate lines for each user agent.';
$_['help_seo_url'] = 'To use SEO URLs, apache module mod-rewrite must be installed and you need to rename the htaccess.txt to .htaccess.';
$_['help_file_max_size'] = 'The maximum image file size you can upload in Image Manager. Enter as byte.';
$_['help_file_ext_allowed'] = 'Add which file extensions are allowed to be uploaded. Use a new line for each value.';
$_['help_file_mime_allowed'] = 'Add which file mime types are allowed to be uploaded. Use a new line for each value.';
$_['help_maintenance'] = 'Prevents customers from browsing your store. They will instead see a maintenance message. If logged in as admin, you will see the store as normal.';
$_['help_password'] = 'Allow forgotten password to be used for the admin. This will be disabled automatically if the system detects a hack attempt.';
$_['help_encryption'] = 'Please provide a secret key that will be used to encrypt private information when processing orders.';
$_['help_compression'] = 'GZIP for more efficient transfer to requesting clients. Compression level must be between 0 - 9.';
// Error
$_['error_warning'] = 'Warning: Please check the form carefully for errors!';
$_['error_permission'] = 'Warning: You do not have permission to modify settings!';
$_['error_meta_title'] = 'Title must be between 3 and 32 characters!';
$_['error_name'] = 'Store Name must be between 3 and 32 characters!';
$_['error_owner'] = 'Store Owner must be between 3 and 64 characters!';
$_['error_address'] = 'Store Address must be between 5 and 50 characters!';
$_['error_zone_id'] = 'Region / State is required!';
$_['error_postal_code'] = 'Postal Code must be between 5 to 10 characters!';
$_['error_city'] = 'Store City must be between 1 to 50 characters!';
$_['error_avatax_account'] = 'Avalara Account ID is required to enable Avalara service!';
$_['error_avatax_license_key'] = 'Avalara License Key is required to enable Avalara service!';
$_['error_avatax_company_code'] = 'Company Name is required to enable Avalara service!';
$_['error_email'] = 'E-Mail Address does not appear to be valid!';
$_['error_telephone'] = 'Telephone must be between 3 and 32 characters!';
$_['error_limit'] = 'Limit required!';
$_['error_login_attempts'] = 'Login Attempts must be greater than 0!';
$_['error_customer_group_display'] = 'You must include the default customer group if you are going to use this feature!';
$_['error_voucher_min'] = 'Minimum voucher amount required!';
$_['error_voucher_max'] = 'Maximum voucher amount required!';
$_['error_processing_status'] = 'You must choose at least 1 order process status';
$_['error_complete_status'] = 'You must choose at least 1 order complete status';
$_['error_ftp_hostname'] = 'FTP Host required!';
$_['error_ftp_port'] = 'FTP Port required!';
$_['error_ftp_username'] = 'FTP Username required!';
$_['error_ftp_password'] = 'FTP Password required!';
$_['error_error_filename'] = 'Error Log Filename required!';
$_['error_malformed_filename'] = 'Error Malformed Log Filename!';
$_['error_encryption'] = 'Encryption Key must be between 32 and 1024 characters!';
| Freedom-FD/freedom | upload/vqmod/vqcache/vq2-admin_language_en-gb_setting_setting.php | PHP | gpl-3.0 | 16,632 |
div.chart-holder {
border: 1px black solid;
margin: 10px 0px;
}
div.code {
margin: 5px;
padding-left: 15px;
background-color: rgb(200, 200, 200);
border: 2px dashed black;
}
table td tr {
padding: 5px;
}
div.filter-entry {
padding: 5px;
}
| BrechtDeMan/WebAudioEvaluationTool | analysis/analysis.css | CSS | gpl-3.0 | 287 |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 16, 2017 at 09:08 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `ADwytee`
--
-- --------------------------------------------------------
--
-- Table structure for table `userTYPE`
--
CREATE TABLE `USERTYPE` (
`Id` int(11) NOT NULL AUTO_INCREMENT ,
`Type` varchar(24) Not NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `PAGE_URL`
--
CREATE TABLE `PAGE_URL` (
`Id` int(11) NOT NULL AUTO_INCREMENT ,
`Url` varchar(24) Not NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `USER_URL`
--
CREATE TABLE `USER_URL` (
`UserId` int(11) NOT NULL,
`PageId` int(11) NOT NULL,
PRIMARY KEY (`UserId`,`PageId`),
FOREIGN KEY (`UserId`) REFERENCES `USERTYPE`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`PageId`) REFERENCES `PAGE_URL`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `FUNCTION`
--
CREATE TABLE `FUNCTION` (
`Id` int(11) NOT NULL AUTO_INCREMENT ,
`Function` varchar(24) Not NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `USER_FUNCTION`
--
CREATE TABLE `USER_FUNCTION` (
`UserId` int(11) NOT NULL,
`FunctionId` int(11) NOT NULL,
PRIMARY KEY (`UserId`,`FunctionId`),
FOREIGN KEY (`UserId`) REFERENCES `USERTYPE`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`FunctionId`) REFERENCES `FUNCTION`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `language`
--
CREATE TABLE `LANGUAGE` (
`Id` tinyint(1) NOT NULL AUTO_INCREMENT,
`language` varchar(2) NOT NULL,
PRIMARY KEY (`Id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `USER` (
`Id` int(11) NOT NULL AUTO_INCREMENT ,
`Password` varchar(16) NOT NULL,
`Mail` varchar(254) NOT NULL UNIQUE,
`Type` int(11) Not NULL,
`Language` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`Id`),
FOREIGN KEY (`Type`) REFERENCES `USERTYPE`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`Language`) REFERENCES `LANGUAGE` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `history`
--
CREATE TABLE `HISTORY` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Date` date NOT NULL,
`UserId` int(11) NOT NULL,
PRIMARY KEY (`Id`),
FOREIGN KEY (`UserId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `Gender`
--
CREATE TABLE `GENDER` (
`Id` tinyint(1) NOT NULL AUTO_INCREMENT,
`Gender` varchar(8) NOT NULL,
PRIMARY KEY (`Id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `patient`
--
CREATE TABLE `PATIENT` (
`Key` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'patient key',
`FName` varchar(24) NOT NULL COMMENT 'PatientFirstName',
`LName` varchar(24) NOT NULL COMMENT 'PatientLastName',
`Gender` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'PGender(If0==male)',
`Birthdate` date NOT NULL COMMENT 'Patient DOB',
`Height` int(3) NOT NULL COMMENT 'Patient height',
`Weight` int(3) NOT NULL COMMENT 'Patient weight',
`StreetNo` int(3) NOT NULL COMMENT 'patient Str no',
`Gov` varchar(24) NOT NULL COMMENT 'patient city',
`District` varchar(24) NOT NULL COMMENT 'patient district',
`Telephone` varchar(14) NOT NULL UNIQUE COMMENT 'patient Telephone',
`UserId` int(11) NOT NULL UNIQUE COMMENT'patient id',
`Latitude` double NOT NULL,
`Longitude` double NOT NULL,
PRIMARY KEY (`UserId`),
FOREIGN KEY (`UserId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`Gender`) REFERENCES `GENDER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `allergy`
--
CREATE TABLE `ALLERGY` (
`UserId` int(11) NOT NULL,
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(24) NOT NULL,
`DOR` date NOT NULL,
`TOR` text NOT NULL,
`Notes` text NOT NULL,
PRIMARY KEY (`Id`),
FOREIGN KEY (`UserId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
-- --------------------------------------------------------
--
-- Table structure for table `pharmacy`
--
CREATE TABLE `PHARMACY` (
`Key` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`UserId` int(11) NOT NULL UNIQUE,
`Name` varchar(24) NOT NULL,
`Notes` TEXT NOT NULL,
`Describition` TEXT NOT NULL,
`Latitude` double NOT NULL,
`Longitude` double NOT NULL,
`Telephone` varchar(14) NOT Null,
PRIMARY KEY (`UserId`),
FOREIGN KEY (`UserId`) REFERENCES `USER` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `binded_with`
--
CREATE TABLE `BIND_WITH` (
`PharmacyId` int(11) NOT NULL,
`PatientId` int(11) NOT NULL,
PRIMARY KEY (`PharmacyId`,`PatientId`),
FOREIGN KEY (`PharmacyId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`)ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `blood_pressure`
--
CREATE TABLE `BLOOD_PRESSURE` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`PatientId` int(11),
`systolic` int(3) NOT NULL,
`diastolic` int(3) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`Id`),
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `medicine`
--
CREATE TABLE `MEDICINE` (
`Code` varchar (13) NOT NULL UNIQUE,
`EnName` varchar(24) NOT NULL UNIQUE,
`ArName` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL UNIQUE,
`Descripton` text NOT NULL,
PRIMARY KEY (`Code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `medicine_alternatives`
--
CREATE TABLE `MEDICINE_ALTERNATIVES` (
`MedicineCode` varchar(13) NOT NULL,
`M_AlternativeCode` varchar(13) NOT NULL,
PRIMARY key (`MedicineCode`,`M_AlternativeCode`),
FOREIGN KEY (`MedicineCode`) REFERENCES `MEDICINE`(`Code`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`M_AlternativeCode`) REFERENCES `MEDICINE`(`Code`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `RESERVATION`
--
CREATE TABLE `RESERVATION` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`UserId` int(11) DEFAULT NULL,
`PharmacyId` int(11) DEFAULT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `order status`
--
CREATE TABLE `ORDER_STATUS` (
`Id` tinyint(1) NOT NULL AUTO_INCREMENT UNIQUE,
`Status` varchar(11),
PRIMARY KEY(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `order`
--
CREATE TABLE `ORDER` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`UserId` int(11),
`PharmacyId` int(11),
`date` TIMESTAMP NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY key (`Id`),
FOREIGN KEY (`UserId`) REFERENCES `USER`(`Id`)ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`PharmacyId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`status`) REFERENCES `ORDER_STATUS`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `medicine_order`
--
CREATE TABLE `MEDICINE_ORDER` (
`MedicineCode` varchar (13) NOT NULL,
`OrderId` int(11) NOT NULL,
`Amount` int(11) NOT NULL,
PRIMARY key (`MedicineCode`,`OrderId`),
FOREIGN KEY (`MedicineCode`) REFERENCES `MEDICINE`(`Code`)ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`OrderId`) REFERENCES `ORDER`(`Id`)ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `notification_staus`
--
CREATE TABLE `NOTIFICATION_STATUS` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`Status` varchar(13) NOT NULL,
PRIMARY key (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `notification_staus`
--
CREATE TABLE `NOTIFICATION_DESCRIPTION` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`Description` varchar(13) NOT NULL,
PRIMARY key (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `notification`
--
CREATE TABLE `NOTIFICATION` (
`Id` int(11) NOT NULL AUTO_INCREMENT UNIQUE,
`MedicineCode` varchar(13) ,
`OrderId` int(11),
`PatientId` Int(11) NOT NULL,
`NStatus` Int(11) NOT NULL DEFAULT '1' ,
`NDescription` Int(11) NOT NULL DEFAULT '1' ,
PRIMARY key (`Id`),
FOREIGN KEY (`MedicineCode`) REFERENCES `MEDICINE`(`Code`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`OrderId`) REFERENCES `ORDER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`NStatus`) REFERENCES `NOTIFICATION_STATUS`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`NDescription`) REFERENCES `NOTIFICATION_DESCRIPTION`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `patient_chronics`
--
CREATE TABLE `PATIENT_CHRONICS` (
`PatientId` int(11),
`Chronics` varchar(24) NOT NULL COMMENT 'Patient Chronics',
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `patient_risk_factor`
--
CREATE TABLE `PATIENT_RISK_FACTOR` (
`PatientId` int(11),
`RiskFactor` varchar(64) NOT NULL,
PRIMARY KEY (`PatientId`,`RiskFactor`),
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `patient_tracked_medicines`
--
CREATE TABLE `PATIENT_TRACKED_MEDICINES` (
`PatientId` int(11),
`MedicineCode` varchar(13) NOT NULL,
PRIMARY KEY (PatientId,MedicineCode),
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`MedicineCode`) REFERENCES `MEDICINE`(`Code`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `pharmacy_medicine`
--
CREATE TABLE `PHARMACY_MEDICINE` (
`PharmacyId` int(11),
`MedicineCode` varchar(13) NOT NULL,
`Amount` int(11) NOT NULL,
PRIMARY KEY (`PharmacyId`,`MedicineCode`),
FOREIGN KEY (`PharmacyId`) REFERENCES `USER`(`Id`)ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`MedicineCode`) REFERENCES `MEDICINE`(`Code`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `rate`
--
CREATE TABLE `RATE` (
`PharmacyId` int(11),
`PatientId` int(11),
`value` tinyint(1) NOT NULL DEFAULT '0',
`comment` TEXT NOT NULL,
PRIMARY KEY (`PharmacyId`,`PatientId`),
FOREIGN KEY (`PharmacyId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`PatientId`) REFERENCES `USER`(`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- insert main table value
--
-- --------------------------------------------------------
INSERT INTO `LANGUAGE`( `Id`, `Language`) VALUES (1,'en');
INSERT INTO `LANGUAGE`( `Id`, `Language`) VALUES (2,'ar');
INSERT INTO `ORDER_STATUS`( `Id` ,`Status`) VALUES (1,'pending');
INSERT INTO `ORDER_STATUS`( `Id` ,`Status`) VALUES (2,'inprogress');
INSERT INTO `ORDER_STATUS`( `Id` ,`Status`) VALUES (3,'complete');
INSERT INTO `NOTIFICATION_STATUS`( `Id`, `Status`) VALUES (1,'active');
INSERT INTO `NOTIFICATION_STATUS`( `Id` ,`Status`) VALUES (2,'disactive');
INSERT INTO `NOTIFICATION_DESCRIPTION`( `Id` ,`Description`) VALUES (1,'accept');
INSERT INTO `NOTIFICATION_DESCRIPTION`( `Id` ,`Description`) VALUES (2,'decline');
INSERT INTO `USERTYPE`( `Id` ,`Type`) VALUES (1,'admin');
INSERT INTO `USERTYPE`( `Id` ,`Type`) VALUES (2,'pharmacy');
INSERT INTO `USERTYPE`(`Id` ,`Type`) VALUES (3,'patient');
INSERT INTO `GENDER`( `Id`,`Gender`) VALUES (1,"Male");
INSERT INTO `GENDER`( `Id` ,`Gender`) VALUES (2,"FMale");
INSERT INTO `PAGE_URL`(`Id` ,`Url`) VALUES (1,"index.php");
INSERT INTO `PAGE_URL`( `Id` ,`Url`) VALUES (2,"pharmacyOrder.php");
INSERT INTO `PAGE_URL`(`Id`, `Url`) VALUES (3,"orderPage.php");
INSERT INTO `PAGE_URL`( `Id`, `Url`) VALUES (4,"RegisterPage.php");
INSERT INTO `PAGE_URL`( `Id`,`Url`) VALUES (5,"statistics.php");
INSERT INTO `PAGE_URL`( `Id`,`Url`) VALUES (6,"MedicinePage.php");
-- --------------------------------------------------------
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| kareem2048/ADwytee | Code/Database/ADwytee.sql | SQL | gpl-3.0 | 15,023 |
package dk.aau.cs.giraf.tortoise;
public interface OnMainLayoutEventListener {
public void OnMainLayoutTouchListener();
}
| NC2903/Tortoise | source/Tortoise/src/dk/aau/cs/giraf/tortoise/OnMainLayoutEventListener.java | Java | gpl-3.0 | 124 |
# -*- coding: utf-8 -*-
# Copyright (c) 2010 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to enter the data for a copy or rename operation.
"""
from __future__ import unicode_literals
import os.path
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QDialog, QDialogButtonBox
from E5Gui.E5PathPicker import E5PathPickerModes
from .Ui_HgCopyDialog import Ui_HgCopyDialog
class HgCopyDialog(QDialog, Ui_HgCopyDialog):
"""
Class implementing a dialog to enter the data for a copy or rename
operation.
"""
def __init__(self, source, parent=None, move=False):
"""
Constructor
@param source name of the source file/directory (string)
@param parent parent widget (QWidget)
@param move flag indicating a move operation (boolean)
"""
super(HgCopyDialog, self).__init__(parent)
self.setupUi(self)
self.source = source
if os.path.isdir(self.source):
self.targetPicker.setMode(E5PathPickerModes.DirectoryMode)
else:
self.targetPicker.setMode(E5PathPickerModes.SaveFileMode)
if move:
self.setWindowTitle(self.tr('Mercurial Move'))
else:
self.forceCheckBox.setEnabled(False)
self.sourceEdit.setText(source)
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
msh = self.minimumSizeHint()
self.resize(max(self.width(), msh.width()), msh.height())
def getData(self):
"""
Public method to retrieve the copy data.
@return the target name (string) and a flag indicating
the operation should be enforced (boolean)
"""
target = self.targetPicker.text()
if not os.path.isabs(target):
sourceDir = os.path.dirname(self.sourceEdit.text())
target = os.path.join(sourceDir, target)
return target, self.forceCheckBox.isChecked()
@pyqtSlot(str)
def on_targetPicker_textChanged(self, txt):
"""
Private slot to handle changes of the target.
@param txt contents of the target edit (string)
"""
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(
os.path.isabs(txt) or os.path.dirname(txt) == "")
| testmana2/test | Plugins/VcsPlugins/vcsMercurial/HgCopyDialog.py | Python | gpl-3.0 | 2,379 |
/*{{{ Comments */
/****************************************************************/
/* Helios Linker */
/* */
/* File: genimage.c */
/* */
/* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 to */
/* Perihelion Software Ltd. */
/* */
/* Author: NHG 26/9/88 */
/* */
/* Updates: CS/PAB */
/* Shift patch */
/* SWAP patch */
/* ARM patches */
/* Recursive patches */
/* NC */
/* 'C40 patches */
/* */
/****************************************************************/
/* RcsId: $Id: genimage.c,v 1.53 1994/04/07 10:56:11 nickc Exp $ */
/*}}}*/
/*{{{ #includes */
#include <module.h>
#include <unistd.h> /* for write() */
#include "link.h"
/*}}}*/
/*{{{ #defines */
#define trace if (traceflags & db_genimage) _trace
#define fits_in_16_bits( val ) (((val) & 0xffff8000U) == 0 || ((val) & 0xffff8000U) == 0xffff8000U)
#define fits_in_16_bits_unsigned( val ) (((val) & 0xffff0000U) == 0 )
#ifdef __C40
#define fits_in_8_bits( val ) (((val) & 0xffffff80U) == 0 || ((val) & 0xffffff80U) == 0xffffff80U)
#define fits_in_24_bits( val ) (((val) & 0xff800000U) == 0 || ((val) & 0xff800000U) == 0xff800000U)
#endif
/*}}}*/
/*{{{ Forward references */
#ifdef __STDC__
word patchit( word vtype, long value, word size );
void putpatch( Code * c );
word mcpatch( word type, VMRef v, word size );
word stdpatch( word type, long value );
static void outbyte( UBYTE );
static void outbyte1( WORD );
static void imageheader( WORD );
long swapw( long x );
unsigned swaps( unsigned x );
void flush_output_buffer(void);
#else
word patchit();
void putpatch();
word mcpatch();
word stdpatch();
static void outbyte();
static void outbyte1();
static void imageheader();
long swapw();
unsigned swaps();
void flush_output_buffer();
#endif
/*}}}*/
/*{{{ Variables */
word codepos;
extern FILE * verfd;
word nchars;
#ifdef __ARM
static word restofdppatch; /* rest of value to be pathed by armdprest */
static word patchNeg; /* if patch value need a sub rather than an add instr. */
static bool AOFSymbolIsData;
#endif
#define BUFFER_SIZE 4096
UBYTE output_buffer[BUFFER_SIZE]; /* buffered output */
int output_buffer_pointer = 0; /* and pointer */
/*}}}*/
/*{{{ Functions */
/*{{{ genimage() */
void
#ifdef __STDC__
genimage( void )
#else
genimage()
#endif
{
Code * c;
asm_Module * m;
VMRef curblock;
curmod = module0;
m = VMAddr( asm_Module, curmod );
curblock = m->start;
VMlock( curblock );
c = VMAddr( Code, curblock );
VMDirty( curblock );
codepos = 0;
imageheader( totalcodesize + sizeof (int) );
for (;;)
{
word tag = c->type;
/* trace( "image op %#x", tag ); */
switch (tag)
{
case OBJNEWSEG: /* go to new code page */
trace( "NEWSEG %#x", c->value.v );
VMunlock( curblock );
curblock = c->value.v;
VMlock( curblock );
c = VMAddr( Code, curblock );
VMDirty( curblock );
continue;
case OBJEND: /* start new module */
VMunlock( curblock );
m = VMAddr( asm_Module, curmod );
curmod = m->next;
if (NullRef( curmod ))
{
if (gen_image_header)
/* only generate tailer if we gen header */
outword( 0L );
flush_output_buffer();
return;
}
m = VMAddr( asm_Module, curmod );
curblock = m->start;
VMlock( curblock );
c = VMAddr( Code, curblock );
VMDirty( curblock );
codepos = 0;
continue;
case OBJMODULE:
case OBJDATA:
case OBJCOMMON:
case OBJCODETABLE:
break;
case OBJCODE:
{
int i;
int size = c->size;
UBYTE * v = VMAddr( UBYTE, c->value.v );
for (i = 0; i < size ; outbyte( v[ i++ ] ))
;
codepos += size;
break;
}
case OBJBSS:
{
int i;
int size = c->size;
for (i = 0; i < size ; outbyte( 0 ))
;
codepos += size;
break;
}
case OBJLITERAL:
{
int i;
int size = c->size;
UBYTE * v = (UBYTE *)&c->value.w;
for (i = 0; i < size ; outbyte( v[ i++ ]))
;
codepos += size;
break;
}
case OBJWORD:
case OBJSHORT:
case OBJBYTE:
putpatch( c );
codepos += tag & 0x07;
break;
case OBJINIT:
if (NullRef( c->value.v ))
{
outword( 0L );
}
else
{
word next = VMAddr( Code, c->value.v )->loc;
outword( (WORD)(next - c->loc) );
}
codepos += 4;
break;
default:
error( "Unknown tag %#x (@%#x)", tag, codepos );
break;
}
c++;
}
flush_output_buffer();
return;
} /* genimage */
/*}}}*/
/*{{{ putpatch() */
void
#ifdef __STDC__
putpatch( Code * c )
#else
putpatch( c )
Code * c;
#endif
{
word value = patchit( c->vtype, c->value.fill, c->type );
trace( "Final patch value = %#x", value );
switch (c->type)
{
case OBJWORD:
outword( value );
break;
case OBJSHORT:
if (!fits_in_16_bits( value ))
warn( "Patch value %#x too large for short", value );
#ifdef __BIGENDIAN
outbyte1( value >> 8 );
outbyte1( value );
#else
outbyte1( value );
outbyte1( value >> 8 );
#endif
break;
case OBJBYTE:
if (value < -128 || value > 255)
warn( "Patch value %#x too large for byte (@%#x)", value, codepos );
outbyte1( value );
break;
default:
warn( "unknown patch result %d\n", c->type );
break;
}
return;
} /* putpatch */
/*}}}*/
/*{{{ patchit() */
word
#ifdef __STDC__
patchit(
word vtype, /* patch type */
long value, /* ptr to another patch, or patch symbol */
word size ) /* patch size */
#else
patchit( vtype, value, size )
word vtype; /* patch type */
long value; /* ptr to another patch, or patch symbol */
word size; /* patch size */
#endif
{
if (OBJPATCH <= vtype && vtype <= OBJPATCHMAX )
{
Value val;
val.fill = value;
return (mcpatch( vtype, val.v, size ));
}
return (stdpatch( vtype, value ));
} /* patchit */
/*}}}*/
/*{{{ FindSymbolOffset() */
/*
* Calculate the offset from the start of the current
* module of the indicated symbol.
*/
WORD
FindSymbolOffset( VMRef vSymbol )
{
Symbol * pSymbol;
pSymbol = VMAddr( Symbol, vSymbol );
if (NullRef( pSymbol ))
return 0;
if (pSymbol->module != curmod)
{
WORD iSize;
VMRef vMod;
VMRef vOurMod = pSymbol->module;
/* The symbol is not in the current module */
vMod = module0;
/* discover which comes first 'curmod' or 'vOurMod' */
while (!NullRef( vMod ) &&
vMod != vOurMod &&
vMod != curmod )
{
vMod = VMAddr( asm_Module, vMod )->next;
}
if (NullRef( vMod ))
{
pSymbol = VMAddr( Symbol, vSymbol );
warn( "Stub Generation: could not find module containing symbol '%s'!",
pSymbol->name );
return codepos;
}
iSize = 0;
if (vMod == curmod)
{
/* search for forwards reference */
while (!NullRef( vMod ) &&
vMod != vOurMod )
{
asm_Module * pModule = VMAddr( asm_Module, vMod );
iSize += pModule->length;
vMod = pModule->next;
}
pSymbol = VMAddr( Symbol, vSymbol );
if (NullRef( vMod ))
{
warn( "Stubs: unable to locate module %s containing symbol '%s'",
VMAddr( asm_Module, vOurMod )->file_name,
pSymbol->name );
return codepos;
}
return VMAddr( Code, pSymbol->value.v )->loc + iSize;
}
else
{
/* search for backwards reference */
while (!NullRef( vMod ) &&
vMod != curmod )
{
asm_Module * pModule = VMAddr( asm_Module, vMod );
iSize += pModule->length;
vMod = pModule->next;
}
pSymbol = VMAddr( Symbol, vSymbol );
if (NullRef( vMod ))
{
warn( "Stub Generation: unable to locate module refering to symbol '%s'",
pSymbol->name );
return codepos;
}
return VMAddr( Code, pSymbol->value.v )->loc - iSize;
}
}
/* symbol is inside the current module - just return the offset */
return VMAddr( Code, pSymbol->value.v )->loc;
} /* FindSymbolOffset */
/*}}}*/
/*{{{ stdpatch() */
word
#ifdef __STDC__
stdpatch(
word vtype,
long xvalue )
#else
stdpatch( vtype, xvalue )
word vtype;
long xvalue;
#endif
{
Value value;
asm_Module * m;
Symbol * s;
value.fill = xvalue;
m = VMAddr( asm_Module, curmod );
switch (vtype)
{
default:
error( "Unknown standard patch type in stdpatch: %#x (@%#x)", vtype, codepos );
return 0;
case OBJMODSIZE:
return m->length;
case OBJMODNUM:
trace( "Stdpatch: returning module %08x, number %d", curmod, m->id );
return m->id;
#ifdef NEW_STUBS
case OBJCODESTUB:
case OBJADDRSTUB:
{
WORD r;
s = VMAddr( Symbol, value.v );
if (s->type != S_CODESYMB)
{
VMRef ref;
VMRef mod;
if (vtype == OBJCODESTUB)
{
char name[ 128 ]; /* XXX */
/* catch unlikely case of a CODESTUB for something other than .<name> */
if (*s->name != '.')
{
warn( "Function \"%s\" used in module '%s', but not defined",
s->name + 1, m->file_name );
/* prevent future warnings */
s->type = S_CODESYMB;
s->module = curmod;
return 0;
}
/* duplicate name */
strcpy( name, s->name );
/* change first character */
name[ 0 ] = '_';
/* find the associated shared library symbol */
ref = lookup( name );
if (ref == NullVMRef)
{
warn( "Function \"%s\" is called from module '%s', but it is not defined",
name + 1, m->file_name );
/* prevent future warnings */
s->type = S_CODESYMB;
s->module = curmod;
return 0;
}
/* check the type of the symbol */
s = VMAddr( Symbol, ref );
if (s->type == S_UNBOUND)
{
warn( "Function \"%s\" is called in '%s', but it is not defined",
name + 1, m->file_name );
/* prevent futher warnings */
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
if (s->type != S_FUNCDONE)
{
if (s->type == S_FUNCSYMB)
{
warn( "Function \"%s\" is called in '%s', but it has not been linked",
name + 1, m->file_name );
}
else
{
warn( "Function \"%s\" is called in '%s', but defined in '%s' as something else.",
name + 1, m->file_name, s->file_name );
}
/* prevent futher warnings */
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
s->referenced = 1;
}
else
{
ref = value.v;
}
/* request a new stub */
r = new_stub( ref, vtype == OBJADDRSTUB );
/* adjust 'r' to be relative to current module */
mod = module0;
while (!NullRef( mod ) &&
mod != curmod)
{
asm_Module * module;
module = VMAddr( asm_Module, mod );
r -= module->length;
mod = module->next;
}
}
else
{
r = FindSymbolOffset( value.v );
}
trace( "Stdpatch: returning label offset of %s = %d", s->name, r - codepos );
return r - codepos;
}
#endif /* NEW_STUBS */
case OBJLABELREF:
{
word r;
s = VMAddr( Symbol, value.v );
if (s->type != S_CODESYMB)
{
warn( "Label \"%s\" used in module '%s', but not defined", s->name, m->file_name );
s->type = S_CODESYMB;
s->module = curmod;
return 0;
}
r = FindSymbolOffset( value.v );
trace( "Stdpatch: returning label offset of %s = %d", s->name, r - codepos );
return r - codepos;
}
case OBJDATASYMB:
s = VMAddr( Symbol, value.v );
trace( "Stdpatch: datasymb of symbol %s", s->name );
if (s->type != S_DATADONE)
{
if (s->type == S_FUNCDONE)
warn( "Alas, function %s was assumed to be data, please link %s before %s",
s->name + 1, VMAddr( asm_Module, s->module)->file_name, m->file_name );
else
warn( "Data Symbol \"%s\" used in module '%s', but not defined",
s->name + 1, m->file_name );
s->type = S_DATADONE;
s->module = curmod;
return 0;
}
return s->value.w;
case OBJCODESYMB:
s = VMAddr( Symbol, value.v );
trace( "Stdpatch: codesymb of symbol %s", s->name );
if (s->type != S_FUNCDONE)
{
warn( "Function Symbol \"%s\" used in module '%s', but not defined", s->name + 1, m->file_name );
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
return s->value.w;
case OBJDATAMODULE:
s = VMAddr( Symbol, value.v );
trace( "Stdpatch: datamodule of symb %s", s->name );
if (s->type != S_DATADONE && s->type != S_FUNCDONE)
{
#ifdef NEW_STUBS
char name[ 128 ]; /* XXX */
VMRef ref;
/* catch unlikely case of a DATAMODULE for something other than _<name> */
if (*s->name != '_')
{
warn( "Function \"%s\" called in module '%s', but not defined",
s->name + 1, m->file_name );
/* prevent future warnings */
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
/* duplicate name */
strcpy( name, s->name );
/* change first character */
name[ 0 ] = '.';
/* find the associated shared library symbol */
ref = lookup( name );
if (ref == NullVMRef)
{
warn( "Function \"%s\" was called from module '%s', but it is not defined",
name + 1, m->file_name );
/* prevent future warnings */
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
/* check the type of the symbol */
s = VMAddr( Symbol, ref );
if (s->type == S_UNBOUND)
{
warn( "Function \"%s\" was called in '%s', but it is not defined",
name + 1, m->file_name );
/* prevent futher warnings */
s->type = S_FUNCDONE;
s->module = curmod;
return 0;
}
if (s->type != S_CODESYMB)
{
if (s->type == S_FUNCSYMB)
{
warn( "Function \"%s\" was called in '%s', but it has not been linked",
name + 1, m->file_name );
}
else
{
warn( "Function \"%s\" was called in '%s', but defined in '%s' as type %x.",
name + 1, m->file_name, s->file_name, s->type );
}
/* prevent further warnings */
s->type = S_CODESYMB;
s->module = curmod;
return 0;
}
/* indicate that the .<name> is being used */
s->referenced = 1;
trace( "branch ref to %s in %s", s->name, VMAddr( asm_Module, s->module )->file_name );
/* generate a branch stub called _<name> */
RequestBranchStub( value.v );
/* locate this branch stub */
s = VMAddr( Symbol, value.v );
#else /* not NEW_STUBS */
if (s->AOFassumedData)
{
if (!NullRef( s->module ))
{
asm_Module * pDef;
pDef = VMAddr( asm_Module, s->module );
if (m->file_name == pDef->file_name)
warn( "Alas, function '%s' was assumed to be data, please link %s before %s",
s->name + 1, s->file_name, m->file_name );
else
warn( "Alas, function '%s' was assumed to be data, please link %s before %s",
s->name + 1, pDef->file_name, m->file_name );
}
else
warn( "Beware, function '%s' was assumed to be data", s->name + 1 );
s->type = S_DATADONE;
s->module = curmod;
}
else
{
warn( "Symbol \"%s\" used in module '%s', but not defined",
s->name + 1, m->file_name );
s->type = S_FUNCDONE;
s->module = curmod;
}
return 0;
#endif /* NEW_STUBS */
}
m = VMAddr( asm_Module, s->module );
trace( "DATAMODULE returns module id %d for symbol %s", m->id, s->name /* XXX */ );
if (smtopt)
return (m->id * 8 + (s->type == S_FUNCDONE ? 4 : 0));
else
return (m->id * 4);
}
return 0;
} /* stdpatch */
/*}}}*/
/*{{{ imageheader() */
/****************************************************************/
/* imageheader */
/* */
/* Generate image file header */
/* */
/****************************************************************/
PRIVATE void
#ifdef __STDC__
imageheader( WORD imagesize )
#else
imageheader( imagesize )
WORD imagesize;
#endif
{
if (gen_image_header) {
outword( Image_Magic );
outword( 0L ); /* Flags */
outword( imagesize );
}
nchars = 0;
return;
} /* imageheader */
/*}}}*/
/*{{{ outword() */
/****************************************************************/
/* outword */
/* */
/* output a word to image file */
/* */
/****************************************************************/
PUBLIC void
#ifdef __STDC__
outword( WORD val )
#else
outword( val )
WORD val;
#endif
{
int i;
#ifdef __BIGENDIAN /* 68k etc */
for (i = 24 ; i >= 0 ; i -= 8)
outbyte( (UBYTE)(val >> i) );
#else
for (i = 0 ; i < 32 ; i += 8)
outbyte( (UBYTE)(val >> i) );
#endif
return;
} /* outword */
/*}}}*/
/*{{{ outbyte1() */
/****************************************************************/
/* Procedure: outbyte1 */
/* */
/* output a byte to image file */
/* */
/****************************************************************/
PRIVATE void
#ifdef __STDC__
outbyte1( WORD b )
#else
outbyte1( b )
WORD b;
#endif
{
outbyte( (UBYTE)b );
return;
} /* outbyte1 */
/*}}}*/
/*{{{ outbyte() */
PRIVATE void
#ifdef __STDC__
outbyte( UBYTE b )
#else
outbyte( b )
UBYTE b;
#endif
{
output_buffer[output_buffer_pointer++] = b;
if (output_buffer_pointer == BUFFER_SIZE)
flush_output_buffer();
nchars++;
return;
} /* outbyte */
/*}}}*/
/*{{{ flush_output_buffer() */
PUBLIC void
#ifdef __STDC__
flush_output_buffer( void )
#else
flush_output_buffer( )
#endif
{
int size = 0;
int size1;
while (size != output_buffer_pointer)
{
size1 = write(outf, (char *)(output_buffer + size),
output_buffer_pointer - size);
if (size1 < 0)
error( "image file write error");
size += size1;
}
output_buffer_pointer = 0;
}
/*}}}*/
/*{{{ swapw() */
/* swap words */
long
#ifdef __STDC__
swapw( long x )
#else
swapw( x )
long x;
#endif
{
return ((x >> 24) & 0x000000ffU) |
((x >> 8) & 0x0000ff00U) |
((x << 8) & 0x00ff0000U) |
((x << 24) & 0xff000000U) ;
} /* swapw */
/*}}}*/
/*{{{ swaps() */
/* swap shorts */
unsigned int
#ifdef __STDC__
swaps( unsigned int x )
#else
swaps( x )
unsigned int x;
#endif
{
return ((x >> 8) & 0xff) | ((x << 8) & 0xff00);
} /* swaps */
/*}}}*/
#if defined __C40
/*{{{ mask_and_sign_extend() */
/*
* extracts the bits specified by 'mask' from the word 'value'
* if necessary the resulting word is sign extended.
* 'mask' must be a contigous set of bits starting from
* the least significant bit
*/
static signed long
mask_and_sign_extend_word(
unsigned long value,
unsigned long mask )
{
value &= mask;
if (value & ((mask + 1) >> 1))
{
value |= ~mask;
}
return (signed long)value;
} /* mask_and_sign_extend_word */
/*}}}*/
#endif /* __C40 */
/*{{{ mcpatch() */
/* Machine specific patches defined for ARM, M68K and PGC1 */
word
#ifdef __STDC__
mcpatch(
word type,
VMRef v,
word size )
#else
mcpatch( type, v, size )
word type;
VMRef v;
word size;
#endif
{
#ifdef __ARM
long data;
#endif
Patch * p = VMAddr( Patch, v );
long value;
#ifdef __C40
static word saved_modnum = 0;
static word saved_offset = 0;
#endif
#ifdef __ARM
if (size != OBJWORD && (type == PATCHARMDT ||
type == PATCHARMDP ||
type == PATCHARMJP ) )
error( "ARM specific patch used to patch a short or byte value (@%#x)", codepos );
if (type < PATCHARMAOFLSB || type > PATCHARMAOFREST)
#endif /* __ARM */
value = patchit( p->type, p->value.fill, size );
switch (type)
{
case PATCHADD:
return p->word + value;
case PATCHSHIFT:
if (p->word < 0)
{
return ((signed long) value) >> (- p->word);
}
else
{
return value << p->word;
}
case PATCHSWAP:
if (size == OBJWORD)
return swapw( value ); /* swap word */
else
return swaps( (unsigned) value ); /* swap short */
case PATCHOR:
return p->word | value;
#ifdef __C40
/*
* XXX - NC - 2/10/91
*
* WARNING: These patches a highly dependent upon the
* register scheme defined in c40/target.h and the
* code in load_address_constant() in c40/gen.c
*
* There are four cases:
*
* modnum < 256 modnum < 256 modnum > 255 modnum > 255
* offset < 256 offset > 255 offset < 256 offset > 255
*
* LDI *+AR4( modnum ), AR5 LDI *+AR4( modnum ), AR5 LDI AR4, AR5 LDI AR4, AR5
* LDI *+AR5( offset ), AR5 ADDI offset, AR5 ADDI modnum, AR5 ADDI modnum, AR5
* Bu AR5 LDI *AR5, AR5 LDI *AR5, AR5 LDI *AR5, AR5
* - Bu AR5 LDI *+AR5( offset ), AR5 ADDI offset, AR5
* - - Bu AR5 LDI *AR5, AR5
* - - - Bu AR5
*/
case PATCHC40DATAMODULE1: /* value is DataModule */
if (fits_in_8_bits( value ))
{
saved_modnum = -2;
return 0x084d0400U + (value & 0xff); /* LDI *+AR4( modnum ), AR5 */
}
else if (!fits_in_16_bits( value ))
{
error( "linker: module number does not fit in 16 bits - code will not link" );
}
else
{
saved_modnum = value;
return 0x080d000cU; /* LDI AR4, AR5 */
}
case PATCHC40DATAMODULE2: /* value is DataSymb */
if (saved_modnum == -2)
{
saved_offset = -2;
if (fits_in_8_bits( value ))
{
return 0x084d0500U + (value & 0xff); /* LDI *+AR5( offset ), AR5 */
}
else if (!fits_in_16_bits( value ))
{
error( "linker: function offset in module table does not fit in 16 bits - code will not link" );
}
else
{
saved_offset = -1; /* trigger LDI *AR5, AR5 */
return 0x026d0000U + (value & 0xffff); /* ADDI offset, AR5 */
}
}
else
{
saved_offset = value;
return 0x026d0000U + saved_modnum; /* ADDI modnum, AR5 */
}
case PATCHC40DATAMODULE3:
if (saved_modnum == -2 && saved_offset == -2)
{
return 0x6800000dU; /* Bu Ar5 */
}
else
{
return 0x084dc500U; /* LDI *AR5, AR5 */
}
case PATCHC40DATAMODULE4:
if (saved_modnum == -2 && saved_offset != -2)
{
return 0x6800000dU; /* Bu AR5 */
}
else if (saved_modnum != -2)
{
if (fits_in_8_bits( saved_offset ))
{
saved_modnum = -2; /* special case, picked up DataModule5 */
return 0x084d0500U + (saved_offset & 0xff); /* LDI *+AR5( offset ), AR5 */
}
else
{
return 0x026d0000U + (saved_offset & 0xffff); /* ADDI offset, AR5 */
}
}
case PATCHC40DATAMODULE5:
if (saved_modnum == -2)
{
return 0x6800000dU; /* Bu Ar5 */
}
else
{
return 0x084dc500U; /* LDI *AR5, AR5 */
}
/*
* special addition routines that take a mask as well
*/
case PATCHC40MASK24ADD:
{
word mask = 0x00FFFFFFU;
value += mask_and_sign_extend_word( p->word, mask );
if (!fits_in_24_bits( value ))
{
warn( "calculated offset (%08x) too big to fit in 24 bit instruction field (%08x)!",
value, p->word );
}
return (p->word & (~mask)) | (value & mask);
}
case PATCHC40MASK16ADD:
{
word mask = 0x0000FFFFU;
value += mask_and_sign_extend_word( p->word, mask );
if (!fits_in_16_bits( value ))
{
warn( "calculated offset (%08x) too big to fit in 16 bit instruction field (%08x)!",
value, p->word );
warn( "This is probably because the source file was compiled with the -Zpl1 option" );
}
return (p->word & (~mask)) | (value & mask);
}
case PATCHC40MASK8ADD:
{
word mask = 0x000000FFU;
/* NB/ use unsigned values as this patch is altering indirect displacements */
value += (p->word & mask);
if (value & ~mask)
{
asm_Module * m;
m = VMAddr( asm_Module, curmod );
warn( "calculated offset (%08x) too big to fit in 8 bits, op code in module %s!",
value, m->file_name );
warn( "This is probably because the source file was compiled with the -Zpl1 option" );
}
return (p->word & (~mask)) | (value & mask);
}
#endif /* __C40 */
#ifdef __ARM
case PATCHARMDT: /* ARM data transfer instr. patch */
value += (p->word & 0xfff); /* patch value includes existing immediate offset */
data = p->word & 0xfffff000U;
if (p->type == OBJLABELREF)
value -= 8; /* adjust pc rel labelref for ARM pipelining */
if (value < -2048 || value > 4096)
error( "ARM data transfer patch value (%#x) too large (@%#x)", value, codepos );
/* set direction bit (23) in ARM instruction - 1 = up 0 = down */
if (value < 0)
{
value = -value; /* offsets are unsigned */
data &= ~(1 << 23); /* down = backwards jump = bit 23=0 */
}
else
{
data |= 1 << 23;
}
return (data | value);
case PATCHARMDP: /* ARM data processing instr. patch */
{
word ror = 0;
word savval;
value += (p->word & 0xff); /* add existing contents to patch value */
if (p->type == OBJLABELREF)
value -= 8; /* adjust pc rel labelref for ARM pipelining */
savval = value;
if (value < 0)
error( "ARM data processing patch value should not be negative (@%#x)", codepos );
if (value > 255)
{
ror = 0x10;
while (!(value & 3)) /* word aligned immediate data? */
{
/* see ARM assembly lang prg. pg 40 */
/* ARM data man pg 21/25 */
value >>= 2; /* shift immediate value left by two */
if (--ror <= 4) /* and alter rotate by factor of two */
break; /* ARM immediate rotates are multiplied by 2 */
}
if (ror == 0x10)
ror = 0; /* if no rotates used */
}
if (value > 255)
{
#if 1
error( "Patch value of %#x is too large for ARM DP patch.(origval = %#x) data=%#x (@%#x)",
value, savval, p->word, codepos );
#else
warn( "Patch value of %#x is too large for ARM DP patch.(origval = %#x) data=%#x (@%#x)",
value, savval, p->word, codepos );
#endif
}
value |= ror << 8; /* 4 bits of ror preceed 8 bit immediate */
return (value | (p->word & (unsigned long) 0xfffff000U));
}
case PATCHARMDPLSB: /* ARM data processing instr. patch least sig byte */
{
patchNeg = FALSE; /* default to use an add instr. for labelrefs */
if (p->type == OBJLABELREF)
{
value -= 8; /* adjust pc rel labelref for ARM pipelining */
if (value < 0)
{ /* backwards label ref */
patchNeg = TRUE; /* use a sub instr. */
value = -value;
}
}
else if (value < 0)
{
error( "Negative patch value passed to armdplsb" );
}
if (p->type != OBJLABELREF)
{
word imm;
/* get instr. existing immediate const and add to patch value */
imm = (p->word & 0xfff); /* bodged 12 bit immediate */
value += imm;
}
restofdppatch = value;
value &= 0xff; /* only ls byte for this patch - not optimal as rot cannot be used */
restofdppatch -= value; /* remember rest of patch */
if (patchNeg)
{
int instr = (int)(p->word & 0xfffff000U);
if ((instr & 0x01e00000U) == 0x00800000U)
{
instr &= ~0x01e00000U; /* convert to a sub instruct */
instr |= 0x00400000U;
}
else
{
error( "armdplsb: Trying to change add to sub when instr not an add" );
}
return (value | instr);
}
else
{
return (value | (p->word & 0xfffff000U));
}
}
case PATCHARMDPMID: /* ARM data processing instr. patch second least sig byte */
{
/* dummy to clean up any unrequired patch info */
value = restofdppatch;
value &= 0xFF00; /* use second ls byte for this patch */
restofdppatch -= value; /* work out remainder still to patch */
value >>= 8; /* move into instructions immediate field */
value |= 0x0C00; /* merge in immediate data's rotate field */
/* 0x0C00 = left shift by eight bits */
if (patchNeg)
{
int instr = (int)(p->word & 0xfffff000U);
if ((instr & 0x01e00000U) == 0x00800000U)
{
instr &= ~0x01e00000U; /* convert to a sub instruct */
instr |= 0x00400000U;
}
else
{
error( "armdpmid: Trying to change add to sub when instr not an add" );
}
return (value | instr);
}
else
{
return (value | (p->word & 0xfffff000U));
}
}
case PATCHARMDPREST: /* ARM data processing instr. patch - rest of last lsb patch */
{
word ror = 0; /* dummy to clean up any unrequired patch info */
value = restofdppatch; /* use residue from last armdplsb/mid patch */
if (value > 255)
{
ror = 0x10;
while (!(value & 3)) /* word aligned immediate data? */
{
/* see ARM assembly lang prg. pg 40 */
/* ARM data man pg 21/25 */
value >>= 2; /* shift immediate value left by two */
if (--ror <= 4) /* and alter rotate by factor of two */
break; /* ARM immediate rotates are multiplied by 2 */
}
if (ror == 0x10)
ror = 0; /* if no rotates used */
}
if (value > 255 )
error( "Patch value of %#x is too large for ARM DP residue patch (@%#x)", value, codepos );
value |= ror << 8; /* 4 bits of ror preceed 8 bit immediate */
if (patchNeg)
{
int instr = (int)(p->word & 0xfffff000U);
if ((instr & 0x01e00000U) == 0x00800000U)
{
instr &= ~0x01e00000U; /* convert to a sub instruct */
instr |= 0x00400000U;
}
else
{
error( "armdprest: Trying to change add to sub when instr not an add" );
}
return (value | instr);
}
else
{
return (value | (p->word & 0xfffff000U));
}
}
case PATCHARMJP: /* ARM branch instr. patch */
if (p->type != OBJLABELREF)
error( "ARM jp patch should only be used with a label ref (@%#x)", codepos );
return (p->word & 0xff000000U) | (((value - 8) >> 2) & 0x00ffffffU);
case PATCHARMAOFLSB:
{
Symbol * s;
s = VMAddr( Symbol, p->value.v );
trace( "ARM patch: data/code symb of symbol %s", s->name );
if (s->type != S_DATADONE && s->type != S_FUNCDONE)
{
asm_Module * m;
m = VMAddr( asm_Module, curmod );
warn( "Symbol \"%s\" used in module '%s', but not defined", s->name + 1, m->file_name );
s->type = S_DATADONE;
s->module = curmod;
return 0;
}
/* symbol's offest into data or code table is s->value.w */
value = s->value.w;
restofdppatch = value;
value &= 0xff; /* only ls byte for this patch - not optimal as rot cannot be used */
restofdppatch -= value; /* remember rest of patch */
if (s->type == S_DATADONE)
{
AOFSymbolIsData = TRUE;
return 0xe2800000UL | ((p->word & 0xF) << 12) | ((p->word & 0xF) << 16) | value;
}
else
{
AOFSymbolIsData = FALSE;
return 0xe5900000UL | ((p->word & 0xF) << 12) | ((p->word & 0xF) << 16) | value;
}
}
case PATCHARMAOFMID:
value = restofdppatch;
value &= 0xFF00; /* use second ls byte for this patch */
restofdppatch -= value; /* work out remainder still to patch */
value >>= 8; /* move into instructions immediate field */
value |= 0x0C00; /* merge in immediate data's rotate field */
/* 0x0C00 = left shift by eight bits */
if (AOFSymbolIsData)
return 0xe2800000UL | ((p->word & 0xF) << 12) | ((p->word & 0xF) << 16) | value;
else
return 0xe1a00000UL;
case PATCHARMAOFREST:
{
word ror = 0; /* dummy to clean up any unrequired patch info */
value = restofdppatch; /* use residue from last armdplsb/mid patch */
if (value > 255)
{
ror = 0x10;
while (!(value & 3)) /* word aligned immediate data? */
{
/* see ARM assembly lang prg. pg 40 */
/* ARM data man pg 21/25 */
value >>= 2; /* shift immediate value left by two */
if (--ror <= 4) /* and alter rotate by factor of two */
break; /* ARM immediate rotates are multiplied by 2 */
}
if (ror == 0x10)
ror = 0; /* if no rotates used */
}
if (value > 255 )
error( "Patch value of %#x is too large for ARM DP residue patch (@%#x)", value, codepos );
value |= ror << 8; /* 4 bits of ror preceed 8 bit immediate */
if (AOFSymbolIsData)
return 0xe2800000UL | ((p->word & 0xF) << 12) | ((p->word & 0xF) << 16) | value;
else
return 0xe1a00000UL;
}
#endif /* __ARM */
default:
error( "Unknown machine dependent patch type in mcpatch: %#x (@%#x)", type, codepos );
}
return 0;
} /* mcpatch */
/*}}}*/
/*}}}*/
| axelmuhr/Helios-NG | cmds/linker/genimage.c | C | gpl-3.0 | 35,380 |
package ExifUtils;
import Rename.meta;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author gabor
*/
public interface ifMetaLink {
/**
* Reads the standard metadata from the specified files in the given directory
* @param filenames String list of the representation of the file names
* @param dir the directory where the files are
* @return a list of the <code> meta </code> objects for every file if the read was unsuccessful the note field of the object will contain the error message
*/
public List<meta> exifToMeta(ArrayList<String> filenames, File dir);
}
| GRuppert/PictureImport | src/ExifUtils/ifMetaLink.java | Java | gpl-3.0 | 844 |
/*
* to_base32.c
* convert binary string to base32, Tile impl.
*
* Copyright (c) 2011 Jan Seiffert
*
* This file is part of g2cd.
*
* g2cd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* g2cd is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with g2cd.
* If not, see <http://www.gnu.org/licenses/>.
*
* $Id: $
*/
#include "tile.h"
#define ARCH_NAME_SUFFIX tile
#define ONLY_REMAINDER
#include "../generic/to_base32.c"
unsigned char *to_base32(unsigned char *dst, const unsigned char *src, unsigned len)
{
while(len >= sizeof(uint64_t))
{
uint64_t d;
if(IS_ALIGN(src, sizeof(unsigned long)))
d = *(const uint64_t *)src;
else
{
#ifdef __tilegx__
uint64_t t;
d = tile_ldna(src);
t = tile_ldna(src + 8);
d = tile_align(d, t, src);
# if (HOST_IS_BIGENDIAN-0) == 0
d = __insn_revbytes(d);
# endif
#elif defined(__tilepro__)
uint32_t t1,t2,t3;
t1 = tile_ldna(src);
t2 = tile_ldna(src + 4);
t3 = tile_ldna(src + 8);
t1 = tile_align(t1, t2, src);
t2 = tile_align(t2, t3, src + 4);
# if (HOST_IS_BIGENDIAN-0) == 0
t1 = __insn_bytex(t1);
t2 = __insn_bytex(t2);
# endif
d = (((uint64_t)t1) << 32) | t2;
#else
d = get_unaligned_be64(src);
#endif
}
src += 5;
len -= 5;
dst = do_40bit(dst, d);
}
return to_base32_generic(dst, src, len);
}
static char const rcsid_tb32ti[] GCC_ATTR_USED_VAR = "$Id: $";
/* EOF */
| kaffeemonster/g2cd | lib/tile/to_base32.c | C | gpl-3.0 | 1,834 |
<?php
/**
* OpenEyes
*
* (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2013
* (C) OpenEyes Foundation, 2011-2013
* This file is part of OpenEyes.
* OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
*
* @package OpenEyes
* @link http://www.openeyes.org.uk
* @author OpenEyes <info@openeyes.org.uk>
* @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
* @copyright Copyright (c) 2011-2013, OpenEyes Foundation
* @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
*/
?>
<?php
if (!@$options['get_row']) {
$this->renderPartial('//base/_messages') ?>
<div class="box admin">
<h2><?php echo $title?></h2>
<?php }
$this->widget('GenericAdmin', array('model' => $model, 'items' => $items, 'errors' => $errors) + $options); ?>
<?php if (!@$options['get_row']) { ?>
</div>
<?php }
| openeyesarchive/OpenEyes | protected/views/admin/generic_admin.php | PHP | gpl-3.0 | 1,442 |
// SuperTux
// Copyright (C) 2015 Hume2 <teratux.mail@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "gui/item_stringselect.hpp"
#include "gui/menu_manager.hpp"
#include "supertux/colorscheme.hpp"
#include "supertux/gameconfig.hpp"
#include "supertux/globals.hpp"
#include "supertux/resources.hpp"
#include "video/drawing_context.hpp"
#include "video/surface.hpp"
ItemStringSelect::ItemStringSelect(const std::string& text, std::vector<std::string> items, int* selected, int id) :
MenuItem(text, id),
m_items(std::move(items)),
m_selected(std::move(selected)),
m_callback(),
m_width(calculate_width())
{
}
void
ItemStringSelect::draw(DrawingContext& context, const Vector& pos, int menu_width, bool active)
{
float roff = static_cast<float>(Resources::arrow_left->get_width()) * 1.0f;
float sel_width = Resources::normal_font->get_text_width(m_items[*m_selected]);
// Draw left side
context.color().draw_text(Resources::normal_font, get_text(),
Vector(pos.x + 16.0f,
pos.y - Resources::normal_font->get_height() / 2.0f),
ALIGN_LEFT, LAYER_GUI, active ? g_config->activetextcolor : get_color());
// Draw right side
context.color().draw_surface(Resources::arrow_left,
Vector(pos.x + static_cast<float>(menu_width) - sel_width - 2.0f * roff - 8.0f,
pos.y - 8.0f),
LAYER_GUI);
context.color().draw_surface(Resources::arrow_right,
Vector(pos.x + static_cast<float>(menu_width) - roff - 8.0f,
pos.y - 8.0f),
LAYER_GUI);
context.color().draw_text(Resources::normal_font, m_items[*m_selected],
Vector(pos.x + static_cast<float>(menu_width) - roff - 8.0f,
pos.y - Resources::normal_font->get_height() / 2.0f),
ALIGN_RIGHT, LAYER_GUI, active ? g_config->activetextcolor : get_color());
}
int
ItemStringSelect::get_width() const
{
return static_cast<int>(m_width);
}
void
ItemStringSelect::process_action(const MenuAction& action)
{
switch (action) {
case MenuAction::LEFT:
if ( (*m_selected) > 0) {
(*m_selected)--;
} else {
(*m_selected) = static_cast<int>(m_items.size()) - 1;
}
MenuManager::instance().current_menu()->menu_action(*this);
if (m_callback) {
m_callback(*m_selected);
}
break;
case MenuAction::RIGHT:
case MenuAction::HIT:
if ( (*m_selected)+1 < int(m_items.size())) {
(*m_selected)++;
} else {
(*m_selected) = 0;
}
MenuManager::instance().current_menu()->menu_action(*this);
if (m_callback) {
m_callback(*m_selected);
}
break;
default:
break;
}
}
float
ItemStringSelect::calculate_width() const
{
float max_item_width = 0;
for (auto const& item : m_items) {
max_item_width = std::max(Resources::normal_font->get_text_width(item),
max_item_width);
}
return Resources::normal_font->get_text_width(get_text()) + max_item_width + 64.0f;
}
/* EOF */
| SuperTux/supertux | src/gui/item_stringselect.cpp | C++ | gpl-3.0 | 3,911 |
dnf remove -y nodejs
cd /usr/local/src
wget https://nodejs.org/dist/v12.4.0/node-v12.4.0-linux-x64.tar.xz
tar xf node-v12.4.0-linux-x64.tar.xz
mv node-v12.4.0-linux-x64 /srv/node-v12.4.0
rm -f /srv/node
ln -s /srv/node-v12.4.0 /srv/node
alternatives --install /usr/local/bin/node node /srv/node-v12.4.0/bin/node 100 \
--slave /usr/local/bin/npm npm /srv/node-v12.4.0/bin/npm \
--slave /usr/local/bin/npx npx /srv/node-v12.4.0/bin/npx
node -v
#alternatives --remove node /srv/node-v12.4.0/bin/node | oscm/shell | lang/node.js/binrary/node-v12.4.0.sh | Shell | gpl-3.0 | 502 |
#if defined(__APPLE__)
#include <CoreServices/CoreServices.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <unistd.h>
unsigned long long currentTimeNano() {
uint64_t t = mach_absolute_time();
Nanoseconds tNano = AbsoluteToNanoseconds(*(AbsoluteTime*)&t);
return *(uint64_t *)&tNano;
}
unsigned long long currentTimeMillis() {
return currentTimeNano()/1000000;
}
#elif defined(__linux)
#include <time.h>
unsigned long long currentTimeNano() {
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return t.tv_sec*1000000000 + t.tv_nsec;
}
unsigned long long currentTimeMillis() {
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return t.tv_sec*1000 + t.tv_nsec/1000000;
}
#elif defined(_WIN32)
#error "Not ported to Win32. Can you help?"
#endif
| luxigo/elphel-jp4-tools | libjp4/clock.h | C | gpl-3.0 | 797 |
--
-- Type: PROCEDURE; Owner: TM_CZ; Name: I2B2_RBM_ZSCORE_CALC_NEW2
--
CREATE OR REPLACE PROCEDURE "TM_CZ"."I2B2_RBM_ZSCORE_CALC_NEW2"
(
trial_id VARCHAR2
,run_type varchar2 := 'L'
,currentJobID NUMBER := null
,data_type varchar2 := 'R'
,log_base number := 2
,source_cd varchar2
)
AS
/*************************************************************************
This Stored Procedure is used in ETL load RBM data
Date:12/04/2013
******************************************************************/
TrialID varchar2(50);
sourceCD varchar2(50);
sqlText varchar2(2000);
runType varchar2(10);
dataType varchar2(10);
stgTrial varchar2(50);
idxExists number;
pExists number;
nbrRecs number;
logBase number;
--Audit variables
newJobFlag INTEGER(1);
databaseName VARCHAR(100);
procedureName VARCHAR(100);
jobID number(18,0);
stepCt number(18,0);
-- exceptions
invalid_runType exception;
trial_mismatch exception;
trial_missing exception;
BEGIN
TrialId := trial_id;
runType := run_type;
dataType := data_type;
logBase := log_base;
sourceCd := source_cd;
--Set Audit Parameters
newJobFlag := 0; -- False (Default)
jobID := currentJobID;
SELECT sys_context('USERENV', 'CURRENT_SCHEMA') INTO databaseName FROM dual;
procedureName := $$PLSQL_UNIT;
--Audit JOB Initialization
--If Job ID does not exist, then this is a single procedure run and we need to create it
IF(jobID IS NULL or jobID < 1)
THEN
newJobFlag := 1; -- True
cz_start_audit (procedureName, databaseName, jobID);
END IF;
stepCt := 0;
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Starting zscore calc for ' || TrialId || ' RunType: ' || runType || ' dataType: ' || dataType,0,stepCt,'Done');
if runType != 'L' then
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Invalid runType passed - procedure exiting',SQL%ROWCOUNT,stepCt,'Done');
raise invalid_runType;
end if;
-- For Load, make sure that the TrialId passed as parameter is the same as the trial in stg_subject_mrna_data
-- If not, raise exception
if runType = 'L' then
select distinct trial_name into stgTrial
from WT_SUBJECT_RBM_PROBESET;
if stgTrial != TrialId then
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'TrialId not the same as trial in WT_SUBJECT_RBM_PROBESET - procedure exiting',SQL%ROWCOUNT,stepCt,'Done');
raise trial_mismatch;
end if;
end if;
--remove Reload processing
-- For Reload, make sure that the TrialId passed as parameter has data in de_subject_rbm_data
-- If not, raise exception
if runType = 'R' then
select count(*) into idxExists
from de_subject_rbm_data
where trial_name = TrialId;
if idxExists = 0 then
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'No data for TrialId in de_subject_rbm_data - procedure exiting',SQL%ROWCOUNT,stepCt,'Done');
raise trial_missing;
end if;
end if;
-- truncate tmp tables
execute immediate('truncate table tm_wz.wt_subject_rbm_logs');
execute immediate('truncate table tm_wz.wt_subject_rbm_calcs');
execute immediate('truncate table tm_wz.wt_subject_rbm_med');
select count(*)
into idxExists
from all_indexes
where table_name = 'WT_SUBJECT_RBM_LOGS'
and index_name = 'WT_SUBJECT_RBM_LOGS_I1'
and owner = 'TM_WZ';
if idxExists = 1 then
execute immediate('drop index tm_wz.wt_subject_rbm_logs_i1');
end if;
select count(*)
into idxExists
from all_indexes
where table_name = 'WT_SUBJECT_RBM_CALCS'
and index_name = 'WT_SUBJECT_RBM_CALCS_I1'
and owner = 'TM_WZ';
if idxExists = 1 then
execute immediate('drop index tm_wz.wt_subject_rbm_calcs_i1');
end if;
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Truncate work tables in TM_WZ',0,stepCt,'Done');
-- if dataType = L, use intensity_value as log_intensity
-- if dataType = R, always use intensity_value
if dataType = 'L' then
insert into wt_subject_rbm_logs
(probeset_id
,intensity_value
,assay_id
,log_intensity
,patient_id
-- ,sample_cd
-- ,subject_id
)
select probeset
,intensity_value
,assay_id
,round(intensity_value,6)
,patient_id
-- ,sample_cd
-- ,subject_id
from wt_subject_rbm_probeset
where trial_name = TrialId;
--end if;
else
insert into wt_subject_rbm_logs
(probeset_id
,intensity_value
,assay_id
,log_intensity
,patient_id
-- ,sample_cd
-- ,subject_id
)
select probeset
,intensity_value
,assay_id
,round(log(2,intensity_value),6)
,patient_id
-- ,sample_cd
-- ,subject_id
from wt_subject_rbm_probeset
where trial_name = TrialId;
-- end if;
end if;
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Loaded data for trial in TM_WZ wt_subject_rbm_logs',SQL%ROWCOUNT,stepCt,'Done');
commit;
execute immediate('create index tm_wz.wt_subject_rbm_logs_i1 on tm_wz.wt_subject_rbm_logs (trial_name, probeset_id) nologging tablespace "INDX"');
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Create index on TM_WZ wt_subject_rbm_logs',0,stepCt,'Done');
-- calculate mean_intensity, median_intensity, and stddev_intensity per experiment, probe
insert into wt_subject_rbm_calcs
(trial_name
,probeset_id
,mean_intensity
,median_intensity
,stddev_intensity
)
select d.trial_name
,d.probeset_id
,avg(log_intensity)
,median(log_intensity)
,stddev(log_intensity)
from wt_subject_rbm_logs d
group by d.trial_name
,d.probeset_id;
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Calculate intensities for trial in TM_WZ wt_subject_rbm_calcs',SQL%ROWCOUNT,stepCt,'Done');
commit;
execute immediate('create index tm_wz.wt_subject_rbm_calcs_i1 on tm_wz.wt_subject_rbm_calcs (trial_name, probeset_id) nologging tablespace "INDX"');
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Create index on TM_WZ wt_subject_rbm_calcs',0,stepCt,'Done');
-- calculate zscore
insert into wt_subject_rbm_med parallel
(probeset_id
,intensity_value
,log_intensity
,assay_id
,mean_intensity
,stddev_intensity
,median_intensity
,zscore
,patient_id
-- ,sample_cd
-- ,subject_id
)
select d.probeset_id
,d.intensity_value
,d.log_intensity
,d.assay_id
,c.mean_intensity
,c.stddev_intensity
,c.median_intensity
,(CASE WHEN stddev_intensity=0 THEN 0 ELSE (log_intensity - median_intensity ) / stddev_intensity END)
,d.patient_id
-- ,d.sample_cd
-- ,d.subject_id
from wt_subject_rbm_logs d
,wt_subject_rbm_calcs c
where d.probeset_id = c.probeset_id;
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Calculate Z-Score for trial in TM_WZ wt_subject_rbm_med',SQL%ROWCOUNT,stepCt,'Done');
commit;
/*
select count(*) into n
select count(*) into nbrRecs
from wt_subject_rbm_med;
if nbrRecs > 10000000 then
i2b2_mrna_index_maint('DROP',,jobId);
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Drop indexes on DEAPP de_subject_rbm_data',0,stepCt,'Done');
else
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Less than 10M records, index drop bypassed',0,stepCt,'Done');
end if;
*/
insert into de_subject_rbm_data
(trial_name
--,rbm_annotation_id
,antigen_name
,patient_id
,gene_symbol
,gene_id
,assay_id
,concept_cd
,value
,normalized_value
,unit
,log_intensity
,zscore
)
select TrialId
--,a.id ---rbm_annotation_id
,trim(substr(m.probeset_id,1,instr(m.probeset_id,'(')-1)) --m.probeset_id
,m.patient_id
,a.gene_symbol -- gene-symbol
,a.gene_id --gene_id
,m.assay_id
,d.concept_code --concept_cd
,round(m.intensity_value,6)
,round(case when dataType = 'R' then m.intensity_value
when dataType = 'L'
then case when logBase = -1 then null else power(logBase, m.log_intensity) end
else null
end,4) as normalized_value
-- ,decode(dataType,'R',m.intensity_value,'L',power(logBase, m.log_intensity),null)
,trim(substr(m.probeset_id ,instr(m.probeset_id ,'(',-1,1),length(m.probeset_id )))
,round(m.log_intensity,6)
,(CASE WHEN m.zscore < -2.5 THEN -2.5 WHEN m.zscore > 2.5 THEN 2.5 ELSE round(m.zscore,5) END)
-- ,m.sample_id
-- ,m.subject_id
from wt_subject_rbm_med m
,wt_subject_rbm_probeset p
,DE_RBM_ANNOTATION a
,de_subject_sample_mapping d
where
trim(substr(p.probeset,1,instr(p.probeset,'(')-1)) =trim(a.antigen_name)
and d.subject_id=p.subject_id
and p.platform=a.gpl_id
and m.assay_id=p.assay_id
and d.gpl_id=p.platform
and d.patient_id=p.patient_id
and d.concept_code in (select concept_cd from i2b2demodata.concept_dimension where concept_cd=d.concept_code)
and d.trial_name=TrialId
and p.patient_id=m.patient_id
and p.probeset=m.probeset_id;
--TODO Find better way to fill in join table
insert into DEAPP.DE_RBM_DATA_ANNOTATION_JOIN
select d.id, ann.id from deapp.de_subject_rbm_data d
inner join deapp.de_rbm_annotation ann on ann.antigen_name = d.antigen_name
inner join deapp.de_subject_sample_mapping ssm on ssm.assay_id = d.assay_id and ann.gpl_id = ssm.gpl_id
where not exists( select * from deapp.de_rbm_data_annotation_join j where j.data_id = d.id AND j.annotation_id = ann.id );
/*
select distinct TrialId
,a.id ---rbm_annotation_id
,trim(substr(m.probeset_id,1,instr(m.probeset_id,'(')-1)) --m.probeset_id
,m.patient_id
,a.gene_symbol -- gene-symbol
,a.gene_id --gene_id
,m.assay_id
,d.concept_code --concept_cd
,m.intensity_value
,round(case when dataType = 'R' then m.intensity_value
when dataType = 'L'
then case when logBase = -1 then null else power(logBase, m.log_intensity) end
else null
end,4) as normalized_value
-- ,decode(dataType,'R',m.intensity_value,'L',power(logBase, m.log_intensity),null)
,trim(substr(m.probeset_id ,instr(m.probeset_id ,'('),length(m.probeset_id )))
,(CASE WHEN m.zscore < -2.5 THEN -2.5 WHEN m.zscore > 2.5 THEN 2.5 ELSE m.zscore END)
-- ,m.sample_id
-- ,m.subject_id
from wt_subject_rbm_med m, DE_RBM_ANNOTATION a,de_subject_sample_mapping d
--(select distinct intensity_value from wt_subject_rbm_probeset p) x
where a.antigen_name = trim(substr(m.probeset_id,1,instr(m.probeset_id,'(')-1)) and m.patient_id = d.patient_id
--and d.assay_id = m.assay_id
and d.trial_name = TrialId
and d.source_cd = source_cd;
--and d.gpl_id = a.gpl_id;
--and x.intensity_value = m.intensity_value;
*/
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Insert data for trial in DEAPP de_subject_rbm_data',SQL%ROWCOUNT,stepCt,'Done');
commit;
-- add indexes, if indexes were not dropped, procedure will not try and recreate
/*
i2b2_mrna_index_maint('ADD',,jobId);
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Add indexes on DEAPP de_subject_rbm_data',0,stepCt,'Done');
*/
-- cleanup tmp_ files
--execute immediate('truncate table tm_wz.wt_subject_rbm_logs');
--execute immediate('truncate table tm_wz.wt_subject_rbm_calcs');
--execute immediate('truncate table tm_wz.wt_subject_rbm_med');
stepCt := stepCt + 1;
cz_write_audit(jobId,databaseName,procedureName,'Truncate work tables in TM_WZ',0,stepCt,'Done');
---Cleanup OVERALL JOB if this proc is being run standalone
IF newJobFlag = 1
THEN
cz_end_audit (jobID, 'SUCCESS');
END IF;
EXCEPTION
WHEN invalid_runType or trial_mismatch or trial_missing then
--Handle errors.
cz_error_handler (jobID, procedureName);
--End Proc
cz_end_audit (jobID, 'FAIL');
when OTHERS THEN
--Handle errors.
cz_error_handler (jobID, procedureName);
cz_end_audit (jobID, 'FAIL');
END;
/
| thehyve/transmart-data | ddl/oracle/tm_cz/procedures/i2b2_rbm_zscore_calc_new2.sql | SQL | gpl-3.0 | 12,503 |
namespace Grove.Tests.Cards
{
using Infrastructure;
using Xunit;
public class SageEyeAvengers
{
public class Ai : AiScenario
{
[Fact]
public void ReturnBearToHand()
{
Battlefield(P1, "Sage-Eye Avengers");
Battlefield(P2, "Grizzly Bears", "Forest");
P2.Life = 4;
RunGame(1);
Equal(0, P2.Life);
}
}
}
} | pinky39/grove | tests/Grove.Tests/Cards/SageEyeAvengers.cs | C# | gpl-3.0 | 392 |
//
//
// Laidout, for laying out
// Copyright (C) 2004-2006 by Tom Lechner
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 3 of the License, or (at your option) any later version.
// For more details, consult the COPYING file in the top directory.
//
// Please consult http://www.laidout.org about where to send any
// correspondence about this software.
//
/*********************** psfilters.cc *********************/
/*! \file psfilters.cc
* Define various encoding filters for use in postscript.
*
* Includes:\n
* Ascii85 encoding
*
* \todo Ultimately, perhaps include RunlengthEncode and also make them
* operate with something resembling streams rather than complete
* buffers?
*/
#include "psfilters.h"
namespace Laidout {
//--------------------------- Ascii85 encoding --------------------------------
/*! \ingroup postscript
* Translate in to the Ascii85 encoding, which translates groups
* of 4 8-bit bytes into 5 ascii characters, from '!'==33 to 'u'==117.
* Returns the number of bytes written to f.
*
* When the 5 new chars are all 0, then 'z' is put, rather than '!!!!!'.
* If not enough bytes are provided, it is padded with 0.
*
* <tt> a1*256^3 + a2*256^2 + a3*256 + a4 = b1*85^4 + b2*85^3 + b3*85^2 + b4*85 + b5</tt>
*
* If puteod!=0, then after writing the data, put an extra "~>\\n" at the end.
*
* linewidth is rounded to the nearest multiple of 5 above or equal to it.
*/
int Ascii85_out(FILE *f,unsigned char *in,int len,int puteod,int linewidth,int *curwidth)
{
if (!f) return -1;
linewidth=((linewidth-1)/5+1)*5;
unsigned int i;
unsigned char b1,b2,b3,b4,b5;
int c=0,w,n=0;
if (curwidth) w=*curwidth; else w=0;
while (c<len) {
// find the 4-byte chunk
i=(unsigned char)(in[c++])*256; //first byte
if (c<len) i|=(in[c++]); //second byte or 0
i*=256;
if (c<len) i|=(in[c++]); //third byte or 0
i*=256;
if (c<len) i|=(in[c++]); //fourth byte or 0
if (i==0) {
fprintf(f,"z");
w++;
n++;
if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
} else {
// find the 5-number translation
b1 = i/52200625; // 85^4
i%= 52200625;
b2 = i / 614125; // 85^3
i %= 614125;
b3 = i / 7225; // 85^2
i %= 7225;
b4 = i / 85; // 85^1
b5 = i % 85;
fputc(33+b1,f);
w++; if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
fputc(33+b2,f);
w++; if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
fputc(33+b3,f);
w++; if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
fputc(33+b4,f);
w++; if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
fputc(33+b5,f);
w++; if (w>=linewidth) { fprintf(f,"\n"); n++; w=0; }
n+=5;
}
if (c>=len && puteod) {
if (2+w>linewidth) fprintf(f,"\n");
fprintf(f,"~>\n");
n+=3;
w=0;
}
}
if (curwidth) *curwidth=w;
return n;
}
//! Take in[4] and make out[5]. Returns the number of chars to use, 1 for 'z' or 5 other ascii chars.
/*! \ingroup postscript
* \todo *** this is untested
*/
int Ascii85_chars(unsigned char *in,unsigned char *out)
{
unsigned long i;
i=(((((in[0]<<8) | in[1])<<8) | in[2])<<8) | in[3];
if (i==0) {
out[0]='z';
out[1]=out[2]=out[3]=out[4]=0;
return 1;
}
// find the 5-number translation
out[0]=33+ i/52200625; // 85^4
i%= 52200625;
out[1]=33+ i/614125; // 85^3
i %= 614125;
out[2]=33+ i / 7225; // 85^2
i %= 7225;
out[3]=33+ i / 85; // 85^1
out[4]=33+ i % 85; // 85^0
return 5;
}
} // namespace Laidout
| Laidout/laidout | src/printing/psfilters.cc | C++ | gpl-3.0 | 3,625 |
/* Main program for the PPL/SWI-Prolog generated tests.
Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
Copyright (C) 2010-2017 BUGSENG srl (http://bugseng.com)
This file is part of the Parma Polyhedra Library (PPL).
The PPL is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
The PPL is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
For the most up-to-date information see the Parma Polyhedra Library
site: http://bugseng.com/products/ppl/ . */
member(X, [X|_]).
member(X, [_|T]) :-
member(X, T).
append([], L, L).
append([H|T], L, [H|R]) :-
append(T, L, R).
:- ensure_loaded('ppl_prolog_generated_test_main.pl').
prolog_system('SWI').
main :-
current_output(Old_Stream),
open(obtained_pgt, write, Stream),
set_output(Stream),
(check_all ->
write('OK')
;
write('FAILURE')
),
nl,
close(Stream),
set_output(Old_Stream).
| fcristini/PPLite2 | interfaces/Prolog/SWI/swi_prolog_generated_test.pl | Perl | gpl-3.0 | 1,462 |
-----------------------------------
-- Area: Xarcabard
-- NPC: ??? (for Boreal Tiger)
-- Involved in Quests: Atop the Highest Mountains
-- @zone 112
-- @pos 341 -29 370
-----------------------------------
package.loaded["scripts/zones/Xarcabard/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/quests");
require("scripts/zones/Xarcabard/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if((os.time() - player:getVar("BorealTigerKilled")) < 200) then
player:setVar("BorealTigerKilled",0);
player:addKeyItem(ROUND_FRIGICITE);
player:messageSpecial(KEYITEM_OBTAINED, ROUND_FRIGICITE);
else
player:messageSpecial(NOTHING_ORDINARY_HERE);
player:setVar("BorealTigerKilled",0);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end; | Laterus/Darkstar-Linux-Fork | scripts/zones/Xarcabard/npcs/qm2.lua | Lua | gpl-3.0 | 1,469 |
<?php
class Util_DocblockParser {
protected $docblock;
public function __construct($docblock) {
$this->docblock = $docblock;
}
/**
* @return array<string,string>
*/
public function parse() {
$docblock = $this->docblock;
$docblock = preg_replace( "/(^\/\*\*)|(\*\/$)/", "", $docblock );
$docblock = preg_replace( "/^\\s*\*/m", "", $docblock );
$docblock = explode( "\n", $docblock );
$lasttag = 0;
$tags = array( 0 => "", 1 => "" );
foreach( $docblock as $line ) {
$line = trim( $line );
if ($lasttag == 0) {
if (!empty($line) && $line[0] != "@") {
$tags[0] = trim( $line );
$lasttag = 1;
continue;
}
}
$line = strtr( $line, "\t", " " );
if (empty( $line )) continue;
if ($line[0] == "@") {
$pos = strpos( $line, " ", 2 );
if ($pos === false) {
$lasttag = substr( $line, 1 );
$tags[$lasttag] = "";
} else {
$lasttag = substr( $line, 1, $pos - 1);
$tags[$lasttag] = trim(substr( $line, $pos + 1));
}
} else {
$tags[$lasttag] .= (empty( $tags[$lasttag] )?"":" ") . $line;
}
}
return $tags;
}
} | szymanp/light | Light/Util/DocblockParser.php | PHP | gpl-3.0 | 1,121 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Uses of Class com.google.gwt.core.ext.linker.SyntheticArtifact (Google Web Toolkit Javadoc)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.google.gwt.core.ext.linker.SyntheticArtifact (Google Web Toolkit Javadoc)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
GWT 2.4.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?com/google/gwt/core/ext/linker//class-useSyntheticArtifact.html" target="_top"><B>FRAMES</B></A>
<A HREF="SyntheticArtifact.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>com.google.gwt.core.ext.linker.SyntheticArtifact</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#com.google.gwt.core.ext.linker"><B>com.google.gwt.core.ext.linker</B></A></TD>
<TD>Classes for writing Linkers. </TD>
</TR>
</TABLE>
<P>
<A NAME="com.google.gwt.core.ext.linker"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A> in <A HREF="../../../../../../../com/google/gwt/core/ext/linker/package-summary.html">com.google.gwt.core.ext.linker</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../../com/google/gwt/core/ext/linker/package-summary.html">com.google.gwt.core.ext.linker</A> that return <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitBytes(com.google.gwt.core.ext.TreeLogger, byte[], java.lang.String)">emitBytes</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
byte[] what,
java.lang.String partialPath)</CODE>
<BR>
A helper method to create an artifact from an array of bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitBytes(com.google.gwt.core.ext.TreeLogger, byte[], java.lang.String, long)">emitBytes</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
byte[] what,
java.lang.String partialPath,
long lastModified)</CODE>
<BR>
A helper method to create an artifact from an array of bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitInputStream(com.google.gwt.core.ext.TreeLogger, java.io.InputStream, java.lang.String)">emitInputStream</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
java.io.InputStream what,
java.lang.String partialPath)</CODE>
<BR>
A helper method to create an artifact to emit the contents of an
InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitInputStream(com.google.gwt.core.ext.TreeLogger, java.io.InputStream, java.lang.String, long)">emitInputStream</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
java.io.InputStream what,
java.lang.String partialPath,
long lastModified)</CODE>
<BR>
A helper method to create an artifact to emit the contents of an
InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitString(com.google.gwt.core.ext.TreeLogger, java.lang.String, java.lang.String)">emitString</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
java.lang.String what,
java.lang.String partialPath)</CODE>
<BR>
A helper method to create an artifact to emit a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitString(com.google.gwt.core.ext.TreeLogger, java.lang.String, java.lang.String, long)">emitString</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
java.lang.String what,
java.lang.String partialPath,
long lastModified)</CODE>
<BR>
A helper method to create an artifact to emit a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitWithStrongName(com.google.gwt.core.ext.TreeLogger, byte[], java.lang.String, java.lang.String)">emitWithStrongName</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
byte[] what,
java.lang.String prefix,
java.lang.String suffix)</CODE>
<BR>
A helper method to create an artifact from an array of bytes with a strong
name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker">SyntheticArtifact</A></CODE></FONT></TD>
<TD><CODE><B>AbstractLinker.</B><B><A HREF="../../../../../../../com/google/gwt/core/ext/linker/AbstractLinker.html#emitWithStrongName(com.google.gwt.core.ext.TreeLogger, byte[], java.lang.String, java.lang.String, long)">emitWithStrongName</A></B>(<A HREF="../../../../../../../com/google/gwt/core/ext/TreeLogger.html" title="class in com.google.gwt.core.ext">TreeLogger</A> logger,
byte[] what,
java.lang.String prefix,
java.lang.String suffix,
long lastModified)</CODE>
<BR>
A helper method to create an artifact from an array of bytes with a strong
name.</TD>
</TR>
</TABLE>
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../com/google/gwt/core/ext/linker/SyntheticArtifact.html" title="class in com.google.gwt.core.ext.linker"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
GWT 2.4.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?com/google/gwt/core/ext/linker//class-useSyntheticArtifact.html" target="_top"><B>FRAMES</B></A>
<A HREF="SyntheticArtifact.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| dandrocec/PaaSInterop | SemanticCloudClient/build/web/WEB-INF/lib/doc/javadoc/com/google/gwt/core/ext/linker/class-use/SyntheticArtifact.html | HTML | gpl-3.0 | 15,097 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS -Wall -fno-warn-unused-binds #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Fixed
-- Copyright : (c) Ashley Yakeley 2005, 2006, 2009
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : Ashley Yakeley <ashley@semantic.org>
-- Stability : experimental
-- Portability : portable
--
-- This module defines a \"Fixed\" type for fixed-precision arithmetic.
-- The parameter to Fixed is any type that's an instance of HasResolution.
-- HasResolution has a single method that gives the resolution of the Fixed type.
--
-- This module also contains generalisations of div, mod, and divmod to work
-- with any Real instance.
--
-----------------------------------------------------------------------------
module Data.Fixed
(
div',mod',divMod',
Fixed(..), HasResolution(..),
showFixed,
E0,Uni,
E1,Deci,
E2,Centi,
E3,Milli,
E6,Micro,
E9,Nano,
E12,Pico
) where
import Prelude -- necessary to get dependencies right
import Data.Typeable
import Data.Data
import GHC.Read
import Text.ParserCombinators.ReadPrec
import Text.Read.Lex
default () -- avoid any defaulting shenanigans
-- | generalisation of 'div' to any instance of Real
div' :: (Real a,Integral b) => a -> a -> b
div' n d = floor ((toRational n) / (toRational d))
-- | generalisation of 'divMod' to any instance of Real
divMod' :: (Real a,Integral b) => a -> a -> (b,a)
divMod' n d = (f,n - (fromIntegral f) * d) where
f = div' n d
-- | generalisation of 'mod' to any instance of Real
mod' :: (Real a) => a -> a -> a
mod' n d = n - (fromInteger f) * d where
f = div' n d
-- | The type parameter should be an instance of 'HasResolution'.
newtype Fixed a = MkFixed Integer -- ^ /Since: 4.7.0.0/
deriving (Eq,Ord,Typeable)
-- We do this because the automatically derived Data instance requires (Data a) context.
-- Our manual instance has the more general (Typeable a) context.
tyFixed :: DataType
tyFixed = mkDataType "Data.Fixed.Fixed" [conMkFixed]
conMkFixed :: Constr
conMkFixed = mkConstr tyFixed "MkFixed" [] Prefix
instance (Typeable a) => Data (Fixed a) where
gfoldl k z (MkFixed a) = k (z MkFixed) a
gunfold k z _ = k (z MkFixed)
dataTypeOf _ = tyFixed
toConstr _ = conMkFixed
class HasResolution a where
resolution :: p a -> Integer
withType :: (p a -> f a) -> f a
withType foo = foo undefined
withResolution :: (HasResolution a) => (Integer -> f a) -> f a
withResolution foo = withType (foo . resolution)
instance Enum (Fixed a) where
succ (MkFixed a) = MkFixed (succ a)
pred (MkFixed a) = MkFixed (pred a)
toEnum = MkFixed . toEnum
fromEnum (MkFixed a) = fromEnum a
enumFrom (MkFixed a) = fmap MkFixed (enumFrom a)
enumFromThen (MkFixed a) (MkFixed b) = fmap MkFixed (enumFromThen a b)
enumFromTo (MkFixed a) (MkFixed b) = fmap MkFixed (enumFromTo a b)
enumFromThenTo (MkFixed a) (MkFixed b) (MkFixed c) = fmap MkFixed (enumFromThenTo a b c)
instance (HasResolution a) => Num (Fixed a) where
(MkFixed a) + (MkFixed b) = MkFixed (a + b)
(MkFixed a) - (MkFixed b) = MkFixed (a - b)
fa@(MkFixed a) * (MkFixed b) = MkFixed (div (a * b) (resolution fa))
negate (MkFixed a) = MkFixed (negate a)
abs (MkFixed a) = MkFixed (abs a)
signum (MkFixed a) = fromInteger (signum a)
fromInteger i = withResolution (\res -> MkFixed (i * res))
instance (HasResolution a) => Real (Fixed a) where
toRational fa@(MkFixed a) = (toRational a) / (toRational (resolution fa))
instance (HasResolution a) => Fractional (Fixed a) where
fa@(MkFixed a) / (MkFixed b) = MkFixed (div (a * (resolution fa)) b)
recip fa@(MkFixed a) = MkFixed (div (res * res) a) where
res = resolution fa
fromRational r = withResolution (\res -> MkFixed (floor (r * (toRational res))))
instance (HasResolution a) => RealFrac (Fixed a) where
properFraction a = (i,a - (fromIntegral i)) where
i = truncate a
truncate f = truncate (toRational f)
round f = round (toRational f)
ceiling f = ceiling (toRational f)
floor f = floor (toRational f)
chopZeros :: Integer -> String
chopZeros 0 = ""
chopZeros a | mod a 10 == 0 = chopZeros (div a 10)
chopZeros a = show a
-- only works for positive a
showIntegerZeros :: Bool -> Int -> Integer -> String
showIntegerZeros True _ 0 = ""
showIntegerZeros chopTrailingZeros digits a = replicate (digits - length s) '0' ++ s' where
s = show a
s' = if chopTrailingZeros then chopZeros a else s
withDot :: String -> String
withDot "" = ""
withDot s = '.':s
-- | First arg is whether to chop off trailing zeros
showFixed :: (HasResolution a) => Bool -> Fixed a -> String
showFixed chopTrailingZeros fa@(MkFixed a) | a < 0 = "-" ++ (showFixed chopTrailingZeros (asTypeOf (MkFixed (negate a)) fa))
showFixed chopTrailingZeros fa@(MkFixed a) = (show i) ++ (withDot (showIntegerZeros chopTrailingZeros digits fracNum)) where
res = resolution fa
(i,d) = divMod a res
-- enough digits to be unambiguous
digits = ceiling (logBase 10 (fromInteger res) :: Double)
maxnum = 10 ^ digits
fracNum = div (d * maxnum) res
instance (HasResolution a) => Show (Fixed a) where
show = showFixed False
instance (HasResolution a) => Read (Fixed a) where
readPrec = readNumber convertFixed
readListPrec = readListPrecDefault
readList = readListDefault
convertFixed :: forall a . HasResolution a => Lexeme -> ReadPrec (Fixed a)
convertFixed (Number n)
| Just (i, f) <- numberToFixed e n =
return (fromInteger i + (fromInteger f / (10 ^ e)))
where r = resolution (undefined :: Fixed a)
-- round 'e' up to help make the 'read . show == id' property
-- possible also for cases where 'resolution' is not a
-- power-of-10, such as e.g. when 'resolution = 128'
e = ceiling (logBase 10 (fromInteger r) :: Double)
convertFixed _ = pfail
data E0 = E0
deriving (Typeable)
instance HasResolution E0 where
resolution _ = 1
-- | resolution of 1, this works the same as Integer
type Uni = Fixed E0
data E1 = E1
deriving (Typeable)
instance HasResolution E1 where
resolution _ = 10
-- | resolution of 10^-1 = .1
type Deci = Fixed E1
data E2 = E2
deriving (Typeable)
instance HasResolution E2 where
resolution _ = 100
-- | resolution of 10^-2 = .01, useful for many monetary currencies
type Centi = Fixed E2
data E3 = E3
deriving (Typeable)
instance HasResolution E3 where
resolution _ = 1000
-- | resolution of 10^-3 = .001
type Milli = Fixed E3
data E6 = E6
deriving (Typeable)
instance HasResolution E6 where
resolution _ = 1000000
-- | resolution of 10^-6 = .000001
type Micro = Fixed E6
data E9 = E9
deriving (Typeable)
instance HasResolution E9 where
resolution _ = 1000000000
-- | resolution of 10^-9 = .000000001
type Nano = Fixed E9
data E12 = E12
deriving (Typeable)
instance HasResolution E12 where
resolution _ = 1000000000000
-- | resolution of 10^-12 = .000000000001
type Pico = Fixed E12
| jwiegley/ghc-release | libraries/base/Data/Fixed.hs | Haskell | gpl-3.0 | 7,207 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LinuxUserId Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="classLinuxUserId-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">LinuxUserId Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Obtains user id using Linux system calls.
<a href="classLinuxUserId.html#details">More...</a></p>
<p><code>#include <<a class="el" href="linuxuserid_8h_source.html">linuxuserid.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af01f4be71b6da2b26e9201ff3db5e604"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#af01f4be71b6da2b26e9201ff3db5e604">LinuxUserId</a> (QObject *parent=0)</td></tr>
<tr class="memdesc:af01f4be71b6da2b26e9201ff3db5e604"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#af01f4be71b6da2b26e9201ff3db5e604"></a><br/></td></tr>
<tr class="memitem:a09500d36bc440fac51e80e972c3cb9b6"><td class="memItemLeft" align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#a09500d36bc440fac51e80e972c3cb9b6">getUserId</a> ()</td></tr>
<tr class="memitem:ae2000e3814f458ac8e84585472e2871f"><td class="memItemLeft" align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#ae2000e3814f458ac8e84585472e2871f">getEffectiveUserId</a> ()</td></tr>
<tr class="memitem:a025aec6b6bef63d34872750583a0be88"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#a025aec6b6bef63d34872750583a0be88">isUserRoot</a> ()</td></tr>
<tr class="memitem:ab970b36200b984846d55d8fed9efabf1"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#ab970b36200b984846d55d8fed9efabf1">isEffectiveUserRoot</a> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a7a229d8237521d4c0a8034cea9554273"><td class="memItemLeft" align="right" valign="top">static const unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classLinuxUserId.html#a7a229d8237521d4c0a8034cea9554273">ROOT_USERID</a> = 0</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0dd899affc02d67fdf782caf6732988e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0dd899affc02d67fdf782caf6732988e"></a>
unsigned int </td><td class="memItemRight" valign="bottom"><b>userId</b></td></tr>
<tr class="memitem:a14a69a90c63c666c18dc6f30f2c8073f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14a69a90c63c666c18dc6f30f2c8073f"></a>
unsigned int </td><td class="memItemRight" valign="bottom"><b>effectiveUserId</b></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Obtains user id using Linux system calls. </p>
<p>Main use is checking for root. The application needs to be running as root to run iptables which is the firewall manipulation tool. </p>
</div><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="af01f4be71b6da2b26e9201ff3db5e604"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">LinuxUserId::LinuxUserId </td>
<td>(</td>
<td class="paramtype">QObject * </td>
<td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">parent</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2>Member Function Documentation</h2>
<a class="anchor" id="ae2000e3814f458ac8e84585472e2871f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">unsigned int LinuxUserId::getEffectiveUserId </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>effective user id of user running application </dd></dl>
</div>
</div>
<a class="anchor" id="a09500d36bc440fac51e80e972c3cb9b6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">unsigned int LinuxUserId::getUserId </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>user id of user running application </dd></dl>
</div>
</div>
<a class="anchor" id="ab970b36200b984846d55d8fed9efabf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool LinuxUserId::isEffectiveUserRoot </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if effective user running application is root else false </dd></dl>
</div>
</div>
<a class="anchor" id="a025aec6b6bef63d34872750583a0be88"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool LinuxUserId::isUserRoot </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if user running application is root else false </dd></dl>
</div>
</div>
<h2>Member Data Documentation</h2>
<a class="anchor" id="a7a229d8237521d4c0a8034cea9554273"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const unsigned int LinuxUserId::ROOT_USERID = 0</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Linux numeric user id of root. This is always zero. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="linuxuserid_8h_source.html">linuxuserid.h</a></li>
<li><a class="el" href="linuxuserid_8cpp.html">linuxuserid.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 16 2013 10:36:52 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>
| tailored/qiptables | html/classLinuxUserId.html | HTML | gpl-3.0 | 12,395 |
/*
Copyright (C) 2008-2015 Teddy Michel
This file is part of TEngine.
TEngine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TEngine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TEngine. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file Gui/CListView.hpp
* \date 24/02/2010 Création de la classe GuiListView.
* \date 17/07/2010 Utilisation possible des signaux.
* \date 04/01/2011 Améliorations.
* \date 14/01/2011 Améliorations diverses, utilisation des signaux.
* \date 15/01/2011 Création des méthodes SelectItem et ToggleItem.
* \date 17/01/2011 Héritage de GuiFrame à la place de GuiWidget.
* \date 29/05/2011 La classe est renommée en CListView.
*/
#ifndef T_FILE_GUI_CLISTVIEW_HPP_
#define T_FILE_GUI_CLISTVIEW_HPP_
/*-------------------------------*
* Includes *
*-------------------------------*/
#include <list>
#include <sigc++/sigc++.h>
#include "Gui/Export.hpp"
#include "Gui/IScrollArea.hpp"
#include "Core/CString.hpp"
namespace Ted
{
/**
* \class CListView
* \ingroup Gui
* \brief Ce widget représente une liste d'éléments (pour le moment des chaines de caractère).
*
* \section Signaux
* \li onSelectionChange
* \li onCurrentItemChange
* \li onItemSelected
******************************/
class T_GUI_API CListView : public IScrollArea
{
public:
/**
* \enum TSelectionMode
* \ingroup Gui
* \brief Modes de sélection des items d'une liste.
******************************/
enum TSelectionMode
{
Single, ///< Un seul item peut être sélectionné, et on ne peut pas désélectionner un item sélectionné.
SingleOrNone, ///< Un seul item peut être sélectionné, et on peut désélectionner un item sélectionné.
Multiple, ///< On peut sélectionner plusieurs items en cliquant sur chacun d'eux (le clic inverse la sélection).
Extended, ///< On peut sélectionner plusieurs items en utilisant les touches Ctrl et Shift.
None ///< On ne peut sélectionner aucun item.
};
// Constructeur
explicit CListView(IWidget * parent = nullptr);
// Accesseurs
int getCurrentItem() const;
TSelectionMode getSelectionMode() const;
int getPadding() const;
CString getItem(int pos) const;
// Mutateurs
void setCurrentItem(int select);
void setSelectionMode(TSelectionMode mode);
void setPadding(int padding);
// Méthodes publiques
int getNumItems() const;
int getLineHeight() const;
void addItem(const CString& text, int pos = -1);
void removeItem(int pos);
void selectItem(int pos, bool select = true);
void toggleItem(int pos);
virtual void draw();
virtual void onEvent(const CMouseEvent& event);
virtual void onEvent(const CKeyboardEvent& event);
void clear();
void clearSelection();
void invertSelection();
void selectAll();
// Signaux
sigc::signal<void> onSelectionChange; ///< Signal émis lorsque la sélection change.
sigc::signal<void, int> onCurrentItemChange; ///< Signal émis lorsque l'item actif change.
sigc::signal<void, int> onItemSelected; ///< Signal émis lorsque un item est sélectionné.
private:
/// Représente une ligne de la liste.
struct TListItem
{
bool selected; ///< Indique si la ligne est sélectionnée.
CString text; ///< Texte de la ligne.
};
typedef std::list<TListItem> TListItemList;
// Données protégées
int m_current_item; ///< Numéro de la ligne sélectionnée.
int m_line_top; ///< Numéro de la première ligne à afficher.
int m_num_items; ///< Nombre d'items dans la liste.
TSelectionMode m_mode; ///< Mode de sélection.
int m_padding; ///< Espacement au-dessus et en-dessous d'un item en pixels (0 par défaut).
TListItemList m_items; ///< Liste des items.
};
} // Namespace Ted
#endif // T_FILE_GUI_CLISTVIEW_HPP_
| teddy-michel/TEngine | include/Gui/CListView.hpp | C++ | gpl-3.0 | 4,416 |
// Kamilla 15211
// Auto generated on 01.02.2012 12:16:41
namespace Kamilla.Network.Protocols.Wow.Game
{
public partial class UpdateFields
{
private static UpdateField<ObjectUpdateFields>[] _ObjectUpdateFields = new UpdateField<ObjectUpdateFields>[]
{
new UpdateField<ObjectUpdateFields>(4, 1, ObjectUpdateFields.OBJECT_FIELD_GUID),
new UpdateField<ObjectUpdateFields>(4, 1, ObjectUpdateFields.OBJECT_FIELD_GUID_HIPART),
new UpdateField<ObjectUpdateFields>(4, 1, ObjectUpdateFields.OBJECT_FIELD_DATA),
new UpdateField<ObjectUpdateFields>(4, 1, ObjectUpdateFields.OBJECT_FIELD_DATA_HIPART),
new UpdateField<ObjectUpdateFields>(2, 1, ObjectUpdateFields.OBJECT_FIELD_TYPE),
new UpdateField<ObjectUpdateFields>(1, 1, ObjectUpdateFields.OBJECT_FIELD_ENTRY),
new UpdateField<ObjectUpdateFields>(3, 1, ObjectUpdateFields.OBJECT_FIELD_SCALE_X),
new UpdateField<ObjectUpdateFields>(1, 0, ObjectUpdateFields.OBJECT_FIELD_PADDING),
};
public static UpdateField<ObjectUpdateFields> GetUpdateField(ObjectUpdateFields uf)
{
uint index = (uint)uf;
if (index >= (uint)ObjectUpdateFields.End)
return UpdateField.CreateUnknown<ObjectUpdateFields>(uf);
return _ObjectUpdateFields[index];
}
}
public enum ObjectUpdateFields : uint
{
OBJECT_FIELD_GUID = 0x0000, // Size: 2, Type: Long, Flags: Public
OBJECT_FIELD_GUID_HIPART = 0x0001,
OBJECT_FIELD_DATA = 0x0002, // Size: 2, Type: Long, Flags: Public
OBJECT_FIELD_DATA_HIPART = 0x0003,
OBJECT_FIELD_TYPE = 0x0004, // Size: 1, Type: TwoShort, Flags: Public
OBJECT_FIELD_ENTRY = 0x0005, // Size: 1, Type: Int, Flags: Public
OBJECT_FIELD_SCALE_X = 0x0006, // Size: 1, Type: Float, Flags: Public
OBJECT_FIELD_PADDING = 0x0007, // Size: 1, Type: Int, Flags: None
End = 0x0008
}
public partial class UpdateFields
{
private static UpdateField<ItemUpdateFields>[] _ItemUpdateFields = new UpdateField<ItemUpdateFields>[]
{
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_OWNER),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_OWNER_HIPART),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_CONTAINED),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_CONTAINED_HIPART),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_CREATOR),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_CREATOR_HIPART),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_GIFTCREATOR),
new UpdateField<ItemUpdateFields>(4, 1, ItemUpdateFields.ITEM_FIELD_GIFTCREATOR_HIPART),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_STACK_COUNT),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_DURATION),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_SPELL_CHARGES),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_SPELL_CHARGES_2),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_SPELL_CHARGES_3),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_SPELL_CHARGES_4),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_SPELL_CHARGES_5),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_FLAGS),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_1_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_1_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_1_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_2_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_2_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_2_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_3_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_3_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_3_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_4_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_4_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_4_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_5_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_5_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_5_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_6_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_6_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_6_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_7_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_7_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_7_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_8_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_8_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_8_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_9_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_9_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_9_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_10_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_10_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_10_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_11_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_11_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_11_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_12_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_12_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_12_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_13_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_13_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_13_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_14_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_14_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_14_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_15_1),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_15_2),
new UpdateField<ItemUpdateFields>(2, 1, ItemUpdateFields.ITEM_FIELD_ENCHANTMENT_15_3),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_PROPERTY_SEED),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_RANDOM_PROPERTIES_ID),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_DURABILITY),
new UpdateField<ItemUpdateFields>(1, 12, ItemUpdateFields.ITEM_FIELD_MAXDURABILITY),
new UpdateField<ItemUpdateFields>(1, 1, ItemUpdateFields.ITEM_FIELD_CREATE_PLAYED_TIME),
};
public static UpdateField<ItemUpdateFields> GetUpdateField(ItemUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)ItemUpdateFields.End)
return UpdateField.CreateUnknown<ItemUpdateFields>(uf);
return _ItemUpdateFields[index];
}
}
public enum ItemUpdateFields : uint
{
ITEM_FIELD_OWNER = ObjectUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
ITEM_FIELD_OWNER_HIPART = ObjectUpdateFields.End + 0x0001,
ITEM_FIELD_CONTAINED = ObjectUpdateFields.End + 0x0002, // Size: 2, Type: Long, Flags: Public
ITEM_FIELD_CONTAINED_HIPART = ObjectUpdateFields.End + 0x0003,
ITEM_FIELD_CREATOR = ObjectUpdateFields.End + 0x0004, // Size: 2, Type: Long, Flags: Public
ITEM_FIELD_CREATOR_HIPART = ObjectUpdateFields.End + 0x0005,
ITEM_FIELD_GIFTCREATOR = ObjectUpdateFields.End + 0x0006, // Size: 2, Type: Long, Flags: Public
ITEM_FIELD_GIFTCREATOR_HIPART = ObjectUpdateFields.End + 0x0007,
ITEM_FIELD_STACK_COUNT = ObjectUpdateFields.End + 0x0008, // Size: 1, Type: Int, Flags: OwnerOnly, Unk1
ITEM_FIELD_DURATION = ObjectUpdateFields.End + 0x0009, // Size: 1, Type: Int, Flags: OwnerOnly, Unk1
ITEM_FIELD_SPELL_CHARGES = ObjectUpdateFields.End + 0x000A, // Size: 5, Type: Int, Flags: OwnerOnly, Unk1
ITEM_FIELD_SPELL_CHARGES_2 = ObjectUpdateFields.End + 0x000B,
ITEM_FIELD_SPELL_CHARGES_3 = ObjectUpdateFields.End + 0x000C,
ITEM_FIELD_SPELL_CHARGES_4 = ObjectUpdateFields.End + 0x000D,
ITEM_FIELD_SPELL_CHARGES_5 = ObjectUpdateFields.End + 0x000E,
ITEM_FIELD_FLAGS = ObjectUpdateFields.End + 0x000F, // Size: 1, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_1_1 = ObjectUpdateFields.End + 0x0010, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_1_2 = ObjectUpdateFields.End + 0x0011,
ITEM_FIELD_ENCHANTMENT_1_3 = ObjectUpdateFields.End + 0x0012, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_2_1 = ObjectUpdateFields.End + 0x0013, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_2_2 = ObjectUpdateFields.End + 0x0014,
ITEM_FIELD_ENCHANTMENT_2_3 = ObjectUpdateFields.End + 0x0015, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_3_1 = ObjectUpdateFields.End + 0x0016, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_3_2 = ObjectUpdateFields.End + 0x0017,
ITEM_FIELD_ENCHANTMENT_3_3 = ObjectUpdateFields.End + 0x0018, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_4_1 = ObjectUpdateFields.End + 0x0019, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_4_2 = ObjectUpdateFields.End + 0x001A,
ITEM_FIELD_ENCHANTMENT_4_3 = ObjectUpdateFields.End + 0x001B, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_5_1 = ObjectUpdateFields.End + 0x001C, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_5_2 = ObjectUpdateFields.End + 0x001D,
ITEM_FIELD_ENCHANTMENT_5_3 = ObjectUpdateFields.End + 0x001E, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_6_1 = ObjectUpdateFields.End + 0x001F, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_6_2 = ObjectUpdateFields.End + 0x0020,
ITEM_FIELD_ENCHANTMENT_6_3 = ObjectUpdateFields.End + 0x0021, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_7_1 = ObjectUpdateFields.End + 0x0022, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_7_2 = ObjectUpdateFields.End + 0x0023,
ITEM_FIELD_ENCHANTMENT_7_3 = ObjectUpdateFields.End + 0x0024, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_8_1 = ObjectUpdateFields.End + 0x0025, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_8_2 = ObjectUpdateFields.End + 0x0026,
ITEM_FIELD_ENCHANTMENT_8_3 = ObjectUpdateFields.End + 0x0027, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_9_1 = ObjectUpdateFields.End + 0x0028, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_9_2 = ObjectUpdateFields.End + 0x0029,
ITEM_FIELD_ENCHANTMENT_9_3 = ObjectUpdateFields.End + 0x002A, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_10_1 = ObjectUpdateFields.End + 0x002B, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_10_2 = ObjectUpdateFields.End + 0x002C,
ITEM_FIELD_ENCHANTMENT_10_3 = ObjectUpdateFields.End + 0x002D, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_11_1 = ObjectUpdateFields.End + 0x002E, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_11_2 = ObjectUpdateFields.End + 0x002F,
ITEM_FIELD_ENCHANTMENT_11_3 = ObjectUpdateFields.End + 0x0030, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_12_1 = ObjectUpdateFields.End + 0x0031, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_12_2 = ObjectUpdateFields.End + 0x0032,
ITEM_FIELD_ENCHANTMENT_12_3 = ObjectUpdateFields.End + 0x0033, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_13_1 = ObjectUpdateFields.End + 0x0034, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_13_2 = ObjectUpdateFields.End + 0x0035,
ITEM_FIELD_ENCHANTMENT_13_3 = ObjectUpdateFields.End + 0x0036, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_14_1 = ObjectUpdateFields.End + 0x0037, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_14_2 = ObjectUpdateFields.End + 0x0038,
ITEM_FIELD_ENCHANTMENT_14_3 = ObjectUpdateFields.End + 0x0039, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_ENCHANTMENT_15_1 = ObjectUpdateFields.End + 0x003A, // Size: 2, Type: Int, Flags: Public
ITEM_FIELD_ENCHANTMENT_15_2 = ObjectUpdateFields.End + 0x003B,
ITEM_FIELD_ENCHANTMENT_15_3 = ObjectUpdateFields.End + 0x003C, // Size: 1, Type: TwoShort, Flags: Public
ITEM_FIELD_PROPERTY_SEED = ObjectUpdateFields.End + 0x003D, // Size: 1, Type: Int, Flags: Public
ITEM_FIELD_RANDOM_PROPERTIES_ID = ObjectUpdateFields.End + 0x003E, // Size: 1, Type: Int, Flags: Public
ITEM_FIELD_DURABILITY = ObjectUpdateFields.End + 0x003F, // Size: 1, Type: Int, Flags: OwnerOnly, Unk1
ITEM_FIELD_MAXDURABILITY = ObjectUpdateFields.End + 0x0040, // Size: 1, Type: Int, Flags: OwnerOnly, Unk1
ITEM_FIELD_CREATE_PLAYED_TIME = ObjectUpdateFields.End + 0x0041, // Size: 1, Type: Int, Flags: Public
End = ObjectUpdateFields.End + 0x0042
}
public partial class UpdateFields
{
private static UpdateField<ContainerUpdateFields>[] _ContainerUpdateFields = new UpdateField<ContainerUpdateFields>[]
{
new UpdateField<ContainerUpdateFields>(1, 1, ContainerUpdateFields.CONTAINER_FIELD_NUM_SLOTS),
new UpdateField<ContainerUpdateFields>(5, 0, ContainerUpdateFields.CONTAINER_ALIGN_PAD),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_1),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_1_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_2),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_2_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_3),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_3_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_4),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_4_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_5),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_5_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_6),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_6_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_7),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_7_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_8),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_8_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_9),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_9_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_10),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_10_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_11),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_11_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_12),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_12_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_13),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_13_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_14),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_14_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_15),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_15_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_16),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_16_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_17),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_17_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_18),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_18_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_19),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_19_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_20),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_20_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_21),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_21_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_22),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_22_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_23),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_23_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_24),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_24_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_25),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_25_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_26),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_26_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_27),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_27_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_28),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_28_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_29),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_29_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_30),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_30_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_31),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_31_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_32),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_32_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_33),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_33_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_34),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_34_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_35),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_35_HIPART),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_36),
new UpdateField<ContainerUpdateFields>(4, 1, ContainerUpdateFields.CONTAINER_FIELD_SLOT_36_HIPART),
};
public static UpdateField<ContainerUpdateFields> GetUpdateField(ContainerUpdateFields uf)
{
uint index = (uint)uf - (uint)ItemUpdateFields.End;
if (index >= (uint)ContainerUpdateFields.End)
return UpdateField.CreateUnknown<ContainerUpdateFields>(uf);
return _ContainerUpdateFields[index];
}
}
public enum ContainerUpdateFields : uint
{
CONTAINER_FIELD_NUM_SLOTS = ItemUpdateFields.End + 0x0000, // Size: 1, Type: Int, Flags: Public
CONTAINER_ALIGN_PAD = ItemUpdateFields.End + 0x0001, // Size: 1, Type: Bytes, Flags: None
CONTAINER_FIELD_SLOT_1 = ItemUpdateFields.End + 0x0002, // Size: 72, Type: Long, Flags: Public
CONTAINER_FIELD_SLOT_1_HIPART = ItemUpdateFields.End + 0x0003,
CONTAINER_FIELD_SLOT_2 = ItemUpdateFields.End + 0x0004,
CONTAINER_FIELD_SLOT_2_HIPART = ItemUpdateFields.End + 0x0005,
CONTAINER_FIELD_SLOT_3 = ItemUpdateFields.End + 0x0006,
CONTAINER_FIELD_SLOT_3_HIPART = ItemUpdateFields.End + 0x0007,
CONTAINER_FIELD_SLOT_4 = ItemUpdateFields.End + 0x0008,
CONTAINER_FIELD_SLOT_4_HIPART = ItemUpdateFields.End + 0x0009,
CONTAINER_FIELD_SLOT_5 = ItemUpdateFields.End + 0x000A,
CONTAINER_FIELD_SLOT_5_HIPART = ItemUpdateFields.End + 0x000B,
CONTAINER_FIELD_SLOT_6 = ItemUpdateFields.End + 0x000C,
CONTAINER_FIELD_SLOT_6_HIPART = ItemUpdateFields.End + 0x000D,
CONTAINER_FIELD_SLOT_7 = ItemUpdateFields.End + 0x000E,
CONTAINER_FIELD_SLOT_7_HIPART = ItemUpdateFields.End + 0x000F,
CONTAINER_FIELD_SLOT_8 = ItemUpdateFields.End + 0x0010,
CONTAINER_FIELD_SLOT_8_HIPART = ItemUpdateFields.End + 0x0011,
CONTAINER_FIELD_SLOT_9 = ItemUpdateFields.End + 0x0012,
CONTAINER_FIELD_SLOT_9_HIPART = ItemUpdateFields.End + 0x0013,
CONTAINER_FIELD_SLOT_10 = ItemUpdateFields.End + 0x0014,
CONTAINER_FIELD_SLOT_10_HIPART = ItemUpdateFields.End + 0x0015,
CONTAINER_FIELD_SLOT_11 = ItemUpdateFields.End + 0x0016,
CONTAINER_FIELD_SLOT_11_HIPART = ItemUpdateFields.End + 0x0017,
CONTAINER_FIELD_SLOT_12 = ItemUpdateFields.End + 0x0018,
CONTAINER_FIELD_SLOT_12_HIPART = ItemUpdateFields.End + 0x0019,
CONTAINER_FIELD_SLOT_13 = ItemUpdateFields.End + 0x001A,
CONTAINER_FIELD_SLOT_13_HIPART = ItemUpdateFields.End + 0x001B,
CONTAINER_FIELD_SLOT_14 = ItemUpdateFields.End + 0x001C,
CONTAINER_FIELD_SLOT_14_HIPART = ItemUpdateFields.End + 0x001D,
CONTAINER_FIELD_SLOT_15 = ItemUpdateFields.End + 0x001E,
CONTAINER_FIELD_SLOT_15_HIPART = ItemUpdateFields.End + 0x001F,
CONTAINER_FIELD_SLOT_16 = ItemUpdateFields.End + 0x0020,
CONTAINER_FIELD_SLOT_16_HIPART = ItemUpdateFields.End + 0x0021,
CONTAINER_FIELD_SLOT_17 = ItemUpdateFields.End + 0x0022,
CONTAINER_FIELD_SLOT_17_HIPART = ItemUpdateFields.End + 0x0023,
CONTAINER_FIELD_SLOT_18 = ItemUpdateFields.End + 0x0024,
CONTAINER_FIELD_SLOT_18_HIPART = ItemUpdateFields.End + 0x0025,
CONTAINER_FIELD_SLOT_19 = ItemUpdateFields.End + 0x0026,
CONTAINER_FIELD_SLOT_19_HIPART = ItemUpdateFields.End + 0x0027,
CONTAINER_FIELD_SLOT_20 = ItemUpdateFields.End + 0x0028,
CONTAINER_FIELD_SLOT_20_HIPART = ItemUpdateFields.End + 0x0029,
CONTAINER_FIELD_SLOT_21 = ItemUpdateFields.End + 0x002A,
CONTAINER_FIELD_SLOT_21_HIPART = ItemUpdateFields.End + 0x002B,
CONTAINER_FIELD_SLOT_22 = ItemUpdateFields.End + 0x002C,
CONTAINER_FIELD_SLOT_22_HIPART = ItemUpdateFields.End + 0x002D,
CONTAINER_FIELD_SLOT_23 = ItemUpdateFields.End + 0x002E,
CONTAINER_FIELD_SLOT_23_HIPART = ItemUpdateFields.End + 0x002F,
CONTAINER_FIELD_SLOT_24 = ItemUpdateFields.End + 0x0030,
CONTAINER_FIELD_SLOT_24_HIPART = ItemUpdateFields.End + 0x0031,
CONTAINER_FIELD_SLOT_25 = ItemUpdateFields.End + 0x0032,
CONTAINER_FIELD_SLOT_25_HIPART = ItemUpdateFields.End + 0x0033,
CONTAINER_FIELD_SLOT_26 = ItemUpdateFields.End + 0x0034,
CONTAINER_FIELD_SLOT_26_HIPART = ItemUpdateFields.End + 0x0035,
CONTAINER_FIELD_SLOT_27 = ItemUpdateFields.End + 0x0036,
CONTAINER_FIELD_SLOT_27_HIPART = ItemUpdateFields.End + 0x0037,
CONTAINER_FIELD_SLOT_28 = ItemUpdateFields.End + 0x0038,
CONTAINER_FIELD_SLOT_28_HIPART = ItemUpdateFields.End + 0x0039,
CONTAINER_FIELD_SLOT_29 = ItemUpdateFields.End + 0x003A,
CONTAINER_FIELD_SLOT_29_HIPART = ItemUpdateFields.End + 0x003B,
CONTAINER_FIELD_SLOT_30 = ItemUpdateFields.End + 0x003C,
CONTAINER_FIELD_SLOT_30_HIPART = ItemUpdateFields.End + 0x003D,
CONTAINER_FIELD_SLOT_31 = ItemUpdateFields.End + 0x003E,
CONTAINER_FIELD_SLOT_31_HIPART = ItemUpdateFields.End + 0x003F,
CONTAINER_FIELD_SLOT_32 = ItemUpdateFields.End + 0x0040,
CONTAINER_FIELD_SLOT_32_HIPART = ItemUpdateFields.End + 0x0041,
CONTAINER_FIELD_SLOT_33 = ItemUpdateFields.End + 0x0042,
CONTAINER_FIELD_SLOT_33_HIPART = ItemUpdateFields.End + 0x0043,
CONTAINER_FIELD_SLOT_34 = ItemUpdateFields.End + 0x0044,
CONTAINER_FIELD_SLOT_34_HIPART = ItemUpdateFields.End + 0x0045,
CONTAINER_FIELD_SLOT_35 = ItemUpdateFields.End + 0x0046,
CONTAINER_FIELD_SLOT_35_HIPART = ItemUpdateFields.End + 0x0047,
CONTAINER_FIELD_SLOT_36 = ItemUpdateFields.End + 0x0048,
CONTAINER_FIELD_SLOT_36_HIPART = ItemUpdateFields.End + 0x0049,
End = ItemUpdateFields.End + 0x004A
}
public partial class UpdateFields
{
private static UpdateField<UnitUpdateFields>[] _UnitUpdateFields = new UpdateField<UnitUpdateFields>[]
{
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHARM),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHARM_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_SUMMON),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_SUMMON_HIPART),
new UpdateField<UnitUpdateFields>(4, 2, UnitUpdateFields.UNIT_FIELD_CRITTER),
new UpdateField<UnitUpdateFields>(4, 2, UnitUpdateFields.UNIT_FIELD_CRITTER_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHARMEDBY),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHARMEDBY_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_SUMMONEDBY),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_SUMMONEDBY_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CREATEDBY),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CREATEDBY_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_TARGET),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_TARGET_HIPART),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHANNEL_OBJECT),
new UpdateField<UnitUpdateFields>(4, 1, UnitUpdateFields.UNIT_FIELD_CHANNEL_OBJECT_HIPART),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_CHANNEL_SPELL),
new UpdateField<UnitUpdateFields>(5, 1, UnitUpdateFields.UNIT_FIELD_BYTES_0),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_HEALTH),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_POWER1),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_POWER2),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_POWER3),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_POWER4),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_POWER5),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXHEALTH),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXPOWER1),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXPOWER2),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXPOWER3),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXPOWER4),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXPOWER5),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_2),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_3),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_4),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_5),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_2),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_3),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_4),
new UpdateField<UnitUpdateFields>(3, 70, UnitUpdateFields.UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_5),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_LEVEL),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_FACTIONTEMPLATE),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_VIRTUAL_ITEM_SLOT_ID),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_VIRTUAL_ITEM_SLOT_ID_2),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_VIRTUAL_ITEM_SLOT_ID_3),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_FLAGS),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_FLAGS_2),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_AURASTATE),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_BASEATTACKTIME),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_BASEATTACKTIME_2),
new UpdateField<UnitUpdateFields>(1, 2, UnitUpdateFields.UNIT_FIELD_RANGEDATTACKTIME),
new UpdateField<UnitUpdateFields>(3, 1, UnitUpdateFields.UNIT_FIELD_BOUNDINGRADIUS),
new UpdateField<UnitUpdateFields>(3, 1, UnitUpdateFields.UNIT_FIELD_COMBATREACH),
new UpdateField<UnitUpdateFields>(1, 128, UnitUpdateFields.UNIT_FIELD_DISPLAYID),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_NATIVEDISPLAYID),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MOUNTDISPLAYID),
new UpdateField<UnitUpdateFields>(3, 22, UnitUpdateFields.UNIT_FIELD_MINDAMAGE),
new UpdateField<UnitUpdateFields>(3, 22, UnitUpdateFields.UNIT_FIELD_MAXDAMAGE),
new UpdateField<UnitUpdateFields>(3, 22, UnitUpdateFields.UNIT_FIELD_MINOFFHANDDAMAGE),
new UpdateField<UnitUpdateFields>(3, 22, UnitUpdateFields.UNIT_FIELD_MAXOFFHANDDAMAGE),
new UpdateField<UnitUpdateFields>(5, 1, UnitUpdateFields.UNIT_FIELD_BYTES_1),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_PETNUMBER),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_PET_NAME_TIMESTAMP),
new UpdateField<UnitUpdateFields>(1, 4, UnitUpdateFields.UNIT_FIELD_PETEXPERIENCE),
new UpdateField<UnitUpdateFields>(1, 4, UnitUpdateFields.UNIT_FIELD_PETNEXTLEVELEXP),
new UpdateField<UnitUpdateFields>(1, 128, UnitUpdateFields.UNIT_DYNAMIC_FLAGS),
new UpdateField<UnitUpdateFields>(3, 1, UnitUpdateFields.UNIT_MOD_CAST_SPEED),
new UpdateField<UnitUpdateFields>(3, 1, UnitUpdateFields.UNIT_MOD_CAST_HASTE),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_CREATED_BY_SPELL),
new UpdateField<UnitUpdateFields>(1, 128, UnitUpdateFields.UNIT_NPC_FLAGS),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_NPC_EMOTESTATE),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_STAT0),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_STAT1),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_STAT2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_STAT3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_STAT4),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POSSTAT0),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POSSTAT1),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POSSTAT2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POSSTAT3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POSSTAT4),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_NEGSTAT0),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_NEGSTAT1),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_NEGSTAT2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_NEGSTAT3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_NEGSTAT4),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_2),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_3),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_4),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_5),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_6),
new UpdateField<UnitUpdateFields>(1, 22, UnitUpdateFields.UNIT_FIELD_RESISTANCES_7),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_4),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_5),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_6),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_7),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_4),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_5),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_6),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_7),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_BASE_MANA),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_BASE_HEALTH),
new UpdateField<UnitUpdateFields>(5, 1, UnitUpdateFields.UNIT_FIELD_BYTES_2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_ATTACK_POWER),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_ATTACK_POWER_MOD_POS),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_ATTACK_POWER_MOD_NEG),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_ATTACK_POWER_MULTIPLIER),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RANGED_ATTACK_POWER),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_MINRANGEDDAMAGE),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_MAXRANGEDDAMAGE),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_2),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_3),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_4),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_5),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_6),
new UpdateField<UnitUpdateFields>(1, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MODIFIER_7),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_2),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_3),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_4),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_5),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_6),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_POWER_COST_MULTIPLIER_7),
new UpdateField<UnitUpdateFields>(3, 6, UnitUpdateFields.UNIT_FIELD_MAXHEALTHMODIFIER),
new UpdateField<UnitUpdateFields>(3, 1, UnitUpdateFields.UNIT_FIELD_HOVERHEIGHT),
new UpdateField<UnitUpdateFields>(1, 1, UnitUpdateFields.UNIT_FIELD_MAXITEMLEVEL),
new UpdateField<UnitUpdateFields>(1, 0, UnitUpdateFields.UNIT_FIELD_PADDING),
};
public static UpdateField<UnitUpdateFields> GetUpdateField(UnitUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)UnitUpdateFields.End)
return UpdateField.CreateUnknown<UnitUpdateFields>(uf);
return _UnitUpdateFields[index];
}
}
public enum UnitUpdateFields : uint
{
UNIT_FIELD_CHARM = ObjectUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_CHARM_HIPART = ObjectUpdateFields.End + 0x0001,
UNIT_FIELD_SUMMON = ObjectUpdateFields.End + 0x0002, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_SUMMON_HIPART = ObjectUpdateFields.End + 0x0003,
UNIT_FIELD_CRITTER = ObjectUpdateFields.End + 0x0004, // Size: 2, Type: Long, Flags: Private
UNIT_FIELD_CRITTER_HIPART = ObjectUpdateFields.End + 0x0005,
UNIT_FIELD_CHARMEDBY = ObjectUpdateFields.End + 0x0006, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_CHARMEDBY_HIPART = ObjectUpdateFields.End + 0x0007,
UNIT_FIELD_SUMMONEDBY = ObjectUpdateFields.End + 0x0008, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_SUMMONEDBY_HIPART = ObjectUpdateFields.End + 0x0009,
UNIT_FIELD_CREATEDBY = ObjectUpdateFields.End + 0x000A, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_CREATEDBY_HIPART = ObjectUpdateFields.End + 0x000B,
UNIT_FIELD_TARGET = ObjectUpdateFields.End + 0x000C, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_TARGET_HIPART = ObjectUpdateFields.End + 0x000D,
UNIT_FIELD_CHANNEL_OBJECT = ObjectUpdateFields.End + 0x000E, // Size: 2, Type: Long, Flags: Public
UNIT_FIELD_CHANNEL_OBJECT_HIPART = ObjectUpdateFields.End + 0x000F,
UNIT_CHANNEL_SPELL = ObjectUpdateFields.End + 0x0010, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_BYTES_0 = ObjectUpdateFields.End + 0x0011, // Size: 1, Type: Bytes, Flags: Public
UNIT_FIELD_HEALTH = ObjectUpdateFields.End + 0x0012, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER1 = ObjectUpdateFields.End + 0x0013, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER2 = ObjectUpdateFields.End + 0x0014, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER3 = ObjectUpdateFields.End + 0x0015, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER4 = ObjectUpdateFields.End + 0x0016, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER5 = ObjectUpdateFields.End + 0x0017, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXHEALTH = ObjectUpdateFields.End + 0x0018, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXPOWER1 = ObjectUpdateFields.End + 0x0019, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXPOWER2 = ObjectUpdateFields.End + 0x001A, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXPOWER3 = ObjectUpdateFields.End + 0x001B, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXPOWER4 = ObjectUpdateFields.End + 0x001C, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MAXPOWER5 = ObjectUpdateFields.End + 0x001D, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER = ObjectUpdateFields.End + 0x001E, // Size: 5, Type: Float, Flags: Private, OwnerOnly, GroupOnly
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_2 = ObjectUpdateFields.End + 0x001F,
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_3 = ObjectUpdateFields.End + 0x0020,
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_4 = ObjectUpdateFields.End + 0x0021,
UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER_5 = ObjectUpdateFields.End + 0x0022,
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER = ObjectUpdateFields.End + 0x0023, // Size: 5, Type: Float, Flags: Private, OwnerOnly, GroupOnly
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_2 = ObjectUpdateFields.End + 0x0024,
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_3 = ObjectUpdateFields.End + 0x0025,
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_4 = ObjectUpdateFields.End + 0x0026,
UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER_5 = ObjectUpdateFields.End + 0x0027,
UNIT_FIELD_LEVEL = ObjectUpdateFields.End + 0x0028, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_FACTIONTEMPLATE = ObjectUpdateFields.End + 0x0029, // Size: 1, Type: Int, Flags: Public
UNIT_VIRTUAL_ITEM_SLOT_ID = ObjectUpdateFields.End + 0x002A, // Size: 3, Type: Int, Flags: Public
UNIT_VIRTUAL_ITEM_SLOT_ID_2 = ObjectUpdateFields.End + 0x002B,
UNIT_VIRTUAL_ITEM_SLOT_ID_3 = ObjectUpdateFields.End + 0x002C,
UNIT_FIELD_FLAGS = ObjectUpdateFields.End + 0x002D, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_FLAGS_2 = ObjectUpdateFields.End + 0x002E, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_AURASTATE = ObjectUpdateFields.End + 0x002F, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_BASEATTACKTIME = ObjectUpdateFields.End + 0x0030, // Size: 2, Type: Int, Flags: Public
UNIT_FIELD_BASEATTACKTIME_2 = ObjectUpdateFields.End + 0x0031,
UNIT_FIELD_RANGEDATTACKTIME = ObjectUpdateFields.End + 0x0032, // Size: 1, Type: Int, Flags: Private
UNIT_FIELD_BOUNDINGRADIUS = ObjectUpdateFields.End + 0x0033, // Size: 1, Type: Float, Flags: Public
UNIT_FIELD_COMBATREACH = ObjectUpdateFields.End + 0x0034, // Size: 1, Type: Float, Flags: Public
UNIT_FIELD_DISPLAYID = ObjectUpdateFields.End + 0x0035, // Size: 1, Type: Int, Flags: Unk4
UNIT_FIELD_NATIVEDISPLAYID = ObjectUpdateFields.End + 0x0036, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MOUNTDISPLAYID = ObjectUpdateFields.End + 0x0037, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_MINDAMAGE = ObjectUpdateFields.End + 0x0038, // Size: 1, Type: Float, Flags: Private, OwnerOnly, Unk2
UNIT_FIELD_MAXDAMAGE = ObjectUpdateFields.End + 0x0039, // Size: 1, Type: Float, Flags: Private, OwnerOnly, Unk2
UNIT_FIELD_MINOFFHANDDAMAGE = ObjectUpdateFields.End + 0x003A, // Size: 1, Type: Float, Flags: Private, OwnerOnly, Unk2
UNIT_FIELD_MAXOFFHANDDAMAGE = ObjectUpdateFields.End + 0x003B, // Size: 1, Type: Float, Flags: Private, OwnerOnly, Unk2
UNIT_FIELD_BYTES_1 = ObjectUpdateFields.End + 0x003C, // Size: 1, Type: Bytes, Flags: Public
UNIT_FIELD_PETNUMBER = ObjectUpdateFields.End + 0x003D, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_PET_NAME_TIMESTAMP = ObjectUpdateFields.End + 0x003E, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_PETEXPERIENCE = ObjectUpdateFields.End + 0x003F, // Size: 1, Type: Int, Flags: OwnerOnly
UNIT_FIELD_PETNEXTLEVELEXP = ObjectUpdateFields.End + 0x0040, // Size: 1, Type: Int, Flags: OwnerOnly
UNIT_DYNAMIC_FLAGS = ObjectUpdateFields.End + 0x0041, // Size: 1, Type: Int, Flags: Unk4
UNIT_MOD_CAST_SPEED = ObjectUpdateFields.End + 0x0042, // Size: 1, Type: Float, Flags: Public
UNIT_MOD_CAST_HASTE = ObjectUpdateFields.End + 0x0043, // Size: 1, Type: Float, Flags: Public
UNIT_CREATED_BY_SPELL = ObjectUpdateFields.End + 0x0044, // Size: 1, Type: Int, Flags: Public
UNIT_NPC_FLAGS = ObjectUpdateFields.End + 0x0045, // Size: 1, Type: Int, Flags: Unk4
UNIT_NPC_EMOTESTATE = ObjectUpdateFields.End + 0x0046, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_STAT0 = ObjectUpdateFields.End + 0x0047, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_STAT1 = ObjectUpdateFields.End + 0x0048, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_STAT2 = ObjectUpdateFields.End + 0x0049, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_STAT3 = ObjectUpdateFields.End + 0x004A, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_STAT4 = ObjectUpdateFields.End + 0x004B, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POSSTAT0 = ObjectUpdateFields.End + 0x004C, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POSSTAT1 = ObjectUpdateFields.End + 0x004D, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POSSTAT2 = ObjectUpdateFields.End + 0x004E, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POSSTAT3 = ObjectUpdateFields.End + 0x004F, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POSSTAT4 = ObjectUpdateFields.End + 0x0050, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_NEGSTAT0 = ObjectUpdateFields.End + 0x0051, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_NEGSTAT1 = ObjectUpdateFields.End + 0x0052, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_NEGSTAT2 = ObjectUpdateFields.End + 0x0053, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_NEGSTAT3 = ObjectUpdateFields.End + 0x0054, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_NEGSTAT4 = ObjectUpdateFields.End + 0x0055, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RESISTANCES = ObjectUpdateFields.End + 0x0056, // Size: 7, Type: Int, Flags: Private, OwnerOnly, Unk2
UNIT_FIELD_RESISTANCES_2 = ObjectUpdateFields.End + 0x0057,
UNIT_FIELD_RESISTANCES_3 = ObjectUpdateFields.End + 0x0058,
UNIT_FIELD_RESISTANCES_4 = ObjectUpdateFields.End + 0x0059,
UNIT_FIELD_RESISTANCES_5 = ObjectUpdateFields.End + 0x005A,
UNIT_FIELD_RESISTANCES_6 = ObjectUpdateFields.End + 0x005B,
UNIT_FIELD_RESISTANCES_7 = ObjectUpdateFields.End + 0x005C,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE = ObjectUpdateFields.End + 0x005D, // Size: 7, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_2 = ObjectUpdateFields.End + 0x005E,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_3 = ObjectUpdateFields.End + 0x005F,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_4 = ObjectUpdateFields.End + 0x0060,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_5 = ObjectUpdateFields.End + 0x0061,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_6 = ObjectUpdateFields.End + 0x0062,
UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE_7 = ObjectUpdateFields.End + 0x0063,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE = ObjectUpdateFields.End + 0x0064, // Size: 7, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_2 = ObjectUpdateFields.End + 0x0065,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_3 = ObjectUpdateFields.End + 0x0066,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_4 = ObjectUpdateFields.End + 0x0067,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_5 = ObjectUpdateFields.End + 0x0068,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_6 = ObjectUpdateFields.End + 0x0069,
UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE_7 = ObjectUpdateFields.End + 0x006A,
UNIT_FIELD_BASE_MANA = ObjectUpdateFields.End + 0x006B, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_BASE_HEALTH = ObjectUpdateFields.End + 0x006C, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_BYTES_2 = ObjectUpdateFields.End + 0x006D, // Size: 1, Type: Bytes, Flags: Public
UNIT_FIELD_ATTACK_POWER = ObjectUpdateFields.End + 0x006E, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_ATTACK_POWER_MOD_POS = ObjectUpdateFields.End + 0x006F, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_ATTACK_POWER_MOD_NEG = ObjectUpdateFields.End + 0x0070, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_ATTACK_POWER_MULTIPLIER = ObjectUpdateFields.End + 0x0071, // Size: 1, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_RANGED_ATTACK_POWER = ObjectUpdateFields.End + 0x0072, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS = ObjectUpdateFields.End + 0x0073, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG = ObjectUpdateFields.End + 0x0074, // Size: 1, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER = ObjectUpdateFields.End + 0x0075, // Size: 1, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_MINRANGEDDAMAGE = ObjectUpdateFields.End + 0x0076, // Size: 1, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_MAXRANGEDDAMAGE = ObjectUpdateFields.End + 0x0077, // Size: 1, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_POWER_COST_MODIFIER = ObjectUpdateFields.End + 0x0078, // Size: 7, Type: Int, Flags: Private, OwnerOnly
UNIT_FIELD_POWER_COST_MODIFIER_2 = ObjectUpdateFields.End + 0x0079,
UNIT_FIELD_POWER_COST_MODIFIER_3 = ObjectUpdateFields.End + 0x007A,
UNIT_FIELD_POWER_COST_MODIFIER_4 = ObjectUpdateFields.End + 0x007B,
UNIT_FIELD_POWER_COST_MODIFIER_5 = ObjectUpdateFields.End + 0x007C,
UNIT_FIELD_POWER_COST_MODIFIER_6 = ObjectUpdateFields.End + 0x007D,
UNIT_FIELD_POWER_COST_MODIFIER_7 = ObjectUpdateFields.End + 0x007E,
UNIT_FIELD_POWER_COST_MULTIPLIER = ObjectUpdateFields.End + 0x007F, // Size: 7, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_POWER_COST_MULTIPLIER_2 = ObjectUpdateFields.End + 0x0080,
UNIT_FIELD_POWER_COST_MULTIPLIER_3 = ObjectUpdateFields.End + 0x0081,
UNIT_FIELD_POWER_COST_MULTIPLIER_4 = ObjectUpdateFields.End + 0x0082,
UNIT_FIELD_POWER_COST_MULTIPLIER_5 = ObjectUpdateFields.End + 0x0083,
UNIT_FIELD_POWER_COST_MULTIPLIER_6 = ObjectUpdateFields.End + 0x0084,
UNIT_FIELD_POWER_COST_MULTIPLIER_7 = ObjectUpdateFields.End + 0x0085,
UNIT_FIELD_MAXHEALTHMODIFIER = ObjectUpdateFields.End + 0x0086, // Size: 1, Type: Float, Flags: Private, OwnerOnly
UNIT_FIELD_HOVERHEIGHT = ObjectUpdateFields.End + 0x0087, // Size: 1, Type: Float, Flags: Public
UNIT_FIELD_MAXITEMLEVEL = ObjectUpdateFields.End + 0x0088, // Size: 1, Type: Int, Flags: Public
UNIT_FIELD_PADDING = ObjectUpdateFields.End + 0x0089, // Size: 1, Type: Int, Flags: None
End = ObjectUpdateFields.End + 0x008A
}
public partial class UpdateFields
{
private static UpdateField<PlayerUpdateFields>[] _PlayerUpdateFields = new UpdateField<PlayerUpdateFields>[]
{
new UpdateField<PlayerUpdateFields>(4, 1, PlayerUpdateFields.PLAYER_DUEL_ARBITER),
new UpdateField<PlayerUpdateFields>(4, 1, PlayerUpdateFields.PLAYER_DUEL_ARBITER_HIPART),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_FLAGS),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_GUILDRANK),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_GUILDDELETE_DATE),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_GUILDLEVEL),
new UpdateField<PlayerUpdateFields>(5, 1, PlayerUpdateFields.PLAYER_BYTES),
new UpdateField<PlayerUpdateFields>(5, 1, PlayerUpdateFields.PLAYER_BYTES_2),
new UpdateField<PlayerUpdateFields>(5, 1, PlayerUpdateFields.PLAYER_BYTES_3),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_DUEL_TEAM),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_GUILD_TIMESTAMP),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_1_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_1_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_1_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_1_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_1_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_2_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_2_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_2_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_2_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_2_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_3_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_3_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_3_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_3_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_3_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_4_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_4_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_4_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_4_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_4_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_5_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_5_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_5_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_5_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_5_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_6_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_6_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_6_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_6_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_6_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_7_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_7_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_7_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_7_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_7_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_8_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_8_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_8_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_8_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_8_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_9_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_9_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_9_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_9_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_9_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_10_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_10_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_10_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_10_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_10_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_11_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_11_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_11_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_11_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_11_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_12_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_12_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_12_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_12_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_12_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_13_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_13_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_13_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_13_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_13_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_14_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_14_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_14_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_14_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_14_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_15_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_15_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_15_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_15_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_15_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_16_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_16_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_16_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_16_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_16_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_17_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_17_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_17_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_17_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_17_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_18_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_18_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_18_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_18_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_18_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_19_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_19_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_19_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_19_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_19_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_20_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_20_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_20_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_20_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_20_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_21_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_21_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_21_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_21_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_21_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_22_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_22_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_22_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_22_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_22_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_23_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_23_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_23_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_23_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_23_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_24_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_24_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_24_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_24_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_24_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_25_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_25_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_25_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_25_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_25_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_26_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_26_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_26_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_26_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_26_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_27_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_27_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_27_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_27_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_27_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_28_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_28_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_28_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_28_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_28_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_29_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_29_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_29_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_29_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_29_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_30_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_30_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_30_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_30_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_30_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_31_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_31_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_31_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_31_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_31_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_32_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_32_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_32_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_32_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_32_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_33_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_33_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_33_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_33_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_33_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_34_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_34_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_34_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_34_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_34_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_35_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_35_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_35_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_35_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_35_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_36_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_36_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_36_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_36_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_36_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_37_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_37_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_37_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_37_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_37_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_38_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_38_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_38_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_38_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_38_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_39_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_39_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_39_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_39_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_39_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_40_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_40_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_40_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_40_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_40_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_41_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_41_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_41_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_41_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_41_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_42_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_42_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_42_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_42_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_42_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_43_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_43_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_43_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_43_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_43_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_44_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_44_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_44_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_44_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_44_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_45_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_45_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_45_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_45_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_45_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_46_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_46_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_46_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_46_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_46_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_47_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_47_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_47_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_47_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_47_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_48_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_48_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_48_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_48_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_48_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_49_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_49_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_49_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_49_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_49_5),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_50_1),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_50_2),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_50_3),
new UpdateField<PlayerUpdateFields>(2, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_50_4),
new UpdateField<PlayerUpdateFields>(1, 32, PlayerUpdateFields.PLAYER_QUEST_LOG_50_5),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_1_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_1_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_2_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_2_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_3_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_3_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_4_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_4_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_5_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_5_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_6_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_6_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_7_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_7_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_8_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_8_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_9_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_9_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_10_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_10_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_11_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_11_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_12_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_12_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_13_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_13_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_14_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_14_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_15_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_15_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_16_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_16_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_17_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_17_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_18_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_18_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_19_ENTRYID),
new UpdateField<PlayerUpdateFields>(2, 1, PlayerUpdateFields.PLAYER_VISIBLE_ITEM_19_ENCHANTMENT),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_CHOSEN_TITLE),
new UpdateField<PlayerUpdateFields>(1, 1, PlayerUpdateFields.PLAYER_FAKE_INEBRIATION),
new UpdateField<PlayerUpdateFields>(1, 0, PlayerUpdateFields.PLAYER_FIELD_PAD_0),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_3_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_4),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_4_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_5),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_5_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_6),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_6_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_7),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_7_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_8),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_8_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_9),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_9_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_10),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_10_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_11),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_11_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_12),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_12_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_13),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_13_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_14),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_14_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_15),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_15_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_16),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_16_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_17),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_17_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_18),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_18_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_19),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_19_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_20),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_20_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_21),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_21_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_22),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_22_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_23),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_INV_SLOT_HEAD_23_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_1),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_1_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_3_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_4),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_4_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_5),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_5_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_6),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_6_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_7),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_7_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_8),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_8_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_9),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_9_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_10),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_10_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_11),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_11_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_12),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_12_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_13),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_13_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_14),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_14_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_15),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_15_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_16),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_PACK_SLOT_16_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_1),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_1_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_3_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_4),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_4_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_5),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_5_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_6),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_6_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_7),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_7_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_8),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_8_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_9),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_9_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_10),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_10_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_11),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_11_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_12),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_12_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_13),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_13_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_14),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_14_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_15),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_15_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_16),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_16_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_17),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_17_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_18),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_18_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_19),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_19_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_20),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_20_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_21),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_21_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_22),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_22_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_23),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_23_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_24),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_24_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_25),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_25_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_26),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_26_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_27),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_27_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_28),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANK_SLOT_28_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_1),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_1_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_3_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_4),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_4_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_5),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_5_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_6),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_6_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_7),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_BANKBAG_SLOT_7_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_1),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_1_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_3_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_4),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_4_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_5),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_5_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_6),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_6_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_7),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_7_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_8),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_8_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_9),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_9_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_10),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_10_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_11),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_11_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_12),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_VENDORBUYBACK_SLOT_12_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FARSIGHT),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FARSIGHT_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES1),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES1_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES2),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES2_HIPART),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES3),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER__FIELD_KNOWN_TITLES3_HIPART),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_XP),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_NEXT_LEVEL_XP),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_LINEID_63),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_STEP_63),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_RANK_63),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MAX_RANK_63),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_MODIFIER_63),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_0),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_9),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_10),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_11),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_13),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_14),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_15),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_16),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_17),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_18),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_19),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_20),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_21),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_22),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_23),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_24),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_25),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_26),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_27),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_28),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_29),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_30),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_31),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_32),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_33),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_34),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_35),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_36),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_37),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_38),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_39),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_40),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_41),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_42),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_43),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_44),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_45),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_46),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_47),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_48),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_49),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_50),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_51),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_52),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_53),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_54),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_55),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_56),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_57),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_58),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_59),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_60),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_61),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_62),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_SKILL_TALENT_63),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_CHARACTER_POINTS),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_TRACK_CREATURES),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_TRACK_RESOURCES),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_EXPERTISE),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_OFFHAND_EXPERTISE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_BLOCK_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_DODGE_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_PARRY_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_CRIT_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_RANGED_CRIT_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_OFFHAND_CRIT_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_2),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_3),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_4),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_5),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_6),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SPELL_CRIT_PERCENTAGE1_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_SHIELD_BLOCK),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_SHIELD_BLOCK_CRIT_PERCENTAGE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_MASTERY),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_1),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_2),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_3),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_4),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_5),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_6),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_7),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_8),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_9),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_10),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_11),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_12),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_13),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_14),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_15),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_16),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_17),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_18),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_19),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_20),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_21),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_22),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_23),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_24),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_25),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_26),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_27),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_28),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_29),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_30),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_31),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_32),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_33),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_34),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_35),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_36),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_37),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_38),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_39),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_40),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_41),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_42),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_43),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_44),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_45),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_46),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_47),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_48),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_49),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_50),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_51),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_52),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_53),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_54),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_55),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_56),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_57),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_58),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_59),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_60),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_61),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_62),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_63),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_64),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_65),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_66),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_67),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_68),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_69),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_70),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_71),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_72),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_73),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_74),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_75),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_76),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_77),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_78),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_79),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_80),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_81),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_82),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_83),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_84),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_85),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_86),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_87),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_88),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_89),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_90),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_91),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_92),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_93),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_94),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_95),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_96),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_97),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_98),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_99),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_100),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_101),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_102),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_103),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_104),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_105),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_106),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_107),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_108),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_109),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_110),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_111),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_112),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_113),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_114),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_115),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_116),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_117),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_118),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_119),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_120),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_121),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_122),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_123),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_124),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_125),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_126),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_127),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_128),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_129),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_130),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_131),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_132),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_133),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_134),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_135),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_136),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_137),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_138),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_139),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_140),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_141),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_142),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_143),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_144),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_145),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_146),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_147),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_148),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_149),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_150),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_151),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_152),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_153),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_154),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_155),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_EXPLORED_ZONES_156),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_REST_STATE_EXPERIENCE),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_COINAGE),
new UpdateField<PlayerUpdateFields>(4, 2, PlayerUpdateFields.PLAYER_FIELD_COINAGE_HIPART),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_POS_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_HEALING_DONE_POS),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_HEALING_PCT),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_HEALING_DONE_PCT),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS_2),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS_3),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_SPELL_POWER_PCT),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_OVERRIDE_SPELL_POWER_BY_AP_PCT),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_TARGET_RESISTANCE),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE),
new UpdateField<PlayerUpdateFields>(5, 2, PlayerUpdateFields.PLAYER_FIELD_BYTES),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_SELF_RES_SPELL),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_PVP_MEDALS),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_10),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_11),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_PRICE_12),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_10),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_11),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BUYBACK_TIMESTAMP_12),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_KILLS),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_LIFETIME_HONORBALE_KILLS),
new UpdateField<PlayerUpdateFields>(6, 2, PlayerUpdateFields.PLAYER_FIELD_BYTES2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_WATCHED_FACTION_INDEX),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_10),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_11),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_12),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_13),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_14),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_15),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_16),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_17),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_18),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_19),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_20),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_21),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_22),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_23),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_24),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_25),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_COMBAT_RATING_26),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_10),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_11),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_12),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_13),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_14),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_15),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_16),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_17),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_18),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_19),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_20),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_ARENA_TEAM_INFO_1_21),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_BATTLEGROUND_RATING),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_MAX_LEVEL),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_10),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_11),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_12),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_13),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_14),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_15),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_16),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_17),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_18),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_19),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_20),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_21),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_22),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_23),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_24),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_DAILY_QUESTS_25),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_RUNE_REGEN_1),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_RUNE_REGEN_2),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_RUNE_REGEN_3),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_RUNE_REGEN_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_NO_REAGENT_COST_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_NO_REAGENT_COST_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_NO_REAGENT_COST_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPH_SLOTS_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_2),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_3),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_4),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_5),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_6),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_7),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_GLYPHS_9),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_GLYPHS_ENABLED),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_PET_SPELL_POWER),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESEARCHING_8),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_1),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_2),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_3),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_4),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_5),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_6),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_7),
new UpdateField<PlayerUpdateFields>(2, 2, PlayerUpdateFields.PLAYER_FIELD_RESERACH_SITE_8),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_PROFESSION_SKILL_LINE_1),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_PROFESSION_SKILL_LINE_2),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_UI_HIT_MODIFIER),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_UI_SPELL_HIT_MODIFIER),
new UpdateField<PlayerUpdateFields>(1, 2, PlayerUpdateFields.PLAYER_FIELD_HOME_REALM_TIME_OFFSET),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_HASTE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_RANGED_HASTE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_PET_HASTE),
new UpdateField<PlayerUpdateFields>(3, 2, PlayerUpdateFields.PLAYER_FIELD_MOD_HASTE_REGEN),
};
public static UpdateField<PlayerUpdateFields> GetUpdateField(PlayerUpdateFields uf)
{
uint index = (uint)uf - (uint)UnitUpdateFields.End;
if (index >= (uint)PlayerUpdateFields.End)
return UpdateField.CreateUnknown<PlayerUpdateFields>(uf);
return _PlayerUpdateFields[index];
}
}
public enum PlayerUpdateFields : uint
{
PLAYER_DUEL_ARBITER = UnitUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
PLAYER_DUEL_ARBITER_HIPART = UnitUpdateFields.End + 0x0001,
PLAYER_FLAGS = UnitUpdateFields.End + 0x0002, // Size: 1, Type: Int, Flags: Public
PLAYER_GUILDRANK = UnitUpdateFields.End + 0x0003, // Size: 1, Type: Int, Flags: Public
PLAYER_GUILDDELETE_DATE = UnitUpdateFields.End + 0x0004, // Size: 1, Type: Int, Flags: Public
PLAYER_GUILDLEVEL = UnitUpdateFields.End + 0x0005, // Size: 1, Type: Int, Flags: Public
PLAYER_BYTES = UnitUpdateFields.End + 0x0006, // Size: 1, Type: Bytes, Flags: Public
PLAYER_BYTES_2 = UnitUpdateFields.End + 0x0007, // Size: 1, Type: Bytes, Flags: Public
PLAYER_BYTES_3 = UnitUpdateFields.End + 0x0008, // Size: 1, Type: Bytes, Flags: Public
PLAYER_DUEL_TEAM = UnitUpdateFields.End + 0x0009, // Size: 1, Type: Int, Flags: Public
PLAYER_GUILD_TIMESTAMP = UnitUpdateFields.End + 0x000A, // Size: 1, Type: Int, Flags: Public
PLAYER_QUEST_LOG_1_1 = UnitUpdateFields.End + 0x000B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_1_2 = UnitUpdateFields.End + 0x000C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_1_3 = UnitUpdateFields.End + 0x000D, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_1_4 = UnitUpdateFields.End + 0x000E,
PLAYER_QUEST_LOG_1_5 = UnitUpdateFields.End + 0x000F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_2_1 = UnitUpdateFields.End + 0x0010, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_2_2 = UnitUpdateFields.End + 0x0011, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_2_3 = UnitUpdateFields.End + 0x0012, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_2_4 = UnitUpdateFields.End + 0x0013,
PLAYER_QUEST_LOG_2_5 = UnitUpdateFields.End + 0x0014, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_3_1 = UnitUpdateFields.End + 0x0015, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_3_2 = UnitUpdateFields.End + 0x0016, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_3_3 = UnitUpdateFields.End + 0x0017, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_3_4 = UnitUpdateFields.End + 0x0018,
PLAYER_QUEST_LOG_3_5 = UnitUpdateFields.End + 0x0019, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_4_1 = UnitUpdateFields.End + 0x001A, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_4_2 = UnitUpdateFields.End + 0x001B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_4_3 = UnitUpdateFields.End + 0x001C, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_4_4 = UnitUpdateFields.End + 0x001D,
PLAYER_QUEST_LOG_4_5 = UnitUpdateFields.End + 0x001E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_5_1 = UnitUpdateFields.End + 0x001F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_5_2 = UnitUpdateFields.End + 0x0020, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_5_3 = UnitUpdateFields.End + 0x0021, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_5_4 = UnitUpdateFields.End + 0x0022,
PLAYER_QUEST_LOG_5_5 = UnitUpdateFields.End + 0x0023, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_6_1 = UnitUpdateFields.End + 0x0024, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_6_2 = UnitUpdateFields.End + 0x0025, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_6_3 = UnitUpdateFields.End + 0x0026, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_6_4 = UnitUpdateFields.End + 0x0027,
PLAYER_QUEST_LOG_6_5 = UnitUpdateFields.End + 0x0028, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_7_1 = UnitUpdateFields.End + 0x0029, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_7_2 = UnitUpdateFields.End + 0x002A, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_7_3 = UnitUpdateFields.End + 0x002B, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_7_4 = UnitUpdateFields.End + 0x002C,
PLAYER_QUEST_LOG_7_5 = UnitUpdateFields.End + 0x002D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_8_1 = UnitUpdateFields.End + 0x002E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_8_2 = UnitUpdateFields.End + 0x002F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_8_3 = UnitUpdateFields.End + 0x0030, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_8_4 = UnitUpdateFields.End + 0x0031,
PLAYER_QUEST_LOG_8_5 = UnitUpdateFields.End + 0x0032, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_9_1 = UnitUpdateFields.End + 0x0033, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_9_2 = UnitUpdateFields.End + 0x0034, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_9_3 = UnitUpdateFields.End + 0x0035, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_9_4 = UnitUpdateFields.End + 0x0036,
PLAYER_QUEST_LOG_9_5 = UnitUpdateFields.End + 0x0037, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_10_1 = UnitUpdateFields.End + 0x0038, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_10_2 = UnitUpdateFields.End + 0x0039, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_10_3 = UnitUpdateFields.End + 0x003A, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_10_4 = UnitUpdateFields.End + 0x003B,
PLAYER_QUEST_LOG_10_5 = UnitUpdateFields.End + 0x003C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_11_1 = UnitUpdateFields.End + 0x003D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_11_2 = UnitUpdateFields.End + 0x003E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_11_3 = UnitUpdateFields.End + 0x003F, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_11_4 = UnitUpdateFields.End + 0x0040,
PLAYER_QUEST_LOG_11_5 = UnitUpdateFields.End + 0x0041, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_12_1 = UnitUpdateFields.End + 0x0042, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_12_2 = UnitUpdateFields.End + 0x0043, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_12_3 = UnitUpdateFields.End + 0x0044, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_12_4 = UnitUpdateFields.End + 0x0045,
PLAYER_QUEST_LOG_12_5 = UnitUpdateFields.End + 0x0046, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_13_1 = UnitUpdateFields.End + 0x0047, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_13_2 = UnitUpdateFields.End + 0x0048, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_13_3 = UnitUpdateFields.End + 0x0049, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_13_4 = UnitUpdateFields.End + 0x004A,
PLAYER_QUEST_LOG_13_5 = UnitUpdateFields.End + 0x004B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_14_1 = UnitUpdateFields.End + 0x004C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_14_2 = UnitUpdateFields.End + 0x004D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_14_3 = UnitUpdateFields.End + 0x004E, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_14_4 = UnitUpdateFields.End + 0x004F,
PLAYER_QUEST_LOG_14_5 = UnitUpdateFields.End + 0x0050, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_15_1 = UnitUpdateFields.End + 0x0051, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_15_2 = UnitUpdateFields.End + 0x0052, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_15_3 = UnitUpdateFields.End + 0x0053, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_15_4 = UnitUpdateFields.End + 0x0054,
PLAYER_QUEST_LOG_15_5 = UnitUpdateFields.End + 0x0055, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_16_1 = UnitUpdateFields.End + 0x0056, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_16_2 = UnitUpdateFields.End + 0x0057, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_16_3 = UnitUpdateFields.End + 0x0058, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_16_4 = UnitUpdateFields.End + 0x0059,
PLAYER_QUEST_LOG_16_5 = UnitUpdateFields.End + 0x005A, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_17_1 = UnitUpdateFields.End + 0x005B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_17_2 = UnitUpdateFields.End + 0x005C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_17_3 = UnitUpdateFields.End + 0x005D, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_17_4 = UnitUpdateFields.End + 0x005E,
PLAYER_QUEST_LOG_17_5 = UnitUpdateFields.End + 0x005F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_18_1 = UnitUpdateFields.End + 0x0060, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_18_2 = UnitUpdateFields.End + 0x0061, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_18_3 = UnitUpdateFields.End + 0x0062, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_18_4 = UnitUpdateFields.End + 0x0063,
PLAYER_QUEST_LOG_18_5 = UnitUpdateFields.End + 0x0064, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_19_1 = UnitUpdateFields.End + 0x0065, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_19_2 = UnitUpdateFields.End + 0x0066, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_19_3 = UnitUpdateFields.End + 0x0067, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_19_4 = UnitUpdateFields.End + 0x0068,
PLAYER_QUEST_LOG_19_5 = UnitUpdateFields.End + 0x0069, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_20_1 = UnitUpdateFields.End + 0x006A, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_20_2 = UnitUpdateFields.End + 0x006B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_20_3 = UnitUpdateFields.End + 0x006C, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_20_4 = UnitUpdateFields.End + 0x006D,
PLAYER_QUEST_LOG_20_5 = UnitUpdateFields.End + 0x006E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_21_1 = UnitUpdateFields.End + 0x006F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_21_2 = UnitUpdateFields.End + 0x0070, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_21_3 = UnitUpdateFields.End + 0x0071, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_21_4 = UnitUpdateFields.End + 0x0072,
PLAYER_QUEST_LOG_21_5 = UnitUpdateFields.End + 0x0073, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_22_1 = UnitUpdateFields.End + 0x0074, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_22_2 = UnitUpdateFields.End + 0x0075, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_22_3 = UnitUpdateFields.End + 0x0076, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_22_4 = UnitUpdateFields.End + 0x0077,
PLAYER_QUEST_LOG_22_5 = UnitUpdateFields.End + 0x0078, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_23_1 = UnitUpdateFields.End + 0x0079, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_23_2 = UnitUpdateFields.End + 0x007A, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_23_3 = UnitUpdateFields.End + 0x007B, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_23_4 = UnitUpdateFields.End + 0x007C,
PLAYER_QUEST_LOG_23_5 = UnitUpdateFields.End + 0x007D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_24_1 = UnitUpdateFields.End + 0x007E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_24_2 = UnitUpdateFields.End + 0x007F, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_24_3 = UnitUpdateFields.End + 0x0080, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_24_4 = UnitUpdateFields.End + 0x0081,
PLAYER_QUEST_LOG_24_5 = UnitUpdateFields.End + 0x0082, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_25_1 = UnitUpdateFields.End + 0x0083, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_25_2 = UnitUpdateFields.End + 0x0084, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_25_3 = UnitUpdateFields.End + 0x0085, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_25_4 = UnitUpdateFields.End + 0x0086,
PLAYER_QUEST_LOG_25_5 = UnitUpdateFields.End + 0x0087, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_26_1 = UnitUpdateFields.End + 0x0088, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_26_2 = UnitUpdateFields.End + 0x0089, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_26_3 = UnitUpdateFields.End + 0x008A, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_26_4 = UnitUpdateFields.End + 0x008B,
PLAYER_QUEST_LOG_26_5 = UnitUpdateFields.End + 0x008C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_27_1 = UnitUpdateFields.End + 0x008D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_27_2 = UnitUpdateFields.End + 0x008E, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_27_3 = UnitUpdateFields.End + 0x008F, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_27_4 = UnitUpdateFields.End + 0x0090,
PLAYER_QUEST_LOG_27_5 = UnitUpdateFields.End + 0x0091, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_28_1 = UnitUpdateFields.End + 0x0092, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_28_2 = UnitUpdateFields.End + 0x0093, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_28_3 = UnitUpdateFields.End + 0x0094, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_28_4 = UnitUpdateFields.End + 0x0095,
PLAYER_QUEST_LOG_28_5 = UnitUpdateFields.End + 0x0096, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_29_1 = UnitUpdateFields.End + 0x0097, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_29_2 = UnitUpdateFields.End + 0x0098, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_29_3 = UnitUpdateFields.End + 0x0099, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_29_4 = UnitUpdateFields.End + 0x009A,
PLAYER_QUEST_LOG_29_5 = UnitUpdateFields.End + 0x009B, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_30_1 = UnitUpdateFields.End + 0x009C, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_30_2 = UnitUpdateFields.End + 0x009D, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_30_3 = UnitUpdateFields.End + 0x009E, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_30_4 = UnitUpdateFields.End + 0x009F,
PLAYER_QUEST_LOG_30_5 = UnitUpdateFields.End + 0x00A0, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_31_1 = UnitUpdateFields.End + 0x00A1, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_31_2 = UnitUpdateFields.End + 0x00A2, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_31_3 = UnitUpdateFields.End + 0x00A3, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_31_4 = UnitUpdateFields.End + 0x00A4,
PLAYER_QUEST_LOG_31_5 = UnitUpdateFields.End + 0x00A5, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_32_1 = UnitUpdateFields.End + 0x00A6, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_32_2 = UnitUpdateFields.End + 0x00A7, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_32_3 = UnitUpdateFields.End + 0x00A8, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_32_4 = UnitUpdateFields.End + 0x00A9,
PLAYER_QUEST_LOG_32_5 = UnitUpdateFields.End + 0x00AA, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_33_1 = UnitUpdateFields.End + 0x00AB, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_33_2 = UnitUpdateFields.End + 0x00AC, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_33_3 = UnitUpdateFields.End + 0x00AD, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_33_4 = UnitUpdateFields.End + 0x00AE,
PLAYER_QUEST_LOG_33_5 = UnitUpdateFields.End + 0x00AF, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_34_1 = UnitUpdateFields.End + 0x00B0, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_34_2 = UnitUpdateFields.End + 0x00B1, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_34_3 = UnitUpdateFields.End + 0x00B2, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_34_4 = UnitUpdateFields.End + 0x00B3,
PLAYER_QUEST_LOG_34_5 = UnitUpdateFields.End + 0x00B4, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_35_1 = UnitUpdateFields.End + 0x00B5, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_35_2 = UnitUpdateFields.End + 0x00B6, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_35_3 = UnitUpdateFields.End + 0x00B7, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_35_4 = UnitUpdateFields.End + 0x00B8,
PLAYER_QUEST_LOG_35_5 = UnitUpdateFields.End + 0x00B9, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_36_1 = UnitUpdateFields.End + 0x00BA, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_36_2 = UnitUpdateFields.End + 0x00BB, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_36_3 = UnitUpdateFields.End + 0x00BC, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_36_4 = UnitUpdateFields.End + 0x00BD,
PLAYER_QUEST_LOG_36_5 = UnitUpdateFields.End + 0x00BE, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_37_1 = UnitUpdateFields.End + 0x00BF, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_37_2 = UnitUpdateFields.End + 0x00C0, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_37_3 = UnitUpdateFields.End + 0x00C1, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_37_4 = UnitUpdateFields.End + 0x00C2,
PLAYER_QUEST_LOG_37_5 = UnitUpdateFields.End + 0x00C3, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_38_1 = UnitUpdateFields.End + 0x00C4, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_38_2 = UnitUpdateFields.End + 0x00C5, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_38_3 = UnitUpdateFields.End + 0x00C6, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_38_4 = UnitUpdateFields.End + 0x00C7,
PLAYER_QUEST_LOG_38_5 = UnitUpdateFields.End + 0x00C8, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_39_1 = UnitUpdateFields.End + 0x00C9, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_39_2 = UnitUpdateFields.End + 0x00CA, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_39_3 = UnitUpdateFields.End + 0x00CB, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_39_4 = UnitUpdateFields.End + 0x00CC,
PLAYER_QUEST_LOG_39_5 = UnitUpdateFields.End + 0x00CD, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_40_1 = UnitUpdateFields.End + 0x00CE, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_40_2 = UnitUpdateFields.End + 0x00CF, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_40_3 = UnitUpdateFields.End + 0x00D0, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_40_4 = UnitUpdateFields.End + 0x00D1,
PLAYER_QUEST_LOG_40_5 = UnitUpdateFields.End + 0x00D2, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_41_1 = UnitUpdateFields.End + 0x00D3, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_41_2 = UnitUpdateFields.End + 0x00D4, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_41_3 = UnitUpdateFields.End + 0x00D5, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_41_4 = UnitUpdateFields.End + 0x00D6,
PLAYER_QUEST_LOG_41_5 = UnitUpdateFields.End + 0x00D7, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_42_1 = UnitUpdateFields.End + 0x00D8, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_42_2 = UnitUpdateFields.End + 0x00D9, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_42_3 = UnitUpdateFields.End + 0x00DA, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_42_4 = UnitUpdateFields.End + 0x00DB,
PLAYER_QUEST_LOG_42_5 = UnitUpdateFields.End + 0x00DC, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_43_1 = UnitUpdateFields.End + 0x00DD, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_43_2 = UnitUpdateFields.End + 0x00DE, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_43_3 = UnitUpdateFields.End + 0x00DF, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_43_4 = UnitUpdateFields.End + 0x00E0,
PLAYER_QUEST_LOG_43_5 = UnitUpdateFields.End + 0x00E1, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_44_1 = UnitUpdateFields.End + 0x00E2, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_44_2 = UnitUpdateFields.End + 0x00E3, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_44_3 = UnitUpdateFields.End + 0x00E4, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_44_4 = UnitUpdateFields.End + 0x00E5,
PLAYER_QUEST_LOG_44_5 = UnitUpdateFields.End + 0x00E6, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_45_1 = UnitUpdateFields.End + 0x00E7, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_45_2 = UnitUpdateFields.End + 0x00E8, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_45_3 = UnitUpdateFields.End + 0x00E9, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_45_4 = UnitUpdateFields.End + 0x00EA,
PLAYER_QUEST_LOG_45_5 = UnitUpdateFields.End + 0x00EB, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_46_1 = UnitUpdateFields.End + 0x00EC, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_46_2 = UnitUpdateFields.End + 0x00ED, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_46_3 = UnitUpdateFields.End + 0x00EE, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_46_4 = UnitUpdateFields.End + 0x00EF,
PLAYER_QUEST_LOG_46_5 = UnitUpdateFields.End + 0x00F0, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_47_1 = UnitUpdateFields.End + 0x00F1, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_47_2 = UnitUpdateFields.End + 0x00F2, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_47_3 = UnitUpdateFields.End + 0x00F3, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_47_4 = UnitUpdateFields.End + 0x00F4,
PLAYER_QUEST_LOG_47_5 = UnitUpdateFields.End + 0x00F5, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_48_1 = UnitUpdateFields.End + 0x00F6, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_48_2 = UnitUpdateFields.End + 0x00F7, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_48_3 = UnitUpdateFields.End + 0x00F8, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_48_4 = UnitUpdateFields.End + 0x00F9,
PLAYER_QUEST_LOG_48_5 = UnitUpdateFields.End + 0x00FA, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_49_1 = UnitUpdateFields.End + 0x00FB, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_49_2 = UnitUpdateFields.End + 0x00FC, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_49_3 = UnitUpdateFields.End + 0x00FD, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_49_4 = UnitUpdateFields.End + 0x00FE,
PLAYER_QUEST_LOG_49_5 = UnitUpdateFields.End + 0x00FF, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_50_1 = UnitUpdateFields.End + 0x0100, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_50_2 = UnitUpdateFields.End + 0x0101, // Size: 1, Type: Int, Flags: Unk3
PLAYER_QUEST_LOG_50_3 = UnitUpdateFields.End + 0x0102, // Size: 2, Type: TwoShort, Flags: Unk3
PLAYER_QUEST_LOG_50_4 = UnitUpdateFields.End + 0x0103,
PLAYER_QUEST_LOG_50_5 = UnitUpdateFields.End + 0x0104, // Size: 1, Type: Int, Flags: Unk3
PLAYER_VISIBLE_ITEM_1_ENTRYID = UnitUpdateFields.End + 0x0105, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_1_ENCHANTMENT = UnitUpdateFields.End + 0x0106, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_2_ENTRYID = UnitUpdateFields.End + 0x0107, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_2_ENCHANTMENT = UnitUpdateFields.End + 0x0108, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_3_ENTRYID = UnitUpdateFields.End + 0x0109, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_3_ENCHANTMENT = UnitUpdateFields.End + 0x010A, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_4_ENTRYID = UnitUpdateFields.End + 0x010B, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_4_ENCHANTMENT = UnitUpdateFields.End + 0x010C, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_5_ENTRYID = UnitUpdateFields.End + 0x010D, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_5_ENCHANTMENT = UnitUpdateFields.End + 0x010E, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_6_ENTRYID = UnitUpdateFields.End + 0x010F, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_6_ENCHANTMENT = UnitUpdateFields.End + 0x0110, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_7_ENTRYID = UnitUpdateFields.End + 0x0111, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_7_ENCHANTMENT = UnitUpdateFields.End + 0x0112, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_8_ENTRYID = UnitUpdateFields.End + 0x0113, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_8_ENCHANTMENT = UnitUpdateFields.End + 0x0114, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_9_ENTRYID = UnitUpdateFields.End + 0x0115, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_9_ENCHANTMENT = UnitUpdateFields.End + 0x0116, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_10_ENTRYID = UnitUpdateFields.End + 0x0117, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_10_ENCHANTMENT = UnitUpdateFields.End + 0x0118, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_11_ENTRYID = UnitUpdateFields.End + 0x0119, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_11_ENCHANTMENT = UnitUpdateFields.End + 0x011A, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_12_ENTRYID = UnitUpdateFields.End + 0x011B, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_12_ENCHANTMENT = UnitUpdateFields.End + 0x011C, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_13_ENTRYID = UnitUpdateFields.End + 0x011D, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_13_ENCHANTMENT = UnitUpdateFields.End + 0x011E, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_14_ENTRYID = UnitUpdateFields.End + 0x011F, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_14_ENCHANTMENT = UnitUpdateFields.End + 0x0120, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_15_ENTRYID = UnitUpdateFields.End + 0x0121, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_15_ENCHANTMENT = UnitUpdateFields.End + 0x0122, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_16_ENTRYID = UnitUpdateFields.End + 0x0123, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_16_ENCHANTMENT = UnitUpdateFields.End + 0x0124, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_17_ENTRYID = UnitUpdateFields.End + 0x0125, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_17_ENCHANTMENT = UnitUpdateFields.End + 0x0126, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_18_ENTRYID = UnitUpdateFields.End + 0x0127, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_18_ENCHANTMENT = UnitUpdateFields.End + 0x0128, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_VISIBLE_ITEM_19_ENTRYID = UnitUpdateFields.End + 0x0129, // Size: 1, Type: Int, Flags: Public
PLAYER_VISIBLE_ITEM_19_ENCHANTMENT = UnitUpdateFields.End + 0x012A, // Size: 1, Type: TwoShort, Flags: Public
PLAYER_CHOSEN_TITLE = UnitUpdateFields.End + 0x012B, // Size: 1, Type: Int, Flags: Public
PLAYER_FAKE_INEBRIATION = UnitUpdateFields.End + 0x012C, // Size: 1, Type: Int, Flags: Public
PLAYER_FIELD_PAD_0 = UnitUpdateFields.End + 0x012D, // Size: 1, Type: Int, Flags: None
PLAYER_FIELD_INV_SLOT_HEAD = UnitUpdateFields.End + 0x012E, // Size: 46, Type: Long, Flags: Private
PLAYER_FIELD_INV_SLOT_HEAD_HIPART = UnitUpdateFields.End + 0x012F,
PLAYER_FIELD_INV_SLOT_HEAD_2 = UnitUpdateFields.End + 0x0130,
PLAYER_FIELD_INV_SLOT_HEAD_2_HIPART = UnitUpdateFields.End + 0x0131,
PLAYER_FIELD_INV_SLOT_HEAD_3 = UnitUpdateFields.End + 0x0132,
PLAYER_FIELD_INV_SLOT_HEAD_3_HIPART = UnitUpdateFields.End + 0x0133,
PLAYER_FIELD_INV_SLOT_HEAD_4 = UnitUpdateFields.End + 0x0134,
PLAYER_FIELD_INV_SLOT_HEAD_4_HIPART = UnitUpdateFields.End + 0x0135,
PLAYER_FIELD_INV_SLOT_HEAD_5 = UnitUpdateFields.End + 0x0136,
PLAYER_FIELD_INV_SLOT_HEAD_5_HIPART = UnitUpdateFields.End + 0x0137,
PLAYER_FIELD_INV_SLOT_HEAD_6 = UnitUpdateFields.End + 0x0138,
PLAYER_FIELD_INV_SLOT_HEAD_6_HIPART = UnitUpdateFields.End + 0x0139,
PLAYER_FIELD_INV_SLOT_HEAD_7 = UnitUpdateFields.End + 0x013A,
PLAYER_FIELD_INV_SLOT_HEAD_7_HIPART = UnitUpdateFields.End + 0x013B,
PLAYER_FIELD_INV_SLOT_HEAD_8 = UnitUpdateFields.End + 0x013C,
PLAYER_FIELD_INV_SLOT_HEAD_8_HIPART = UnitUpdateFields.End + 0x013D,
PLAYER_FIELD_INV_SLOT_HEAD_9 = UnitUpdateFields.End + 0x013E,
PLAYER_FIELD_INV_SLOT_HEAD_9_HIPART = UnitUpdateFields.End + 0x013F,
PLAYER_FIELD_INV_SLOT_HEAD_10 = UnitUpdateFields.End + 0x0140,
PLAYER_FIELD_INV_SLOT_HEAD_10_HIPART = UnitUpdateFields.End + 0x0141,
PLAYER_FIELD_INV_SLOT_HEAD_11 = UnitUpdateFields.End + 0x0142,
PLAYER_FIELD_INV_SLOT_HEAD_11_HIPART = UnitUpdateFields.End + 0x0143,
PLAYER_FIELD_INV_SLOT_HEAD_12 = UnitUpdateFields.End + 0x0144,
PLAYER_FIELD_INV_SLOT_HEAD_12_HIPART = UnitUpdateFields.End + 0x0145,
PLAYER_FIELD_INV_SLOT_HEAD_13 = UnitUpdateFields.End + 0x0146,
PLAYER_FIELD_INV_SLOT_HEAD_13_HIPART = UnitUpdateFields.End + 0x0147,
PLAYER_FIELD_INV_SLOT_HEAD_14 = UnitUpdateFields.End + 0x0148,
PLAYER_FIELD_INV_SLOT_HEAD_14_HIPART = UnitUpdateFields.End + 0x0149,
PLAYER_FIELD_INV_SLOT_HEAD_15 = UnitUpdateFields.End + 0x014A,
PLAYER_FIELD_INV_SLOT_HEAD_15_HIPART = UnitUpdateFields.End + 0x014B,
PLAYER_FIELD_INV_SLOT_HEAD_16 = UnitUpdateFields.End + 0x014C,
PLAYER_FIELD_INV_SLOT_HEAD_16_HIPART = UnitUpdateFields.End + 0x014D,
PLAYER_FIELD_INV_SLOT_HEAD_17 = UnitUpdateFields.End + 0x014E,
PLAYER_FIELD_INV_SLOT_HEAD_17_HIPART = UnitUpdateFields.End + 0x014F,
PLAYER_FIELD_INV_SLOT_HEAD_18 = UnitUpdateFields.End + 0x0150,
PLAYER_FIELD_INV_SLOT_HEAD_18_HIPART = UnitUpdateFields.End + 0x0151,
PLAYER_FIELD_INV_SLOT_HEAD_19 = UnitUpdateFields.End + 0x0152,
PLAYER_FIELD_INV_SLOT_HEAD_19_HIPART = UnitUpdateFields.End + 0x0153,
PLAYER_FIELD_INV_SLOT_HEAD_20 = UnitUpdateFields.End + 0x0154,
PLAYER_FIELD_INV_SLOT_HEAD_20_HIPART = UnitUpdateFields.End + 0x0155,
PLAYER_FIELD_INV_SLOT_HEAD_21 = UnitUpdateFields.End + 0x0156,
PLAYER_FIELD_INV_SLOT_HEAD_21_HIPART = UnitUpdateFields.End + 0x0157,
PLAYER_FIELD_INV_SLOT_HEAD_22 = UnitUpdateFields.End + 0x0158,
PLAYER_FIELD_INV_SLOT_HEAD_22_HIPART = UnitUpdateFields.End + 0x0159,
PLAYER_FIELD_INV_SLOT_HEAD_23 = UnitUpdateFields.End + 0x015A,
PLAYER_FIELD_INV_SLOT_HEAD_23_HIPART = UnitUpdateFields.End + 0x015B,
PLAYER_FIELD_PACK_SLOT_1 = UnitUpdateFields.End + 0x015C, // Size: 32, Type: Long, Flags: Private
PLAYER_FIELD_PACK_SLOT_1_HIPART = UnitUpdateFields.End + 0x015D,
PLAYER_FIELD_PACK_SLOT_2 = UnitUpdateFields.End + 0x015E,
PLAYER_FIELD_PACK_SLOT_2_HIPART = UnitUpdateFields.End + 0x015F,
PLAYER_FIELD_PACK_SLOT_3 = UnitUpdateFields.End + 0x0160,
PLAYER_FIELD_PACK_SLOT_3_HIPART = UnitUpdateFields.End + 0x0161,
PLAYER_FIELD_PACK_SLOT_4 = UnitUpdateFields.End + 0x0162,
PLAYER_FIELD_PACK_SLOT_4_HIPART = UnitUpdateFields.End + 0x0163,
PLAYER_FIELD_PACK_SLOT_5 = UnitUpdateFields.End + 0x0164,
PLAYER_FIELD_PACK_SLOT_5_HIPART = UnitUpdateFields.End + 0x0165,
PLAYER_FIELD_PACK_SLOT_6 = UnitUpdateFields.End + 0x0166,
PLAYER_FIELD_PACK_SLOT_6_HIPART = UnitUpdateFields.End + 0x0167,
PLAYER_FIELD_PACK_SLOT_7 = UnitUpdateFields.End + 0x0168,
PLAYER_FIELD_PACK_SLOT_7_HIPART = UnitUpdateFields.End + 0x0169,
PLAYER_FIELD_PACK_SLOT_8 = UnitUpdateFields.End + 0x016A,
PLAYER_FIELD_PACK_SLOT_8_HIPART = UnitUpdateFields.End + 0x016B,
PLAYER_FIELD_PACK_SLOT_9 = UnitUpdateFields.End + 0x016C,
PLAYER_FIELD_PACK_SLOT_9_HIPART = UnitUpdateFields.End + 0x016D,
PLAYER_FIELD_PACK_SLOT_10 = UnitUpdateFields.End + 0x016E,
PLAYER_FIELD_PACK_SLOT_10_HIPART = UnitUpdateFields.End + 0x016F,
PLAYER_FIELD_PACK_SLOT_11 = UnitUpdateFields.End + 0x0170,
PLAYER_FIELD_PACK_SLOT_11_HIPART = UnitUpdateFields.End + 0x0171,
PLAYER_FIELD_PACK_SLOT_12 = UnitUpdateFields.End + 0x0172,
PLAYER_FIELD_PACK_SLOT_12_HIPART = UnitUpdateFields.End + 0x0173,
PLAYER_FIELD_PACK_SLOT_13 = UnitUpdateFields.End + 0x0174,
PLAYER_FIELD_PACK_SLOT_13_HIPART = UnitUpdateFields.End + 0x0175,
PLAYER_FIELD_PACK_SLOT_14 = UnitUpdateFields.End + 0x0176,
PLAYER_FIELD_PACK_SLOT_14_HIPART = UnitUpdateFields.End + 0x0177,
PLAYER_FIELD_PACK_SLOT_15 = UnitUpdateFields.End + 0x0178,
PLAYER_FIELD_PACK_SLOT_15_HIPART = UnitUpdateFields.End + 0x0179,
PLAYER_FIELD_PACK_SLOT_16 = UnitUpdateFields.End + 0x017A,
PLAYER_FIELD_PACK_SLOT_16_HIPART = UnitUpdateFields.End + 0x017B,
PLAYER_FIELD_BANK_SLOT_1 = UnitUpdateFields.End + 0x017C, // Size: 56, Type: Long, Flags: Private
PLAYER_FIELD_BANK_SLOT_1_HIPART = UnitUpdateFields.End + 0x017D,
PLAYER_FIELD_BANK_SLOT_2 = UnitUpdateFields.End + 0x017E,
PLAYER_FIELD_BANK_SLOT_2_HIPART = UnitUpdateFields.End + 0x017F,
PLAYER_FIELD_BANK_SLOT_3 = UnitUpdateFields.End + 0x0180,
PLAYER_FIELD_BANK_SLOT_3_HIPART = UnitUpdateFields.End + 0x0181,
PLAYER_FIELD_BANK_SLOT_4 = UnitUpdateFields.End + 0x0182,
PLAYER_FIELD_BANK_SLOT_4_HIPART = UnitUpdateFields.End + 0x0183,
PLAYER_FIELD_BANK_SLOT_5 = UnitUpdateFields.End + 0x0184,
PLAYER_FIELD_BANK_SLOT_5_HIPART = UnitUpdateFields.End + 0x0185,
PLAYER_FIELD_BANK_SLOT_6 = UnitUpdateFields.End + 0x0186,
PLAYER_FIELD_BANK_SLOT_6_HIPART = UnitUpdateFields.End + 0x0187,
PLAYER_FIELD_BANK_SLOT_7 = UnitUpdateFields.End + 0x0188,
PLAYER_FIELD_BANK_SLOT_7_HIPART = UnitUpdateFields.End + 0x0189,
PLAYER_FIELD_BANK_SLOT_8 = UnitUpdateFields.End + 0x018A,
PLAYER_FIELD_BANK_SLOT_8_HIPART = UnitUpdateFields.End + 0x018B,
PLAYER_FIELD_BANK_SLOT_9 = UnitUpdateFields.End + 0x018C,
PLAYER_FIELD_BANK_SLOT_9_HIPART = UnitUpdateFields.End + 0x018D,
PLAYER_FIELD_BANK_SLOT_10 = UnitUpdateFields.End + 0x018E,
PLAYER_FIELD_BANK_SLOT_10_HIPART = UnitUpdateFields.End + 0x018F,
PLAYER_FIELD_BANK_SLOT_11 = UnitUpdateFields.End + 0x0190,
PLAYER_FIELD_BANK_SLOT_11_HIPART = UnitUpdateFields.End + 0x0191,
PLAYER_FIELD_BANK_SLOT_12 = UnitUpdateFields.End + 0x0192,
PLAYER_FIELD_BANK_SLOT_12_HIPART = UnitUpdateFields.End + 0x0193,
PLAYER_FIELD_BANK_SLOT_13 = UnitUpdateFields.End + 0x0194,
PLAYER_FIELD_BANK_SLOT_13_HIPART = UnitUpdateFields.End + 0x0195,
PLAYER_FIELD_BANK_SLOT_14 = UnitUpdateFields.End + 0x0196,
PLAYER_FIELD_BANK_SLOT_14_HIPART = UnitUpdateFields.End + 0x0197,
PLAYER_FIELD_BANK_SLOT_15 = UnitUpdateFields.End + 0x0198,
PLAYER_FIELD_BANK_SLOT_15_HIPART = UnitUpdateFields.End + 0x0199,
PLAYER_FIELD_BANK_SLOT_16 = UnitUpdateFields.End + 0x019A,
PLAYER_FIELD_BANK_SLOT_16_HIPART = UnitUpdateFields.End + 0x019B,
PLAYER_FIELD_BANK_SLOT_17 = UnitUpdateFields.End + 0x019C,
PLAYER_FIELD_BANK_SLOT_17_HIPART = UnitUpdateFields.End + 0x019D,
PLAYER_FIELD_BANK_SLOT_18 = UnitUpdateFields.End + 0x019E,
PLAYER_FIELD_BANK_SLOT_18_HIPART = UnitUpdateFields.End + 0x019F,
PLAYER_FIELD_BANK_SLOT_19 = UnitUpdateFields.End + 0x01A0,
PLAYER_FIELD_BANK_SLOT_19_HIPART = UnitUpdateFields.End + 0x01A1,
PLAYER_FIELD_BANK_SLOT_20 = UnitUpdateFields.End + 0x01A2,
PLAYER_FIELD_BANK_SLOT_20_HIPART = UnitUpdateFields.End + 0x01A3,
PLAYER_FIELD_BANK_SLOT_21 = UnitUpdateFields.End + 0x01A4,
PLAYER_FIELD_BANK_SLOT_21_HIPART = UnitUpdateFields.End + 0x01A5,
PLAYER_FIELD_BANK_SLOT_22 = UnitUpdateFields.End + 0x01A6,
PLAYER_FIELD_BANK_SLOT_22_HIPART = UnitUpdateFields.End + 0x01A7,
PLAYER_FIELD_BANK_SLOT_23 = UnitUpdateFields.End + 0x01A8,
PLAYER_FIELD_BANK_SLOT_23_HIPART = UnitUpdateFields.End + 0x01A9,
PLAYER_FIELD_BANK_SLOT_24 = UnitUpdateFields.End + 0x01AA,
PLAYER_FIELD_BANK_SLOT_24_HIPART = UnitUpdateFields.End + 0x01AB,
PLAYER_FIELD_BANK_SLOT_25 = UnitUpdateFields.End + 0x01AC,
PLAYER_FIELD_BANK_SLOT_25_HIPART = UnitUpdateFields.End + 0x01AD,
PLAYER_FIELD_BANK_SLOT_26 = UnitUpdateFields.End + 0x01AE,
PLAYER_FIELD_BANK_SLOT_26_HIPART = UnitUpdateFields.End + 0x01AF,
PLAYER_FIELD_BANK_SLOT_27 = UnitUpdateFields.End + 0x01B0,
PLAYER_FIELD_BANK_SLOT_27_HIPART = UnitUpdateFields.End + 0x01B1,
PLAYER_FIELD_BANK_SLOT_28 = UnitUpdateFields.End + 0x01B2,
PLAYER_FIELD_BANK_SLOT_28_HIPART = UnitUpdateFields.End + 0x01B3,
PLAYER_FIELD_BANKBAG_SLOT_1 = UnitUpdateFields.End + 0x01B4, // Size: 14, Type: Long, Flags: Private
PLAYER_FIELD_BANKBAG_SLOT_1_HIPART = UnitUpdateFields.End + 0x01B5,
PLAYER_FIELD_BANKBAG_SLOT_2 = UnitUpdateFields.End + 0x01B6,
PLAYER_FIELD_BANKBAG_SLOT_2_HIPART = UnitUpdateFields.End + 0x01B7,
PLAYER_FIELD_BANKBAG_SLOT_3 = UnitUpdateFields.End + 0x01B8,
PLAYER_FIELD_BANKBAG_SLOT_3_HIPART = UnitUpdateFields.End + 0x01B9,
PLAYER_FIELD_BANKBAG_SLOT_4 = UnitUpdateFields.End + 0x01BA,
PLAYER_FIELD_BANKBAG_SLOT_4_HIPART = UnitUpdateFields.End + 0x01BB,
PLAYER_FIELD_BANKBAG_SLOT_5 = UnitUpdateFields.End + 0x01BC,
PLAYER_FIELD_BANKBAG_SLOT_5_HIPART = UnitUpdateFields.End + 0x01BD,
PLAYER_FIELD_BANKBAG_SLOT_6 = UnitUpdateFields.End + 0x01BE,
PLAYER_FIELD_BANKBAG_SLOT_6_HIPART = UnitUpdateFields.End + 0x01BF,
PLAYER_FIELD_BANKBAG_SLOT_7 = UnitUpdateFields.End + 0x01C0,
PLAYER_FIELD_BANKBAG_SLOT_7_HIPART = UnitUpdateFields.End + 0x01C1,
PLAYER_FIELD_VENDORBUYBACK_SLOT_1 = UnitUpdateFields.End + 0x01C2, // Size: 24, Type: Long, Flags: Private
PLAYER_FIELD_VENDORBUYBACK_SLOT_1_HIPART = UnitUpdateFields.End + 0x01C3,
PLAYER_FIELD_VENDORBUYBACK_SLOT_2 = UnitUpdateFields.End + 0x01C4,
PLAYER_FIELD_VENDORBUYBACK_SLOT_2_HIPART = UnitUpdateFields.End + 0x01C5,
PLAYER_FIELD_VENDORBUYBACK_SLOT_3 = UnitUpdateFields.End + 0x01C6,
PLAYER_FIELD_VENDORBUYBACK_SLOT_3_HIPART = UnitUpdateFields.End + 0x01C7,
PLAYER_FIELD_VENDORBUYBACK_SLOT_4 = UnitUpdateFields.End + 0x01C8,
PLAYER_FIELD_VENDORBUYBACK_SLOT_4_HIPART = UnitUpdateFields.End + 0x01C9,
PLAYER_FIELD_VENDORBUYBACK_SLOT_5 = UnitUpdateFields.End + 0x01CA,
PLAYER_FIELD_VENDORBUYBACK_SLOT_5_HIPART = UnitUpdateFields.End + 0x01CB,
PLAYER_FIELD_VENDORBUYBACK_SLOT_6 = UnitUpdateFields.End + 0x01CC,
PLAYER_FIELD_VENDORBUYBACK_SLOT_6_HIPART = UnitUpdateFields.End + 0x01CD,
PLAYER_FIELD_VENDORBUYBACK_SLOT_7 = UnitUpdateFields.End + 0x01CE,
PLAYER_FIELD_VENDORBUYBACK_SLOT_7_HIPART = UnitUpdateFields.End + 0x01CF,
PLAYER_FIELD_VENDORBUYBACK_SLOT_8 = UnitUpdateFields.End + 0x01D0,
PLAYER_FIELD_VENDORBUYBACK_SLOT_8_HIPART = UnitUpdateFields.End + 0x01D1,
PLAYER_FIELD_VENDORBUYBACK_SLOT_9 = UnitUpdateFields.End + 0x01D2,
PLAYER_FIELD_VENDORBUYBACK_SLOT_9_HIPART = UnitUpdateFields.End + 0x01D3,
PLAYER_FIELD_VENDORBUYBACK_SLOT_10 = UnitUpdateFields.End + 0x01D4,
PLAYER_FIELD_VENDORBUYBACK_SLOT_10_HIPART = UnitUpdateFields.End + 0x01D5,
PLAYER_FIELD_VENDORBUYBACK_SLOT_11 = UnitUpdateFields.End + 0x01D6,
PLAYER_FIELD_VENDORBUYBACK_SLOT_11_HIPART = UnitUpdateFields.End + 0x01D7,
PLAYER_FIELD_VENDORBUYBACK_SLOT_12 = UnitUpdateFields.End + 0x01D8,
PLAYER_FIELD_VENDORBUYBACK_SLOT_12_HIPART = UnitUpdateFields.End + 0x01D9,
PLAYER_FARSIGHT = UnitUpdateFields.End + 0x01DA, // Size: 2, Type: Long, Flags: Private
PLAYER_FARSIGHT_HIPART = UnitUpdateFields.End + 0x01DB,
PLAYER__FIELD_KNOWN_TITLES = UnitUpdateFields.End + 0x01DC, // Size: 2, Type: Long, Flags: Private
PLAYER__FIELD_KNOWN_TITLES_HIPART = UnitUpdateFields.End + 0x01DD,
PLAYER__FIELD_KNOWN_TITLES1 = UnitUpdateFields.End + 0x01DE, // Size: 2, Type: Long, Flags: Private
PLAYER__FIELD_KNOWN_TITLES1_HIPART = UnitUpdateFields.End + 0x01DF,
PLAYER__FIELD_KNOWN_TITLES2 = UnitUpdateFields.End + 0x01E0, // Size: 2, Type: Long, Flags: Private
PLAYER__FIELD_KNOWN_TITLES2_HIPART = UnitUpdateFields.End + 0x01E1,
PLAYER__FIELD_KNOWN_TITLES3 = UnitUpdateFields.End + 0x01E2, // Size: 2, Type: Long, Flags: Private
PLAYER__FIELD_KNOWN_TITLES3_HIPART = UnitUpdateFields.End + 0x01E3,
PLAYER_XP = UnitUpdateFields.End + 0x01E4, // Size: 1, Type: Int, Flags: Private
PLAYER_NEXT_LEVEL_XP = UnitUpdateFields.End + 0x01E5, // Size: 1, Type: Int, Flags: Private
PLAYER_SKILL_LINEID_0 = UnitUpdateFields.End + 0x01E6, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_LINEID_1 = UnitUpdateFields.End + 0x01E7,
PLAYER_SKILL_LINEID_2 = UnitUpdateFields.End + 0x01E8,
PLAYER_SKILL_LINEID_3 = UnitUpdateFields.End + 0x01E9,
PLAYER_SKILL_LINEID_4 = UnitUpdateFields.End + 0x01EA,
PLAYER_SKILL_LINEID_5 = UnitUpdateFields.End + 0x01EB,
PLAYER_SKILL_LINEID_6 = UnitUpdateFields.End + 0x01EC,
PLAYER_SKILL_LINEID_7 = UnitUpdateFields.End + 0x01ED,
PLAYER_SKILL_LINEID_8 = UnitUpdateFields.End + 0x01EE,
PLAYER_SKILL_LINEID_9 = UnitUpdateFields.End + 0x01EF,
PLAYER_SKILL_LINEID_10 = UnitUpdateFields.End + 0x01F0,
PLAYER_SKILL_LINEID_11 = UnitUpdateFields.End + 0x01F1,
PLAYER_SKILL_LINEID_12 = UnitUpdateFields.End + 0x01F2,
PLAYER_SKILL_LINEID_13 = UnitUpdateFields.End + 0x01F3,
PLAYER_SKILL_LINEID_14 = UnitUpdateFields.End + 0x01F4,
PLAYER_SKILL_LINEID_15 = UnitUpdateFields.End + 0x01F5,
PLAYER_SKILL_LINEID_16 = UnitUpdateFields.End + 0x01F6,
PLAYER_SKILL_LINEID_17 = UnitUpdateFields.End + 0x01F7,
PLAYER_SKILL_LINEID_18 = UnitUpdateFields.End + 0x01F8,
PLAYER_SKILL_LINEID_19 = UnitUpdateFields.End + 0x01F9,
PLAYER_SKILL_LINEID_20 = UnitUpdateFields.End + 0x01FA,
PLAYER_SKILL_LINEID_21 = UnitUpdateFields.End + 0x01FB,
PLAYER_SKILL_LINEID_22 = UnitUpdateFields.End + 0x01FC,
PLAYER_SKILL_LINEID_23 = UnitUpdateFields.End + 0x01FD,
PLAYER_SKILL_LINEID_24 = UnitUpdateFields.End + 0x01FE,
PLAYER_SKILL_LINEID_25 = UnitUpdateFields.End + 0x01FF,
PLAYER_SKILL_LINEID_26 = UnitUpdateFields.End + 0x0200,
PLAYER_SKILL_LINEID_27 = UnitUpdateFields.End + 0x0201,
PLAYER_SKILL_LINEID_28 = UnitUpdateFields.End + 0x0202,
PLAYER_SKILL_LINEID_29 = UnitUpdateFields.End + 0x0203,
PLAYER_SKILL_LINEID_30 = UnitUpdateFields.End + 0x0204,
PLAYER_SKILL_LINEID_31 = UnitUpdateFields.End + 0x0205,
PLAYER_SKILL_LINEID_32 = UnitUpdateFields.End + 0x0206,
PLAYER_SKILL_LINEID_33 = UnitUpdateFields.End + 0x0207,
PLAYER_SKILL_LINEID_34 = UnitUpdateFields.End + 0x0208,
PLAYER_SKILL_LINEID_35 = UnitUpdateFields.End + 0x0209,
PLAYER_SKILL_LINEID_36 = UnitUpdateFields.End + 0x020A,
PLAYER_SKILL_LINEID_37 = UnitUpdateFields.End + 0x020B,
PLAYER_SKILL_LINEID_38 = UnitUpdateFields.End + 0x020C,
PLAYER_SKILL_LINEID_39 = UnitUpdateFields.End + 0x020D,
PLAYER_SKILL_LINEID_40 = UnitUpdateFields.End + 0x020E,
PLAYER_SKILL_LINEID_41 = UnitUpdateFields.End + 0x020F,
PLAYER_SKILL_LINEID_42 = UnitUpdateFields.End + 0x0210,
PLAYER_SKILL_LINEID_43 = UnitUpdateFields.End + 0x0211,
PLAYER_SKILL_LINEID_44 = UnitUpdateFields.End + 0x0212,
PLAYER_SKILL_LINEID_45 = UnitUpdateFields.End + 0x0213,
PLAYER_SKILL_LINEID_46 = UnitUpdateFields.End + 0x0214,
PLAYER_SKILL_LINEID_47 = UnitUpdateFields.End + 0x0215,
PLAYER_SKILL_LINEID_48 = UnitUpdateFields.End + 0x0216,
PLAYER_SKILL_LINEID_49 = UnitUpdateFields.End + 0x0217,
PLAYER_SKILL_LINEID_50 = UnitUpdateFields.End + 0x0218,
PLAYER_SKILL_LINEID_51 = UnitUpdateFields.End + 0x0219,
PLAYER_SKILL_LINEID_52 = UnitUpdateFields.End + 0x021A,
PLAYER_SKILL_LINEID_53 = UnitUpdateFields.End + 0x021B,
PLAYER_SKILL_LINEID_54 = UnitUpdateFields.End + 0x021C,
PLAYER_SKILL_LINEID_55 = UnitUpdateFields.End + 0x021D,
PLAYER_SKILL_LINEID_56 = UnitUpdateFields.End + 0x021E,
PLAYER_SKILL_LINEID_57 = UnitUpdateFields.End + 0x021F,
PLAYER_SKILL_LINEID_58 = UnitUpdateFields.End + 0x0220,
PLAYER_SKILL_LINEID_59 = UnitUpdateFields.End + 0x0221,
PLAYER_SKILL_LINEID_60 = UnitUpdateFields.End + 0x0222,
PLAYER_SKILL_LINEID_61 = UnitUpdateFields.End + 0x0223,
PLAYER_SKILL_LINEID_62 = UnitUpdateFields.End + 0x0224,
PLAYER_SKILL_LINEID_63 = UnitUpdateFields.End + 0x0225,
PLAYER_SKILL_STEP_0 = UnitUpdateFields.End + 0x0226, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_STEP_1 = UnitUpdateFields.End + 0x0227,
PLAYER_SKILL_STEP_2 = UnitUpdateFields.End + 0x0228,
PLAYER_SKILL_STEP_3 = UnitUpdateFields.End + 0x0229,
PLAYER_SKILL_STEP_4 = UnitUpdateFields.End + 0x022A,
PLAYER_SKILL_STEP_5 = UnitUpdateFields.End + 0x022B,
PLAYER_SKILL_STEP_6 = UnitUpdateFields.End + 0x022C,
PLAYER_SKILL_STEP_7 = UnitUpdateFields.End + 0x022D,
PLAYER_SKILL_STEP_8 = UnitUpdateFields.End + 0x022E,
PLAYER_SKILL_STEP_9 = UnitUpdateFields.End + 0x022F,
PLAYER_SKILL_STEP_10 = UnitUpdateFields.End + 0x0230,
PLAYER_SKILL_STEP_11 = UnitUpdateFields.End + 0x0231,
PLAYER_SKILL_STEP_12 = UnitUpdateFields.End + 0x0232,
PLAYER_SKILL_STEP_13 = UnitUpdateFields.End + 0x0233,
PLAYER_SKILL_STEP_14 = UnitUpdateFields.End + 0x0234,
PLAYER_SKILL_STEP_15 = UnitUpdateFields.End + 0x0235,
PLAYER_SKILL_STEP_16 = UnitUpdateFields.End + 0x0236,
PLAYER_SKILL_STEP_17 = UnitUpdateFields.End + 0x0237,
PLAYER_SKILL_STEP_18 = UnitUpdateFields.End + 0x0238,
PLAYER_SKILL_STEP_19 = UnitUpdateFields.End + 0x0239,
PLAYER_SKILL_STEP_20 = UnitUpdateFields.End + 0x023A,
PLAYER_SKILL_STEP_21 = UnitUpdateFields.End + 0x023B,
PLAYER_SKILL_STEP_22 = UnitUpdateFields.End + 0x023C,
PLAYER_SKILL_STEP_23 = UnitUpdateFields.End + 0x023D,
PLAYER_SKILL_STEP_24 = UnitUpdateFields.End + 0x023E,
PLAYER_SKILL_STEP_25 = UnitUpdateFields.End + 0x023F,
PLAYER_SKILL_STEP_26 = UnitUpdateFields.End + 0x0240,
PLAYER_SKILL_STEP_27 = UnitUpdateFields.End + 0x0241,
PLAYER_SKILL_STEP_28 = UnitUpdateFields.End + 0x0242,
PLAYER_SKILL_STEP_29 = UnitUpdateFields.End + 0x0243,
PLAYER_SKILL_STEP_30 = UnitUpdateFields.End + 0x0244,
PLAYER_SKILL_STEP_31 = UnitUpdateFields.End + 0x0245,
PLAYER_SKILL_STEP_32 = UnitUpdateFields.End + 0x0246,
PLAYER_SKILL_STEP_33 = UnitUpdateFields.End + 0x0247,
PLAYER_SKILL_STEP_34 = UnitUpdateFields.End + 0x0248,
PLAYER_SKILL_STEP_35 = UnitUpdateFields.End + 0x0249,
PLAYER_SKILL_STEP_36 = UnitUpdateFields.End + 0x024A,
PLAYER_SKILL_STEP_37 = UnitUpdateFields.End + 0x024B,
PLAYER_SKILL_STEP_38 = UnitUpdateFields.End + 0x024C,
PLAYER_SKILL_STEP_39 = UnitUpdateFields.End + 0x024D,
PLAYER_SKILL_STEP_40 = UnitUpdateFields.End + 0x024E,
PLAYER_SKILL_STEP_41 = UnitUpdateFields.End + 0x024F,
PLAYER_SKILL_STEP_42 = UnitUpdateFields.End + 0x0250,
PLAYER_SKILL_STEP_43 = UnitUpdateFields.End + 0x0251,
PLAYER_SKILL_STEP_44 = UnitUpdateFields.End + 0x0252,
PLAYER_SKILL_STEP_45 = UnitUpdateFields.End + 0x0253,
PLAYER_SKILL_STEP_46 = UnitUpdateFields.End + 0x0254,
PLAYER_SKILL_STEP_47 = UnitUpdateFields.End + 0x0255,
PLAYER_SKILL_STEP_48 = UnitUpdateFields.End + 0x0256,
PLAYER_SKILL_STEP_49 = UnitUpdateFields.End + 0x0257,
PLAYER_SKILL_STEP_50 = UnitUpdateFields.End + 0x0258,
PLAYER_SKILL_STEP_51 = UnitUpdateFields.End + 0x0259,
PLAYER_SKILL_STEP_52 = UnitUpdateFields.End + 0x025A,
PLAYER_SKILL_STEP_53 = UnitUpdateFields.End + 0x025B,
PLAYER_SKILL_STEP_54 = UnitUpdateFields.End + 0x025C,
PLAYER_SKILL_STEP_55 = UnitUpdateFields.End + 0x025D,
PLAYER_SKILL_STEP_56 = UnitUpdateFields.End + 0x025E,
PLAYER_SKILL_STEP_57 = UnitUpdateFields.End + 0x025F,
PLAYER_SKILL_STEP_58 = UnitUpdateFields.End + 0x0260,
PLAYER_SKILL_STEP_59 = UnitUpdateFields.End + 0x0261,
PLAYER_SKILL_STEP_60 = UnitUpdateFields.End + 0x0262,
PLAYER_SKILL_STEP_61 = UnitUpdateFields.End + 0x0263,
PLAYER_SKILL_STEP_62 = UnitUpdateFields.End + 0x0264,
PLAYER_SKILL_STEP_63 = UnitUpdateFields.End + 0x0265,
PLAYER_SKILL_RANK_0 = UnitUpdateFields.End + 0x0266, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_RANK_1 = UnitUpdateFields.End + 0x0267,
PLAYER_SKILL_RANK_2 = UnitUpdateFields.End + 0x0268,
PLAYER_SKILL_RANK_3 = UnitUpdateFields.End + 0x0269,
PLAYER_SKILL_RANK_4 = UnitUpdateFields.End + 0x026A,
PLAYER_SKILL_RANK_5 = UnitUpdateFields.End + 0x026B,
PLAYER_SKILL_RANK_6 = UnitUpdateFields.End + 0x026C,
PLAYER_SKILL_RANK_7 = UnitUpdateFields.End + 0x026D,
PLAYER_SKILL_RANK_8 = UnitUpdateFields.End + 0x026E,
PLAYER_SKILL_RANK_9 = UnitUpdateFields.End + 0x026F,
PLAYER_SKILL_RANK_10 = UnitUpdateFields.End + 0x0270,
PLAYER_SKILL_RANK_11 = UnitUpdateFields.End + 0x0271,
PLAYER_SKILL_RANK_12 = UnitUpdateFields.End + 0x0272,
PLAYER_SKILL_RANK_13 = UnitUpdateFields.End + 0x0273,
PLAYER_SKILL_RANK_14 = UnitUpdateFields.End + 0x0274,
PLAYER_SKILL_RANK_15 = UnitUpdateFields.End + 0x0275,
PLAYER_SKILL_RANK_16 = UnitUpdateFields.End + 0x0276,
PLAYER_SKILL_RANK_17 = UnitUpdateFields.End + 0x0277,
PLAYER_SKILL_RANK_18 = UnitUpdateFields.End + 0x0278,
PLAYER_SKILL_RANK_19 = UnitUpdateFields.End + 0x0279,
PLAYER_SKILL_RANK_20 = UnitUpdateFields.End + 0x027A,
PLAYER_SKILL_RANK_21 = UnitUpdateFields.End + 0x027B,
PLAYER_SKILL_RANK_22 = UnitUpdateFields.End + 0x027C,
PLAYER_SKILL_RANK_23 = UnitUpdateFields.End + 0x027D,
PLAYER_SKILL_RANK_24 = UnitUpdateFields.End + 0x027E,
PLAYER_SKILL_RANK_25 = UnitUpdateFields.End + 0x027F,
PLAYER_SKILL_RANK_26 = UnitUpdateFields.End + 0x0280,
PLAYER_SKILL_RANK_27 = UnitUpdateFields.End + 0x0281,
PLAYER_SKILL_RANK_28 = UnitUpdateFields.End + 0x0282,
PLAYER_SKILL_RANK_29 = UnitUpdateFields.End + 0x0283,
PLAYER_SKILL_RANK_30 = UnitUpdateFields.End + 0x0284,
PLAYER_SKILL_RANK_31 = UnitUpdateFields.End + 0x0285,
PLAYER_SKILL_RANK_32 = UnitUpdateFields.End + 0x0286,
PLAYER_SKILL_RANK_33 = UnitUpdateFields.End + 0x0287,
PLAYER_SKILL_RANK_34 = UnitUpdateFields.End + 0x0288,
PLAYER_SKILL_RANK_35 = UnitUpdateFields.End + 0x0289,
PLAYER_SKILL_RANK_36 = UnitUpdateFields.End + 0x028A,
PLAYER_SKILL_RANK_37 = UnitUpdateFields.End + 0x028B,
PLAYER_SKILL_RANK_38 = UnitUpdateFields.End + 0x028C,
PLAYER_SKILL_RANK_39 = UnitUpdateFields.End + 0x028D,
PLAYER_SKILL_RANK_40 = UnitUpdateFields.End + 0x028E,
PLAYER_SKILL_RANK_41 = UnitUpdateFields.End + 0x028F,
PLAYER_SKILL_RANK_42 = UnitUpdateFields.End + 0x0290,
PLAYER_SKILL_RANK_43 = UnitUpdateFields.End + 0x0291,
PLAYER_SKILL_RANK_44 = UnitUpdateFields.End + 0x0292,
PLAYER_SKILL_RANK_45 = UnitUpdateFields.End + 0x0293,
PLAYER_SKILL_RANK_46 = UnitUpdateFields.End + 0x0294,
PLAYER_SKILL_RANK_47 = UnitUpdateFields.End + 0x0295,
PLAYER_SKILL_RANK_48 = UnitUpdateFields.End + 0x0296,
PLAYER_SKILL_RANK_49 = UnitUpdateFields.End + 0x0297,
PLAYER_SKILL_RANK_50 = UnitUpdateFields.End + 0x0298,
PLAYER_SKILL_RANK_51 = UnitUpdateFields.End + 0x0299,
PLAYER_SKILL_RANK_52 = UnitUpdateFields.End + 0x029A,
PLAYER_SKILL_RANK_53 = UnitUpdateFields.End + 0x029B,
PLAYER_SKILL_RANK_54 = UnitUpdateFields.End + 0x029C,
PLAYER_SKILL_RANK_55 = UnitUpdateFields.End + 0x029D,
PLAYER_SKILL_RANK_56 = UnitUpdateFields.End + 0x029E,
PLAYER_SKILL_RANK_57 = UnitUpdateFields.End + 0x029F,
PLAYER_SKILL_RANK_58 = UnitUpdateFields.End + 0x02A0,
PLAYER_SKILL_RANK_59 = UnitUpdateFields.End + 0x02A1,
PLAYER_SKILL_RANK_60 = UnitUpdateFields.End + 0x02A2,
PLAYER_SKILL_RANK_61 = UnitUpdateFields.End + 0x02A3,
PLAYER_SKILL_RANK_62 = UnitUpdateFields.End + 0x02A4,
PLAYER_SKILL_RANK_63 = UnitUpdateFields.End + 0x02A5,
PLAYER_SKILL_MAX_RANK_0 = UnitUpdateFields.End + 0x02A6, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_MAX_RANK_1 = UnitUpdateFields.End + 0x02A7,
PLAYER_SKILL_MAX_RANK_2 = UnitUpdateFields.End + 0x02A8,
PLAYER_SKILL_MAX_RANK_3 = UnitUpdateFields.End + 0x02A9,
PLAYER_SKILL_MAX_RANK_4 = UnitUpdateFields.End + 0x02AA,
PLAYER_SKILL_MAX_RANK_5 = UnitUpdateFields.End + 0x02AB,
PLAYER_SKILL_MAX_RANK_6 = UnitUpdateFields.End + 0x02AC,
PLAYER_SKILL_MAX_RANK_7 = UnitUpdateFields.End + 0x02AD,
PLAYER_SKILL_MAX_RANK_8 = UnitUpdateFields.End + 0x02AE,
PLAYER_SKILL_MAX_RANK_9 = UnitUpdateFields.End + 0x02AF,
PLAYER_SKILL_MAX_RANK_10 = UnitUpdateFields.End + 0x02B0,
PLAYER_SKILL_MAX_RANK_11 = UnitUpdateFields.End + 0x02B1,
PLAYER_SKILL_MAX_RANK_12 = UnitUpdateFields.End + 0x02B2,
PLAYER_SKILL_MAX_RANK_13 = UnitUpdateFields.End + 0x02B3,
PLAYER_SKILL_MAX_RANK_14 = UnitUpdateFields.End + 0x02B4,
PLAYER_SKILL_MAX_RANK_15 = UnitUpdateFields.End + 0x02B5,
PLAYER_SKILL_MAX_RANK_16 = UnitUpdateFields.End + 0x02B6,
PLAYER_SKILL_MAX_RANK_17 = UnitUpdateFields.End + 0x02B7,
PLAYER_SKILL_MAX_RANK_18 = UnitUpdateFields.End + 0x02B8,
PLAYER_SKILL_MAX_RANK_19 = UnitUpdateFields.End + 0x02B9,
PLAYER_SKILL_MAX_RANK_20 = UnitUpdateFields.End + 0x02BA,
PLAYER_SKILL_MAX_RANK_21 = UnitUpdateFields.End + 0x02BB,
PLAYER_SKILL_MAX_RANK_22 = UnitUpdateFields.End + 0x02BC,
PLAYER_SKILL_MAX_RANK_23 = UnitUpdateFields.End + 0x02BD,
PLAYER_SKILL_MAX_RANK_24 = UnitUpdateFields.End + 0x02BE,
PLAYER_SKILL_MAX_RANK_25 = UnitUpdateFields.End + 0x02BF,
PLAYER_SKILL_MAX_RANK_26 = UnitUpdateFields.End + 0x02C0,
PLAYER_SKILL_MAX_RANK_27 = UnitUpdateFields.End + 0x02C1,
PLAYER_SKILL_MAX_RANK_28 = UnitUpdateFields.End + 0x02C2,
PLAYER_SKILL_MAX_RANK_29 = UnitUpdateFields.End + 0x02C3,
PLAYER_SKILL_MAX_RANK_30 = UnitUpdateFields.End + 0x02C4,
PLAYER_SKILL_MAX_RANK_31 = UnitUpdateFields.End + 0x02C5,
PLAYER_SKILL_MAX_RANK_32 = UnitUpdateFields.End + 0x02C6,
PLAYER_SKILL_MAX_RANK_33 = UnitUpdateFields.End + 0x02C7,
PLAYER_SKILL_MAX_RANK_34 = UnitUpdateFields.End + 0x02C8,
PLAYER_SKILL_MAX_RANK_35 = UnitUpdateFields.End + 0x02C9,
PLAYER_SKILL_MAX_RANK_36 = UnitUpdateFields.End + 0x02CA,
PLAYER_SKILL_MAX_RANK_37 = UnitUpdateFields.End + 0x02CB,
PLAYER_SKILL_MAX_RANK_38 = UnitUpdateFields.End + 0x02CC,
PLAYER_SKILL_MAX_RANK_39 = UnitUpdateFields.End + 0x02CD,
PLAYER_SKILL_MAX_RANK_40 = UnitUpdateFields.End + 0x02CE,
PLAYER_SKILL_MAX_RANK_41 = UnitUpdateFields.End + 0x02CF,
PLAYER_SKILL_MAX_RANK_42 = UnitUpdateFields.End + 0x02D0,
PLAYER_SKILL_MAX_RANK_43 = UnitUpdateFields.End + 0x02D1,
PLAYER_SKILL_MAX_RANK_44 = UnitUpdateFields.End + 0x02D2,
PLAYER_SKILL_MAX_RANK_45 = UnitUpdateFields.End + 0x02D3,
PLAYER_SKILL_MAX_RANK_46 = UnitUpdateFields.End + 0x02D4,
PLAYER_SKILL_MAX_RANK_47 = UnitUpdateFields.End + 0x02D5,
PLAYER_SKILL_MAX_RANK_48 = UnitUpdateFields.End + 0x02D6,
PLAYER_SKILL_MAX_RANK_49 = UnitUpdateFields.End + 0x02D7,
PLAYER_SKILL_MAX_RANK_50 = UnitUpdateFields.End + 0x02D8,
PLAYER_SKILL_MAX_RANK_51 = UnitUpdateFields.End + 0x02D9,
PLAYER_SKILL_MAX_RANK_52 = UnitUpdateFields.End + 0x02DA,
PLAYER_SKILL_MAX_RANK_53 = UnitUpdateFields.End + 0x02DB,
PLAYER_SKILL_MAX_RANK_54 = UnitUpdateFields.End + 0x02DC,
PLAYER_SKILL_MAX_RANK_55 = UnitUpdateFields.End + 0x02DD,
PLAYER_SKILL_MAX_RANK_56 = UnitUpdateFields.End + 0x02DE,
PLAYER_SKILL_MAX_RANK_57 = UnitUpdateFields.End + 0x02DF,
PLAYER_SKILL_MAX_RANK_58 = UnitUpdateFields.End + 0x02E0,
PLAYER_SKILL_MAX_RANK_59 = UnitUpdateFields.End + 0x02E1,
PLAYER_SKILL_MAX_RANK_60 = UnitUpdateFields.End + 0x02E2,
PLAYER_SKILL_MAX_RANK_61 = UnitUpdateFields.End + 0x02E3,
PLAYER_SKILL_MAX_RANK_62 = UnitUpdateFields.End + 0x02E4,
PLAYER_SKILL_MAX_RANK_63 = UnitUpdateFields.End + 0x02E5,
PLAYER_SKILL_MODIFIER_0 = UnitUpdateFields.End + 0x02E6, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_MODIFIER_1 = UnitUpdateFields.End + 0x02E7,
PLAYER_SKILL_MODIFIER_2 = UnitUpdateFields.End + 0x02E8,
PLAYER_SKILL_MODIFIER_3 = UnitUpdateFields.End + 0x02E9,
PLAYER_SKILL_MODIFIER_4 = UnitUpdateFields.End + 0x02EA,
PLAYER_SKILL_MODIFIER_5 = UnitUpdateFields.End + 0x02EB,
PLAYER_SKILL_MODIFIER_6 = UnitUpdateFields.End + 0x02EC,
PLAYER_SKILL_MODIFIER_7 = UnitUpdateFields.End + 0x02ED,
PLAYER_SKILL_MODIFIER_8 = UnitUpdateFields.End + 0x02EE,
PLAYER_SKILL_MODIFIER_9 = UnitUpdateFields.End + 0x02EF,
PLAYER_SKILL_MODIFIER_10 = UnitUpdateFields.End + 0x02F0,
PLAYER_SKILL_MODIFIER_11 = UnitUpdateFields.End + 0x02F1,
PLAYER_SKILL_MODIFIER_12 = UnitUpdateFields.End + 0x02F2,
PLAYER_SKILL_MODIFIER_13 = UnitUpdateFields.End + 0x02F3,
PLAYER_SKILL_MODIFIER_14 = UnitUpdateFields.End + 0x02F4,
PLAYER_SKILL_MODIFIER_15 = UnitUpdateFields.End + 0x02F5,
PLAYER_SKILL_MODIFIER_16 = UnitUpdateFields.End + 0x02F6,
PLAYER_SKILL_MODIFIER_17 = UnitUpdateFields.End + 0x02F7,
PLAYER_SKILL_MODIFIER_18 = UnitUpdateFields.End + 0x02F8,
PLAYER_SKILL_MODIFIER_19 = UnitUpdateFields.End + 0x02F9,
PLAYER_SKILL_MODIFIER_20 = UnitUpdateFields.End + 0x02FA,
PLAYER_SKILL_MODIFIER_21 = UnitUpdateFields.End + 0x02FB,
PLAYER_SKILL_MODIFIER_22 = UnitUpdateFields.End + 0x02FC,
PLAYER_SKILL_MODIFIER_23 = UnitUpdateFields.End + 0x02FD,
PLAYER_SKILL_MODIFIER_24 = UnitUpdateFields.End + 0x02FE,
PLAYER_SKILL_MODIFIER_25 = UnitUpdateFields.End + 0x02FF,
PLAYER_SKILL_MODIFIER_26 = UnitUpdateFields.End + 0x0300,
PLAYER_SKILL_MODIFIER_27 = UnitUpdateFields.End + 0x0301,
PLAYER_SKILL_MODIFIER_28 = UnitUpdateFields.End + 0x0302,
PLAYER_SKILL_MODIFIER_29 = UnitUpdateFields.End + 0x0303,
PLAYER_SKILL_MODIFIER_30 = UnitUpdateFields.End + 0x0304,
PLAYER_SKILL_MODIFIER_31 = UnitUpdateFields.End + 0x0305,
PLAYER_SKILL_MODIFIER_32 = UnitUpdateFields.End + 0x0306,
PLAYER_SKILL_MODIFIER_33 = UnitUpdateFields.End + 0x0307,
PLAYER_SKILL_MODIFIER_34 = UnitUpdateFields.End + 0x0308,
PLAYER_SKILL_MODIFIER_35 = UnitUpdateFields.End + 0x0309,
PLAYER_SKILL_MODIFIER_36 = UnitUpdateFields.End + 0x030A,
PLAYER_SKILL_MODIFIER_37 = UnitUpdateFields.End + 0x030B,
PLAYER_SKILL_MODIFIER_38 = UnitUpdateFields.End + 0x030C,
PLAYER_SKILL_MODIFIER_39 = UnitUpdateFields.End + 0x030D,
PLAYER_SKILL_MODIFIER_40 = UnitUpdateFields.End + 0x030E,
PLAYER_SKILL_MODIFIER_41 = UnitUpdateFields.End + 0x030F,
PLAYER_SKILL_MODIFIER_42 = UnitUpdateFields.End + 0x0310,
PLAYER_SKILL_MODIFIER_43 = UnitUpdateFields.End + 0x0311,
PLAYER_SKILL_MODIFIER_44 = UnitUpdateFields.End + 0x0312,
PLAYER_SKILL_MODIFIER_45 = UnitUpdateFields.End + 0x0313,
PLAYER_SKILL_MODIFIER_46 = UnitUpdateFields.End + 0x0314,
PLAYER_SKILL_MODIFIER_47 = UnitUpdateFields.End + 0x0315,
PLAYER_SKILL_MODIFIER_48 = UnitUpdateFields.End + 0x0316,
PLAYER_SKILL_MODIFIER_49 = UnitUpdateFields.End + 0x0317,
PLAYER_SKILL_MODIFIER_50 = UnitUpdateFields.End + 0x0318,
PLAYER_SKILL_MODIFIER_51 = UnitUpdateFields.End + 0x0319,
PLAYER_SKILL_MODIFIER_52 = UnitUpdateFields.End + 0x031A,
PLAYER_SKILL_MODIFIER_53 = UnitUpdateFields.End + 0x031B,
PLAYER_SKILL_MODIFIER_54 = UnitUpdateFields.End + 0x031C,
PLAYER_SKILL_MODIFIER_55 = UnitUpdateFields.End + 0x031D,
PLAYER_SKILL_MODIFIER_56 = UnitUpdateFields.End + 0x031E,
PLAYER_SKILL_MODIFIER_57 = UnitUpdateFields.End + 0x031F,
PLAYER_SKILL_MODIFIER_58 = UnitUpdateFields.End + 0x0320,
PLAYER_SKILL_MODIFIER_59 = UnitUpdateFields.End + 0x0321,
PLAYER_SKILL_MODIFIER_60 = UnitUpdateFields.End + 0x0322,
PLAYER_SKILL_MODIFIER_61 = UnitUpdateFields.End + 0x0323,
PLAYER_SKILL_MODIFIER_62 = UnitUpdateFields.End + 0x0324,
PLAYER_SKILL_MODIFIER_63 = UnitUpdateFields.End + 0x0325,
PLAYER_SKILL_TALENT_0 = UnitUpdateFields.End + 0x0326, // Size: 64, Type: TwoShort, Flags: Private
PLAYER_SKILL_TALENT_1 = UnitUpdateFields.End + 0x0327,
PLAYER_SKILL_TALENT_2 = UnitUpdateFields.End + 0x0328,
PLAYER_SKILL_TALENT_3 = UnitUpdateFields.End + 0x0329,
PLAYER_SKILL_TALENT_4 = UnitUpdateFields.End + 0x032A,
PLAYER_SKILL_TALENT_5 = UnitUpdateFields.End + 0x032B,
PLAYER_SKILL_TALENT_6 = UnitUpdateFields.End + 0x032C,
PLAYER_SKILL_TALENT_7 = UnitUpdateFields.End + 0x032D,
PLAYER_SKILL_TALENT_8 = UnitUpdateFields.End + 0x032E,
PLAYER_SKILL_TALENT_9 = UnitUpdateFields.End + 0x032F,
PLAYER_SKILL_TALENT_10 = UnitUpdateFields.End + 0x0330,
PLAYER_SKILL_TALENT_11 = UnitUpdateFields.End + 0x0331,
PLAYER_SKILL_TALENT_12 = UnitUpdateFields.End + 0x0332,
PLAYER_SKILL_TALENT_13 = UnitUpdateFields.End + 0x0333,
PLAYER_SKILL_TALENT_14 = UnitUpdateFields.End + 0x0334,
PLAYER_SKILL_TALENT_15 = UnitUpdateFields.End + 0x0335,
PLAYER_SKILL_TALENT_16 = UnitUpdateFields.End + 0x0336,
PLAYER_SKILL_TALENT_17 = UnitUpdateFields.End + 0x0337,
PLAYER_SKILL_TALENT_18 = UnitUpdateFields.End + 0x0338,
PLAYER_SKILL_TALENT_19 = UnitUpdateFields.End + 0x0339,
PLAYER_SKILL_TALENT_20 = UnitUpdateFields.End + 0x033A,
PLAYER_SKILL_TALENT_21 = UnitUpdateFields.End + 0x033B,
PLAYER_SKILL_TALENT_22 = UnitUpdateFields.End + 0x033C,
PLAYER_SKILL_TALENT_23 = UnitUpdateFields.End + 0x033D,
PLAYER_SKILL_TALENT_24 = UnitUpdateFields.End + 0x033E,
PLAYER_SKILL_TALENT_25 = UnitUpdateFields.End + 0x033F,
PLAYER_SKILL_TALENT_26 = UnitUpdateFields.End + 0x0340,
PLAYER_SKILL_TALENT_27 = UnitUpdateFields.End + 0x0341,
PLAYER_SKILL_TALENT_28 = UnitUpdateFields.End + 0x0342,
PLAYER_SKILL_TALENT_29 = UnitUpdateFields.End + 0x0343,
PLAYER_SKILL_TALENT_30 = UnitUpdateFields.End + 0x0344,
PLAYER_SKILL_TALENT_31 = UnitUpdateFields.End + 0x0345,
PLAYER_SKILL_TALENT_32 = UnitUpdateFields.End + 0x0346,
PLAYER_SKILL_TALENT_33 = UnitUpdateFields.End + 0x0347,
PLAYER_SKILL_TALENT_34 = UnitUpdateFields.End + 0x0348,
PLAYER_SKILL_TALENT_35 = UnitUpdateFields.End + 0x0349,
PLAYER_SKILL_TALENT_36 = UnitUpdateFields.End + 0x034A,
PLAYER_SKILL_TALENT_37 = UnitUpdateFields.End + 0x034B,
PLAYER_SKILL_TALENT_38 = UnitUpdateFields.End + 0x034C,
PLAYER_SKILL_TALENT_39 = UnitUpdateFields.End + 0x034D,
PLAYER_SKILL_TALENT_40 = UnitUpdateFields.End + 0x034E,
PLAYER_SKILL_TALENT_41 = UnitUpdateFields.End + 0x034F,
PLAYER_SKILL_TALENT_42 = UnitUpdateFields.End + 0x0350,
PLAYER_SKILL_TALENT_43 = UnitUpdateFields.End + 0x0351,
PLAYER_SKILL_TALENT_44 = UnitUpdateFields.End + 0x0352,
PLAYER_SKILL_TALENT_45 = UnitUpdateFields.End + 0x0353,
PLAYER_SKILL_TALENT_46 = UnitUpdateFields.End + 0x0354,
PLAYER_SKILL_TALENT_47 = UnitUpdateFields.End + 0x0355,
PLAYER_SKILL_TALENT_48 = UnitUpdateFields.End + 0x0356,
PLAYER_SKILL_TALENT_49 = UnitUpdateFields.End + 0x0357,
PLAYER_SKILL_TALENT_50 = UnitUpdateFields.End + 0x0358,
PLAYER_SKILL_TALENT_51 = UnitUpdateFields.End + 0x0359,
PLAYER_SKILL_TALENT_52 = UnitUpdateFields.End + 0x035A,
PLAYER_SKILL_TALENT_53 = UnitUpdateFields.End + 0x035B,
PLAYER_SKILL_TALENT_54 = UnitUpdateFields.End + 0x035C,
PLAYER_SKILL_TALENT_55 = UnitUpdateFields.End + 0x035D,
PLAYER_SKILL_TALENT_56 = UnitUpdateFields.End + 0x035E,
PLAYER_SKILL_TALENT_57 = UnitUpdateFields.End + 0x035F,
PLAYER_SKILL_TALENT_58 = UnitUpdateFields.End + 0x0360,
PLAYER_SKILL_TALENT_59 = UnitUpdateFields.End + 0x0361,
PLAYER_SKILL_TALENT_60 = UnitUpdateFields.End + 0x0362,
PLAYER_SKILL_TALENT_61 = UnitUpdateFields.End + 0x0363,
PLAYER_SKILL_TALENT_62 = UnitUpdateFields.End + 0x0364,
PLAYER_SKILL_TALENT_63 = UnitUpdateFields.End + 0x0365,
PLAYER_CHARACTER_POINTS = UnitUpdateFields.End + 0x0366, // Size: 1, Type: Int, Flags: Private
PLAYER_TRACK_CREATURES = UnitUpdateFields.End + 0x0367, // Size: 1, Type: Int, Flags: Private
PLAYER_TRACK_RESOURCES = UnitUpdateFields.End + 0x0368, // Size: 1, Type: Int, Flags: Private
PLAYER_EXPERTISE = UnitUpdateFields.End + 0x0369, // Size: 1, Type: Int, Flags: Private
PLAYER_OFFHAND_EXPERTISE = UnitUpdateFields.End + 0x036A, // Size: 1, Type: Int, Flags: Private
PLAYER_BLOCK_PERCENTAGE = UnitUpdateFields.End + 0x036B, // Size: 1, Type: Float, Flags: Private
PLAYER_DODGE_PERCENTAGE = UnitUpdateFields.End + 0x036C, // Size: 1, Type: Float, Flags: Private
PLAYER_PARRY_PERCENTAGE = UnitUpdateFields.End + 0x036D, // Size: 1, Type: Float, Flags: Private
PLAYER_CRIT_PERCENTAGE = UnitUpdateFields.End + 0x036E, // Size: 1, Type: Float, Flags: Private
PLAYER_RANGED_CRIT_PERCENTAGE = UnitUpdateFields.End + 0x036F, // Size: 1, Type: Float, Flags: Private
PLAYER_OFFHAND_CRIT_PERCENTAGE = UnitUpdateFields.End + 0x0370, // Size: 1, Type: Float, Flags: Private
PLAYER_SPELL_CRIT_PERCENTAGE1 = UnitUpdateFields.End + 0x0371, // Size: 7, Type: Float, Flags: Private
PLAYER_SPELL_CRIT_PERCENTAGE1_2 = UnitUpdateFields.End + 0x0372,
PLAYER_SPELL_CRIT_PERCENTAGE1_3 = UnitUpdateFields.End + 0x0373,
PLAYER_SPELL_CRIT_PERCENTAGE1_4 = UnitUpdateFields.End + 0x0374,
PLAYER_SPELL_CRIT_PERCENTAGE1_5 = UnitUpdateFields.End + 0x0375,
PLAYER_SPELL_CRIT_PERCENTAGE1_6 = UnitUpdateFields.End + 0x0376,
PLAYER_SPELL_CRIT_PERCENTAGE1_7 = UnitUpdateFields.End + 0x0377,
PLAYER_SHIELD_BLOCK = UnitUpdateFields.End + 0x0378, // Size: 1, Type: Int, Flags: Private
PLAYER_SHIELD_BLOCK_CRIT_PERCENTAGE = UnitUpdateFields.End + 0x0379, // Size: 1, Type: Float, Flags: Private
PLAYER_MASTERY = UnitUpdateFields.End + 0x037A, // Size: 1, Type: Float, Flags: Private
PLAYER_EXPLORED_ZONES_1 = UnitUpdateFields.End + 0x037B, // Size: 156, Type: Bytes, Flags: Private
PLAYER_EXPLORED_ZONES_2 = UnitUpdateFields.End + 0x037C,
PLAYER_EXPLORED_ZONES_3 = UnitUpdateFields.End + 0x037D,
PLAYER_EXPLORED_ZONES_4 = UnitUpdateFields.End + 0x037E,
PLAYER_EXPLORED_ZONES_5 = UnitUpdateFields.End + 0x037F,
PLAYER_EXPLORED_ZONES_6 = UnitUpdateFields.End + 0x0380,
PLAYER_EXPLORED_ZONES_7 = UnitUpdateFields.End + 0x0381,
PLAYER_EXPLORED_ZONES_8 = UnitUpdateFields.End + 0x0382,
PLAYER_EXPLORED_ZONES_9 = UnitUpdateFields.End + 0x0383,
PLAYER_EXPLORED_ZONES_10 = UnitUpdateFields.End + 0x0384,
PLAYER_EXPLORED_ZONES_11 = UnitUpdateFields.End + 0x0385,
PLAYER_EXPLORED_ZONES_12 = UnitUpdateFields.End + 0x0386,
PLAYER_EXPLORED_ZONES_13 = UnitUpdateFields.End + 0x0387,
PLAYER_EXPLORED_ZONES_14 = UnitUpdateFields.End + 0x0388,
PLAYER_EXPLORED_ZONES_15 = UnitUpdateFields.End + 0x0389,
PLAYER_EXPLORED_ZONES_16 = UnitUpdateFields.End + 0x038A,
PLAYER_EXPLORED_ZONES_17 = UnitUpdateFields.End + 0x038B,
PLAYER_EXPLORED_ZONES_18 = UnitUpdateFields.End + 0x038C,
PLAYER_EXPLORED_ZONES_19 = UnitUpdateFields.End + 0x038D,
PLAYER_EXPLORED_ZONES_20 = UnitUpdateFields.End + 0x038E,
PLAYER_EXPLORED_ZONES_21 = UnitUpdateFields.End + 0x038F,
PLAYER_EXPLORED_ZONES_22 = UnitUpdateFields.End + 0x0390,
PLAYER_EXPLORED_ZONES_23 = UnitUpdateFields.End + 0x0391,
PLAYER_EXPLORED_ZONES_24 = UnitUpdateFields.End + 0x0392,
PLAYER_EXPLORED_ZONES_25 = UnitUpdateFields.End + 0x0393,
PLAYER_EXPLORED_ZONES_26 = UnitUpdateFields.End + 0x0394,
PLAYER_EXPLORED_ZONES_27 = UnitUpdateFields.End + 0x0395,
PLAYER_EXPLORED_ZONES_28 = UnitUpdateFields.End + 0x0396,
PLAYER_EXPLORED_ZONES_29 = UnitUpdateFields.End + 0x0397,
PLAYER_EXPLORED_ZONES_30 = UnitUpdateFields.End + 0x0398,
PLAYER_EXPLORED_ZONES_31 = UnitUpdateFields.End + 0x0399,
PLAYER_EXPLORED_ZONES_32 = UnitUpdateFields.End + 0x039A,
PLAYER_EXPLORED_ZONES_33 = UnitUpdateFields.End + 0x039B,
PLAYER_EXPLORED_ZONES_34 = UnitUpdateFields.End + 0x039C,
PLAYER_EXPLORED_ZONES_35 = UnitUpdateFields.End + 0x039D,
PLAYER_EXPLORED_ZONES_36 = UnitUpdateFields.End + 0x039E,
PLAYER_EXPLORED_ZONES_37 = UnitUpdateFields.End + 0x039F,
PLAYER_EXPLORED_ZONES_38 = UnitUpdateFields.End + 0x03A0,
PLAYER_EXPLORED_ZONES_39 = UnitUpdateFields.End + 0x03A1,
PLAYER_EXPLORED_ZONES_40 = UnitUpdateFields.End + 0x03A2,
PLAYER_EXPLORED_ZONES_41 = UnitUpdateFields.End + 0x03A3,
PLAYER_EXPLORED_ZONES_42 = UnitUpdateFields.End + 0x03A4,
PLAYER_EXPLORED_ZONES_43 = UnitUpdateFields.End + 0x03A5,
PLAYER_EXPLORED_ZONES_44 = UnitUpdateFields.End + 0x03A6,
PLAYER_EXPLORED_ZONES_45 = UnitUpdateFields.End + 0x03A7,
PLAYER_EXPLORED_ZONES_46 = UnitUpdateFields.End + 0x03A8,
PLAYER_EXPLORED_ZONES_47 = UnitUpdateFields.End + 0x03A9,
PLAYER_EXPLORED_ZONES_48 = UnitUpdateFields.End + 0x03AA,
PLAYER_EXPLORED_ZONES_49 = UnitUpdateFields.End + 0x03AB,
PLAYER_EXPLORED_ZONES_50 = UnitUpdateFields.End + 0x03AC,
PLAYER_EXPLORED_ZONES_51 = UnitUpdateFields.End + 0x03AD,
PLAYER_EXPLORED_ZONES_52 = UnitUpdateFields.End + 0x03AE,
PLAYER_EXPLORED_ZONES_53 = UnitUpdateFields.End + 0x03AF,
PLAYER_EXPLORED_ZONES_54 = UnitUpdateFields.End + 0x03B0,
PLAYER_EXPLORED_ZONES_55 = UnitUpdateFields.End + 0x03B1,
PLAYER_EXPLORED_ZONES_56 = UnitUpdateFields.End + 0x03B2,
PLAYER_EXPLORED_ZONES_57 = UnitUpdateFields.End + 0x03B3,
PLAYER_EXPLORED_ZONES_58 = UnitUpdateFields.End + 0x03B4,
PLAYER_EXPLORED_ZONES_59 = UnitUpdateFields.End + 0x03B5,
PLAYER_EXPLORED_ZONES_60 = UnitUpdateFields.End + 0x03B6,
PLAYER_EXPLORED_ZONES_61 = UnitUpdateFields.End + 0x03B7,
PLAYER_EXPLORED_ZONES_62 = UnitUpdateFields.End + 0x03B8,
PLAYER_EXPLORED_ZONES_63 = UnitUpdateFields.End + 0x03B9,
PLAYER_EXPLORED_ZONES_64 = UnitUpdateFields.End + 0x03BA,
PLAYER_EXPLORED_ZONES_65 = UnitUpdateFields.End + 0x03BB,
PLAYER_EXPLORED_ZONES_66 = UnitUpdateFields.End + 0x03BC,
PLAYER_EXPLORED_ZONES_67 = UnitUpdateFields.End + 0x03BD,
PLAYER_EXPLORED_ZONES_68 = UnitUpdateFields.End + 0x03BE,
PLAYER_EXPLORED_ZONES_69 = UnitUpdateFields.End + 0x03BF,
PLAYER_EXPLORED_ZONES_70 = UnitUpdateFields.End + 0x03C0,
PLAYER_EXPLORED_ZONES_71 = UnitUpdateFields.End + 0x03C1,
PLAYER_EXPLORED_ZONES_72 = UnitUpdateFields.End + 0x03C2,
PLAYER_EXPLORED_ZONES_73 = UnitUpdateFields.End + 0x03C3,
PLAYER_EXPLORED_ZONES_74 = UnitUpdateFields.End + 0x03C4,
PLAYER_EXPLORED_ZONES_75 = UnitUpdateFields.End + 0x03C5,
PLAYER_EXPLORED_ZONES_76 = UnitUpdateFields.End + 0x03C6,
PLAYER_EXPLORED_ZONES_77 = UnitUpdateFields.End + 0x03C7,
PLAYER_EXPLORED_ZONES_78 = UnitUpdateFields.End + 0x03C8,
PLAYER_EXPLORED_ZONES_79 = UnitUpdateFields.End + 0x03C9,
PLAYER_EXPLORED_ZONES_80 = UnitUpdateFields.End + 0x03CA,
PLAYER_EXPLORED_ZONES_81 = UnitUpdateFields.End + 0x03CB,
PLAYER_EXPLORED_ZONES_82 = UnitUpdateFields.End + 0x03CC,
PLAYER_EXPLORED_ZONES_83 = UnitUpdateFields.End + 0x03CD,
PLAYER_EXPLORED_ZONES_84 = UnitUpdateFields.End + 0x03CE,
PLAYER_EXPLORED_ZONES_85 = UnitUpdateFields.End + 0x03CF,
PLAYER_EXPLORED_ZONES_86 = UnitUpdateFields.End + 0x03D0,
PLAYER_EXPLORED_ZONES_87 = UnitUpdateFields.End + 0x03D1,
PLAYER_EXPLORED_ZONES_88 = UnitUpdateFields.End + 0x03D2,
PLAYER_EXPLORED_ZONES_89 = UnitUpdateFields.End + 0x03D3,
PLAYER_EXPLORED_ZONES_90 = UnitUpdateFields.End + 0x03D4,
PLAYER_EXPLORED_ZONES_91 = UnitUpdateFields.End + 0x03D5,
PLAYER_EXPLORED_ZONES_92 = UnitUpdateFields.End + 0x03D6,
PLAYER_EXPLORED_ZONES_93 = UnitUpdateFields.End + 0x03D7,
PLAYER_EXPLORED_ZONES_94 = UnitUpdateFields.End + 0x03D8,
PLAYER_EXPLORED_ZONES_95 = UnitUpdateFields.End + 0x03D9,
PLAYER_EXPLORED_ZONES_96 = UnitUpdateFields.End + 0x03DA,
PLAYER_EXPLORED_ZONES_97 = UnitUpdateFields.End + 0x03DB,
PLAYER_EXPLORED_ZONES_98 = UnitUpdateFields.End + 0x03DC,
PLAYER_EXPLORED_ZONES_99 = UnitUpdateFields.End + 0x03DD,
PLAYER_EXPLORED_ZONES_100 = UnitUpdateFields.End + 0x03DE,
PLAYER_EXPLORED_ZONES_101 = UnitUpdateFields.End + 0x03DF,
PLAYER_EXPLORED_ZONES_102 = UnitUpdateFields.End + 0x03E0,
PLAYER_EXPLORED_ZONES_103 = UnitUpdateFields.End + 0x03E1,
PLAYER_EXPLORED_ZONES_104 = UnitUpdateFields.End + 0x03E2,
PLAYER_EXPLORED_ZONES_105 = UnitUpdateFields.End + 0x03E3,
PLAYER_EXPLORED_ZONES_106 = UnitUpdateFields.End + 0x03E4,
PLAYER_EXPLORED_ZONES_107 = UnitUpdateFields.End + 0x03E5,
PLAYER_EXPLORED_ZONES_108 = UnitUpdateFields.End + 0x03E6,
PLAYER_EXPLORED_ZONES_109 = UnitUpdateFields.End + 0x03E7,
PLAYER_EXPLORED_ZONES_110 = UnitUpdateFields.End + 0x03E8,
PLAYER_EXPLORED_ZONES_111 = UnitUpdateFields.End + 0x03E9,
PLAYER_EXPLORED_ZONES_112 = UnitUpdateFields.End + 0x03EA,
PLAYER_EXPLORED_ZONES_113 = UnitUpdateFields.End + 0x03EB,
PLAYER_EXPLORED_ZONES_114 = UnitUpdateFields.End + 0x03EC,
PLAYER_EXPLORED_ZONES_115 = UnitUpdateFields.End + 0x03ED,
PLAYER_EXPLORED_ZONES_116 = UnitUpdateFields.End + 0x03EE,
PLAYER_EXPLORED_ZONES_117 = UnitUpdateFields.End + 0x03EF,
PLAYER_EXPLORED_ZONES_118 = UnitUpdateFields.End + 0x03F0,
PLAYER_EXPLORED_ZONES_119 = UnitUpdateFields.End + 0x03F1,
PLAYER_EXPLORED_ZONES_120 = UnitUpdateFields.End + 0x03F2,
PLAYER_EXPLORED_ZONES_121 = UnitUpdateFields.End + 0x03F3,
PLAYER_EXPLORED_ZONES_122 = UnitUpdateFields.End + 0x03F4,
PLAYER_EXPLORED_ZONES_123 = UnitUpdateFields.End + 0x03F5,
PLAYER_EXPLORED_ZONES_124 = UnitUpdateFields.End + 0x03F6,
PLAYER_EXPLORED_ZONES_125 = UnitUpdateFields.End + 0x03F7,
PLAYER_EXPLORED_ZONES_126 = UnitUpdateFields.End + 0x03F8,
PLAYER_EXPLORED_ZONES_127 = UnitUpdateFields.End + 0x03F9,
PLAYER_EXPLORED_ZONES_128 = UnitUpdateFields.End + 0x03FA,
PLAYER_EXPLORED_ZONES_129 = UnitUpdateFields.End + 0x03FB,
PLAYER_EXPLORED_ZONES_130 = UnitUpdateFields.End + 0x03FC,
PLAYER_EXPLORED_ZONES_131 = UnitUpdateFields.End + 0x03FD,
PLAYER_EXPLORED_ZONES_132 = UnitUpdateFields.End + 0x03FE,
PLAYER_EXPLORED_ZONES_133 = UnitUpdateFields.End + 0x03FF,
PLAYER_EXPLORED_ZONES_134 = UnitUpdateFields.End + 0x0400,
PLAYER_EXPLORED_ZONES_135 = UnitUpdateFields.End + 0x0401,
PLAYER_EXPLORED_ZONES_136 = UnitUpdateFields.End + 0x0402,
PLAYER_EXPLORED_ZONES_137 = UnitUpdateFields.End + 0x0403,
PLAYER_EXPLORED_ZONES_138 = UnitUpdateFields.End + 0x0404,
PLAYER_EXPLORED_ZONES_139 = UnitUpdateFields.End + 0x0405,
PLAYER_EXPLORED_ZONES_140 = UnitUpdateFields.End + 0x0406,
PLAYER_EXPLORED_ZONES_141 = UnitUpdateFields.End + 0x0407,
PLAYER_EXPLORED_ZONES_142 = UnitUpdateFields.End + 0x0408,
PLAYER_EXPLORED_ZONES_143 = UnitUpdateFields.End + 0x0409,
PLAYER_EXPLORED_ZONES_144 = UnitUpdateFields.End + 0x040A,
PLAYER_EXPLORED_ZONES_145 = UnitUpdateFields.End + 0x040B,
PLAYER_EXPLORED_ZONES_146 = UnitUpdateFields.End + 0x040C,
PLAYER_EXPLORED_ZONES_147 = UnitUpdateFields.End + 0x040D,
PLAYER_EXPLORED_ZONES_148 = UnitUpdateFields.End + 0x040E,
PLAYER_EXPLORED_ZONES_149 = UnitUpdateFields.End + 0x040F,
PLAYER_EXPLORED_ZONES_150 = UnitUpdateFields.End + 0x0410,
PLAYER_EXPLORED_ZONES_151 = UnitUpdateFields.End + 0x0411,
PLAYER_EXPLORED_ZONES_152 = UnitUpdateFields.End + 0x0412,
PLAYER_EXPLORED_ZONES_153 = UnitUpdateFields.End + 0x0413,
PLAYER_EXPLORED_ZONES_154 = UnitUpdateFields.End + 0x0414,
PLAYER_EXPLORED_ZONES_155 = UnitUpdateFields.End + 0x0415,
PLAYER_EXPLORED_ZONES_156 = UnitUpdateFields.End + 0x0416,
PLAYER_REST_STATE_EXPERIENCE = UnitUpdateFields.End + 0x0417, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_COINAGE = UnitUpdateFields.End + 0x0418, // Size: 2, Type: Long, Flags: Private
PLAYER_FIELD_COINAGE_HIPART = UnitUpdateFields.End + 0x0419,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS = UnitUpdateFields.End + 0x041A, // Size: 7, Type: Int, Flags: Private
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_2 = UnitUpdateFields.End + 0x041B,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_3 = UnitUpdateFields.End + 0x041C,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_4 = UnitUpdateFields.End + 0x041D,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_5 = UnitUpdateFields.End + 0x041E,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_6 = UnitUpdateFields.End + 0x041F,
PLAYER_FIELD_MOD_DAMAGE_DONE_POS_7 = UnitUpdateFields.End + 0x0420,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG = UnitUpdateFields.End + 0x0421, // Size: 7, Type: Int, Flags: Private
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_2 = UnitUpdateFields.End + 0x0422,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_3 = UnitUpdateFields.End + 0x0423,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_4 = UnitUpdateFields.End + 0x0424,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_5 = UnitUpdateFields.End + 0x0425,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_6 = UnitUpdateFields.End + 0x0426,
PLAYER_FIELD_MOD_DAMAGE_DONE_NEG_7 = UnitUpdateFields.End + 0x0427,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT = UnitUpdateFields.End + 0x0428, // Size: 7, Type: Int, Flags: Private
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_2 = UnitUpdateFields.End + 0x0429,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_3 = UnitUpdateFields.End + 0x042A,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_4 = UnitUpdateFields.End + 0x042B,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_5 = UnitUpdateFields.End + 0x042C,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_6 = UnitUpdateFields.End + 0x042D,
PLAYER_FIELD_MOD_DAMAGE_DONE_PCT_7 = UnitUpdateFields.End + 0x042E,
PLAYER_FIELD_MOD_HEALING_DONE_POS = UnitUpdateFields.End + 0x042F, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_MOD_HEALING_PCT = UnitUpdateFields.End + 0x0430, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_MOD_HEALING_DONE_PCT = UnitUpdateFields.End + 0x0431, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS = UnitUpdateFields.End + 0x0432, // Size: 3, Type: Float, Flags: Private
PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS_2 = UnitUpdateFields.End + 0x0433,
PLAYER_FIELD_WEAPON_DMG_MULTIPLIERS_3 = UnitUpdateFields.End + 0x0434,
PLAYER_FIELD_MOD_SPELL_POWER_PCT = UnitUpdateFields.End + 0x0435, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_OVERRIDE_SPELL_POWER_BY_AP_PCT = UnitUpdateFields.End + 0x0436, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_MOD_TARGET_RESISTANCE = UnitUpdateFields.End + 0x0437, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE = UnitUpdateFields.End + 0x0438, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_BYTES = UnitUpdateFields.End + 0x0439, // Size: 1, Type: Bytes, Flags: Private
PLAYER_SELF_RES_SPELL = UnitUpdateFields.End + 0x043A, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_PVP_MEDALS = UnitUpdateFields.End + 0x043B, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_BUYBACK_PRICE_1 = UnitUpdateFields.End + 0x043C, // Size: 12, Type: Int, Flags: Private
PLAYER_FIELD_BUYBACK_PRICE_2 = UnitUpdateFields.End + 0x043D,
PLAYER_FIELD_BUYBACK_PRICE_3 = UnitUpdateFields.End + 0x043E,
PLAYER_FIELD_BUYBACK_PRICE_4 = UnitUpdateFields.End + 0x043F,
PLAYER_FIELD_BUYBACK_PRICE_5 = UnitUpdateFields.End + 0x0440,
PLAYER_FIELD_BUYBACK_PRICE_6 = UnitUpdateFields.End + 0x0441,
PLAYER_FIELD_BUYBACK_PRICE_7 = UnitUpdateFields.End + 0x0442,
PLAYER_FIELD_BUYBACK_PRICE_8 = UnitUpdateFields.End + 0x0443,
PLAYER_FIELD_BUYBACK_PRICE_9 = UnitUpdateFields.End + 0x0444,
PLAYER_FIELD_BUYBACK_PRICE_10 = UnitUpdateFields.End + 0x0445,
PLAYER_FIELD_BUYBACK_PRICE_11 = UnitUpdateFields.End + 0x0446,
PLAYER_FIELD_BUYBACK_PRICE_12 = UnitUpdateFields.End + 0x0447,
PLAYER_FIELD_BUYBACK_TIMESTAMP_1 = UnitUpdateFields.End + 0x0448, // Size: 12, Type: Int, Flags: Private
PLAYER_FIELD_BUYBACK_TIMESTAMP_2 = UnitUpdateFields.End + 0x0449,
PLAYER_FIELD_BUYBACK_TIMESTAMP_3 = UnitUpdateFields.End + 0x044A,
PLAYER_FIELD_BUYBACK_TIMESTAMP_4 = UnitUpdateFields.End + 0x044B,
PLAYER_FIELD_BUYBACK_TIMESTAMP_5 = UnitUpdateFields.End + 0x044C,
PLAYER_FIELD_BUYBACK_TIMESTAMP_6 = UnitUpdateFields.End + 0x044D,
PLAYER_FIELD_BUYBACK_TIMESTAMP_7 = UnitUpdateFields.End + 0x044E,
PLAYER_FIELD_BUYBACK_TIMESTAMP_8 = UnitUpdateFields.End + 0x044F,
PLAYER_FIELD_BUYBACK_TIMESTAMP_9 = UnitUpdateFields.End + 0x0450,
PLAYER_FIELD_BUYBACK_TIMESTAMP_10 = UnitUpdateFields.End + 0x0451,
PLAYER_FIELD_BUYBACK_TIMESTAMP_11 = UnitUpdateFields.End + 0x0452,
PLAYER_FIELD_BUYBACK_TIMESTAMP_12 = UnitUpdateFields.End + 0x0453,
PLAYER_FIELD_KILLS = UnitUpdateFields.End + 0x0454, // Size: 1, Type: TwoShort, Flags: Private
PLAYER_FIELD_LIFETIME_HONORBALE_KILLS = UnitUpdateFields.End + 0x0455, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_BYTES2 = UnitUpdateFields.End + 0x0456, // Size: 1, Type: 6, Flags: Private
PLAYER_FIELD_WATCHED_FACTION_INDEX = UnitUpdateFields.End + 0x0457, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_COMBAT_RATING_1 = UnitUpdateFields.End + 0x0458, // Size: 26, Type: Int, Flags: Private
PLAYER_FIELD_COMBAT_RATING_2 = UnitUpdateFields.End + 0x0459,
PLAYER_FIELD_COMBAT_RATING_3 = UnitUpdateFields.End + 0x045A,
PLAYER_FIELD_COMBAT_RATING_4 = UnitUpdateFields.End + 0x045B,
PLAYER_FIELD_COMBAT_RATING_5 = UnitUpdateFields.End + 0x045C,
PLAYER_FIELD_COMBAT_RATING_6 = UnitUpdateFields.End + 0x045D,
PLAYER_FIELD_COMBAT_RATING_7 = UnitUpdateFields.End + 0x045E,
PLAYER_FIELD_COMBAT_RATING_8 = UnitUpdateFields.End + 0x045F,
PLAYER_FIELD_COMBAT_RATING_9 = UnitUpdateFields.End + 0x0460,
PLAYER_FIELD_COMBAT_RATING_10 = UnitUpdateFields.End + 0x0461,
PLAYER_FIELD_COMBAT_RATING_11 = UnitUpdateFields.End + 0x0462,
PLAYER_FIELD_COMBAT_RATING_12 = UnitUpdateFields.End + 0x0463,
PLAYER_FIELD_COMBAT_RATING_13 = UnitUpdateFields.End + 0x0464,
PLAYER_FIELD_COMBAT_RATING_14 = UnitUpdateFields.End + 0x0465,
PLAYER_FIELD_COMBAT_RATING_15 = UnitUpdateFields.End + 0x0466,
PLAYER_FIELD_COMBAT_RATING_16 = UnitUpdateFields.End + 0x0467,
PLAYER_FIELD_COMBAT_RATING_17 = UnitUpdateFields.End + 0x0468,
PLAYER_FIELD_COMBAT_RATING_18 = UnitUpdateFields.End + 0x0469,
PLAYER_FIELD_COMBAT_RATING_19 = UnitUpdateFields.End + 0x046A,
PLAYER_FIELD_COMBAT_RATING_20 = UnitUpdateFields.End + 0x046B,
PLAYER_FIELD_COMBAT_RATING_21 = UnitUpdateFields.End + 0x046C,
PLAYER_FIELD_COMBAT_RATING_22 = UnitUpdateFields.End + 0x046D,
PLAYER_FIELD_COMBAT_RATING_23 = UnitUpdateFields.End + 0x046E,
PLAYER_FIELD_COMBAT_RATING_24 = UnitUpdateFields.End + 0x046F,
PLAYER_FIELD_COMBAT_RATING_25 = UnitUpdateFields.End + 0x0470,
PLAYER_FIELD_COMBAT_RATING_26 = UnitUpdateFields.End + 0x0471,
PLAYER_FIELD_ARENA_TEAM_INFO_1_1 = UnitUpdateFields.End + 0x0472, // Size: 21, Type: Int, Flags: Private
PLAYER_FIELD_ARENA_TEAM_INFO_1_2 = UnitUpdateFields.End + 0x0473,
PLAYER_FIELD_ARENA_TEAM_INFO_1_3 = UnitUpdateFields.End + 0x0474,
PLAYER_FIELD_ARENA_TEAM_INFO_1_4 = UnitUpdateFields.End + 0x0475,
PLAYER_FIELD_ARENA_TEAM_INFO_1_5 = UnitUpdateFields.End + 0x0476,
PLAYER_FIELD_ARENA_TEAM_INFO_1_6 = UnitUpdateFields.End + 0x0477,
PLAYER_FIELD_ARENA_TEAM_INFO_1_7 = UnitUpdateFields.End + 0x0478,
PLAYER_FIELD_ARENA_TEAM_INFO_1_8 = UnitUpdateFields.End + 0x0479,
PLAYER_FIELD_ARENA_TEAM_INFO_1_9 = UnitUpdateFields.End + 0x047A,
PLAYER_FIELD_ARENA_TEAM_INFO_1_10 = UnitUpdateFields.End + 0x047B,
PLAYER_FIELD_ARENA_TEAM_INFO_1_11 = UnitUpdateFields.End + 0x047C,
PLAYER_FIELD_ARENA_TEAM_INFO_1_12 = UnitUpdateFields.End + 0x047D,
PLAYER_FIELD_ARENA_TEAM_INFO_1_13 = UnitUpdateFields.End + 0x047E,
PLAYER_FIELD_ARENA_TEAM_INFO_1_14 = UnitUpdateFields.End + 0x047F,
PLAYER_FIELD_ARENA_TEAM_INFO_1_15 = UnitUpdateFields.End + 0x0480,
PLAYER_FIELD_ARENA_TEAM_INFO_1_16 = UnitUpdateFields.End + 0x0481,
PLAYER_FIELD_ARENA_TEAM_INFO_1_17 = UnitUpdateFields.End + 0x0482,
PLAYER_FIELD_ARENA_TEAM_INFO_1_18 = UnitUpdateFields.End + 0x0483,
PLAYER_FIELD_ARENA_TEAM_INFO_1_19 = UnitUpdateFields.End + 0x0484,
PLAYER_FIELD_ARENA_TEAM_INFO_1_20 = UnitUpdateFields.End + 0x0485,
PLAYER_FIELD_ARENA_TEAM_INFO_1_21 = UnitUpdateFields.End + 0x0486,
PLAYER_FIELD_BATTLEGROUND_RATING = UnitUpdateFields.End + 0x0487, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_MAX_LEVEL = UnitUpdateFields.End + 0x0488, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_DAILY_QUESTS_1 = UnitUpdateFields.End + 0x0489, // Size: 25, Type: Int, Flags: Private
PLAYER_FIELD_DAILY_QUESTS_2 = UnitUpdateFields.End + 0x048A,
PLAYER_FIELD_DAILY_QUESTS_3 = UnitUpdateFields.End + 0x048B,
PLAYER_FIELD_DAILY_QUESTS_4 = UnitUpdateFields.End + 0x048C,
PLAYER_FIELD_DAILY_QUESTS_5 = UnitUpdateFields.End + 0x048D,
PLAYER_FIELD_DAILY_QUESTS_6 = UnitUpdateFields.End + 0x048E,
PLAYER_FIELD_DAILY_QUESTS_7 = UnitUpdateFields.End + 0x048F,
PLAYER_FIELD_DAILY_QUESTS_8 = UnitUpdateFields.End + 0x0490,
PLAYER_FIELD_DAILY_QUESTS_9 = UnitUpdateFields.End + 0x0491,
PLAYER_FIELD_DAILY_QUESTS_10 = UnitUpdateFields.End + 0x0492,
PLAYER_FIELD_DAILY_QUESTS_11 = UnitUpdateFields.End + 0x0493,
PLAYER_FIELD_DAILY_QUESTS_12 = UnitUpdateFields.End + 0x0494,
PLAYER_FIELD_DAILY_QUESTS_13 = UnitUpdateFields.End + 0x0495,
PLAYER_FIELD_DAILY_QUESTS_14 = UnitUpdateFields.End + 0x0496,
PLAYER_FIELD_DAILY_QUESTS_15 = UnitUpdateFields.End + 0x0497,
PLAYER_FIELD_DAILY_QUESTS_16 = UnitUpdateFields.End + 0x0498,
PLAYER_FIELD_DAILY_QUESTS_17 = UnitUpdateFields.End + 0x0499,
PLAYER_FIELD_DAILY_QUESTS_18 = UnitUpdateFields.End + 0x049A,
PLAYER_FIELD_DAILY_QUESTS_19 = UnitUpdateFields.End + 0x049B,
PLAYER_FIELD_DAILY_QUESTS_20 = UnitUpdateFields.End + 0x049C,
PLAYER_FIELD_DAILY_QUESTS_21 = UnitUpdateFields.End + 0x049D,
PLAYER_FIELD_DAILY_QUESTS_22 = UnitUpdateFields.End + 0x049E,
PLAYER_FIELD_DAILY_QUESTS_23 = UnitUpdateFields.End + 0x049F,
PLAYER_FIELD_DAILY_QUESTS_24 = UnitUpdateFields.End + 0x04A0,
PLAYER_FIELD_DAILY_QUESTS_25 = UnitUpdateFields.End + 0x04A1,
PLAYER_RUNE_REGEN_1 = UnitUpdateFields.End + 0x04A2, // Size: 4, Type: Float, Flags: Private
PLAYER_RUNE_REGEN_2 = UnitUpdateFields.End + 0x04A3,
PLAYER_RUNE_REGEN_3 = UnitUpdateFields.End + 0x04A4,
PLAYER_RUNE_REGEN_4 = UnitUpdateFields.End + 0x04A5,
PLAYER_NO_REAGENT_COST_1 = UnitUpdateFields.End + 0x04A6, // Size: 3, Type: Int, Flags: Private
PLAYER_NO_REAGENT_COST_2 = UnitUpdateFields.End + 0x04A7,
PLAYER_NO_REAGENT_COST_3 = UnitUpdateFields.End + 0x04A8,
PLAYER_FIELD_GLYPH_SLOTS_1 = UnitUpdateFields.End + 0x04A9, // Size: 9, Type: Int, Flags: Private
PLAYER_FIELD_GLYPH_SLOTS_2 = UnitUpdateFields.End + 0x04AA,
PLAYER_FIELD_GLYPH_SLOTS_3 = UnitUpdateFields.End + 0x04AB,
PLAYER_FIELD_GLYPH_SLOTS_4 = UnitUpdateFields.End + 0x04AC,
PLAYER_FIELD_GLYPH_SLOTS_5 = UnitUpdateFields.End + 0x04AD,
PLAYER_FIELD_GLYPH_SLOTS_6 = UnitUpdateFields.End + 0x04AE,
PLAYER_FIELD_GLYPH_SLOTS_7 = UnitUpdateFields.End + 0x04AF,
PLAYER_FIELD_GLYPH_SLOTS_8 = UnitUpdateFields.End + 0x04B0,
PLAYER_FIELD_GLYPH_SLOTS_9 = UnitUpdateFields.End + 0x04B1,
PLAYER_FIELD_GLYPHS_1 = UnitUpdateFields.End + 0x04B2, // Size: 9, Type: Int, Flags: Private
PLAYER_FIELD_GLYPHS_2 = UnitUpdateFields.End + 0x04B3,
PLAYER_FIELD_GLYPHS_3 = UnitUpdateFields.End + 0x04B4,
PLAYER_FIELD_GLYPHS_4 = UnitUpdateFields.End + 0x04B5,
PLAYER_FIELD_GLYPHS_5 = UnitUpdateFields.End + 0x04B6,
PLAYER_FIELD_GLYPHS_6 = UnitUpdateFields.End + 0x04B7,
PLAYER_FIELD_GLYPHS_7 = UnitUpdateFields.End + 0x04B8,
PLAYER_FIELD_GLYPHS_8 = UnitUpdateFields.End + 0x04B9,
PLAYER_FIELD_GLYPHS_9 = UnitUpdateFields.End + 0x04BA,
PLAYER_GLYPHS_ENABLED = UnitUpdateFields.End + 0x04BB, // Size: 1, Type: Int, Flags: Private
PLAYER_PET_SPELL_POWER = UnitUpdateFields.End + 0x04BC, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_RESEARCHING_1 = UnitUpdateFields.End + 0x04BD, // Size: 8, Type: TwoShort, Flags: Private
PLAYER_FIELD_RESEARCHING_2 = UnitUpdateFields.End + 0x04BE,
PLAYER_FIELD_RESEARCHING_3 = UnitUpdateFields.End + 0x04BF,
PLAYER_FIELD_RESEARCHING_4 = UnitUpdateFields.End + 0x04C0,
PLAYER_FIELD_RESEARCHING_5 = UnitUpdateFields.End + 0x04C1,
PLAYER_FIELD_RESEARCHING_6 = UnitUpdateFields.End + 0x04C2,
PLAYER_FIELD_RESEARCHING_7 = UnitUpdateFields.End + 0x04C3,
PLAYER_FIELD_RESEARCHING_8 = UnitUpdateFields.End + 0x04C4,
PLAYER_FIELD_RESERACH_SITE_1 = UnitUpdateFields.End + 0x04C5, // Size: 8, Type: TwoShort, Flags: Private
PLAYER_FIELD_RESERACH_SITE_2 = UnitUpdateFields.End + 0x04C6,
PLAYER_FIELD_RESERACH_SITE_3 = UnitUpdateFields.End + 0x04C7,
PLAYER_FIELD_RESERACH_SITE_4 = UnitUpdateFields.End + 0x04C8,
PLAYER_FIELD_RESERACH_SITE_5 = UnitUpdateFields.End + 0x04C9,
PLAYER_FIELD_RESERACH_SITE_6 = UnitUpdateFields.End + 0x04CA,
PLAYER_FIELD_RESERACH_SITE_7 = UnitUpdateFields.End + 0x04CB,
PLAYER_FIELD_RESERACH_SITE_8 = UnitUpdateFields.End + 0x04CC,
PLAYER_PROFESSION_SKILL_LINE_1 = UnitUpdateFields.End + 0x04CD, // Size: 2, Type: Int, Flags: Private
PLAYER_PROFESSION_SKILL_LINE_2 = UnitUpdateFields.End + 0x04CE,
PLAYER_FIELD_UI_HIT_MODIFIER = UnitUpdateFields.End + 0x04CF, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_UI_SPELL_HIT_MODIFIER = UnitUpdateFields.End + 0x04D0, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_HOME_REALM_TIME_OFFSET = UnitUpdateFields.End + 0x04D1, // Size: 1, Type: Int, Flags: Private
PLAYER_FIELD_MOD_HASTE = UnitUpdateFields.End + 0x04D2, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_MOD_RANGED_HASTE = UnitUpdateFields.End + 0x04D3, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_MOD_PET_HASTE = UnitUpdateFields.End + 0x04D4, // Size: 1, Type: Float, Flags: Private
PLAYER_FIELD_MOD_HASTE_REGEN = UnitUpdateFields.End + 0x04D5, // Size: 1, Type: Float, Flags: Private
End = UnitUpdateFields.End + 0x04D6
}
public partial class UpdateFields
{
private static UpdateField<GameObjectUpdateFields>[] _GameObjectUpdateFields = new UpdateField<GameObjectUpdateFields>[]
{
new UpdateField<GameObjectUpdateFields>(4, 1, GameObjectUpdateFields.OBJECT_FIELD_CREATED_BY),
new UpdateField<GameObjectUpdateFields>(4, 1, GameObjectUpdateFields.OBJECT_FIELD_CREATED_BY_HIPART),
new UpdateField<GameObjectUpdateFields>(1, 1, GameObjectUpdateFields.GAMEOBJECT_DISPLAYID),
new UpdateField<GameObjectUpdateFields>(1, 1, GameObjectUpdateFields.GAMEOBJECT_FLAGS),
new UpdateField<GameObjectUpdateFields>(3, 1, GameObjectUpdateFields.GAMEOBJECT_PARENTROTATION),
new UpdateField<GameObjectUpdateFields>(3, 1, GameObjectUpdateFields.GAMEOBJECT_PARENTROTATION_2),
new UpdateField<GameObjectUpdateFields>(3, 1, GameObjectUpdateFields.GAMEOBJECT_PARENTROTATION_3),
new UpdateField<GameObjectUpdateFields>(3, 1, GameObjectUpdateFields.GAMEOBJECT_PARENTROTATION_4),
new UpdateField<GameObjectUpdateFields>(2, 128, GameObjectUpdateFields.GAMEOBJECT_DYNAMIC),
new UpdateField<GameObjectUpdateFields>(1, 1, GameObjectUpdateFields.GAMEOBJECT_FACTION),
new UpdateField<GameObjectUpdateFields>(1, 1, GameObjectUpdateFields.GAMEOBJECT_LEVEL),
new UpdateField<GameObjectUpdateFields>(5, 1, GameObjectUpdateFields.GAMEOBJECT_BYTES_1),
};
public static UpdateField<GameObjectUpdateFields> GetUpdateField(GameObjectUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)GameObjectUpdateFields.End)
return UpdateField.CreateUnknown<GameObjectUpdateFields>(uf);
return _GameObjectUpdateFields[index];
}
}
public enum GameObjectUpdateFields : uint
{
OBJECT_FIELD_CREATED_BY = ObjectUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
OBJECT_FIELD_CREATED_BY_HIPART = ObjectUpdateFields.End + 0x0001,
GAMEOBJECT_DISPLAYID = ObjectUpdateFields.End + 0x0002, // Size: 1, Type: Int, Flags: Public
GAMEOBJECT_FLAGS = ObjectUpdateFields.End + 0x0003, // Size: 1, Type: Int, Flags: Public
GAMEOBJECT_PARENTROTATION = ObjectUpdateFields.End + 0x0004, // Size: 4, Type: Float, Flags: Public
GAMEOBJECT_PARENTROTATION_2 = ObjectUpdateFields.End + 0x0005,
GAMEOBJECT_PARENTROTATION_3 = ObjectUpdateFields.End + 0x0006,
GAMEOBJECT_PARENTROTATION_4 = ObjectUpdateFields.End + 0x0007,
GAMEOBJECT_DYNAMIC = ObjectUpdateFields.End + 0x0008, // Size: 1, Type: TwoShort, Flags: Unk4
GAMEOBJECT_FACTION = ObjectUpdateFields.End + 0x0009, // Size: 1, Type: Int, Flags: Public
GAMEOBJECT_LEVEL = ObjectUpdateFields.End + 0x000A, // Size: 1, Type: Int, Flags: Public
GAMEOBJECT_BYTES_1 = ObjectUpdateFields.End + 0x000B, // Size: 1, Type: Bytes, Flags: Public
End = ObjectUpdateFields.End + 0x000C
}
public partial class UpdateFields
{
private static UpdateField<DynamicObjectUpdateFields>[] _DynamicObjectUpdateFields = new UpdateField<DynamicObjectUpdateFields>[]
{
new UpdateField<DynamicObjectUpdateFields>(4, 1, DynamicObjectUpdateFields.DYNAMICOBJECT_CASTER),
new UpdateField<DynamicObjectUpdateFields>(4, 1, DynamicObjectUpdateFields.DYNAMICOBJECT_CASTER_HIPART),
new UpdateField<DynamicObjectUpdateFields>(1, 128, DynamicObjectUpdateFields.DYNAMICOBJECT_BYTES),
new UpdateField<DynamicObjectUpdateFields>(1, 1, DynamicObjectUpdateFields.DYNAMICOBJECT_SPELLID),
new UpdateField<DynamicObjectUpdateFields>(3, 1, DynamicObjectUpdateFields.DYNAMICOBJECT_RADIUS),
new UpdateField<DynamicObjectUpdateFields>(1, 1, DynamicObjectUpdateFields.DYNAMICOBJECT_CASTTIME),
};
public static UpdateField<DynamicObjectUpdateFields> GetUpdateField(DynamicObjectUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)DynamicObjectUpdateFields.End)
return UpdateField.CreateUnknown<DynamicObjectUpdateFields>(uf);
return _DynamicObjectUpdateFields[index];
}
}
public enum DynamicObjectUpdateFields : uint
{
DYNAMICOBJECT_CASTER = ObjectUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
DYNAMICOBJECT_CASTER_HIPART = ObjectUpdateFields.End + 0x0001,
DYNAMICOBJECT_BYTES = ObjectUpdateFields.End + 0x0002, // Size: 1, Type: Int, Flags: Unk4
DYNAMICOBJECT_SPELLID = ObjectUpdateFields.End + 0x0003, // Size: 1, Type: Int, Flags: Public
DYNAMICOBJECT_RADIUS = ObjectUpdateFields.End + 0x0004, // Size: 1, Type: Float, Flags: Public
DYNAMICOBJECT_CASTTIME = ObjectUpdateFields.End + 0x0005, // Size: 1, Type: Int, Flags: Public
End = ObjectUpdateFields.End + 0x0006
}
public partial class UpdateFields
{
private static UpdateField<CorpseUpdateFields>[] _CorpseUpdateFields = new UpdateField<CorpseUpdateFields>[]
{
new UpdateField<CorpseUpdateFields>(4, 1, CorpseUpdateFields.CORPSE_FIELD_OWNER),
new UpdateField<CorpseUpdateFields>(4, 1, CorpseUpdateFields.CORPSE_FIELD_OWNER_HIPART),
new UpdateField<CorpseUpdateFields>(4, 1, CorpseUpdateFields.CORPSE_FIELD_PARTY),
new UpdateField<CorpseUpdateFields>(4, 1, CorpseUpdateFields.CORPSE_FIELD_PARTY_HIPART),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_DISPLAY_ID),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_2),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_3),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_4),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_5),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_6),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_7),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_8),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_9),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_10),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_11),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_12),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_13),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_14),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_15),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_16),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_17),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_18),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_ITEM_19),
new UpdateField<CorpseUpdateFields>(5, 1, CorpseUpdateFields.CORPSE_FIELD_BYTES_1),
new UpdateField<CorpseUpdateFields>(5, 1, CorpseUpdateFields.CORPSE_FIELD_BYTES_2),
new UpdateField<CorpseUpdateFields>(1, 1, CorpseUpdateFields.CORPSE_FIELD_FLAGS),
new UpdateField<CorpseUpdateFields>(1, 128, CorpseUpdateFields.CORPSE_FIELD_DYNAMIC_FLAGS),
};
public static UpdateField<CorpseUpdateFields> GetUpdateField(CorpseUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)CorpseUpdateFields.End)
return UpdateField.CreateUnknown<CorpseUpdateFields>(uf);
return _CorpseUpdateFields[index];
}
}
public enum CorpseUpdateFields : uint
{
CORPSE_FIELD_OWNER = ObjectUpdateFields.End + 0x0000, // Size: 2, Type: Long, Flags: Public
CORPSE_FIELD_OWNER_HIPART = ObjectUpdateFields.End + 0x0001,
CORPSE_FIELD_PARTY = ObjectUpdateFields.End + 0x0002, // Size: 2, Type: Long, Flags: Public
CORPSE_FIELD_PARTY_HIPART = ObjectUpdateFields.End + 0x0003,
CORPSE_FIELD_DISPLAY_ID = ObjectUpdateFields.End + 0x0004, // Size: 1, Type: Int, Flags: Public
CORPSE_FIELD_ITEM = ObjectUpdateFields.End + 0x0005, // Size: 19, Type: Int, Flags: Public
CORPSE_FIELD_ITEM_2 = ObjectUpdateFields.End + 0x0006,
CORPSE_FIELD_ITEM_3 = ObjectUpdateFields.End + 0x0007,
CORPSE_FIELD_ITEM_4 = ObjectUpdateFields.End + 0x0008,
CORPSE_FIELD_ITEM_5 = ObjectUpdateFields.End + 0x0009,
CORPSE_FIELD_ITEM_6 = ObjectUpdateFields.End + 0x000A,
CORPSE_FIELD_ITEM_7 = ObjectUpdateFields.End + 0x000B,
CORPSE_FIELD_ITEM_8 = ObjectUpdateFields.End + 0x000C,
CORPSE_FIELD_ITEM_9 = ObjectUpdateFields.End + 0x000D,
CORPSE_FIELD_ITEM_10 = ObjectUpdateFields.End + 0x000E,
CORPSE_FIELD_ITEM_11 = ObjectUpdateFields.End + 0x000F,
CORPSE_FIELD_ITEM_12 = ObjectUpdateFields.End + 0x0010,
CORPSE_FIELD_ITEM_13 = ObjectUpdateFields.End + 0x0011,
CORPSE_FIELD_ITEM_14 = ObjectUpdateFields.End + 0x0012,
CORPSE_FIELD_ITEM_15 = ObjectUpdateFields.End + 0x0013,
CORPSE_FIELD_ITEM_16 = ObjectUpdateFields.End + 0x0014,
CORPSE_FIELD_ITEM_17 = ObjectUpdateFields.End + 0x0015,
CORPSE_FIELD_ITEM_18 = ObjectUpdateFields.End + 0x0016,
CORPSE_FIELD_ITEM_19 = ObjectUpdateFields.End + 0x0017,
CORPSE_FIELD_BYTES_1 = ObjectUpdateFields.End + 0x0018, // Size: 1, Type: Bytes, Flags: Public
CORPSE_FIELD_BYTES_2 = ObjectUpdateFields.End + 0x0019, // Size: 1, Type: Bytes, Flags: Public
CORPSE_FIELD_FLAGS = ObjectUpdateFields.End + 0x001A, // Size: 1, Type: Int, Flags: Public
CORPSE_FIELD_DYNAMIC_FLAGS = ObjectUpdateFields.End + 0x001B, // Size: 1, Type: Int, Flags: Unk4
End = ObjectUpdateFields.End + 0x001C
}
public partial class UpdateFields
{
private static UpdateField<AreaTriggerUpdateFields>[] _AreaTriggerUpdateFields = new UpdateField<AreaTriggerUpdateFields>[]
{
new UpdateField<AreaTriggerUpdateFields>(1, 1, AreaTriggerUpdateFields.AREATRIGGER_SPELLID),
new UpdateField<AreaTriggerUpdateFields>(1, 1, AreaTriggerUpdateFields.AREATRIGGER_SPELLVISUALID),
new UpdateField<AreaTriggerUpdateFields>(1, 1, AreaTriggerUpdateFields.AREATRIGGER_DURATION),
new UpdateField<AreaTriggerUpdateFields>(3, 1, AreaTriggerUpdateFields.AREATRIGGER_FINAL_POS),
new UpdateField<AreaTriggerUpdateFields>(3, 1, AreaTriggerUpdateFields.AREATRIGGER_FINAL_POS_2),
new UpdateField<AreaTriggerUpdateFields>(3, 1, AreaTriggerUpdateFields.AREATRIGGER_FINAL_POS_3),
};
public static UpdateField<AreaTriggerUpdateFields> GetUpdateField(AreaTriggerUpdateFields uf)
{
uint index = (uint)uf - (uint)ObjectUpdateFields.End;
if (index >= (uint)AreaTriggerUpdateFields.End)
return UpdateField.CreateUnknown<AreaTriggerUpdateFields>(uf);
return _AreaTriggerUpdateFields[index];
}
}
public enum AreaTriggerUpdateFields : uint
{
AREATRIGGER_SPELLID = ObjectUpdateFields.End + 0x0000, // Size: 1, Type: Int, Flags: Public
AREATRIGGER_SPELLVISUALID = ObjectUpdateFields.End + 0x0001, // Size: 1, Type: Int, Flags: Public
AREATRIGGER_DURATION = ObjectUpdateFields.End + 0x0002, // Size: 1, Type: Int, Flags: Public
AREATRIGGER_FINAL_POS = ObjectUpdateFields.End + 0x0003, // Size: 3, Type: Float, Flags: Public
AREATRIGGER_FINAL_POS_2 = ObjectUpdateFields.End + 0x0004,
AREATRIGGER_FINAL_POS_3 = ObjectUpdateFields.End + 0x0005,
End = ObjectUpdateFields.End + 0x0006
}
}
| LordJZ/Kamilla.Wow | Kamilla.Network.Protocols.Wow/Game/UpdateFields.Generated.cs | C# | gpl-3.0 | 347,185 |
/**
*
*/
package mac.lista;
import static org.junit.Assert.*;
import org.junit.Test;
/**
* @author T420
*
*/
public class ListaTest {
@Test
public void test() {
Lista s = new Lista(9);
piszLn(s.dodajElement(0));
s.dodajElement(1);
s.dodajElement(2);
s.dodajElement(3);
s.dodajElement(4);
s.pish();
s.dodajElement(5);
s.dodajElement(6);
s.dodajElement(7);
piszLn(s.dodajElement(8));
s.pish();
piszLn(s.dodajElement(9));
s.usunPierwszy(4);
s.pish();
piszLn(s.dodajElement(1));
s.pish();
s.usunPowtorzenia();
s.pish();
assertEquals("msg", "", "");
}
private void piszLn(String s){
System.out.println(s);
}
}
| michaldurski/mac-lista | mac/src/mac/lista/ListaTest.java | Java | gpl-3.0 | 716 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.